{"diffoscope-json-version": 1, "source1": "/srv/reproducible-results/rbuild-debian/r-b-build.wOCnGPgG/b1/gsoap_2.8.104-3_amd64.changes", "source2": "/srv/reproducible-results/rbuild-debian/r-b-build.wOCnGPgG/b2/gsoap_2.8.104-3_amd64.changes", "unified_diff": null, "details": [{"source1": "Files", "source2": "Files", "unified_diff": "@@ -1,7 +1,7 @@\n \n 7ceb18b9438c958b0ec4730f9bd18d25 6280996 debug optional gsoap-dbgsym_2.8.104-3_amd64.deb\n- 323ab2e51972877d1a9428035a8360db 12593192 doc optional gsoap-doc_2.8.104-3_all.deb\n+ 37fd14865ec89c6f6c1ee814a5ed1f5b 12593252 doc optional gsoap-doc_2.8.104-3_all.deb\n 4620210cc927e4603d5505209278052b 1480532 devel optional gsoap_2.8.104-3_amd64.deb\n 0684d113c326584f3d6db61342292116 1626352 debug optional libgsoap-2.8.104-dbgsym_2.8.104-3_amd64.deb\n 37e97ebba2ee4174ea1b1b1444c61a7f 283524 libs optional libgsoap-2.8.104_2.8.104-3_amd64.deb\n b6cf67a1787cdf02eaa11f2dbf928858 290536 libdevel optional libgsoap-dev_2.8.104-3_amd64.deb\n"}, {"source1": "gsoap-doc_2.8.104-3_all.deb", "source2": "gsoap-doc_2.8.104-3_all.deb", "unified_diff": null, "details": [{"source1": "file list", "source2": "file list", "unified_diff": "@@ -1,3 +1,3 @@\n -rw-r--r-- 0 0 0 4 2021-03-08 13:06:23.000000 debian-binary\n--rw-r--r-- 0 0 0 46976 2021-03-08 13:06:23.000000 control.tar.xz\n--rw-r--r-- 0 0 0 12546024 2021-03-08 13:06:23.000000 data.tar.xz\n+-rw-r--r-- 0 0 0 46980 2021-03-08 13:06:23.000000 control.tar.xz\n+-rw-r--r-- 0 0 0 12546080 2021-03-08 13:06:23.000000 data.tar.xz\n"}, {"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) 1834605 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) 1834598 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,27 +56951,27 @@\n 000de760: 6c69 7374 3c2f 7370 616e 3e20 3c73 7061 list id="1&\n 000de7b0: 7175 6f74 3b3c 2f73 7061 6e3e 3c73 7061 quot;.......
....|U.....U
.
....|U<\n+000de850: 6c69 7465 7261 6c22 3eb0 c08b f7f3 553c literal\">.....U<\n 000de860: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.<\n 000de880: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-000de890: 6e67 6c69 7465 7261 6c22 3e80 e019 fc7c ngliteral\">....|\n+000de890: 6e67 6c69 7465 7261 6c22 3eb0 c08b f7f3 ngliteral\">.....\n 000de8a0: 553c 2f73 7061 6e3e 3c2f 6469 763e 0a3c U.<\n 000de8b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n 000de8c0: 3e3c 7370 616e 2063 6c61 7373 3d22 7374 > \n 000de8e0: 2026 6c74 3b6e 6578 7420 6872 6566 3d26 <next href=&\n 000de8f0: 7175 6f74 3b3c 2f73 7061 6e3e 2331 2671 quot;#1&q\n 000de900: 756f 743b 2f26 6774 3b20 3c2f 6469 763e uot;/> \n@@ -57253,57411 +57253,57411 @@\n 000dfa40: 763e 0a3c 6469 7620 636c 6173 733d 226c v>.
<q ref=<\n 000dfaa0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-000dfab0: 6e67 6c69 7465 7261 6c22 3ec0 2726 2378 ngliteral\">.'&#x\n-000dfac0: 3234 3139 3bfc 0055 3c2f 7370 616e 3e3c 2419;..U<\n-000dfad0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
<r id=&\n-000dfb10: 7175 6f74 3b3c 2f73 7061 6e3e 313c 7370 quot;1" \n-000dfb40: 7873 693a 6e69 6c3d 2671 756f 743b 3c2f xsi:nil="true<\n-000dfb70: 2f73 7061 6e3e 2671 756f 743b 2f26 6774 /span>"/>\n-000dfb80: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
</<\n-000dfba0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000dfbb0: 6f72 6474 7970 6522 3e58 3c2f 7370 616e ordtype\">X>
.

The\n-000dfbf0: 2064 6573 6572 6961 6c69 7a65 7220 7265 deserializer re\n-000dfc00: 636f 6e73 7472 7563 7473 2074 6865 2073 constructs the s\n-000dfc10: 7472 7563 7420 3c63 6f64 653e 583c 2f63 truct X from this f\n-000dfc30: 6f72 6d20 6f66 2058 4d4c 2c20 7468 6572 orm of XML, ther\n-000dfc40: 6562 7920 7072 6573 6572 7669 6e67 2074 eby preserving t\n-000dfc50: 6865 2069 6e74 6567 7269 7479 206f 6620 he integrity of \n-000dfc60: 7468 6520 6461 7461 2073 7472 7563 7475 the data structu\n-000dfc70: 7265 2073 6572 6961 6c69 7a65 642e 3c2f re serialized..

When the d\n-000dfc90: 6573 6572 6961 6c69 7a65 7220 656e 636f eserializer enco\n-000dfca0: 756e 7465 7273 2061 6e20 584d 4c20 656c unters an XML el\n-000dfcb0: 656d 656e 7420 7468 6174 2068 6173 2061 ement that has a\n-000dfcc0: 203c 656d 3e3c 636f 6465 3e78 7369 3a6e xsi:n\n-000dfcd0: 696c 3d22 7472 7565 223c 2f63 6f64 653e il=\"true\"\n-000dfce0: 3c2f 656d 3e20 6174 7472 6962 7574 6520 attribute \n-000dfcf0: 6275 7420 7468 6520 636f 7272 6573 706f but the correspo\n-000dfd00: 6e64 696e 6720 432f 432b 2b20 6461 7461 nding C/C++ data\n-000dfd10: 2069 7320 6e6f 7420 6120 706f 696e 7465 is not a pointe\n-000dfd20: 7220 6f72 2072 6566 6572 656e 6365 2c20 r or reference, \n-000dfd30: 7468 6520 6465 7365 7269 616c 697a 6572 the deserializer\n-000dfd40: 2077 696c 6c20 7465 726d 696e 6174 6520 will terminate \n-000dfd50: 7769 7468 2061 203c 636f 6465 3e23 534f with a #SO\n-000dfd60: 4150 5f4e 554c 4c3c 2f63 6f64 653e 2066 AP_NULL f\n-000dfd70: 6175 6c74 2077 6865 6e20 7468 6520 3c63 ault when the #SOAP_XML_ST\n-000dfd90: 5249 4354 3c2f 636f 6465 3e20 666c 6167 RICT flag\n-000dfda0: 2069 7320 7365 742e 3c2f 703e 0a3c 703e is set.

.

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

.Void poi\n-000dfe10: 6e74 6572 2073 6572 6961 6c69 7a61 7469 nter serializati\n-000dfe20: 6f6e 3c2f 6832 3e0a 3c70 3e56 6f69 6420 on

.

Void \n-000dfe30: 706f 696e 7465 7273 2028 3c63 6f64 653e pointers (\n-000dfe40: 766f 6964 2a3c 2f63 6f64 653e 2920 6361 void*) ca\n-000dfe50: 6e6e 6f74 2062 6520 7365 7269 616c 697a nnot be serializ\n-000dfe60: 6564 2069 6e20 584d 4c20 6265 6361 7573 ed in XML becaus\n-000dfe70: 6520 7468 6520 7479 7065 206f 6620 6461 e the type of da\n-000dfe80: 7461 2072 6566 6572 7265 6420 746f 2069 ta referred to i\n-000dfe90: 7320 756e 7479 7065 642e 2054 6f20 656e s untyped. To en\n-000dfea0: 6162 6c65 2074 6865 2073 6572 6961 6c69 able the seriali\n-000dfeb0: 7a61 7469 6f6e 206f 6620 766f 6964 2070 zation of void p\n-000dfec0: 6f69 6e74 6572 7320 7468 6174 2061 7265 ointers that are\n-000dfed0: 206d 656d 6265 7273 206f 6620 7374 7275 members of stru\n-000dfee0: 6374 7320 616e 6420 636c 6173 7365 732c cts and classes,\n-000dfef0: 2079 6f75 2063 616e 2069 6e73 6572 7420 you can insert \n-000dff00: 6120 3c63 6f64 653e 696e 7420 5f5f 7479 a int __ty\n-000dff10: 7065 3c2f 636f 6465 3e20 6d65 6d62 6572 pe member\n-000dff20: 2072 6967 6874 2062 6566 6f72 6520 7468 right before th\n-000dff30: 6520 766f 6964 2070 6f69 6e74 6572 206d e void pointer m\n-000dff40: 656d 6265 722e 2054 6865 203c 636f 6465 ember. The int __type member contai\n-000dff70: 6e73 2072 756e 2074 696d 6520 696e 666f ns run time info\n-000dff80: 726d 6174 696f 6e20 6f6e 2074 6865 2074 rmation on the t\n-000dff90: 7970 6520 6f66 2074 6865 2064 6174 6120 ype of the data \n-000dffa0: 706f 696e 7465 6420 746f 2062 7920 3c63 pointed to by void*\n-000dffc0: 206d 656d 6265 7220 696e 2061 2073 7472 member in a str\n-000dffd0: 7563 742f 636c 6173 7320 746f 2065 6e61 uct/class to ena\n-000dffe0: 626c 6520 7468 6520 7365 7269 616c 697a ble the serializ\n-000dfff0: 6174 696f 6e20 6f66 2074 6869 7320 6461 ation of this da\n-000e0000: 7461 2e20 5468 6520 3c63 6f64 653e 696e ta. The in\n-000e0010: 7420 5f5f 7479 7065 3c2f 636f 6465 3e20 t __type \n-000e0020: 6d65 6d62 6572 2069 7320 7365 7420 746f member is set to\n-000e0030: 2061 203c 636f 6465 3e53 4f41 505f 5459 a SOAP_TY\n-000e0040: 5045 5f54 3c2f 636f 6465 3e20 7661 6c75 PE_T valu\n-000e0050: 652c 2077 6865 7265 203c 636f 6465 3e54 e, where T\n-000e0060: 3c2f 636f 6465 3e20 6973 2074 6865 206e is the n\n-000e0070: 616d 6520 6f66 2061 2074 7970 652e 2054 ame of a type. T\n-000e0080: 6865 2073 6f61 7063 7070 3220 746f 6f6c he soapcpp2 tool\n-000e0090: 2067 656e 6572 6174 6573 2074 6865 203c generates the <\n-000e00a0: 636f 6465 3e53 4f41 505f 5459 5045 5f54 code>SOAP_TYPE_T\n-000e00b0: 3c2f 636f 6465 3e20 6465 6669 6e69 7469 definiti\n-000e00c0: 6f6e 7320 696e 203c 656d 3e3c 636f 6465 ons in soapH.h<\n-000e00e0: 2f65 6d3e 2061 6e64 2075 7365 7320 7468 /em> and uses th\n-000e00f0: 656d 2069 6e74 6572 6e61 6c6c 7920 746f em internally to\n-000e0100: 2075 6e69 7175 656c 7920 6964 656e 7469 uniquely identi\n-000e0110: 6679 2074 6865 2074 7970 6520 6f66 2065 fy the type of e\n-000e0120: 6163 6820 6f62 6a65 6374 2e20 5468 6520 ach object. The \n-000e0130: 7479 7065 206e 616d 696e 6720 636f 6e76 type naming conv\n-000e0140: 656e 7469 6f6e 7320 6f75 746c 696e 6564 entions outlined\n-000e0150: 2069 6e20 5365 6374 696f 6e20 3c61 2063 in Section Serializin\n-000e0190: 6720 432f 432b 2b20 6461 7461 2074 6f20 g C/C++ data to \n-000e01a0: 584d 4c3c 2f61 3e20 6172 6520 7573 6564 XML are used\n-000e01b0: 2074 6f20 6465 7465 726d 696e 6520 7468 to determine th\n-000e01c0: 6520 7479 7065 206e 616d 6520 666f 7220 e type name for \n-000e01d0: 3c63 6f64 653e 543c 2f63 6f64 653e 2e20 T. \n-000e01e0: 5661 6c75 6573 2073 6572 6961 6c69 7a65 Values serialize\n-000e01f0: 6420 696e 2058 4d4c 2077 6974 6820 7468 d in XML with th\n-000e0200: 6973 2061 7070 726f 6163 6820 616c 7761 is approach alwa\n-000e0210: 7973 2063 6172 7279 2074 6865 203c 656d ys carry the xsi:type<\n-000e0230: 2f63 6f64 653e 3c2f 656d 3e20 6174 7472 /code> attr\n-000e0240: 6962 7574 6520 696e 2058 4d4c 2074 6f20 ibute in XML to \n-000e0250: 696e 6469 6361 7465 2074 6865 2074 7970 indicate the typ\n-000e0260: 6520 6f66 2063 6f6e 7465 6e74 2073 6572 e of content ser\n-000e0270: 6961 6c69 7a65 642e 3c2f 703e 0a3c 703e ialized.

.

\n-000e0280: 4865 7265 2069 7320 616e 2065 7861 6d70 Here is an examp\n-000e0290: 6c65 2074 6f20 696c 6c75 7374 7261 7465 le to illustrate\n-000e02a0: 2074 6865 2073 6572 6961 6c69 7a61 7469 the serializati\n-000e02b0: 6f6e 206f 6620 6120 3c63 6f64 653e 766f on of a vo\n-000e02c0: 6964 2a3c 2f63 6f64 653e 206d 656d 6265 id* membe\n-000e02d0: 7220 696e 2061 2073 7472 7563 742f 636c r in a struct/cl\n-000e02e0: 6173 733a 3c2f 703e 0a3c 6469 7620 636c ass:

.
<\n-000e0300: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e0310: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct ns__record \n-000e0340: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{
\n-000e0360: 0a3c 6469 7620 636c 6173 733d 226c 696e .
int __ty\n-000e03a0: 7065 3b20 3c73 7061 6e20 636c 6173 733d pe; // the\n-000e03c0: 2053 4f41 505f 5459 5045 5f54 2070 6f69 SOAP_TYPE_T poi\n-000e03d0: 6e74 6564 2074 6f20 6279 2076 616c 3c2f nted to by val
. \n-000e0400: 2020 3c73 7061 6e20 636c 6173 733d 226b void\n-000e0420: 3c2f 7370 616e 3e20 2a76 616c 3b20 203c *val; <\n-000e0430: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-000e0440: 656e 7422 3e2f 2f20 7365 7269 616c 697a ent\">// serializ\n-000e0450: 6520 616e 7920 7479 7065 2069 6e20 656c e any type in el\n-000e0460: 656d 656e 7420 266c 743b 7661 6c26 6774 ement <val>\n-000e0470: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;.<\n-000e0480: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e0490: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};.\n-000e04a0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d \n-000e0900: 3c70 3e54 6865 2064 6573 6572 6961 6c69

The deseriali\n-000e0910: 7a65 7220 666f 7220 3c63 6f64 653e 6e73 zer for ns\n-000e0920: 5f5f 7265 636f 7264 3c2f 636f 6465 3e20 __record \n-000e0930: 7769 6c6c 2061 7574 6f6d 6174 6963 616c will automatical\n-000e0940: 6c79 2073 6574 2074 6865 203c 636f 6465 ly set the __type f\n-000e0960: 6965 6c64 2061 6e64 2076 6f69 6420 706f ield and void po\n-000e0970: 696e 7465 7220 7768 656e 2064 6573 6572 inter when deser\n-000e0980: 6961 6c69 7a69 6e67 2074 6865 2064 6174 ializing the dat\n-000e0990: 612c 2070 726f 7669 6465 6420 7468 6174 a, provided that\n-000e09a0: 2074 6865 2058 4d4c 2065 6c65 6d65 6e74 the XML element\n-000e09b0: 203c 656d 3e3c 636f 6465 3e76 616c 3c2f val carri\n-000e09d0: 6573 2074 6865 203c 656d 3e3c 636f 6465 es the xsi:type\n-000e09f0: 3c2f 656d 3e20 6174 7472 6962 7574 6520 attribute \n-000e0a00: 6672 6f6d 2077 6869 6368 2069 7420 6361 from which it ca\n-000e0a10: 6e20 6465 7465 726d 696e 6520 7468 6520 n determine the \n-000e0a20: 7479 7065 2e3c 2f70 3e0a 3c64 6c20 636c type.

.
Note
\n-000e0a50: 3c64 643e 7768 656e 2073 6572 6961 6c69
when seriali\n-000e0a60: 7a69 6e67 2073 7472 696e 6773 2076 6961 zing strings via\n-000e0a70: 2061 203c 636f 6465 3e76 6f69 642a 3c2f a void* member, th\n-000e0a90: 6520 3c63 6f64 653e 766f 6964 2a3c 2f63 e void* pointer mus\n-000e0ab0: 7420 6469 7265 6374 6c79 2070 6f69 6e74 t directly point\n-000e0ac0: 2074 6f20 7468 6520 7374 7269 6e67 2076 to the string v\n-000e0ad0: 616c 7565 2072 6174 6865 7220 7468 616e alue rather than\n-000e0ae0: 2069 6e64 6972 6563 746c 7920 6173 2077 indirectly as w\n-000e0af0: 6974 6820 616c 6c20 6f74 6865 7220 7479 ith all other ty\n-000e0b00: 7065 732e 2046 6f72 2065 7861 6d70 6c65 pes. For example\n-000e0b10: 3a3c 2f64 643e 3c2f 646c 3e0a 3c64 6976 :
.
struct\n-000e0b60: 203c 2f73 7061 6e3e 6e73 5f5f 7265 636f ns__reco\n-000e0b70: 7264 2053 3b20 3c2f 6469 763e 0a3c 6469 rd S;
.S\n-000e0b90: 2e76 616c 203d 2028 3c73 7061 6e20 636c .val = (void*)<\n-000e0bc0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-000e0bd0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-000e0be0: 3b48 656c 6c6f 2671 756f 743b 3c2f 7370 ;Hello"; .S.\n-000e0c10: 5f5f 7479 7065 203d 2053 4f41 505f 5459 __type = SOAP_TY\n-000e0c20: 5045 5f73 7472 696e 673b 203c 2f64 6976 PE_string; .

This\n-000e0c50: 2069 7320 7468 6520 6361 7365 2066 6f72 is the case for\n-000e0c60: 2061 6c6c 2073 7472 696e 672d 6261 7365 all string-base\n-000e0c70: 6420 7479 7065 732c 2069 6e63 6c75 6469 d types, includi\n-000e0c80: 6e67 2074 7970 6573 2064 6566 696e 6564 ng types defined\n-000e0c90: 2077 6974 6820 3c63 6f64 653e 7479 7065 with type\n-000e0ca0: 6465 6620 6368 6172 2a3c 2f63 6f64 653e def char*\n-000e0cb0: 2e3c 2f70 3e0a 3c70 3e59 6f75 206d 6179 .

.

You may\n-000e0cc0: 2075 7365 2061 6e20 6172 6269 7472 6172 use an arbitrar\n-000e0cd0: 7920 7375 6666 6978 2077 6974 6820 7468 y suffix with th\n-000e0ce0: 6520 3c63 6f64 653e 5f5f 7479 7065 3c2f e __type members to\n-000e0d00: 2068 616e 646c 6520 6d75 6c74 6970 6c65 handle multiple\n-000e0d10: 2076 6f69 6420 706f 696e 7465 7273 2069 void pointers i\n-000e0d20: 6e20 7374 7275 6374 732f 636c 6173 7365 n structs/classe\n-000e0d30: 732e 2046 6f72 2065 7861 6d70 6c65 3a3c s. For example:<\n-000e0d40: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

struct \n-000e0d90: 6e73 5f5f 7265 636f 7264 203c 2f64 6976 ns__record .
{
. \n-000e0dd0: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n-000e0df0: 2f73 7061 6e3e 205f 5f74 7970 654f 6670 /span> __typeOfp\n-000e0e00: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // the S\n-000e0e20: 4f41 505f 5459 5045 5f54 2070 6f69 6e74 OAP_TYPE_T point\n-000e0e30: 6564 2074 6f20 6279 2070 203c 2f73 7061 ed to by p
.
<\n-000e0e60: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e0e70: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void *p; <\n-000e0e90: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-000e0ea0: 656e 7422 3e2f 2f20 656c 656d 656e 7420 ent\">// element \n-000e0eb0: 266c 743b 7026 6774 3b3c 2f73 7061 6e3e <p>\n-000e0ec0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
int __typeOfq; // the SOAP_T\n-000e0f30: 5950 455f 5420 706f 696e 7465 6420 746f YPE_T pointed to\n-000e0f40: 2062 7920 7120 3c2f 7370 616e 3e3c 2f64 by q .
void \n-000e0f90: 2a71 3b20 2020 2020 2020 3c73 7061 6e20 *q; \n-000e0fb0: 2f2f 2065 6c65 6d65 6e74 2026 6c74 3b71 // element <q\n-000e0fc0: 2667 743b 3c2f 7370 616e 3e3c 2f64 6976 >.
};
.

Because s\n-000e1010: 6572 7669 6365 206d 6574 686f 6420 7061 ervice method pa\n-000e1020: 7261 6d65 7465 7273 2061 7265 2073 746f rameters are sto\n-000e1030: 7265 6420 7769 7468 696e 2073 7472 7563 red within struc\n-000e1040: 7473 2c20 796f 7520 6361 6e20 7573 6520 ts, you can use \n-000e1050: 3c63 6f64 653e 5f5f 7479 7065 3c2f 636f __type and vo\n-000e1070: 6964 2a3c 2f63 6f64 653e 2070 6172 616d id* param\n-000e1080: 6574 6572 7320 746f 2070 6173 7320 706f eters to pass po\n-000e1090: 6c79 6d6f 7270 6869 6320 6172 6775 6d65 lymorphic argume\n-000e10a0: 6e74 7320 7769 7468 6f75 7420 6861 7669 nts without havi\n-000e10b0: 6e67 2074 6f20 6465 6669 6e65 2061 2043 ng to define a C\n-000e10c0: 2b2b 2063 6c61 7373 2068 6965 7261 7263 ++ class hierarc\n-000e10d0: 6879 2028 5365 6374 696f 6e20 3c61 2063 hy (Section Polymorphi\n-000e1110: 736d 2c20 6465 7269 7665 6420 7479 7065 sm, derived type\n-000e1120: 732c 2061 6e64 2064 796e 616d 6963 2062 s, and dynamic b\n-000e1130: 696e 6469 6e67 2069 6e20 432b 2b3c 2f61 inding in C++ ), provided th\n-000e1150: 6174 203c 656d 3e3c 636f 6465 3e78 7369 at xsi\n-000e1160: 3a74 7970 653c 2f63 6f64 653e 3c2f 656d :type attributes are\n-000e1180: 2070 7265 7365 6e74 2069 6e20 7468 6520 present in the \n-000e1190: 584d 4c20 656c 656d 656e 7473 2e20 466f XML elements. Fo\n-000e11a0: 7220 6578 616d 706c 653a 3c2f 703e 0a3c r example:

.<\n-000e11b0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-000e11c0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
typ\n-000e11f0: 6564 6566 3c2f 7370 616e 3e20 3c73 7061 edef char *xsd__string; \n-000e1230: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
t\n-000e1260: 7970 6564 6566 3c2f 7370 616e 3e20 3c73 ypedef int xsd__int; .
type\n-000e12d0: 6465 663c 2f73 7061 6e3e 203c 7370 616e def float xsd__float; .
enu\n-000e1340: 6d3c 2f73 7061 6e3e 206e 735f 5f73 7461 m ns__sta\n-000e1350: 7475 7320 7b20 6f6e 2c20 6f66 6620 7d3b tus { on, off };\n-000e1360: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
\n-000e1390: 7374 7275 6374 203c 2f73 7061 6e3e 6e73 struct ns\n-000e13a0: 5f5f 7769 6467 6574 3c2f 6469 763e 0a3c __widget
.<\n-000e13b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e13c0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
.
<\n-000e13e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e13f0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *name;.
int par\n-000e1450: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
.
};.
\n-000e14a0: 696e 743c 2f73 7061 6e3e 206e 735f 5f77 int ns__w\n-000e14b0: 6562 6d65 7468 6f64 283c 7370 616e 2063 ebmethod(int __\n-000e14e0: 7479 7065 2c20 3c73 7061 6e20 636c 6173 type, \n-000e1500: 766f 6964 3c2f 7370 616e 3e20 2a64 6174 void *dat\n-000e1510: 612c 203c 7370 616e 2063 6c61 7373 3d22 a, struct<\n-000e1530: 2f73 7061 6e3e 206e 735f 5f77 6562 6d65 /span> ns__webme\n-000e1540: 7468 6f64 5265 7370 6f6e 7365 207b 203c thodResponse { <\n-000e1550: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e1560: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int __type; void *return_; } *o\n-000e15b0: 7574 293b 3c2f 6469 763e 0a3c 2f64 6976 ut);
.\n-000e1b10: 3c70 3e54 6865 2066 6f6c 6c6f 7769 6e67

The following\n-000e1b20: 2065 7861 6d70 6c65 2069 6c6c 7573 7472 example illustr\n-000e1b30: 6174 6573 2074 6865 2069 6e69 7469 616c ates the initial\n-000e1b40: 697a 6174 696f 6e20 6f66 203c 636f 6465 ization of __ns__record with a void\n-000e1b70: 2070 6f69 6e74 6572 2074 6f20 616e 2069 pointer to an i\n-000e1b80: 6e74 3a3c 2f70 3e0a 3c64 6976 2063 6c61 nt:

.
\n-000e1bb0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct ns__record S\n-000e1be0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
int \n-000e1c20: 6e20 3d20 3132 333b 203c 2f64 6976 3e0a n = 123;
.\n-000e1c30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
S.val.__item =\n-000e1c50: 2028 3c73 7061 6e20 636c 6173 733d 226b (void\n-000e1c70: 3c2f 7370 616e 3e2a 2926 616d 703b 6e3b *)&n;\n-000e1c80: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
S.val.\n-000e1ca0: 5f5f 7479 7065 203d 2053 4f41 505f 5459 __type = SOAP_TY\n-000e1cb0: 5045 5f69 6e74 3b20 3c2f 6469 763e 0a3c PE_int;
.<\n-000e1cc0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

The ser\n-000e1ce0: 6961 6c69 7a65 6420 6f75 7470 7574 206f ialized output o\n-000e1cf0: 6620 3c63 6f64 653e 533c 2f63 6f64 653e f S\n-000e1d00: 2063 6f6e 7461 696e 7320 7468 6520 696e contains the in\n-000e1d10: 7465 6765 723a 3c2f 703e 0a3c 6469 7620 teger:

.
<ns:record>
.\n-000e1da0: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n-000e1dc0: 7661 6c3c 2f73 7061 6e3e 203c 7370 616e val xsi:type\n-000e1df0: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n-000e1e10: 6f74 3b78 7364 3a69 6e74 2671 756f 743b ot;xsd:int"\n-000e1e20: 3c2f 7370 616e 3e26 6774 3b31 3233 266c >123&l\n-000e1e30: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/val\n-000e1e50: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
</ns:record>
.

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

.Fi\n-000e1f30: 7865 642d 7369 7a65 2061 7272 6179 2073 xed-size array s\n-000e1f40: 6572 6961 6c69 7a61 7469 6f6e 3c2f 6832 erialization.

Fixed size \n-000e1f60: 6172 7261 7973 2061 7265 2073 6572 6961 arrays are seria\n-000e1f70: 6c69 7a65 6420 6173 2072 6570 6574 6974 lized as repetit\n-000e1f80: 696f 6e73 206f 6620 3c65 6d3e 3c63 6f64 ions of item elements with\n-000e1fb0: 2074 6865 2061 7272 6179 2076 616c 7565 the array value\n-000e1fc0: 7320 696e 2058 4d4c 2e20 4d75 6c74 692d s in XML. Multi-\n-000e1fd0: 6469 6d65 6e73 696f 6e61 6c20 6669 7865 dimensional fixe\n-000e1fe0: 6420 7369 7a65 2061 7272 6179 7320 6172 d size arrays ar\n-000e1ff0: 6520 7365 7269 616c 697a 6564 2061 7320 e serialized as \n-000e2000: 6e65 7374 6564 203c 656d 3e3c 636f 6465 nested item elements, wher\n-000e2030: 6520 7468 6520 6f75 7465 7220 656c 656d e the outer elem\n-000e2040: 656e 7473 2061 7265 2061 7272 6179 732e ents are arrays.\n-000e2050: 3c2f 703e 0a3c 703e 5468 6520 7365 7269

.

The seri\n-000e2060: 616c 697a 6174 696f 6e20 6f66 2066 6978 alization of fix\n-000e2070: 6564 2d73 697a 6520 6172 7261 7973 2073 ed-size arrays s\n-000e2080: 7570 706f 7274 7320 7468 6520 534f 4150 upports the SOAP\n-000e2090: 2052 5043 2065 6e63 6f64 696e 6720 6d75 RPC encoding mu\n-000e20a0: 6c74 692d 6469 6d65 6e73 696f 6e61 6c20 lti-dimensional \n-000e20b0: 6172 7261 7920 666f 726d 6174 2061 7320 array format as \n-000e20c0: 7765 6c6c 2061 7320 7061 7274 6961 6c6c well as partiall\n-000e20d0: 7920 7472 616e 736d 6974 7465 6420 616e y transmitted an\n-000e20e0: 6420 7370 6172 7365 2061 7272 6179 2066 d sparse array f\n-000e20f0: 6f72 6d61 7473 2073 7461 6e64 6172 6469 ormats standardi\n-000e2100: 7a65 6420 696e 2053 4f41 5020 312e 3120 zed in SOAP 1.1 \n-000e2110: 616e 6420 312e 322e 3c2f 703e 0a3c 703e and 1.2.

.

\n-000e2120: 466f 7220 6578 616d 706c 653a 3c2f 703e For example:

\n-000e2130: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
/\n-000e2170: 2f20 436f 6e74 656e 7473 206f 6620 6669 / Contents of fi\n-000e2180: 6c65 2026 7175 6f74 3b66 6978 6564 2e68 le "fixed.h\n-000e2190: 2671 756f 743b 3a20 3c2f 7370 616e 3e3c ": <\n-000e21a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
st\n-000e21d0: 7275 6374 203c 2f73 7061 6e3e 4578 616d ruct Exam\n-000e21e0: 706c 6520 3c2f 6469 763e 0a3c 6469 7620 ple
.
{.
float a[3];
.<\n-000e2250: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e2260: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
.
\n-000e2270: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

\n-000e2540: 416e 7920 6465 7365 7269 616c 697a 6564 Any deserialized\n-000e2550: 2069 7465 6d73 206f 6620 616e 2061 7272 items of an arr\n-000e2560: 6179 2074 6861 7420 646f 206e 6f74 2066 ay that do not f\n-000e2570: 6974 2069 6e20 7468 6520 6669 7865 6420 it in the fixed \n-000e2580: 7369 7a65 2061 7272 6179 2c20 692e 652e size array, i.e.\n-000e2590: 2061 7265 206f 7574 206f 6620 626f 756e are out of boun\n-000e25a0: 6473 2c20 6172 6520 6967 6e6f 7265 6420 ds, are ignored \n-000e25b0: 6279 2074 6865 2064 6573 6572 6961 6c69 by the deseriali\n-000e25c0: 7a65 7220 7768 656e 2074 6865 203c 636f zer when the #SOAP_C_NOIOB\n-000e25e0: 3c2f 636f 6465 3e20 666c 6167 2069 7320 flag is \n-000e25f0: 7365 742c 206f 7468 6572 7769 7365 203c set, otherwise <\n-000e2600: 636f 6465 3e23 534f 4150 5f49 4f42 3c2f code>#SOAP_IOB errors wil\n-000e2620: 6c20 6265 2067 656e 6572 6174 6564 2062 l be generated b\n-000e2630: 7920 7468 6520 6465 7365 7269 616c 697a y the deserializ\n-000e2640: 6572 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 er.

.

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

..Dynamic a\n-000e26b0: 7272 6179 2073 6572 6961 6c69 7a61 7469 rray serializati\n-000e26c0: 6f6e 3c2f 6832 3e0a 3c70 3e44 796e 616d on

.

Dynam\n-000e26d0: 6963 2061 7272 6179 7320 6172 6520 6d75 ic arrays are mu\n-000e26e0: 6368 206d 6f72 6520 666c 6578 6962 6c65 ch more flexible\n-000e26f0: 2074 6861 6e20 6669 7865 642d 7369 7a65 than fixed-size\n-000e2700: 2061 7272 6179 732e 2044 796e 616d 6963 arrays. Dynamic\n-000e2710: 2061 7272 6179 7320 6465 636c 6172 6564 arrays declared\n-000e2720: 2069 6e20 7468 6520 696e 7465 7266 6163 in the interfac\n-000e2730: 6520 6865 6164 6572 2066 696c 6520 666f e header file fo\n-000e2740: 7220 736f 6170 6370 7032 2061 7265 2061 r soapcpp2 are a\n-000e2750: 2073 7065 6369 616c 2073 7472 7563 7420 special struct \n-000e2760: 6f72 2063 6c61 7373 206f 7220 6172 6520 or class or are \n-000e2770: 7061 7274 206f 6620 6120 7374 7275 6374 part of a struct\n-000e2780: 206f 7220 636c 6173 7320 7769 7468 2061 or class with a\n-000e2790: 206d 656d 6265 7220 706f 696e 7469 6e67 member pointing\n-000e27a0: 2074 6f20 616e 2061 7272 6179 206f 6620 to an array of \n-000e27b0: 656c 656d 656e 7473 2061 6e64 2061 206d elements and a m\n-000e27c0: 656d 6265 7220 7468 6174 2073 746f 7265 ember that store\n-000e27d0: 7320 7468 6520 7369 7a65 206f 6620 7468 s the size of th\n-000e27e0: 6520 6172 7261 792e 2044 796e 616d 6963 e array. Dynamic\n-000e27f0: 2061 7272 6179 2061 6c6c 6f63 6174 696f array allocatio\n-000e2800: 6e73 2061 7265 2065 6173 7920 7573 696e ns are easy usin\n-000e2810: 6720 7468 6520 736f 6170 6370 702d 6765 g the soapcpp-ge\n-000e2820: 6e65 7261 7465 6420 3c63 6f64 653e 736f nerated so\n-000e2830: 6170 5f6e 6577 5f54 3c2f 636f 6465 3e20 ap_new_T \n-000e2840: 6675 6e63 7469 6f6e 7320 666f 7220 7479 functions for ty\n-000e2850: 7065 203c 636f 6465 3e54 3c2f 636f 6465 pe T. This function\n-000e2870: 2069 7320 7573 6564 2074 6f20 616c 6c6f is used to allo\n-000e2880: 6361 7465 2061 6e20 6172 7261 7920 6f66 cate an array of\n-000e2890: 2076 616c 7565 7320 7768 6963 6820 6361 values which ca\n-000e28a0: 6e20 7468 656e 2062 6520 6173 7369 676e n then be assign\n-000e28b0: 6564 2074 6f20 7468 6520 706f 696e 7465 ed to the pointe\n-000e28c0: 7220 6d65 6d62 6572 206f 6620 7468 6520 r member of the \n-000e28d0: 7374 7275 6374 2f63 6c61 7373 2074 6861 struct/class tha\n-000e28e0: 7420 7374 6f72 6573 2074 6865 2061 7272 t stores the arr\n-000e28f0: 6179 2070 6f69 6e74 6572 2077 6974 6820 ay pointer with \n-000e2900: 6974 7320 7369 7a65 2e3c 2f70 3e0a 3c70 its size.

.To facilitate S\n-000e2920: 4f41 5020 5250 4320 656e 636f 6469 6e67 OAP RPC encoding\n-000e2930: 2c20 534f 4150 2d65 6e63 6f64 6564 2061 , SOAP-encoded a\n-000e2940: 7272 6179 7320 7265 7175 6972 6520 7370 rrays require sp\n-000e2950: 6563 6961 6c20 7472 6561 746d 656e 742e ecial treatment.\n-000e2960: 2053 4f41 502d 656e 636f 6465 6420 6172 SOAP-encoded ar\n-000e2970: 7261 7973 2061 7265 2073 696e 676c 652d rays are single-\n-000e2980: 206f 7220 6d75 6c74 692d 6469 6d65 6e73 or multi-dimens\n-000e2990: 696f 6e61 6c20 6172 7261 7973 2077 6974 ional arrays wit\n-000e29a0: 6820 626f 756e 6473 2074 6861 7420 6170 h bounds that ap\n-000e29b0: 7065 6172 2069 6e20 584d 4c2e 2054 6865 pear in XML. The\n-000e29c0: 7365 2061 7272 6179 7320 6d61 7920 616c se arrays may al\n-000e29d0: 736f 2068 6176 6520 6f66 6673 6574 7320 so have offsets \n-000e29e0: 7468 6174 2064 6966 6665 7220 6672 6f6d that differ from\n-000e29f0: 207a 6572 6f2e 2054 6865 2069 6e74 656e zero. The inten\n-000e2a00: 7420 6f66 2053 4f41 502d 656e 636f 6465 t of SOAP-encode\n-000e2a10: 6420 6172 7261 7973 2069 7320 746f 2072 d arrays is to r\n-000e2a20: 6570 6c69 6361 7465 206d 756c 7469 2d64 eplicate multi-d\n-000e2a30: 696d 656e 7369 6f6e 616c 2061 7272 6179 imensional array\n-000e2a40: 7320 636f 6d6d 6f6e 6c79 2066 6f75 6e64 s commonly found\n-000e2a50: 2069 6e20 7072 6f67 7261 6d6d 696e 6720 in programming \n-000e2a60: 6c61 6e67 7561 6765 732e 3c2f 703e 0a3c languages.

.<\n-000e2a70: 703e 486f 7765 7665 722c 2058 4d4c 2061 p>However, XML a\n-000e2a80: 6c73 6f20 7072 6f76 6964 6573 2061 2073 lso provides a s\n-000e2a90: 696d 706c 6520 7761 7920 746f 2072 6570 imple way to rep\n-000e2aa0: 7265 7365 6e74 2061 2073 6571 7565 6e63 resent a sequenc\n-000e2ab0: 6520 6f66 2076 616c 7565 7320 7769 7468 e of values with\n-000e2ac0: 2061 2073 6571 7565 6e63 6520 6f66 2058 a sequence of X\n-000e2ad0: 4d4c 2065 6c65 6d65 6e74 732e 2054 6869 ML elements. Thi\n-000e2ae0: 7320 6469 6666 6572 7320 6672 6f6d 2053 s differs from S\n-000e2af0: 4f41 502d 656e 636f 6465 6420 6172 7261 OAP-encoded arra\n-000e2b00: 7973 2069 6e20 7468 6174 2053 4f41 502d ys in that SOAP-\n-000e2b10: 656e 636f 6465 6420 6172 7261 7973 2061 encoded arrays a\n-000e2b20: 7265 2065 6c65 6d65 6e74 7320 7769 7468 re elements with\n-000e2b30: 206e 6573 7465 6420 3c65 6d3e 3c63 6f64 nested item
elements with\n-000e2b60: 2076 616c 7565 732c 2074 686f 7567 6820 values, though \n-000e2b70: 534f 4150 2064 6573 6572 6961 6c69 7a65 SOAP deserialize\n-000e2b80: 7273 206d 6179 2069 676e 6f72 6520 7468 rs may ignore th\n-000e2b90: 6520 6e61 6d65 206f 6620 7468 6573 6520 e name of these \n-000e2ba0: 656c 656d 656e 7473 2077 6865 6e20 7061 elements when pa\n-000e2bb0: 7273 696e 6720 584d 4c20 6173 2073 7461 rsing XML as sta\n-000e2bc0: 7465 6420 696e 2074 6865 2053 4f41 5020 ted in the SOAP \n-000e2bd0: 7370 6563 6966 6963 6174 696f 6e73 2e3c specifications.<\n-000e2be0: 2f70 3e0a 3c70 3e42 6f74 6820 534f 4150 /p>.

Both SOAP\n-000e2bf0: 2d65 6e63 6f64 6564 2061 7272 6179 7320 -encoded arrays \n-000e2c00: 616e 6420 7365 7175 656e 6365 7320 6f66 and sequences of\n-000e2c10: 2058 4d4c 2065 6c65 6d65 6e74 7320 6172 XML elements ar\n-000e2c20: 6520 7375 7070 6f72 7465 6420 696e 2067 e supported in g\n-000e2c30: 534f 4150 2c20 7573 696e 6720 6479 6e61 SOAP, using dyna\n-000e2c40: 6d69 6320 6172 7261 7973 2061 6e64 2063 mic arrays and c\n-000e2c50: 6f6e 7461 696e 6572 732e 2054 6865 2062 ontainers. The b\n-000e2c60: 6173 6963 7320 7769 6c6c 2062 6520 6465 asics will be de\n-000e2c70: 7363 7269 6265 6420 6e65 7874 2e20 466f scribed next. Fo\n-000e2c80: 7220 6164 6469 7469 6f6e 616c 2064 6574 r additional det\n-000e2c90: 6169 6c73 2c20 7365 6520 7468 6520 3c61 ails, see the C and \n-000e2cd0: 432b 2b20 584d 4c20 4461 7461 2042 696e C++ XML Data Bin\n-000e2ce0: 6469 6e67 733c 2f61 3e20 646f 6375 6d65 dings docume\n-000e2cf0: 6e74 6174 696f 6e2e 3c2f 703e 0a3c 703e ntation.

.

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

.S\n-000e2d60: 4f41 502d 656e 636f 6465 6420 6172 7261 OAP-encoded arra\n-000e2d70: 7920 626f 756e 6473 3c2f 6833 3e0a 3c70 y bounds

.SOAP-encoded ar\n-000e2d90: 7261 7973 2075 7365 2074 6865 203c 656d rays use the SOAP-ENC:\n-000e2db0: 4172 7261 793c 2f63 6f64 653e 3c2f 656d Array attribute in X\n-000e2dd0: 4d4c 2074 6f20 6964 656e 7469 6679 2074 ML to identify t\n-000e2de0: 6865 2061 7272 6179 2061 6e64 2074 6865 he array and the\n-000e2df0: 203c 656d 3e3c 636f 6465 3e53 4f41 502d SOAP-\n-000e2e00: 454e 433a 6172 7261 7954 7970 653c 2f63 ENC:arrayType attrib\n-000e2e20: 7574 6520 746f 2069 6465 6e74 6966 7920 ute to identify \n-000e2e30: 7468 6520 6172 7261 7920 6469 6d65 6e73 the array dimens\n-000e2e40: 696f 6e61 6c69 7479 2061 6e64 2069 7473 ionality and its\n-000e2e50: 2073 697a 652e 3c2f 703e 0a3c 703e 4173 size.

.

As\n-000e2e60: 2061 2073 6563 7572 6974 7920 6d65 6173 a security meas\n-000e2e70: 7572 6520 746f 2061 766f 6964 2064 656e ure to avoid den\n-000e2e80: 6961 6c20 6f66 2073 6572 7669 6365 2061 ial of service a\n-000e2e90: 7474 6163 6b73 2062 6173 6564 206f 6e20 ttacks based on \n-000e2ea0: 7365 6e64 696e 6720 6120 6875 6765 2061 sending a huge a\n-000e2eb0: 7272 6179 2073 697a 6520 7661 6c75 6520 rray size value \n-000e2ec0: 7573 696e 6720 7468 6520 3c65 6d3e 3c63 using the SOAP-ENC:arr\n-000e2ee0: 6179 5479 7065 3c2f 636f 6465 3e3c 2f65 ayType attribute, re\n-000e2f00: 7175 6972 696e 6720 7468 6520 616c 6c6f quiring the allo\n-000e2f10: 6361 7469 6f6e 206f 6620 6c61 7267 6520 cation of large \n-000e2f20: 6368 756e 6b73 206f 6620 6d65 6d6f 7279 chunks of memory\n-000e2f30: 2c20 7468 6520 746f 7461 6c20 6e75 6d62 , the total numb\n-000e2f40: 6572 206f 6620 6172 7261 7920 656c 656d er of array elem\n-000e2f50: 656e 7473 2073 6574 2062 7920 7468 6520 ents set by the \n-000e2f60: 3c65 6d3e 3c63 6f64 653e 534f 4150 2d45 SOAP-E\n-000e2f70: 4e43 3a61 7272 6179 5479 7065 3c2f 636f NC:arrayType attribu\n-000e2f90: 7465 2063 616e 6e6f 7420 6578 6365 6564 te cannot exceed\n-000e2fa0: 203c 636f 6465 3e23 534f 4150 5f4d 4158 #SOAP_MAX\n-000e2fb0: 4152 5241 5953 495a 453c 2f63 6f64 653e ARRAYSIZE\n-000e2fc0: 2c20 7768 6963 6820 6973 2073 6574 2074 , which is set t\n-000e2fd0: 6f20 3130 3030 3030 2062 7920 6465 6661 o 100000 by defa\n-000e2fe0: 756c 742e 2054 6869 7320 6c69 6d69 7420 ult. This limit \n-000e2ff0: 6973 206e 6f74 2061 2068 6172 6420 6c69 is not a hard li\n-000e3000: 6d69 7420 6f6e 2074 6865 206e 756d 6265 mit on the numbe\n-000e3010: 7220 6f66 2061 7272 6179 2065 6c65 6d65 r of array eleme\n-000e3020: 6e74 732c 2062 7574 2072 6174 6865 7220 nts, but rather \n-000e3030: 746f 2061 766f 6964 2070 7265 2d61 6c6c to avoid pre-all\n-000e3040: 6f63 6174 696e 6720 6c61 7267 6520 6172 ocating large ar\n-000e3050: 7261 7973 2061 7320 7374 6174 6564 2e20 rays as stated. \n-000e3060: 5468 6520 6861 7264 206c 696d 6974 206f The hard limit o\n-000e3070: 6e20 7468 6520 6e75 6d62 6572 206f 6620 n the number of \n-000e3080: 6172 7261 7920 656c 656d 656e 7473 2072 array elements r\n-000e3090: 6563 6569 7665 6420 6973 203c 636f 6465 eceived is soap::m\n-000e3160: 6178 6f63 6375 7273 3c2f 613e 3c2f 636f axoccurs which is set\n-000e3180: 2074 6f20 3c63 6f64 653e 2353 4f41 505f to #SOAP_\n-000e3190: 4d41 584f 4343 5552 533c 2f63 6f64 653e MAXOCCURS\n-000e31a0: 2062 7920 6465 6661 756c 742e 2042 7920 by default. By \n-000e31b0: 636f 6e74 7261 7374 2c20 7468 6520 3c63 contrast, the #SOAP_MAXARR\n-000e31d0: 4159 5349 5a45 3c2f 636f 6465 3e20 6c69 AYSIZE li\n-000e31e0: 6d69 7420 6f6e 6c79 206e 6567 6174 6976 mit only negativ\n-000e31f0: 656c 7920 6166 6665 6374 7320 6d75 6c74 ely affects mult\n-000e3200: 692d 6469 6d65 6e73 696f 6e61 6c20 6172 i-dimensional ar\n-000e3210: 7261 7973 2062 6563 6175 7365 2074 6865 rays because the\n-000e3220: 2064 696d 656e 7369 6f6e 616c 6974 7920 dimensionality \n-000e3230: 6f66 2074 6865 2072 6563 6569 7669 6e67 of the receiving\n-000e3240: 2061 7272 6179 206d 6179 2062 6520 6c6f array may be lo\n-000e3250: 7374 2077 6865 6e20 7468 6520 6e75 6d62 st when the numb\n-000e3260: 6572 206f 6620 656c 656d 656e 7473 2065 er of elements e\n-000e3270: 7863 6565 6473 2031 3030 3030 302e 204f xceeds 100000. O\n-000e3280: 6e65 2d64 696d 656e 7369 6f6e 616c 2061 ne-dimensional a\n-000e3290: 7272 6179 7320 6172 6520 6e6f 7420 6166 rrays are not af\n-000e32a0: 6665 6374 6564 2061 6e64 2070 6f70 756c fected and popul\n-000e32b0: 6174 6564 2061 6674 6572 2074 6869 7320 ated after this \n-000e32c0: 6c69 6d69 7420 6279 2073 696d 706c 7920 limit by simply \n-000e32d0: 6465 7365 7269 616c 697a 696e 6720 7468 deserializing th\n-000e32e0: 6520 6172 7261 7920 656c 656d 656e 7473 e array elements\n-000e32f0: 2072 6563 6569 7665 642e 3c2f 703e 0a3c received.

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

.

.One-di\n-000e3360: 6d65 6e73 696f 6e61 6c20 6479 6e61 6d69 mensional dynami\n-000e3370: 6320 534f 4150 2d65 6e63 6f64 6564 2061 c SOAP-encoded a\n-000e3380: 7272 6179 733c 2f68 333e 0a3c 703e 4120 rrays

.

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

.\n-000e3490: 3c70 3e54 6865 2067 656e 6572 616c 2066

The general f\n-000e34a0: 6f72 6d20 6f66 2074 6865 2073 7472 7563 orm of the struc\n-000e34b0: 7420 6f72 2063 6c61 7373 2064 6563 6c61 t or class decla\n-000e34c0: 7261 7469 6f6e 2074 6861 7420 636f 6e74 ration that cont\n-000e34d0: 6169 6e73 2061 206f 6e65 2d64 696d 656e ains a one-dimen\n-000e34e0: 7369 6f6e 616c 2064 796e 616d 6963 2053 sional dynamic S\n-000e34f0: 4f41 502d 656e 636f 6465 6420 6172 7261 OAP-encoded arra\n-000e3500: 7920 6973 3a3c 2f70 3e0a 3c64 6976 2063 y is:

.
\n-000e3520: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
struct <\n-000e3550: 2f73 7061 6e3e 6172 7261 795f 6e61 6d65 /span>array_name\n-000e3560: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
{.
Type *__\n-000e35a0: 7074 723b 2020 3c73 7061 6e20 636c 6173 ptr; // p\n-000e35c0: 6f69 6e74 6572 2074 6f20 6172 7261 7920 ointer to array \n-000e35d0: 6f66 2065 6c65 6d65 6e74 7320 696e 206d of elements in m\n-000e35e0: 656d 6f72 793c 2f73 7061 6e3e 3c2f 6469 emory.
int __\n-000e3630: 7369 7a65 3b20 2020 3c73 7061 6e20 636c size; //\n-000e3650: 206e 756d 6265 7220 6f66 2065 6c65 6d65 number of eleme\n-000e3660: 6e74 7320 706f 696e 7465 6420 746f 203c nts pointed to <\n-000e3670: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
. \n-000e3690: 2020 203c 7370 616e 2063 6c61 7373 3d22 int\n-000e36b0: 3c2f 7370 616e 3e20 5f5f 6f66 6673 6574 __offset\n-000e36c0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // optio\n-000e36e0: 6e61 6c20 534f 4150 2031 2e31 2061 7272 nal SOAP 1.1 arr\n-000e36f0: 6179 206f 6666 7365 743c 2f73 7061 6e3e ay offset\n-000e3700: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
...\n-000e3720: 2020 2020 2020 2020 2020 203c 7370 616e // anything tha\n-000e3750: 7420 666f 6c6c 6f77 7320 6865 7265 2077 t follows here w\n-000e3760: 696c 6c20 6265 2069 676e 6f72 6564 203c ill be ignored <\n-000e3770: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.}\n-000e3790: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.
<\n-000e37b0: 703e 7768 6572 6520 7468 6520 3c63 6f64 p>where the array_name must be a no\n-000e37e0: 6e2d 7175 616c 6966 6965 6420 6e61 6d65 n-qualified name\n-000e37f0: 2061 6e64 203c 636f 6465 3e54 7970 653c and Type<\n-000e3800: 2f63 6f64 653e 2069 7320 7468 6520 7479 /code> is the ty\n-000e3810: 7065 2066 6f72 2074 6865 2065 6c65 6d65 pe for the eleme\n-000e3820: 6e74 7320 6f66 2074 6865 2061 7272 6179 nts of the array\n-000e3830: 2e20 5468 6520 3c63 6f64 653e 5f5f 7074 . The __pt\n-000e3840: 723c 2f63 6f64 653e 206d 656d 6265 7220 r member \n-000e3850: 706f 696e 7473 2074 6f20 7468 6520 6172 points to the ar\n-000e3860: 7261 7920 7661 6c75 6573 2061 6e64 203c ray values and <\n-000e3870: 636f 6465 3e5f 5f73 697a 653c 2f63 6f64 code>__size is the array \n-000e3890: 7369 7a65 2e20 5468 6520 3c63 6f64 653e size. The \n-000e38a0: 5f5f 6f66 6673 6574 3c2f 636f 6465 3e20 __offset \n-000e38b0: 6d65 6d62 6572 2073 7065 6369 6669 6573 member specifies\n-000e38c0: 2061 6e20 6f70 7469 6f6e 616c 2061 7272 an optional arr\n-000e38d0: 6179 206f 6666 7365 742c 2077 6865 6e20 ay offset, when \n-000e38e0: 6e6f 6e7a 6572 6f2c 2073 6565 2053 6563 nonzero, see Sec\n-000e38f0: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion \n-000e3920: 4f6e 652d 6469 6d65 6e73 696f 6e61 6c20 One-dimensional \n-000e3930: 6479 6e61 6d69 6320 534f 4150 2d65 6e63 dynamic SOAP-enc\n-000e3940: 6f64 6564 2061 7272 6179 7320 7769 7468 oded arrays with\n-000e3950: 206e 6f6e 2d7a 6572 6f20 6f66 6673 6574 non-zero offset\n-000e3960: 733c 2f61 3e2e 3c2f 703e 0a3c 703e 4966 s.

.

If\n-000e3970: 2074 6865 203c 636f 6465 3e61 7272 6179 the array\n-000e3980: 5f6e 616d 653c 2f63 6f64 653e 2069 7320 _name is \n-000e3990: 7175 616c 6966 6965 6420 7769 7468 2061 qualified with a\n-000e39a0: 206e 616d 6573 7061 6365 2070 7265 6669 namespace prefi\n-000e39b0: 7820 7468 656e 2074 6865 2061 7272 6179 x then the array\n-000e39c0: 2069 7320 6e6f 7420 6120 534f 4150 2d65 is not a SOAP-e\n-000e39d0: 6e63 6f64 6564 2061 7272 6179 2062 7574 ncoded array but\n-000e39e0: 2072 6174 6865 7220 7265 7072 6573 656e rather represen\n-000e39f0: 7473 2061 2073 6571 7565 6e63 6520 6f66 ts a sequence of\n-000e3a00: 2058 4d4c 2065 6c65 6d65 6e74 732c 2073 XML elements, s\n-000e3a10: 6565 2053 6563 7469 6f6e 203c 6120 636c ee Section \n-000e3a40: 4e6f 6e2d 534f 4150 2064 796e 616d 6963 Non-SOAP dynamic\n-000e3a50: 2061 7272 6179 733c 2f61 3e2e 3c2f 703e arrays.

\n-000e3a60: 0a3c 703e 5468 6520 736f 6170 6370 7032 .

The soapcpp2\n-000e3a70: 2d67 656e 6572 6174 6564 2064 6573 6572 -generated deser\n-000e3a80: 6961 6c69 7a65 7220 6f66 2061 206f 6e65 ializer of a one\n-000e3a90: 2d64 696d 656e 7369 6f6e 616c 2064 796e -dimensional dyn\n-000e3aa0: 616d 6963 2061 7272 6179 2063 616e 2064 amic array can d\n-000e3ab0: 6573 6572 6961 6c69 7a65 2070 6172 7469 eserialize parti\n-000e3ac0: 616c 6c79 2074 7261 6e73 6d69 7474 6564 ally transmitted\n-000e3ad0: 2061 6e64 2f6f 7220 534f 4150 2d65 6e63 and/or SOAP-enc\n-000e3ae0: 6f64 6564 2073 7061 7273 6520 6172 7261 oded sparse arra\n-000e3af0: 7973 2c20 616e 6420 6576 656e 206d 756c ys, and even mul\n-000e3b00: 7469 2d64 696d 656e 7369 6f6e 616c 2061 ti-dimensional a\n-000e3b10: 7272 6179 7320 7768 6963 6820 7769 6c6c rrays which will\n-000e3b20: 2062 6520 636f 6c6c 6170 7365 6420 696e be collapsed in\n-000e3b30: 746f 2061 206f 6e65 2d64 696d 656e 7369 to a one-dimensi\n-000e3b40: 6f6e 616c 2061 7272 6179 2077 6974 6820 onal array with \n-000e3b50: 726f 772d 6d61 6a6f 7220 6f72 6465 7269 row-major orderi\n-000e3b60: 6e67 2e3c 2f70 3e0a 3c64 6c20 636c 6173 ng.

.
Warning<\n-000e3b90: 2f64 743e 3c64 643e 534f 4150 2031 2e32 /dt>
SOAP 1.2\n-000e3ba0: 2064 6f65 7320 6e6f 7420 7375 7070 6f72 does not suppor\n-000e3bb0: 7420 7061 7274 6961 6c6c 7920 7472 616e t partially tran\n-000e3bc0: 736d 6974 7465 6420 6172 7261 7973 2061 smitted arrays a\n-000e3bd0: 6e64 2074 6865 203c 636f 6465 3e5f 5f6f nd the __o\n-000e3be0: 6666 7365 743c 2f63 6f64 653e 206d 656d ffset mem\n-000e3bf0: 6265 7220 6f66 2061 2064 796e 616d 6963 ber of a dynamic\n-000e3c00: 2061 7272 6179 2069 7320 6967 6e6f 7265 array is ignore\n-000e3c10: 642e 3c2f 6464 3e3c 2f64 6c3e 0a3c 703e d.
.

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

.On\n-000e3c80: 652d 6469 6d65 6e73 696f 6e61 6c20 6479 e-dimensional dy\n-000e3c90: 6e61 6d69 6320 534f 4150 2d65 6e63 6f64 namic SOAP-encod\n-000e3ca0: 6564 2061 7272 6179 7320 7769 7468 206e ed arrays with n\n-000e3cb0: 6f6e 2d7a 6572 6f20 6f66 6673 6574 733c on-zero offsets<\n-000e3cc0: 2f68 333e 0a3c 703e 5468 6520 6465 636c /h3>.

The decl\n-000e3cd0: 6172 6174 696f 6e20 6f66 2061 2064 796e aration of a dyn\n-000e3ce0: 616d 6963 2061 7272 6179 2061 7320 6465 amic array as de\n-000e3cf0: 7363 7269 6265 6420 696e 2053 6563 7469 scribed in Secti\n-000e3d00: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on One-dime\n-000e3d30: 6e73 696f 6e61 6c20 6479 6e61 6d69 6320 nsional dynamic \n-000e3d40: 534f 4150 2d65 6e63 6f64 6564 2061 7272 SOAP-encoded arr\n-000e3d50: 6179 733c 2f61 3e20 6d61 7920 696e 636c ays may incl\n-000e3d60: 7564 6520 616e 203c 636f 6465 3e69 6e74 ude an int\n-000e3d70: 205f 5f6f 6666 7365 743c 2f63 6f64 653e __offset\n-000e3d80: 206d 656d 6265 722e 2057 6865 6e20 7365 member. When se\n-000e3d90: 7420 746f 2061 6e20 696e 7465 6765 7220 t to an integer \n-000e3da0: 7661 6c75 652c 2074 6865 2073 6572 6961 value, the seria\n-000e3db0: 6c69 7a65 7220 6f66 2074 6865 2064 796e lizer of the dyn\n-000e3dc0: 616d 6963 2061 7272 6179 2077 696c 6c20 amic array will \n-000e3dd0: 7573 6520 7468 6973 206d 656d 6265 7220 use this member \n-000e3de0: 6173 2074 6865 2073 7461 7274 2069 6e64 as the start ind\n-000e3df0: 6578 206f 6620 7468 6520 6172 7261 7920 ex of the array \n-000e3e00: 616e 6420 7468 6520 534f 4150 2d65 6e63 and the SOAP-enc\n-000e3e10: 6f64 6564 2061 7272 6179 206f 6666 7365 oded array offse\n-000e3e20: 7420 6174 7472 6962 7574 6520 3c65 6d3e t attribute \n-000e3e30: 3c63 6f64 653e 534f 4150 2d45 4e43 3a6f SOAP-ENC:o\n-000e3e40: 6666 7365 743c 2f63 6f64 653e 3c2f 656d ffset will appear in\n-000e3e60: 2074 6865 2058 4d4c 206d 6573 7361 6765 the XML message\n-000e3e70: 2e20 4e6f 7465 2074 6861 7420 6172 7261 . Note that arra\n-000e3e80: 7920 6f66 6673 6574 7320 6973 2061 2053 y offsets is a S\n-000e3e90: 4f41 5020 312e 3120 7370 6563 6966 6963 OAP 1.1 specific\n-000e3ea0: 2066 6561 7475 7265 2077 6869 6368 2069 feature which i\n-000e3eb0: 7320 6e6f 7420 7375 7070 6f72 7465 6420 s not supported \n-000e3ec0: 696e 2053 4f41 5020 312e 322e 3c2f 703e in SOAP 1.2.

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

For example,\n-000e3ee0: 2074 6865 2066 6f6c 6c6f 7769 6e67 2068 the following h\n-000e3ef0: 6561 6465 7220 6669 6c65 2064 6563 6c61 eader file decla\n-000e3f00: 7265 7320 6120 6e75 6d65 7269 6320 3c63 res a numeric Vector class, which i\n-000e3f30: 7320 6120 6479 6e61 6d69 6320 6172 7261 s a dynamic arra\n-000e3f40: 7920 6f66 2066 6c6f 6174 696e 6720 706f y of floating po\n-000e3f50: 696e 7420 7661 6c75 6573 2077 6974 6820 int values with \n-000e3f60: 616e 2069 6e64 6578 2074 6861 7420 7374 an index that st\n-000e3f70: 6172 7473 2061 7420 313a 3c2f 703e 0a3c arts at 1:

.<\n-000e3f80: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-000e3f90: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
// \n-000e3fc0: 436f 6e74 656e 7473 206f 6620 6669 6c65 Contents of file\n-000e3fd0: 2026 7175 6f74 3b76 6563 746f 722e 6826 "vector.h&\n-000e3fe0: 7175 6f74 3b3a 203c 2f73 7061 6e3e 3c2f quot;: .
cla\n-000e4020: 7373 203c 2f73 7061 6e3e 5665 6374 6f72 ss Vector\n-000e4030: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
{ public:\n-000e4070: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
float *__ptr; .
int __\n-000e4100: 7369 7a65 3b20 3c2f 6469 763e 0a3c 6469 size;
. \n-000e4120: 2020 203c 7370 616e 2063 6c61 7373 3d22 int\n-000e4140: 3c2f 7370 616e 3e20 5f5f 6f66 6673 6574 __offset\n-000e4150: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
V\n-000e4170: 6563 746f 7228 293b 3c2f 6469 763e 0a3c ector();
.<\n-000e4180: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e4190: 3e20 2020 2056 6563 746f 7228 3c73 7061 > Vector(struct \n-000e41c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-000e41f0: 2a2c 203c 7370 616e 2063 6c61 7373 3d22 *, int\n-000e4210: 3c2f 7370 616e 3e20 6e29 3b3c 2f64 6976 n);.
float&a\n-000e4260: 6d70 3b20 6f70 6572 6174 6f72 5b5d 283c mp; operator[](<\n-000e4270: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e4280: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int i);
.<\n-000e42a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e42b0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > struc\n-000e42d0: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t \n-000e4300: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap;.
};
.

The impl\n-000e43a0: 656d 656e 7461 7469 6f6e 7320 6f66 2074 ementations of t\n-000e43b0: 6865 203c 636f 6465 3e56 6563 746f 723c he Vector<\n-000e43c0: 2f63 6f64 653e 206d 6574 686f 6473 2061 /code> methods a\n-000e43d0: 7265 3a3c 2f70 3e0a 3c64 6976 2063 6c61 re:

.
\n-000e4400: 5665 6374 6f72 3a3a 5665 6374 6f72 2829 Vector::Vector()\n-000e4410: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{
\n-000e4430: 0a3c 6469 7620 636c 6173 733d 226c 696e .
this->so\n-000e4450: 6170 5f64 6566 6175 6c74 284e 554c 4c29 ap_default(NULL)\n-000e4460: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
}.
Vector::Vect\n-000e44a0: 6f72 283c 7370 616e 2063 6c61 7373 3d22 or(struct<\n-000e44c0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n-000e44f0: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n-000e4520: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, int n)\n-000e4550: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
{.
this->s\n-000e4590: 6f61 7020 3d20 3c61 2063 6c61 7373 3d22 oap = s\n-000e45e0: 6f61 703c 2f61 3e3b 3c2f 6469 763e 0a3c oap;
.<\n-000e45f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e4600: 3e20 205f 5f70 7472 203d 2073 6f61 705f > __ptr = soap_\n-000e4610: 6e65 775f 666c 6f61 7428 3c61 2063 6c61 new_float(soap, n); <\n-000e4650: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
__size\n-000e4670: 203d 206e 3b20 3c2f 6469 763e 0a3c 6469 = n;
. \n-000e4690: 205f 5f6f 6666 7365 7420 3d20 313b 203c __offset = 1; <\n-000e46a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
}
\n-000e46c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
flo\n-000e46f0: 6174 3c2f 7370 616e 3e26 616d 703b 2056 at& V\n-000e4700: 6563 746f 723a 3a6f 7065 7261 746f 725b ector::operator[\n-000e4710: 5d28 3c73 7061 6e20 636c 6173 733d 226b ](int<\n-000e4730: 2f73 7061 6e3e 2069 2920 3c2f 6469 763e /span> i)
\n-000e4740: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{
.
<\n-000e4770: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e4780: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n-000e4790: 2f73 7061 6e3e 205f 5f70 7472 5b69 202d /span> __ptr[i -\n-000e47a0: 205f 5f6f 6666 7365 745d 3b20 3c2f 6469 __offset]; .
}
.

An exampl\n-000e47f0: 6520 7072 6f67 7261 6d20 6672 6167 6d65 e program fragme\n-000e4800: 6e74 2074 6861 7420 7365 7269 616c 697a nt that serializ\n-000e4810: 6573 2061 2076 6563 746f 7220 6f66 2033 es a vector of 3\n-000e4820: 2065 6c65 6d65 6e74 733a 3c2f 703e 0a3c elements:

.<\n-000e4830: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-000e4840: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
str\n-000e4870: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap *soap = soap_new(\n-000e4940: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
.
Vect\n-000e4960: 6f72 2076 283c 6120 636c 6173 733d 2263 or v(soap\n-000e4990: 3c2f 613e 2c20 3329 3b3c 2f64 6976 3e0a , 3);
.\n-000e49a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
v[1] = 1.0; .
v[2] = 2.\n-000e49e0: 303b 203c 2f64 6976 3e0a 3c64 6976 2063 0;
.
v[3]\n-000e4a00: 203d 2033 2e30 3b20 3c2f 6469 763e 0a3c = 3.0;
.<\n-000e4a10: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e4a20: 3e73 6f61 705f 7772 6974 655f 5665 6374 >soap_write_Vect\n-000e4a30: 6f72 283c 6120 636c 6173 733d 2263 6f64 or(soap, &v);..

The output\n-000e4ca0: 2069 7320 6120 7061 7274 6961 6c6c 7920 is a partially \n-000e4cb0: 7472 616e 736d 6974 7465 6420 6172 7261 transmitted arra\n-000e4cc0: 793a 3c2f 703e 0a3c 6469 7620 636c 6173 y:

.
<\n-000e4cf0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e4d00: 3e26 6c74 3b3c 7370 616e 2063 6c61 7373 ><S\n-000e4d20: 4f41 502d 454e 433a 4172 7261 793c 2f73 OAP-ENC:Array SOAP-\n-000e4d50: 454e 433a 6172 7261 7954 7970 653c 2f73 ENC:arrayType="xsd:float\n-000e4d90: 5b34 5d26 7175 6f74 3b3c 2f73 7061 6e3e [4]"\n-000e4da0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 SOAP-ENC:\n-000e4dc0: 6f66 6673 6574 3c2f 7370 616e 3e3d 3c73 offset="\n-000e4df0: 5b31 5d26 7175 6f74 3b3c 2f73 7061 6e3e [1]"\n-000e4e00: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
. \n-000e4e20: 266c 743b 3c73 7061 6e20 636c 6173 733d <it\n-000e4e40: 656d 3c2f 7370 616e 3e26 6774 3b31 266c em>1&l\n-000e4e50: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/ite\n-000e4e70: 6d3c 2f73 7061 6e3e 2667 743b 203c 2f64 m> .
<item>2</item\n-000e4ef0: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
. \n-000e4f10: 266c 743b 3c73 7061 6e20 636c 6173 733d <it\n-000e4f30: 656d 3c2f 7370 616e 3e26 6774 3b33 266c em>3&l\n-000e4f40: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/ite\n-000e4f60: 6d3c 2f73 7061 6e3e 2667 743b 203c 2f64 m> .
</SOAP-ENC:Ar\n-000e4fb0: 7261 793c 2f73 7061 6e3e 2667 743b 3c2f ray>.

Note that \n-000e4ff0: 3c65 6d3e 3c63 6f64 653e 7873 643a 666c xsd:fl\n-000e5000: 6f61 745b 345d 3c2f 636f 6465 3e3c 2f65 oat[4] is the type a\n-000e5020: 6e64 2073 6861 7065 206f 6620 7468 6520 nd shape of the \n-000e5030: 656e 636f 6465 6420 6172 7261 792c 2077 encoded array, w\n-000e5040: 6869 6368 2073 7461 7274 7320 6174 206f hich starts at o\n-000e5050: 6666 7365 7420 3120 616e 6420 7468 6572 ffset 1 and ther\n-000e5060: 6566 6f72 6520 7468 6520 656c 656d 656e efore the elemen\n-000e5070: 7420 6174 2030 2069 7320 6f6d 6974 7465 t at 0 is omitte\n-000e5080: 642e 3c2f 703e 0a3c 703e f09f 949d 203c d.

.

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

.<\n-000e50e0: 2f61 3e0a 4e65 7374 6564 206f 6e65 2d64 /a>.Nested one-d\n-000e50f0: 696d 656e 7369 6f6e 616c 2064 796e 616d imensional dynam\n-000e5100: 6963 2053 4f41 502d 656e 636f 6465 6420 ic SOAP-encoded \n-000e5110: 6172 7261 7973 3c2f 6833 3e0a 3c70 3e4f arrays

.

O\n-000e5120: 6e65 2d64 696d 656e 7369 6f6e 616c 2053 ne-dimensional S\n-000e5130: 4f41 502d 656e 636f 6465 6420 6479 6e61 OAP-encoded dyna\n-000e5140: 6d69 6320 6172 7261 7973 206d 6179 2062 mic arrays may b\n-000e5150: 6520 6e65 7374 6564 2e20 466f 7220 6578 e nested. For ex\n-000e5160: 616d 706c 652c 2075 7369 6e67 203c 636f ample, using class Vector<\n-000e5180: 2f63 6f64 653e 2064 6563 6c61 7265 6420 /code> declared \n-000e5190: 696e 2074 6865 2070 7265 7669 6f75 7320 in the previous \n-000e51a0: 7365 6374 696f 6e2c 203c 636f 6465 3e63 section, c\n-000e51b0: 6c61 7373 204d 6174 7269 783c 2f63 6f64 lass Matrix is declared:<\n-000e51d0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

// Contents of\n-000e5220: 2066 696c 6520 2671 756f 743b 6d61 7472 file "matr\n-000e5230: 6978 2e68 2671 756f 743b 3a20 3c2f 7370 ix.h":
.
class M\n-000e5280: 6174 7269 7820 3c2f 6469 763e 0a3c 6469 atrix
.{\n-000e52a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 public:
. \n-000e52e0: 2020 2056 6563 746f 7220 2a5f 5f70 7472 Vector *__ptr\n-000e52f0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n-000e5310: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e5320: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int __size; .
int __\n-000e5380: 6f66 6673 6574 3b20 3c2f 6469 763e 0a3c offset;
.<\n-000e5390: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e53a0: 3e20 2020 204d 6174 7269 7828 293b 203c > Matrix(); <\n-000e53b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
\n-000e54b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
Vector&am\n-000e54d0: 703b 206f 7065 7261 746f 725b 5d28 3c73 p; operator[](int i);
.\n-000e5520: 2020 2020 3c73 7061 6e20 636c 6173 733d struct\n-000e5540: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 s\n-000e5570: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *soap;.
};
.

The Matr\n-000e5610: 6978 2074 7970 6520 6973 2065 7373 656e ix type is essen\n-000e5620: 7469 616c 6c79 2061 6e20 6172 7261 7920 tially an array \n-000e5630: 6f66 2070 6f69 6e74 6572 7320 746f 2061 of pointers to a\n-000e5640: 7272 6179 7320 7768 6963 6820 6d61 6b65 rrays which make\n-000e5650: 2075 7020 7468 6520 726f 7773 206f 6620 up the rows of \n-000e5660: 6120 6d61 7472 6978 2e20 5468 6520 7365 a matrix. The se\n-000e5670: 7269 616c 697a 6174 696f 6e20 6f66 2074 rialization of t\n-000e5680: 6865 2074 776f 2d64 696d 656e 7369 6f6e he two-dimension\n-000e5690: 616c 2064 796e 616d 6963 2061 7272 6179 al dynamic array\n-000e56a0: 2069 6e20 6973 206e 6573 7465 6420 666f in is nested fo\n-000e56b0: 726d 2069 6e20 584d 4c2e 3c2f 703e 0a3c rm in XML.

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

.

.Mult\n-000e5720: 692d 6469 6d65 6e73 696f 6e61 6c20 6479 i-dimensional dy\n-000e5730: 6e61 6d69 6320 534f 4150 2d65 6e63 6f64 namic SOAP-encod\n-000e5740: 6564 2061 7272 6179 733c 2f68 333e 0a3c ed arrays

.<\n-000e5750: 703e 4120 7370 6563 6961 6c20 666f 726d p>A special form\n-000e5760: 206f 6620 3c63 6f64 653e 7374 7275 6374 of struct\n-000e5770: 3c2f 636f 6465 3e20 6f72 203c 636f 6465 or class
is\n-000e5790: 2075 7365 6420 746f 2064 6566 696e 6520 used to define \n-000e57a0: 6d75 6c74 692d 6469 6d65 6e73 696f 6e61 multi-dimensiona\n-000e57b0: 6c20 6479 6e61 6d69 6320 534f 4150 2d65 l dynamic SOAP-e\n-000e57c0: 6e63 6f64 6564 2061 7272 6179 732e 2045 ncoded arrays. E\n-000e57d0: 6163 6820 6172 7261 7920 6861 7320 6120 ach array has a \n-000e57e0: 706f 696e 7465 7220 7661 7269 6162 6c65 pointer variable\n-000e57f0: 2061 6e64 2061 206d 656d 6265 7220 7468 and a member th\n-000e5800: 6174 2072 6563 6f72 6473 2074 6865 206e at records the n\n-000e5810: 756d 6265 7220 6f66 2065 6c65 6d65 6e74 umber of element\n-000e5820: 7320 7065 7220 6469 6d65 6e73 696f 6e2e s per dimension.\n-000e5830: 2041 203c 636f 6465 3e4b 3c2f 636f 6465 A K-dimensional ar\n-000e5850: 7261 7920 6973 2064 6563 6c61 7265 6420 ray is declared \n-000e5860: 6173 3a3c 2f70 3e0a 3c64 6976 2063 6c61 as:

.
\n-000e5890: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct array_name <\n-000e58c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{
.\n-000e58e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
Type *__pt\n-000e5900: 723b 2020 2020 203c 7370 616e 2063 6c61 r; // \n-000e5920: 706f 696e 7465 7220 746f 2061 7272 6179 pointer to array\n-000e5930: 206f 6620 656c 656d 656e 7473 2069 6e20 of elements in \n-000e5940: 6d65 6d6f 7279 3c2f 7370 616e 3e3c 2f64 memory.
int _\n-000e5990: 5f73 697a 655b 4b5d 3b20 2020 3c73 7061 _size[K]; // number of e\n-000e59c0: 6c65 6d65 6e74 7320 7065 7220 6469 6d65 lements per dime\n-000e59d0: 6e73 696f 6e3c 2f73 7061 6e3e 3c2f 6469 nsion.
int __\n-000e5a20: 6f66 6673 6574 5b4b 5d3b 203c 7370 616e offset[K]; // optional SOA\n-000e5a50: 5020 312e 3120 6172 7261 7920 6f66 6673 P 1.1 array offs\n-000e5a60: 6574 3c2f 7370 616e 3e3c 2f64 6976 3e0a et
.\n-000e5a70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
... \n-000e5a90: 2020 2020 2020 203c 7370 616e 2063 6c61 // \n-000e5ab0: 616e 7974 6869 6e67 2074 6861 7420 666f anything that fo\n-000e5ac0: 6c6c 6f77 7320 6865 7265 2077 696c 6c20 llows here will \n-000e5ad0: 6265 2069 676e 6f72 6564 203c 2f73 7061 be ignored
.
};.

wh\n-000e5b20: 6572 6520 7468 6520 3c63 6f64 653e 6172 ere the ar\n-000e5b30: 7261 795f 6e61 6d65 3c2f 636f 6465 3e20 ray_name \n-000e5b40: 6d75 7374 2062 6520 6120 6e6f 6e2d 7175 must be a non-qu\n-000e5b50: 616c 6966 6965 6420 6e61 6d65 2061 6e64 alified name and\n-000e5b60: 203c 636f 6465 3e54 7970 653c 2f63 6f64 Type is the type f\n-000e5b80: 6f72 2074 6865 2065 6c65 6d65 6e74 7320 or the elements \n-000e5b90: 6f66 2074 6865 2061 7272 6179 2e20 5468 of the array. Th\n-000e5ba0: 6520 3c63 6f64 653e 5f5f 7074 723c 2f63 e __ptr member poin\n-000e5bc0: 7473 2074 6f20 7468 6520 6172 7261 7920 ts to the array \n-000e5bd0: 7661 6c75 6573 2e20 5468 6520 3c63 6f64 values. The __size \n-000e5bf0: 6172 7261 7920 7370 6563 6966 6965 7320 array specifies \n-000e5c00: 7468 6520 6e75 6d62 6572 206f 6620 6172 the number of ar\n-000e5c10: 7261 7920 656c 656d 656e 7473 2070 6572 ray elements per\n-000e5c20: 2064 696d 656e 7369 6f6e 2e20 5468 6520 dimension. The \n-000e5c30: 3c63 6f64 653e 5f5f 6f66 6673 6574 3c2f __offset array spec\n-000e5c50: 6966 6965 7320 616e 206f 7074 696f 6e61 ifies an optiona\n-000e5c60: 6c20 6f66 6673 6574 2070 6572 2064 696d l offset per dim\n-000e5c70: 656e 7369 6f6e 2e3c 2f70 3e0a 3c70 3e46 ension.

.

F\n-000e5c80: 6f72 2065 7861 6d70 6c65 2c20 7468 6520 or example, the \n-000e5c90: 666f 6c6c 6f77 696e 6720 6465 636c 6172 following declar\n-000e5ca0: 6174 696f 6e20 7370 6563 6966 6965 7320 ation specifies \n-000e5cb0: 6120 6d61 7472 6978 2063 6c61 7373 3a3c a matrix class:<\n-000e5cc0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

class M\n-000e5d10: 6174 7269 7820 3c2f 6469 763e 0a3c 6469 atrix
.{\n-000e5d30: 203c 7370 616e 2063 6c61 7373 3d22 6b65 public:
. \n-000e5d70: 2020 203c 7370 616e 2063 6c61 7373 3d22 flo\n-000e5d90: 6174 3c2f 7370 616e 3e20 2a5f 5f70 7472 at *__ptr\n-000e5da0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n-000e5dc0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e5dd0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int __size[2]; <\n-000e5df0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
int\n-000e5e30: 205f 5f6f 6666 7365 745b 325d 3b20 3c2f __offset[2]; .
};
\n-000e5e60: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

By co\n-000e5e80: 6e74 7261 7374 2074 6f20 7468 6520 6d61 ntrast to the ma\n-000e5e90: 7472 6978 2063 6c61 7373 206f 6620 5365 trix class of Se\n-000e5ea0: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction Nes\n-000e5ed0: 7465 6420 6f6e 652d 6469 6d65 6e73 696f ted one-dimensio\n-000e5ee0: 6e61 6c20 6479 6e61 6d69 6320 534f 4150 nal dynamic SOAP\n-000e5ef0: 2d65 6e63 6f64 6564 2061 7272 6179 733c -encoded arrays<\n-000e5f00: 2f61 3e20 7468 6174 2064 6566 696e 6573 /a> that defines\n-000e5f10: 2061 206d 6174 7269 7820 6173 2061 6e20 a matrix as an \n-000e5f20: 6172 7261 7920 6f66 2070 6f69 6e74 6572 array of pointer\n-000e5f30: 7320 746f 206d 6174 7269 7820 726f 7773 s to matrix rows\n-000e5f40: 2c20 7468 6973 2063 6c61 7373 2068 6173 , this class has\n-000e5f50: 206f 6e65 2070 6f69 6e74 6572 2074 6f20 one pointer to \n-000e5f60: 6120 6d61 7472 6978 2073 746f 7265 6420 a matrix stored \n-000e5f70: 696e 2072 6f77 2d6d 616a 6f72 206f 7264 in row-major ord\n-000e5f80: 6572 2e20 5468 6520 7369 7a65 206f 6620 er. The size of \n-000e5f90: 7468 6520 6d61 7472 6978 2069 7320 6465 the matrix is de\n-000e5fa0: 7465 726d 696e 6564 2062 7920 7468 6520 termined by the \n-000e5fb0: 3c63 6f64 653e 5f5f 7369 7a65 3c2f 636f __size member: __size[0] holds the num\n-000e5ff0: 6265 7220 6f66 2072 6f77 7320 616e 6420 ber of rows and \n-000e6000: 3c63 6f64 653e 5f5f 7369 7a65 5b31 5d3c __size[1]<\n-000e6010: 2f63 6f64 653e 2068 6f6c 6473 2074 6865 /code> holds the\n-000e6020: 206e 756d 6265 7220 6f66 2063 6f6c 756d number of colum\n-000e6030: 6e73 206f 6620 7468 6520 6d61 7472 6978 ns of the matrix\n-000e6040: 2e20 4c69 6b65 7769 7365 2c20 3c63 6f64 . Likewise, __offset[0] is the row \n-000e6070: 6f66 6673 6574 2061 6e64 203c 636f 6465 offset and __offset[1] is the colum\n-000e60a0: 6e73 206f 6666 7365 742e 3c2f 703e 0a3c ns offset.

.<\n-000e60b0: 646c 2063 6c61 7373 3d22 7365 6374 696f dl class=\"sectio\n-000e60c0: 6e20 7761 726e 696e 6722 3e3c 6474 3e57 n warning\">
W\n-000e60d0: 6172 6e69 6e67 3c2f 6474 3e3c 6464 3e53 arning
S\n-000e60e0: 4f41 5020 312e 3220 646f 6573 206e 6f74 OAP 1.2 does not\n-000e60f0: 2073 7570 706f 7274 2070 6172 7469 616c support partial\n-000e6100: 6c79 2074 7261 6e73 6d69 7474 6564 2061 ly transmitted a\n-000e6110: 7272 6179 7320 616e 6420 7468 6520 3c63 rrays and the __offset member of a \n-000e6140: 6479 6e61 6d69 6320 6172 7261 7920 6973 dynamic array is\n-000e6150: 2069 676e 6f72 6564 2e3c 2f64 643e 3c2f ignored.
.

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

.

.N\n-000e61c0: 6f6e 2d53 4f41 5020 6479 6e61 6d69 6320 on-SOAP dynamic \n-000e61d0: 6172 7261 7973 3c2f 6833 3e0a 3c70 3e41 arrays

.

A\n-000e61e0: 6e20 6172 7261 7920 6973 2073 6572 6961 n array is seria\n-000e61f0: 6c69 7a65 6420 6173 2061 2073 6571 7565 lized as a seque\n-000e6200: 6e63 6520 6f66 2058 4d4c 2065 6c65 6d65 nce of XML eleme\n-000e6210: 6e74 732e 2042 7920 636f 6e74 7261 7374 nts. By contrast\n-000e6220: 2c20 6120 534f 4150 2d65 6e63 6f64 6564 , a SOAP-encoded\n-000e6230: 2061 7272 6179 2069 7320 7365 7269 616c array is serial\n-000e6240: 697a 6564 2061 7320 616e 2065 6c65 6d65 ized as an eleme\n-000e6250: 6e74 2077 6974 6820 6120 7365 7175 656e nt with a sequen\n-000e6260: 6365 206f 6620 7375 622d 656c 656d 656e ce of sub-elemen\n-000e6270: 7473 2c20 7768 6f73 6520 7461 6720 6e61 ts, whose tag na\n-000e6280: 6d65 7320 6172 6520 6972 7265 6c65 7661 mes are irreleva\n-000e6290: 6e74 2074 6f20 7468 6520 534f 4150 2070 nt to the SOAP p\n-000e62a0: 726f 6365 7373 6f72 2c20 7365 6520 3c61 rocessor, see One-dimension\n-000e62e0: 616c 2064 796e 616d 6963 2053 4f41 502d al dynamic SOAP-\n-000e62f0: 656e 636f 6465 6420 6172 7261 7973 3c2f encoded arrays.

.

An ar\n-000e6310: 7261 7920 6973 2064 6563 6c61 7265 6420 ray is declared \n-000e6320: 696e 2061 6e20 696e 7465 7266 6163 6520 in an interface \n-000e6330: 6865 6164 6572 2066 696c 6520 666f 7220 header file for \n-000e6340: 736f 6170 6370 7032 2061 7320 6120 7374 soapcpp2 as a st\n-000e6350: 7275 6374 206f 7220 636c 6173 7320 7769 ruct or class wi\n-000e6360: 7468 2061 206e 616d 6520 7468 6174 2069 th a name that i\n-000e6370: 7320 7175 616c 6966 6965 6420 7769 7468 s qualified with\n-000e6380: 2061 206e 616d 6573 7061 6365 2070 7265 a namespace pre\n-000e6390: 6669 782e 2054 6865 7265 2061 7265 2074 fix. There are t\n-000e63a0: 776f 2066 6f72 6d73 2e20 5468 6520 6669 wo forms. The fi\n-000e63b0: 7273 7420 666f 726d 2069 7320 7369 6d69 rst form is simi\n-000e63c0: 6c61 7220 746f 2074 6865 2053 4f41 502d lar to the SOAP-\n-000e63d0: 656e 636f 6465 6420 6172 7261 7920 6465 encoded array de\n-000e63e0: 636c 6172 6174 696f 6e20 7468 6174 2077 claration that w\n-000e63f0: 7261 7073 2074 6865 203c 636f 6465 3e5f raps the _\n-000e6400: 5f70 7472 3c2f 636f 6465 3e20 616e 6420 _ptr and \n-000e6410: 3c63 6f64 653e 5f5f 7369 7a65 3c2f 636f __size members:

\n-000e6430: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
s\n-000e6470: 7472 7563 7420 3c2f 7370 616e 3e70 7265 truct pre\n-000e6480: 6669 785f 5f61 7272 6179 5f6e 616d 6520 fix__array_name \n-000e6490: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{
\n-000e64b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
Type *__p\n-000e64d0: 7472 3b20 203c 7370 616e 2063 6c61 7373 tr; // po\n-000e64f0: 696e 7465 7220 746f 2061 7272 6179 206f inter to array o\n-000e6500: 6620 656c 656d 656e 7473 2069 6e20 6d65 f elements in me\n-000e6510: 6d6f 7279 3c2f 7370 616e 3e3c 2f64 6976 mory.
int __s\n-000e6560: 697a 653b 2020 203c 7370 616e 2063 6c61 ize; // \n-000e6580: 6e75 6d62 6572 206f 6620 656c 656d 656e number of elemen\n-000e6590: 7473 2070 6f69 6e74 6564 2074 6f20 3c2f ts pointed to
. \n-000e65c0: 2020 2e2e 2e20 2020 2020 2020 2020 2020 ... \n-000e65d0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // anythin\n-000e65f0: 6720 7468 6174 2066 6f6c 6c6f 7773 2068 g that follows h\n-000e6600: 6572 6520 7769 6c6c 2062 6520 6967 6e6f ere will be igno\n-000e6610: 7265 6420 3c2f 7370 616e 3e3c 2f64 6976 red .
};
.

The secon\n-000e6660: 6420 666f 726d 2069 7320 6d6f 7265 2067 d form is more g\n-000e6670: 656e 6572 6963 2c20 6265 6361 7573 6520 eneric, because \n-000e6680: 7468 6520 6172 7261 7920 6361 6e20 6265 the array can be\n-000e6690: 2064 6563 6c61 7265 6420 616e 7977 6865 declared anywhe\n-000e66a0: 7265 2069 6e20 7468 6520 7374 7275 6374 re in the struct\n-000e66b0: 206f 7220 636c 6173 7320 616e 6420 6d75 or class and mu\n-000e66c0: 6c74 6970 6c65 2061 7272 6179 7320 6361 ltiple arrays ca\n-000e66d0: 6e20 6265 2075 7365 6420 6173 206d 656d n be used as mem\n-000e66e0: 6265 7273 2c20 6561 6368 2077 6974 6820 bers, each with \n-000e66f0: 6120 3c63 6f64 653e 5f5f 7369 7a65 3c2f a __size member (__sizeName is also al\n-000e6730: 6c6f 7765 6429 2074 6861 7420 7072 6563 lowed) that prec\n-000e6740: 6564 6573 2061 2070 6f69 6e74 6572 206d edes a pointer m\n-000e6750: 656d 6265 723a 3c2f 703e 0a3c 6469 7620 ember:

.
struct \n-000e67a0: 3c2f 7370 616e 3e70 7265 6669 785f 5f61 prefix__a\n-000e67b0: 7272 6179 5f6e 616d 6520 3c2f 6469 763e rray_name
\n-000e67c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{
.
\n-000e67f0: 202e 2e2e 2020 2020 2020 2020 2020 2020 ... \n-000e6800: 2020 2020 2020 203c 7370 616e 2063 6c61 // \n-000e6820: 6f74 6865 7220 6d65 6d62 6572 7320 7468 other members th\n-000e6830: 6174 2061 7265 2073 6572 6961 6c69 7a65 at are serialize\n-000e6840: 643c 2f73 7061 6e3e 3c2f 6469 763e 0a3c d
.<\n-000e6850: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e6860: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n-000e6880: 6e74 3c2f 7370 616e 3e20 5f5f 7369 7a65 nt __size\n-000e6890: 5f6f 665f 6172 7261 7931 3b20 3c73 7061 _of_array1; // number of e\n-000e68c0: 6c65 6d65 6e74 7320 706f 696e 7465 6420 lements pointed \n-000e68d0: 746f 203c 2f73 7061 6e3e 3c2f 6469 763e to
\n-000e68e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
Type1 *ar\n-000e6900: 7261 7931 3b20 2020 2020 2020 203c 7370 ray1; // pointer to\n-000e6930: 2061 7272 6179 206f 6620 656c 656d 656e array of elemen\n-000e6940: 7473 2069 6e20 6d65 6d6f 7279 3c2f 7370 ts in memory
.
\n-000e6970: 2e2e 2e20 2020 2020 2020 2020 2020 2020 ... \n-000e6980: 2020 2020 2020 3c73 7061 6e20 636c 6173 // o\n-000e69a0: 7468 6572 206d 656d 6265 7273 2074 6861 ther members tha\n-000e69b0: 7420 6172 6520 7365 7269 616c 697a 6564 t are serialized\n-000e69c0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-000e69e0: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n-000e6a00: 743c 2f73 7061 6e3e 205f 5f73 697a 655f t __size_\n-000e6a10: 6f66 5f61 7272 6179 313b 203c 7370 616e of_array1; // number of el\n-000e6a40: 656d 656e 7473 2070 6f69 6e74 6564 2074 ements pointed t\n-000e6a50: 6f20 3c2f 7370 616e 3e3c 2f64 6976 3e0a o
.\n-000e6a60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
Type2 *arr\n-000e6a80: 6179 323b 2020 2020 2020 2020 3c73 7061 ay2; // pointer to \n-000e6ab0: 6172 7261 7920 6f66 2065 6c65 6d65 6e74 array of element\n-000e6ac0: 7320 696e 206d 656d 6f72 793c 2f73 7061 s in memory
.
.\n-000e6af0: 2e2e 2020 2020 2020 2020 2020 2020 2020 .. \n-000e6b00: 2020 2020 203c 7370 616e 2063 6c61 7373 // ot\n-000e6b20: 6865 7220 6d65 6d62 6572 7320 7468 6174 her members that\n-000e6b30: 2061 7265 2073 6572 6961 6c69 7a65 643c are serialized<\n-000e6b40: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.}\n-000e6b60: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.
<\n-000e6b80: 703e 5468 6520 3c63 6f64 653e 5f5f 7369 p>The __si\n-000e6b90: 7a65 3c2f 636f 6465 3e20 6d65 6d62 6572 ze member\n-000e6ba0: 2073 686f 756c 6420 6265 2061 6e20 3c63 should be an int t\n-000e6bc0: 7970 6520 616e 6420 6361 6e6e 6f74 2062 ype and cannot b\n-000e6bd0: 6520 6120 3c63 6f64 653e 7369 7a65 5f74 e a size_t\n-000e6be0: 3c2f 636f 6465 3e20 7479 7065 206f 7220 type or \n-000e6bf0: 6f74 6865 7220 696e 7465 6765 7220 7479 other integer ty\n-000e6c00: 7065 2e3c 2f70 3e0a 3c70 3e46 6f72 2065 pe.

.

For e\n-000e6c10: 7861 6d70 6c65 2c20 7765 2064 6566 696e xample, we defin\n-000e6c20: 6520 6120 4d61 7020 7374 7275 6374 7572 e a Map structur\n-000e6c30: 6520 7468 6174 2063 6f6e 7461 696e 7320 e that contains \n-000e6c40: 6120 7365 7175 656e 6365 206f 6620 6b65 a sequence of ke\n-000e6c50: 792d 7661 6c20 7061 6972 733a 3c2f 703e y-val pairs:

\n-000e6c60: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
s\n-000e6ca0: 7472 7563 7420 3c2f 7370 616e 3e6e 735f truct ns_\n-000e6cb0: 5f4d 6170 203c 2f64 6976 3e0a 3c64 6976 _Map
.{<\n-000e6cd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
int\n-000e6d10: 205f 5f73 697a 653b 203c 7370 616e 2063 __size; /\n-000e6d30: 2f20 6e75 6d62 6572 206f 6620 7061 6972 / number of pair\n-000e6d40: 7320 3c2f 7370 616e 3e3c 2f64 6976 3e0a s
.\n-000e6d50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
stru\n-000e6d80: 6374 203c 2f73 7061 6e3e 6e73 5f5f 5061 ct ns__Pa\n-000e6d90: 6972 3c2f 6469 763e 0a3c 6469 7620 636c ir
.
{\n-000e6db0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
\n-000e6dd0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-000e6df0: 2f73 7061 6e3e 202a 6b65 793b 3c2f 6469 /span> *key;.
char *val;
.<\n-000e6e50: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e6e60: 3e20 2020 207d 202a 7061 6972 3b20 2020 > } *pair; \n-000e6e70: 203c 7370 616e 2063 6c61 7373 3d22 636f // array \n-000e6e90: 6f66 2070 6169 7273 3c2f 7370 616e 3e3c of pairs<\n-000e6ea0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
};
\n-000e6ec0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

Since\n-000e6ee0: 2032 2e37 2e31 3620 6974 2069 7320 616c 2.7.16 it is al\n-000e6ef0: 736f 2070 6f73 7369 626c 6520 746f 2075 so possible to u\n-000e6f00: 7365 2061 2027 3c63 6f64 653e 243c 2f63 se a '$' as a speci\n-000e6f20: 616c 206d 6172 6b65 7220 746f 2061 6e6e al marker to ann\n-000e6f30: 6f74 6174 6520 6120 7369 7a65 206d 656d otate a size mem\n-000e6f40: 6265 7220 696e 7374 6561 6420 6f66 2072 ber instead of r\n-000e6f50: 6571 7569 7269 6e67 2074 6865 7365 206d equiring these m\n-000e6f60: 656d 6265 7273 2074 6f20 7374 6172 7420 embers to start \n-000e6f70: 7769 7468 203c 636f 6465 3e5f 5f73 697a with __siz\n-000e6f80: 653c 2f63 6f64 653e 3a3c 2f70 3e0a 3c64 e:

.
stru\n-000e6fd0: 6374 203c 2f73 7061 6e3e 6e73 5f5f 4d61 ct ns__Ma\n-000e6fe0: 7020 3c2f 6469 763e 0a3c 6469 7620 636c p
.
{.
$ int si\n-000e7040: 7a65 3b20 203c 7370 616e 2063 6c61 7373 ze; // nu\n-000e7060: 6d62 6572 206f 6620 7061 6972 7320 3c2f mber of pairs
. \n-000e7090: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n-000e70b0: 2f73 7061 6e3e 6e73 5f5f 5061 6972 3c2f /span>ns__Pair.
{.
char *key;
.<\n-000e7130: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e7140: 3e20 2020 2020 2020 203c 7370 616e 2063 > char *\n-000e7170: 7661 6c3b 3c2f 6469 763e 0a3c 6469 7620 val;
.
\n-000e7190: 207d 202a 7061 6972 3b20 2020 203c 7370 } *pair; // array of p\n-000e71c0: 6169 7273 3c2f 7370 616e 3e3c 2f64 6976 airs.
};
.

The array\n-000e7210: 2077 696c 6c20 6265 2073 6572 6961 6c69 will be seriali\n-000e7220: 7a65 6420 696e 2058 4d4c 2061 7320 6120 zed in XML as a \n-000e7230: 7365 7175 656e 6365 206f 6620 7061 6972 sequence of pair\n-000e7240: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

.
<\n-000e7270: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e7280: 3e26 6c74 3b3c 7370 616e 2063 6c61 7373 ><n\n-000e72a0: 733a 4d61 703c 2f73 7061 6e3e 2667 743b s:Map>\n-000e72b0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
<\n-000e72d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 pair>
\n-000e7300: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<key&\n-000e7340: 6774 3b3c 7370 616e 2063 6c61 7373 3d22 gt;Joe</key>\n-000e7390: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
&l\n-000e73b0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;val<\n-000e73d0: 2f73 7061 6e3e 2667 743b 3535 3520 3737 /span>>555 77\n-000e73e0: 2031 3233 3426 6c74 3b2f 3c73 7061 6e20 1234</val&g\n-000e7410: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
&l\n-000e7430: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/pai\n-000e7450: 723c 2f73 7061 6e3e 2667 743b 203c 2f64 r> .
<pair>
. \n-000e74c0: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <key><\n-000e74f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e7500: 6f72 6422 3e53 7573 616e 3c2f 7370 616e ord\">Susan</\n-000e7530: 6b65 793c 2f73 7061 6e3e 2667 743b 203c key> <\n-000e7540: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
<\n-000e7560: 3c73 7061 6e20 636c 6173 733d 226b 6579 val>555 12 6\n-000e7590: 3732 3526 6c74 3b2f 3c73 7061 6e20 636c 725</val>\n-000e75c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
<\n-000e75e0: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /pair<\n-000e7600: 2f73 7061 6e3e 2667 743b 203c 2f64 6976 /span>> .
<pair&\n-000e7650: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
\n-000e7670: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <k\n-000e7690: 6579 3c2f 7370 616e 3e26 6774 3b3c 7370 ey>Pete&l\n-000e76c0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/key\n-000e76e0: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
<val>555 99 4321\n-000e7740: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </v\n-000e7760: 616c 3c2f 7370 616e 3e26 6774 3b20 3c2f al> .
</pair>
.<\n-000e77c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e77d0: 3e26 6c74 3b2f 3c73 7061 6e20 636c 6173 ></\n-000e77f0: 6e73 3a4d 6170 3c2f 7370 616e 3e26 6774 ns:Map>\n-000e7800: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.
\n-000e7820: 3c2f 6469 763e 3c70 3e44 6573 6572 6961

Deseria\n-000e7830: 6c69 7a61 7469 6f6e 2069 7320 6c65 7373 lization is less\n-000e7840: 2065 6666 6963 6965 6e74 2063 6f6d 7061 efficient compa\n-000e7850: 7265 6420 746f 2061 2053 4f41 502d 656e red to a SOAP-en\n-000e7860: 636f 6465 6420 6172 7261 792c 2062 6563 coded array, bec\n-000e7870: 6175 7365 2074 6865 2073 697a 6520 6f66 ause the size of\n-000e7880: 2074 6865 2073 6571 7565 6e63 6520 6973 the sequence is\n-000e7890: 206e 6f74 2070 6172 7420 6f66 2074 6865 not part of the\n-000e78a0: 2053 4f41 5020 656e 636f 6469 6e67 2e20 SOAP encoding. \n-000e78b0: 4275 6666 6572 696e 6720 6973 2075 7365 Buffering is use\n-000e78c0: 6420 6279 2074 6865 2064 6573 6572 6961 d by the deseria\n-000e78d0: 6c69 7a65 7220 746f 2063 6f6c 6c65 6374 lizer to collect\n-000e78e0: 2074 6865 2065 6c65 6d65 6e74 7320 696e the elements in\n-000e78f0: 206d 656d 6f72 792e 2057 6865 6e20 7468 memory. When th\n-000e7900: 6520 656e 6420 6f66 2074 6865 206c 6973 e end of the lis\n-000e7910: 7420 6973 2072 6561 6368 6564 2c20 7468 t is reached, th\n-000e7920: 6520 6275 6666 6572 6564 2065 6c65 6d65 e buffered eleme\n-000e7930: 6e74 7320 6172 6520 636f 7069 6564 2074 nts are copied t\n-000e7940: 6f20 6120 6e65 776c 7920 616c 6c6f 6361 o a newly alloca\n-000e7950: 7465 6420 6d61 6e61 6765 6420 7370 6163 ted managed spac\n-000e7960: 6520 6f6e 2074 6865 2068 6561 7020 666f e on the heap fo\n-000e7970: 7220 7468 6520 6479 6e61 6d69 6320 6172 r the dynamic ar\n-000e7980: 7261 792e 3c2f 703e 0a3c 703e 4d75 6c74 ray.

.

Mult\n-000e7990: 6970 6c65 2061 7272 6179 7320 6361 6e20 iple arrays can \n-000e79a0: 6265 2070 6172 7420 6f66 2061 2073 7472 be part of a str\n-000e79b0: 7563 7420 6f72 2063 6c61 7373 2e20 466f uct or class. Fo\n-000e79c0: 7220 6578 616d 706c 653a 3c2f 703e 0a3c r example:

.<\n-000e79d0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-000e79e0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
str\n-000e7a10: 7563 7420 3c2f 7370 616e 3e6e 735f 5f43 uct ns__C\n-000e7a20: 6f6e 7461 6374 203c 2f64 6976 3e0a 3c64 ontact
.\n-000e7a40: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
.
char *firstName; \n-000e7a90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
char *lastName; .
$ int \n-000e7b20: 6e50 686f 6e65 733b 2020 2020 2020 2020 nPhones; \n-000e7b30: 2020 3c73 7061 6e20 636c 6173 733d 2263 // numbe\n-000e7b50: 7220 6f66 2050 686f 6e65 733c 2f73 7061 r of Phones
.
<\n-000e7b80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-000e7b90: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-000e7ba0: 705f 5f73 6f61 702e 6874 6d6c 2367 6137 p__soap.html#ga7\n-000e7bb0: 6336 6533 3864 3230 3966 3630 6131 3865 c6e38d209f60a18e\n-000e7bc0: 3336 3231 3732 6463 6131 6133 6236 6522 362172dca1a3b6e\"\n-000e7bd0: 3e55 4c4f 4e47 3634 3c2f 613e 202a 7068 >ULONG64 *ph\n-000e7be0: 6f6e 654e 756d 6265 723b 203c 7370 616e oneNumber; // array of pho\n-000e7c10: 6e65 206e 756d 6265 7273 203c 2f73 7061 ne numbers
.
$ <\n-000e7c40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e7c50: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int nEmails; \n-000e7c70: 2020 2020 2020 3c73 7061 6e20 636c 6173 // n\n-000e7c90: 756d 6265 7220 6f66 2065 6d61 696c 7320 umber of emails \n-000e7ca0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-000e7cc0: 2020 2020 3c73 7061 6e20 636c 6173 733d ch\n-000e7ce0: 6172 3c2f 7370 616e 3e20 2a2a 656d 6169 ar **emai\n-000e7cf0: 6c41 6464 7265 7373 3b20 203c 7370 616e lAddress; // array of ema\n-000e7d20: 696c 2061 6464 7265 7373 6573 203c 2f73 il addresses
.
};<\n-000e7d50: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

\n-000e7d70: 5468 6520 584d 4c20 7365 7269 616c 697a The XML serializ\n-000e7d80: 6174 696f 6e20 6f66 2061 6e20 6578 616d ation of an exam\n-000e7d90: 706c 6520 3c63 6f64 653e 6e73 5f5f 436f ple ns__Co\n-000e7da0: 6e74 6163 743c 2f63 6f64 653e 2069 733a ntact is:\n-000e7db0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

.
&\n-000e7df0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;ns:\n-000e7e10: 436f 6e74 6163 743c 2f73 7061 6e3e 2667 Contact&g\n-000e7e20: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
&l\n-000e7e40: 743b 3c73 7061 6e20 636c 6173 733d 226b t;firs\n-000e7e60: 744e 616d 653c 2f73 7061 6e3e 2667 743b tName>\n-000e7e70: 3c73 7061 6e20 636c 6173 733d 226b 6579 Joe\n-000e7e90: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </f\n-000e7eb0: 6972 7374 4e61 6d65 3c2f 7370 616e 3e26 irstName&\n-000e7ec0: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
&\n-000e7ee0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;las\n-000e7f00: 744e 616d 653c 2f73 7061 6e3e 2667 743b tName>\n-000e7f10: 3c73 7061 6e20 636c 6173 733d 226b 6579 Smith</lastName\n-000e7f60: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
. \n-000e7f80: 266c 743b 3c73 7061 6e20 636c 6173 733d <ph\n-000e7fa0: 6f6e 654e 756d 6265 723c 2f73 7061 6e3e oneNumber\n-000e7fb0: 2667 743b 3535 3531 3131 3232 3232 266c >5551112222&l\n-000e7fc0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/pho\n-000e7fe0: 6e65 4e75 6d62 6572 3c2f 7370 616e 3e26 neNumber&\n-000e7ff0: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
&\n-000e8010: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;pho\n-000e8030: 6e65 4e75 6d62 6572 3c2f 7370 616e 3e26 neNumber&\n-000e8040: 6774 3b35 3535 3132 3334 3536 3726 6c74 gt;5551234567<\n-000e8050: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/phon\n-000e8070: 654e 756d 6265 723c 2f73 7061 6e3e 2667 eNumber&g\n-000e8080: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
&l\n-000e80a0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;phon\n-000e80c0: 654e 756d 6265 723c 2f73 7061 6e3e 2667 eNumber&g\n-000e80d0: 743b 3535 3532 3334 3839 3031 266c 743b t;5552348901<\n-000e80e0: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /phone\n-000e8100: 4e75 6d62 6572 3c2f 7370 616e 3e26 6774 Number>\n-000e8110: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n-000e8130: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;email\n-000e8150: 4164 6472 6573 733c 2f73 7061 6e3e 2667 Address&g\n-000e8160: 743b 3c73 7061 6e20 636c 6173 733d 226b t;Joe.Smit\n-000e8180: 683c 2f73 7061 6e3e 403c 7370 616e 2063 h@m\n-000e81a0: 6169 6c2e 636f 6d3c 2f73 7061 6e3e 266c ail.com&l\n-000e81b0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/ema\n-000e81d0: 696c 4164 6472 6573 733c 2f73 7061 6e3e ilAddress\n-000e81e0: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
. \n-000e8200: 266c 743b 3c73 7061 6e20 636c 6173 733d <em\n-000e8220: 6169 6c41 6464 7265 7373 3c2f 7370 616e ailAddress>Joe@Smit\n-000e8270: 682e 636f 6d3c 2f73 7061 6e3e 266c 743b h.com<\n-000e8280: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /email\n-000e82a0: 4164 6472 6573 733c 2f73 7061 6e3e 2667 Address&g\n-000e82b0: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
<\n-000e82d0: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /ns:Co\n-000e82f0: 6e74 6163 743c 2f73 7061 6e3e 2667 743b ntact>\n-000e8300: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.
<\n-000e8320: 2f64 6976 3e3c 703e 466f 7220 432b 2b2c /div>

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

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

.ST\n-000e83e0: 4c20 636f 6e74 6169 6e65 7273 3c2f 6833 L containers.

The STL con\n-000e8400: 7461 696e 6572 7320 3c63 6f64 653e 7374 tainers st\n-000e8410: 643a 3a64 6571 7565 3c2f 636f 6465 3e2c d::deque,\n-000e8420: 203c 636f 6465 3e73 7464 3a3a 6c69 7374 std::list\n-000e8430: 3c2f 636f 6465 3e2c 203c 636f 6465 3e73 , s\n-000e8440: 7464 3a3a 7365 743c 2f63 6f64 653e 2c20 td::set, \n-000e8450: 616e 6420 3c63 6f64 653e 7374 643a 3a76 and std::v\n-000e8460: 6563 746f 723c 2f63 6f64 653e 2061 7265 ector are\n-000e8470: 2073 6572 6961 6c69 7a61 626c 6520 696e serializable in\n-000e8480: 2058 4d4c 2062 7920 7468 6520 736f 6170 XML by the soap\n-000e8490: 6370 7032 2d67 656e 6572 6174 6564 2073 cpp2-generated s\n-000e84a0: 6572 6961 6c69 7a65 7273 2e3c 2f70 3e0a erializers.

.\n-000e84b0: 3c70 3e49 6e20 6f72 6465 7220 746f 2075

In order to u\n-000e84c0: 7365 2063 6f6e 7461 696e 6572 7320 696e se containers in\n-000e84d0: 2061 6e20 696e 7465 7266 6163 6520 6865 an interface he\n-000e84e0: 6164 6572 2066 696c 6520 666f 7220 736f ader file for so\n-000e84f0: 6170 6370 7032 2c20 696d 706f 7274 203c apcpp2, import <\n-000e8500: 656d 3e3c 636f 6465 3e73 746c 6465 7175 em>stldequ\n-000e8510: 652e 683c 2f63 6f64 653e 3c2f 656d 3e2c e.h,\n-000e8520: 203c 656d 3e3c 636f 6465 3e73 746c 6c69 stlli\n-000e8530: 7374 2e68 3c2f 636f 6465 3e3c 2f65 6d3e st.h\n-000e8540: 2c20 3c65 6d3e 3c63 6f64 653e 7374 6c73 , stls\n-000e8550: 6574 2e68 3c2f 636f 6465 3e3c 2f65 6d3e et.h\n-000e8560: 2c20 6f72 203c 656d 3e3c 636f 6465 3e73 , or s\n-000e8570: 746c 7665 6374 6f72 2e68 3c2f 636f 6465 tlvector.h to enable\n-000e8590: 203c 636f 6465 3e73 7464 3a3a 6465 7175 std::dequ\n-000e85a0: 653c 2f63 6f64 653e 2c20 3c63 6f64 653e e, \n-000e85b0: 7374 643a 3a6c 6973 743c 2f63 6f64 653e std::list\n-000e85c0: 2c20 3c63 6f64 653e 7374 643a 3a73 6574 , std::set\n-000e85d0: 3c2f 636f 6465 3e2c 2061 6e64 203c 636f , and std::vector, respectiv\n-000e8600: 656c 792e 2046 6f72 2065 7861 6d70 6c65 ely. For example\n-000e8610: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
#import\n-000e8660: 2026 7175 6f74 3b73 746c 7665 6374 6f72 "stlvector\n-000e8670: 2e68 2671 756f 743b 3c2f 7370 616e 3e20 .h" \n-000e8680: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
c\n-000e86b0: 6c61 7373 203c 2f73 7061 6e3e 6e73 5f5f lass ns__\n-000e86c0: 6d79 436c 6173 7320 3c2f 6469 763e 0a3c myClass
.<\n-000e86d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e86e0: 3e7b 203c 7370 616e 2063 6c61 7373 3d22 >{ public<\n-000e8700: 2f73 7061 6e3e 3a20 3c2f 6469 763e 0a3c /span>:

.<\n-000e8710: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000e8720: 3e20 2020 2073 7464 3a3a 7665 6374 6f72 > std::vector\n-000e8730: 266c 743b 696e 7426 6774 3b20 2020 2020 <int> \n-000e8740: 2020 2020 206e 756d 6265 7220 313a 3130 number 1:10\n-000e8750: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // 1 to \n-000e8770: 3130 206e 756d 6265 7273 3c2f 7370 616e 10 numbers
.
st\n-000e87a0: 643a 3a76 6563 746f 7226 6c74 3b73 7464 d::vector<std\n-000e87b0: 3a3a 7374 7269 6e67 2667 743b 202a 6e61 ::string> *na\n-000e87c0: 6d65 2020 2032 3b20 2020 203c 7370 616e me 2; // more than 2 \n-000e87f0: 6e61 6d65 733c 2f73 7061 6e3e 3c2f 6469 names.
};
.

The use \n-000e8840: 6f66 2070 6f69 6e74 6572 206d 656d 6265 of pointer membe\n-000e8850: 7273 2073 7563 6820 6173 2066 6f72 203c rs such as for <\n-000e8860: 636f 6465 3e6e 616d 653c 2f63 6f64 653e code>name\n-000e8870: 2073 686f 776e 2061 626f 7665 2069 7320 shown above is \n-000e8880: 706f 7373 6962 6c65 2c20 6275 7420 6e6f possible, but no\n-000e8890: 7420 7265 7175 6972 6564 2e20 416c 736f t required. Also\n-000e88a0: 203c 636f 6465 3e6d 696e 4f63 6375 7273 minOccurs\n-000e88b0: 203a 206d 6178 4f63 6375 7273 3c2f 636f : maxOccurs and mi\n-000e88d0: 6e4f 6363 7572 733c 2f63 6f64 653e 206c nOccurs l\n-000e88e0: 656e 6774 6820 636f 6e73 7472 6169 6e74 ength constraint\n-000e88f0: 7320 6361 6e20 6265 2073 7065 6369 6669 s can be specifi\n-000e8900: 6564 2061 7320 7368 6f77 6e20 696e 2074 ed as shown in t\n-000e8910: 6865 2065 7861 6d70 6c65 2061 626f 7665 he example above\n-000e8920: 2e20 5468 6520 584d 4c20 7363 6865 6d61 . The XML schema\n-000e8930: 2074 6861 7420 636f 7272 6573 706f 6e64 that correspond\n-000e8940: 7320 746f 2074 6865 203c 636f 6465 3e6e s to the n\n-000e8950: 735f 5f6d 7943 6c61 7373 3c2f 636f 6465 s__myClass type is:

.<\n-000e8970: 6469 7620 636c 6173 733d 2261 6c74 223e div class=\"alt\">\n-000e8980: 203c 6469 7620 636c 6173 733d 2266 7261
<complexTy\n-000e89d0: 7065 3c2f 7370 616e 3e20 3c73 7061 6e20 pe \n-000e89f0: 6e61 6d65 3c2f 7370 616e 3e3d 3c73 7061 name="my\n-000e8a20: 436c 6173 7326 7175 6f74 3b3c 2f73 7061 Class">
.\n-000e8a50: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n-000e8a70: 7365 7175 656e 6365 3c2f 7370 616e 3e26 sequence&\n-000e8a80: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
\n-000e8aa0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <e\n-000e8ac0: 6c65 6d65 6e74 3c2f 7370 616e 3e20 3c73 lement name=\n-000e8af0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-000e8b10: 743b 6e75 6d62 6572 2671 756f 743b 3c2f t;number" type\n-000e8b40: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="xsd:in\n-000e8b70: 7426 7175 6f74 3b3c 2f73 7061 6e3e 203c t" <\n-000e8b80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e8b90: 6f72 6422 3e6d 696e 4f63 6375 7273 3c2f ord\">minOccurs="1"<\n-000e8bd0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> max\n-000e8bf0: 4f63 6375 7273 3c2f 7370 616e 3e3d 3c73 Occurs="\n-000e8c20: 3130 2671 756f 743b 3c2f 7370 616e 3e2f 10"/\n-000e8c30: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
. \n-000e8c50: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n-000e8c70: 656c 656d 656e 743c 2f73 7061 6e3e 203c element <\n-000e8c80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e8c90: 6f72 6422 3e6e 616d 653c 2f73 7061 6e3e ord\">name\n-000e8ca0: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n-000e8cc0: 6f74 3b6e 616d 6526 7175 6f74 3b3c 2f73 ot;name" type<\n-000e8cf0: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="xsd:str\n-000e8d20: 696e 6726 7175 6f74 3b3c 2f73 7061 6e3e ing"\n-000e8d30: 203c 7370 616e 2063 6c61 7373 3d22 6b65 minOccurs\n-000e8d50: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="2"\n-000e8d80: 3b3c 2f73 7061 6e3e 203c 7370 616e 2063 ; m\n-000e8da0: 6178 4f63 6375 7273 3c2f 7370 616e 3e3d axOccurs=\n-000e8db0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-000e8dd0: 743b 756e 626f 756e 6465 6426 7175 6f74 t;unbounded"\n-000e8de0: 3b3c 2f73 7061 6e3e 2f26 6774 3b20 3c2f ;/> .
</sequence\n-000e8e30: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
</complexType<\n-000e8e80: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
\n-000e8e90: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .
<\n-000e8eb0: 703e 596f 7520 6361 6e20 616c 736f 2069 p>You can also i\n-000e8ec0: 6d70 6c65 6d65 6e74 2079 6f75 7220 6f77 mplement your ow\n-000e8ed0: 6e20 636f 6e74 6169 6e65 7273 2e20 5468 n containers. Th\n-000e8ee0: 6520 636f 6e74 6169 6e65 7273 206d 7573 e containers mus\n-000e8ef0: 7420 6265 2063 6c61 7373 2074 656d 706c t be class templ\n-000e8f00: 6174 6573 2061 6e64 2073 686f 756c 6420 ates and should \n-000e8f10: 6465 6669 6e65 2061 2066 6f72 7761 7264 define a forward\n-000e8f20: 2069 7465 7261 746f 7220 7479 7065 2c20 iterator type, \n-000e8f30: 616e 6420 7072 6f76 6964 6520 7468 6520 and provide the \n-000e8f40: 666f 6c6c 6f77 696e 6720 6d65 7468 6f64 following method\n-000e8f50: 733a 3c2f 703e 0a3c 756c 3e0a 3c6c 693e s:

.
    .
  • \n-000e8f60: 3c63 6f64 653e 766f 6964 2063 6c65 6172 void clear\n-000e8f70: 2829 3c2f 636f 6465 3e20 656d 7074 7920 () empty \n-000e8f80: 7468 6520 636f 6e74 6169 6e65 723b 3c2f the container;.
  • it\n-000e8fa0: 6572 6174 6f72 2062 6567 696e 2829 3c2f erator begin() return ite\n-000e8fc0: 7261 746f 7220 746f 2062 6567 696e 6e69 rator to beginni\n-000e8fd0: 6e67 3b3c 2f6c 693e 0a3c 6c69 3e3c 636f ng;
  • .
  • const_iterato\n-000e8ff0: 7220 6265 6769 6e28 2920 636f 6e73 743c r begin() const<\n-000e9000: 2f63 6f64 653e 2072 6574 7572 6e20 636f /code> return co\n-000e9010: 6e73 7420 6974 6572 6174 6f72 2074 6f20 nst iterator to \n-000e9020: 6265 6769 6e6e 696e 673b 3c2f 6c69 3e0a beginning;
  • .\n-000e9030: 3c6c 693e 3c63 6f64 653e 6974 6572 6174
  • iterat\n-000e9040: 6f72 2065 6e64 2829 3c2f 636f 6465 3e20 or end() \n-000e9050: 7265 7475 726e 2069 7465 7261 746f 7220 return iterator \n-000e9060: 746f 2065 6e64 3b3c 2f6c 693e 0a3c 6c69 to end;
  • .const_ite\n-000e9080: 7261 746f 7220 656e 6428 2920 636f 6e73 rator end() cons\n-000e9090: 743c 2f63 6f64 653e 2072 6574 7572 6e20 t return \n-000e90a0: 636f 6e73 7420 6974 6572 6174 6f72 2074 const iterator t\n-000e90b0: 6f20 656e 643b 3c2f 6c69 3e0a 3c6c 693e o end;.
  • \n-000e90c0: 3c63 6f64 653e 7369 7a65 5f74 2073 697a size_t siz\n-000e90d0: 6528 293c 2f63 6f64 653e 2072 6574 7572 e() retur\n-000e90e0: 6e20 7369 7a65 3b3c 2f6c 693e 0a3c 6c69 n size;
  • .iterator \n-000e9100: 696e 7365 7274 2869 7465 7261 746f 7220 insert(iterator \n-000e9110: 706f 732c 2063 6f6e 7374 5f72 6566 6572 pos, const_refer\n-000e9120: 656e 6365 2076 616c 293c 2f63 6f64 653e ence val)\n-000e9130: 2069 6e73 6572 7420 656c 656d 656e 742e insert element.\n-000e9140: 3c2f 6c69 3e0a 3c2f 756c 3e0a 3c70 3e54 .
.

T\n-000e9150: 6865 203c 636f 6465 3e69 7465 7261 746f he iterato\n-000e9160: 723c 2f63 6f64 653e 2073 686f 756c 6420 r should \n-000e9170: 6265 2061 2066 6f72 7761 7264 2069 7465 be a forward ite\n-000e9180: 7261 746f 7220 7769 7468 2061 2064 6572 rator with a der\n-000e9190: 6566 6572 656e 6365 206f 7065 7261 746f eference operato\n-000e91a0: 7220 746f 2061 6363 6573 7320 7468 6520 r to access the \n-000e91b0: 636f 6e74 6169 6e65 7227 7320 656c 656d container's elem\n-000e91c0: 656e 7473 2c20 6974 206d 7573 7420 6265 ents, it must be\n-000e91d0: 2063 6f6d 7061 7261 626c 6520 2865 7175 comparable (equ\n-000e91e0: 616c 2f75 6e65 7175 616c 292c 2061 6e64 al/unequal), and\n-000e91f0: 2062 6520 7072 652d 696e 6372 656d 656e be pre-incremen\n-000e9200: 7461 626c 6520 283c 636f 6465 3e2b 2b69 table (++i\n-000e9210: 743c 2f63 6f64 653e 292e 2054 6865 2063 t). The c\n-000e9220: 6f6e 7374 2069 7465 7261 746f 7220 6973 onst iterator is\n-000e9230: 2075 7365 6420 6279 2069 7473 2073 6f61 used by its soa\n-000e9240: 7063 7070 322d 6765 6e65 7261 7465 6420 pcpp2-generated \n-000e9250: 7365 7269 616c 697a 6572 2074 6f20 7365 serializer to se\n-000e9260: 6e64 2061 2073 6571 7565 6e63 6520 6f66 nd a sequence of\n-000e9270: 2058 4d4c 2065 6c65 6d65 6e74 2076 616c XML element val\n-000e9280: 7565 732e 2054 6865 203c 636f 6465 3e69 ues. The i\n-000e9290: 6e73 6572 743c 2f63 6f64 653e 206d 6574 nsert met\n-000e92a0: 686f 6420 6973 2075 7365 6420 746f 2070 hod is used to p\n-000e92b0: 6f70 756c 6174 6520 6120 636f 6e74 6169 opulate a contai\n-000e92c0: 6e65 7220 7769 7468 203c 636f 6465 3e43 ner with C\n-000e92d0: 6f6e 7461 696e 6572 3a3a 6974 6572 6174 ontainer::iterat\n-000e92e0: 6f72 2069 203d 2063 6f6e 7461 696e 6572 or i = container\n-000e92f0: 2e69 6e73 6572 7428 636f 6e74 6169 6e65 .insert(containe\n-000e9300: 722e 656e 6428 292c 2076 616c 293c 2f63 r.end(), val).

.

Her\n-000e9320: 6520 6973 2069 6e20 6578 616d 706c 6520 e is in example \n-000e9330: 636f 6e74 6169 6e65 7220 7465 6d70 6c61 container templa\n-000e9340: 7465 2063 6c61 7373 3a3c 2f70 3e0a 3c64 te class:

.
// s\n-000e9390: 696d 706c 655f 7665 6374 6f72 2e68 203c imple_vector.h <\n-000e93a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.<\n-000e93c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e93d0: 6f72 6422 3e74 656d 706c 6174 653c 2f73 ord\">template <c\n-000e9400: 6c61 7373 3c2f 7370 616e 3e20 5426 6774 lass T>\n-000e9410: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
class si\n-000e9450: 6d70 6c65 5f76 6563 746f 7220 3c2f 6469 mple_vector .
{ pub\n-000e9490: 6c69 633c 2f73 7061 6e3e 3a20 3c2f 6469 lic: .
t\n-000e94d0: 7970 6564 6566 3c2f 7370 616e 3e20 5420 ypedef T \n-000e94e0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e94f0: 2020 2020 2020 7661 6c75 655f 7479 7065 value_type\n-000e9500: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n-000e9520: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000e9530: 6f72 6422 3e74 7970 6564 6566 3c2f 7370 ord\">typedef value_type \n-000e9550: 2020 2020 2020 2020 2020 2a20 706f 696e * poin\n-000e9560: 7465 723b 203c 2f64 6976 3e0a 3c64 6976 ter;
. \n-000e9580: 2020 3c73 7061 6e20 636c 6173 733d 226b typedef<\n-000e95a0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> con\n-000e95c0: 7374 3c2f 7370 616e 3e20 7661 6c75 655f st value_\n-000e95d0: 7479 7065 2020 2020 2020 2a20 636f 6e73 type * cons\n-000e95e0: 745f 706f 696e 7465 723b 203c 2f64 6976 t_pointer; .
ty\n-000e9620: 7065 6465 663c 2f73 7061 6e3e 2076 616c pedef val\n-000e9630: 7565 5f74 7970 6520 2020 2020 2020 2020 ue_type \n-000e9640: 2020 2026 616d 703b 2072 6566 6572 656e & referen\n-000e9650: 6365 3b20 3c2f 6469 763e 0a3c 6469 7620 ce;
.
\n-000e9670: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typedef cons\n-000e96b0: 743c 2f73 7061 6e3e 2076 616c 7565 5f74 t value_t\n-000e96c0: 7970 6520 2020 2020 2026 616d 703b 2063 ype & c\n-000e96d0: 6f6e 7374 5f72 6566 6572 656e 6365 3b20 onst_reference; \n-000e96e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
typedef pointer \n-000e9730: 2020 2020 2020 2020 2020 6974 6572 6174 iterat\n-000e9740: 6f72 3b20 3c2f 6469 763e 0a3c 6469 7620 or;
.
\n-000e9760: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typedef const_poin\n-000e9790: 7465 7220 2020 2020 2020 2020 2020 636f ter co\n-000e97a0: 6e73 745f 6974 6572 6174 6f72 3b20 3c2f nst_iterator; .
p\n-000e97e0: 726f 7465 6374 6564 3c2f 7370 616e 3e3a rotected:\n-000e97f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
it\n-000e9810: 6572 6174 6f72 2020 2020 2020 2020 2020 erator \n-000e9820: 2020 2020 2020 2020 2020 2020 2020 6865 he\n-000e9830: 6164 3b20 3c2f 6469 763e 0a3c 6469 7620 ad;
.
\n-000e9850: 2069 7465 7261 746f 7220 2020 2020 2020 iterator \n-000e9860: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e9870: 2074 6169 6c3b 203c 2f64 6976 3e0a 3c64 tail;
.\n-000e9890: 2020 2020 3c73 7061 6e20 636c 6173 733d si\n-000e98b0: 7a65 5f74 3c2f 7370 616e 3e20 2020 2020 ze_t \n-000e98c0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-000e98d0: 2020 2020 2063 6170 6163 6974 793b 203c capacity; <\n-000e98e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
\n-000e9910: 7075 626c 6963 3c2f 7370 616e 3e3a 203c public: <\n-000e9920: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
\n+000dfab0: 6e67 6c69 7465 7261 6c22 3ef0 078b f700 ngliteral\">.....\n+000dfac0: 553c 2f73 7061 6e3e 3c2f 6469 763e 0a3c U
.<\n+000dfad0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000dfae0: 3e3c 7370 616e 2063 6c61 7373 3d22 7374 > &\n+000dfb00: 6c74 3b72 2069 643d 2671 756f 743b 3c2f lt;r id="1" xsi:nil\n+000dfb40: 3d26 7175 6f74 3b3c 2f73 7061 6e3e 3c73 ="true&\n+000dfb70: 7175 6f74 3b2f 2667 743b 3c2f 6469 763e quot;/>
\n+000dfb80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
</X>.

The deseri\n+000dfbf0: 616c 697a 6572 2072 6563 6f6e 7374 7275 alizer reconstru\n+000dfc00: 6374 7320 7468 6520 7374 7275 6374 203c cts the struct <\n+000dfc10: 636f 6465 3e58 3c2f 636f 6465 3e20 6672 code>X fr\n+000dfc20: 6f6d 2074 6869 7320 666f 726d 206f 6620 om this form of \n+000dfc30: 584d 4c2c 2074 6865 7265 6279 2070 7265 XML, thereby pre\n+000dfc40: 7365 7276 696e 6720 7468 6520 696e 7465 serving the inte\n+000dfc50: 6772 6974 7920 6f66 2074 6865 2064 6174 grity of the dat\n+000dfc60: 6120 7374 7275 6374 7572 6520 7365 7269 a structure seri\n+000dfc70: 616c 697a 6564 2e3c 2f70 3e0a 3c70 3e57 alized.

.

W\n+000dfc80: 6865 6e20 7468 6520 6465 7365 7269 616c hen the deserial\n+000dfc90: 697a 6572 2065 6e63 6f75 6e74 6572 7320 izer encounters \n+000dfca0: 616e 2058 4d4c 2065 6c65 6d65 6e74 2074 an XML element t\n+000dfcb0: 6861 7420 6861 7320 6120 3c65 6d3e 3c63 hat has a xsi:nil=\"tru\n+000dfcd0: 6522 3c2f 636f 6465 3e3c 2f65 6d3e 2061 e\" a\n+000dfce0: 7474 7269 6275 7465 2062 7574 2074 6865 ttribute but the\n+000dfcf0: 2063 6f72 7265 7370 6f6e 6469 6e67 2043 corresponding C\n+000dfd00: 2f43 2b2b 2064 6174 6120 6973 206e 6f74 /C++ data is not\n+000dfd10: 2061 2070 6f69 6e74 6572 206f 7220 7265 a pointer or re\n+000dfd20: 6665 7265 6e63 652c 2074 6865 2064 6573 ference, the des\n+000dfd30: 6572 6961 6c69 7a65 7220 7769 6c6c 2074 erializer will t\n+000dfd40: 6572 6d69 6e61 7465 2077 6974 6820 6120 erminate with a \n+000dfd50: 3c63 6f64 653e 2353 4f41 505f 4e55 4c4c #SOAP_NULL\n+000dfd60: 3c2f 636f 6465 3e20 6661 756c 7420 7768 fault wh\n+000dfd70: 656e 2074 6865 203c 636f 6465 3e23 534f en the #SO\n+000dfd80: 4150 5f58 4d4c 5f53 5452 4943 543c 2f63 AP_XML_STRICT flag is set\n+000dfda0: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

.

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

.

\n+000dfde0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 \n+000dfe00: 0a56 6f69 6420 706f 696e 7465 7220 7365 .Void pointer se\n+000dfe10: 7269 616c 697a 6174 696f 6e3c 2f68 323e rialization

\n+000dfe20: 0a3c 703e 566f 6964 2070 6f69 6e74 6572 .

Void pointer\n+000dfe30: 7320 283c 636f 6465 3e76 6f69 642a 3c2f s (void*) cannot be\n+000dfe50: 2073 6572 6961 6c69 7a65 6420 696e 2058 serialized in X\n+000dfe60: 4d4c 2062 6563 6175 7365 2074 6865 2074 ML because the t\n+000dfe70: 7970 6520 6f66 2064 6174 6120 7265 6665 ype of data refe\n+000dfe80: 7272 6564 2074 6f20 6973 2075 6e74 7970 rred to is untyp\n+000dfe90: 6564 2e20 546f 2065 6e61 626c 6520 7468 ed. To enable th\n+000dfea0: 6520 7365 7269 616c 697a 6174 696f 6e20 e serialization \n+000dfeb0: 6f66 2076 6f69 6420 706f 696e 7465 7273 of void pointers\n+000dfec0: 2074 6861 7420 6172 6520 6d65 6d62 6572 that are member\n+000dfed0: 7320 6f66 2073 7472 7563 7473 2061 6e64 s of structs and\n+000dfee0: 2063 6c61 7373 6573 2c20 796f 7520 6361 classes, you ca\n+000dfef0: 6e20 696e 7365 7274 2061 203c 636f 6465 n insert a int __type member right \n+000dff20: 6265 666f 7265 2074 6865 2076 6f69 6420 before the void \n+000dff30: 706f 696e 7465 7220 6d65 6d62 6572 2e20 pointer member. \n+000dff40: 5468 6520 3c63 6f64 653e 696e 7420 5f5f The int __\n+000dff50: 7479 7065 3c2f 636f 6465 3e20 6d65 6d62 type memb\n+000dff60: 6572 2063 6f6e 7461 696e 7320 7275 6e20 er contains run \n+000dff70: 7469 6d65 2069 6e66 6f72 6d61 7469 6f6e time information\n+000dff80: 206f 6e20 7468 6520 7479 7065 206f 6620 on the type of \n+000dff90: 7468 6520 6461 7461 2070 6f69 6e74 6564 the data pointed\n+000dffa0: 2074 6f20 6279 203c 636f 6465 3e76 6f69 to by voi\n+000dffb0: 642a 3c2f 636f 6465 3e20 6d65 6d62 6572 d* member\n+000dffc0: 2069 6e20 6120 7374 7275 6374 2f63 6c61 in a struct/cla\n+000dffd0: 7373 2074 6f20 656e 6162 6c65 2074 6865 ss to enable the\n+000dffe0: 2073 6572 6961 6c69 7a61 7469 6f6e 206f serialization o\n+000dfff0: 6620 7468 6973 2064 6174 612e 2054 6865 f this data. The\n+000e0000: 203c 636f 6465 3e69 6e74 205f 5f74 7970 int __typ\n+000e0010: 653c 2f63 6f64 653e 206d 656d 6265 7220 e member \n+000e0020: 6973 2073 6574 2074 6f20 6120 3c63 6f64 is set to a SOAP_TYPE_T value, wher\n+000e0050: 6520 3c63 6f64 653e 543c 2f63 6f64 653e e T\n+000e0060: 2069 7320 7468 6520 6e61 6d65 206f 6620 is the name of \n+000e0070: 6120 7479 7065 2e20 5468 6520 736f 6170 a type. The soap\n+000e0080: 6370 7032 2074 6f6f 6c20 6765 6e65 7261 cpp2 tool genera\n+000e0090: 7465 7320 7468 6520 3c63 6f64 653e 534f tes the SO\n+000e00a0: 4150 5f54 5950 455f 543c 2f63 6f64 653e AP_TYPE_T\n+000e00b0: 2064 6566 696e 6974 696f 6e73 2069 6e20 definitions in \n+000e00c0: 3c65 6d3e 3c63 6f64 653e 736f 6170 482e soapH.\n+000e00d0: 683c 2f63 6f64 653e 3c2f 656d 3e20 616e h an\n+000e00e0: 6420 7573 6573 2074 6865 6d20 696e 7465 d uses them inte\n+000e00f0: 726e 616c 6c79 2074 6f20 756e 6971 7565 rnally to unique\n+000e0100: 6c79 2069 6465 6e74 6966 7920 7468 6520 ly identify the \n+000e0110: 7479 7065 206f 6620 6561 6368 206f 626a type of each obj\n+000e0120: 6563 742e 2054 6865 2074 7970 6520 6e61 ect. The type na\n+000e0130: 6d69 6e67 2063 6f6e 7665 6e74 696f 6e73 ming conventions\n+000e0140: 206f 7574 6c69 6e65 6420 696e 2053 6563 outlined in Sec\n+000e0150: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion S\n+000e0180: 6572 6961 6c69 7a69 6e67 2043 2f43 2b2b erializing C/C++\n+000e0190: 2064 6174 6120 746f 2058 4d4c 3c2f 613e data to XML\n+000e01a0: 2061 7265 2075 7365 6420 746f 2064 6574 are used to det\n+000e01b0: 6572 6d69 6e65 2074 6865 2074 7970 6520 ermine the type \n+000e01c0: 6e61 6d65 2066 6f72 203c 636f 6465 3e54 name for T\n+000e01d0: 3c2f 636f 6465 3e2e 2056 616c 7565 7320 . Values \n+000e01e0: 7365 7269 616c 697a 6564 2069 6e20 584d serialized in XM\n+000e01f0: 4c20 7769 7468 2074 6869 7320 6170 7072 L with this appr\n+000e0200: 6f61 6368 2061 6c77 6179 7320 6361 7272 oach always carr\n+000e0210: 7920 7468 6520 3c65 6d3e 3c63 6f64 653e y the \n+000e0220: 7873 693a 7479 7065 3c2f 636f 6465 3e3c xsi:type<\n+000e0230: 2f65 6d3e 2061 7474 7269 6275 7465 2069 /em> attribute i\n+000e0240: 6e20 584d 4c20 746f 2069 6e64 6963 6174 n XML to indicat\n+000e0250: 6520 7468 6520 7479 7065 206f 6620 636f e the type of co\n+000e0260: 6e74 656e 7420 7365 7269 616c 697a 6564 ntent serialized\n+000e0270: 2e3c 2f70 3e0a 3c70 3e48 6572 6520 6973 .

.

Here is\n+000e0280: 2061 6e20 6578 616d 706c 6520 746f 2069 an example to i\n+000e0290: 6c6c 7573 7472 6174 6520 7468 6520 7365 llustrate the se\n+000e02a0: 7269 616c 697a 6174 696f 6e20 6f66 2061 rialization of a\n+000e02b0: 203c 636f 6465 3e76 6f69 642a 3c2f 636f void* member in a \n+000e02d0: 7374 7275 6374 2f63 6c61 7373 3a3c 2f70 struct/class:.

\n+000e0320: 7374 7275 6374 203c 2f73 7061 6e3e 6e73 struct ns\n+000e0330: 5f5f 7265 636f 7264 203c 2f64 6976 3e0a __record
.\n+000e0340: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{
.
\n+000e0370: 3c73 7061 6e20 636c 6173 733d 226b 6579 int __type; // the SOAP_T\n+000e03c0: 5950 455f 5420 706f 696e 7465 6420 746f YPE_T pointed to\n+000e03d0: 2062 7920 7661 6c3c 2f73 7061 6e3e 3c2f by val.
void\n+000e0420: 202a 7661 6c3b 2020 3c73 7061 6e20 636c *val; //\n+000e0440: 2073 6572 6961 6c69 7a65 2061 6e79 2074 serialize any t\n+000e0450: 7970 6520 696e 2065 6c65 6d65 6e74 2026 ype in element &\n+000e0460: 6c74 3b76 616c 2667 743b 3c2f 7370 616e lt;val>
.
};.

The\n+000e04b0: 203c 636f 6465 3e5f 5f74 7970 653c 2f63 __type integer can\n+000e04d0: 2062 6520 7365 7420 746f 2030 2061 7420 be set to 0 at \n+000e04e0: 7275 6e20 7469 6d65 2074 6f20 6f6d 6974 run time to omit\n+000e04f0: 2074 6865 2073 6572 6961 6c69 7a61 7469 the serializati\n+000e0500: 6f6e 206f 6620 7468 6520 766f 6964 2070 on of the void p\n+000e0510: 6f69 6e74 6572 206d 656d 6265 722e 3c2f ointer member..

The follow\n+000e0530: 696e 6720 6578 616d 706c 6520 696c 6c75 ing example illu\n+000e0540: 7374 7261 7465 7320 7468 6520 696e 6974 strates the init\n+000e0550: 6961 6c69 7a61 7469 6f6e 206f 6620 3c63 ialization of myStruct with a void \n+000e0580: 706f 696e 7465 7220 746f 2061 6e20 696e pointer to an in\n+000e0590: 743a 3c2f 703e 0a3c 6469 7620 636c 6173 t:

.
<\n+000e05c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e05d0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct ns__record S;\n+000e05f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
int n\n+000e0630: 203d 2031 3233 3b20 3c2f 6469 763e 0a3c = 123;
.<\n+000e0640: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e0650: 3e53 2e76 616c 203d 2028 3c73 7061 6e20 >S.val = (void*\n+000e0680: 2926 616d 703b 6e3b 203c 2f64 6976 3e0a )&n;
.\n+000e0690: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
S.__type = SOA\n+000e06b0: 505f 5459 5045 5f69 6e74 3b20 3c2f 6469 P_TYPE_int; .

The\n+000e06e0: 2073 6572 6961 6c69 7a65 6420 6f75 7470 serialized outp\n+000e06f0: 7574 206f 6620 3c63 6f64 653e 533c 2f63 ut of S contains th\n+000e0710: 6520 696e 7465 6765 7220 696e 2069 7473 e integer in its\n+000e0720: 203c 656d 3e3c 636f 6465 3e76 616c 3c2f val eleme\n+000e0740: 6e74 3a3c 2f70 3e0a 3c64 6976 2063 6c61 nt:

.
\n+000e0770: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
<\n+000e07a0: 6e73 3a72 6563 6f72 643c 2f73 7061 6e3e ns:record\n+000e07b0: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
.
&\n+000e07d0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;val\n+000e07f0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c xs\n+000e0810: 693a 7479 7065 3c2f 7370 616e 3e3d 3c73 i:type="\n+000e0840: 7873 643a 696e 7426 7175 6f74 3b3c 2f73 xsd:int">123</\n+000e0860: 3c73 7061 6e20 636c 6173 733d 226b 6579 val>
.<\n+000e0890: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e08a0: 3e26 6c74 3b2f 3c73 7061 6e20 636c 6173 ></\n+000e08c0: 6e73 3a72 6563 6f72 643c 2f73 7061 6e3e ns:record\n+000e08d0: 2667 743b 3c2f 6469 763e 0a3c 2f64 6976 >
.

\n+000e1000: 4265 6361 7573 6520 7365 7276 6963 6520 Because service \n+000e1010: 6d65 7468 6f64 2070 6172 616d 6574 6572 method parameter\n+000e1020: 7320 6172 6520 7374 6f72 6564 2077 6974 s are stored wit\n+000e1030: 6869 6e20 7374 7275 6374 732c 2079 6f75 hin structs, you\n+000e1040: 2063 616e 2075 7365 203c 636f 6465 3e5f can use _\n+000e1050: 5f74 7970 653c 2f63 6f64 653e 2061 6e64 _type and\n+000e1060: 203c 636f 6465 3e76 6f69 642a 3c2f 636f void* parameters t\n+000e1080: 6f20 7061 7373 2070 6f6c 796d 6f72 7068 o pass polymorph\n+000e1090: 6963 2061 7267 756d 656e 7473 2077 6974 ic arguments wit\n+000e10a0: 686f 7574 2068 6176 696e 6720 746f 2064 hout having to d\n+000e10b0: 6566 696e 6520 6120 432b 2b20 636c 6173 efine a C++ clas\n+000e10c0: 7320 6869 6572 6172 6368 7920 2853 6563 s hierarchy (Sec\n+000e10d0: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion P\n+000e1100: 6f6c 796d 6f72 7068 6973 6d2c 2064 6572 olymorphism, der\n+000e1110: 6976 6564 2074 7970 6573 2c20 616e 6420 ived types, and \n+000e1120: 6479 6e61 6d69 6320 6269 6e64 696e 6720 dynamic binding \n+000e1130: 696e 2043 2b2b 3c2f 613e 2029 2c20 7072 in C++ ), pr\n+000e1140: 6f76 6964 6564 2074 6861 7420 3c65 6d3e ovided that \n+000e1150: 3c63 6f64 653e 7873 693a 7479 7065 3c2f xsi:type attri\n+000e1170: 6275 7465 7320 6172 6520 7072 6573 656e butes are presen\n+000e1180: 7420 696e 2074 6865 2058 4d4c 2065 6c65 t in the XML ele\n+000e1190: 6d65 6e74 732e 2046 6f72 2065 7861 6d70 ments. For examp\n+000e11a0: 6c65 3a3c 2f70 3e0a 3c64 6976 2063 6c61 le:

.
\n+000e11d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 typedef c\n+000e1210: 6861 723c 2f73 7061 6e3e 202a 7873 645f har *xsd_\n+000e1220: 5f73 7472 696e 673b 203c 2f64 6976 3e0a _string;
.\n+000e1230: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
typedef<\n+000e1260: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> int xsd_\n+000e1290: 5f69 6e74 3b20 3c2f 6469 763e 0a3c 6469 _int;
.<\n+000e12b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e12c0: 6f72 6422 3e74 7970 6564 6566 3c2f 7370 ord\">typedef fl\n+000e12f0: 6f61 743c 2f73 7061 6e3e 2078 7364 5f5f oat xsd__\n+000e1300: 666c 6f61 743b 203c 2f64 6976 3e0a 3c64 float;
.\n+000e1320: 3c73 7061 6e20 636c 6173 733d 226b 6579 enum ns__status { o\n+000e1350: 6e2c 206f 6666 207d 3b20 3c2f 6469 763e n, off };
\n+000e1360: 0a3c 6469 7620 636c 6173 733d 226c 696e .
struct \n+000e1390: 3c2f 7370 616e 3e6e 735f 5f77 6964 6765 ns__widge\n+000e13a0: 743c 2f64 6976 3e0a 3c64 6976 2063 6c61 t
.
{.
char *n\n+000e1400: 616d 653b 3c2f 6469 763e 0a3c 6469 7620 ame;
.
\n+000e1420: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int part;.
};
.<\n+000e1480: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e1490: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int ns__webmetho\n+000e14b0: 6428 3c73 7061 6e20 636c 6173 733d 226b d(int<\n+000e14d0: 2f73 7061 6e3e 205f 5f74 7970 652c 203c /span> __type, <\n+000e14e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e14f0: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void *data, struct \n+000e1530: 6e73 5f5f 7765 626d 6574 686f 6452 6573 ns__webmethodRes\n+000e1540: 706f 6e73 6520 7b20 3c73 7061 6e20 636c ponse { int __t\n+000e1570: 7970 653b 203c 7370 616e 2063 6c61 7373 ype; v\n+000e1590: 6f69 643c 2f73 7061 6e3e 202a 7265 7475 oid *retu\n+000e15a0: 726e 5f3b 207d 202a 6f75 7429 3b3c 2f64 rn_; } *out);.

Th\n+000e15d0: 6973 206d 6574 686f 6420 6861 7320 6120 is method has a \n+000e15e0: 706f 6c79 6d6f 7270 6869 6320 696e 7075 polymorphic inpu\n+000e15f0: 7420 7061 7261 6d65 7465 7220 3c63 6f64 t parameter data an\n+000e1610: 6420 6120 706f 6c79 6d6f 7270 6869 6320 d a polymorphic \n+000e1620: 6f75 7470 7574 2070 6172 616d 6574 6572 output parameter\n+000e1630: 203c 636f 6465 3e72 6574 7572 6e5f 3c2f return_. The __type p\n+000e1660: 6172 616d 6574 6572 7320 6361 6e20 6265 arameters can be\n+000e1670: 206f 6e65 206f 6620 3c63 6f64 653e 534f one of SO\n+000e1680: 4150 5f54 5950 455f 7873 645f 5f73 7472 AP_TYPE_xsd__str\n+000e1690: 696e 673c 2f63 6f64 653e 2c20 3c63 6f64 ing, SOAP_TYPE_xsd_\n+000e16b0: 5f69 6e74 3c2f 636f 6465 3e2c 203c 636f _int, SOAP_TYPE_xsd\n+000e16d0: 5f5f 666c 6f61 743c 2f63 6f64 653e 2c20 __float, \n+000e16e0: 3c63 6f64 653e 534f 4150 5f54 5950 455f SOAP_TYPE_\n+000e16f0: 6e73 5f5f 7374 6174 7573 3c2f 636f 6465 ns__status, or SOAP\n+000e1710: 5f54 5950 455f 6e73 5f5f 7769 6467 6574 _TYPE_ns__widget\n+000e1720: 3c2f 636f 6465 3e2e 2054 6865 2057 5344 . The WSD\n+000e1730: 4c20 616e 6420 5853 4420 6669 6c65 7320 L and XSD files \n+000e1740: 7072 6f64 7563 6564 2062 7920 7468 6520 produced by the \n+000e1750: 736f 6170 6370 7032 2074 6f6f 6c20 6465 soapcpp2 tool de\n+000e1760: 636c 6172 6520 7468 6520 3c63 6f64 653e clare the \n+000e1770: 766f 6964 2a3c 2f63 6f64 653e 2070 6f6c void* pol\n+000e1780: 796d 6f72 7068 6963 206d 656d 6265 7273 ymorphic members\n+000e1790: 2061 7320 3c65 6d3e 3c63 6f64 653e 7873 as xs\n+000e17a0: 643a 616e 7954 7970 653c 2f63 6f64 653e d:anyType\n+000e17b0: 3c2f 656d 3e20 656c 656d 656e 7473 2e3c elements.<\n+000e17c0: 2f70 3e0a 3c70 3e54 6f20 6465 636c 6172 /p>.

To declar\n+000e17d0: 6520 6120 7772 6170 7065 7220 7374 7275 e a wrapper stru\n+000e17e0: 6374 2f63 6c61 7373 2066 6f72 203c 636f ct/class for void* \n+000e1800: 706f 696e 7465 7273 2061 6c6c 6f77 7320 pointers allows \n+000e1810: 7573 2074 6f20 7265 7573 6520 7468 6973 us to reuse this\n+000e1820: 206d 6563 6861 6e69 736d 2077 6865 6e20 mechanism when \n+000e1830: 7765 2075 7365 203c 636f 6465 3e5f 5f73 we use __s\n+000e1840: 656c 663c 2f63 6f64 653e 2061 7320 6120 elf as a \n+000e1850: 6d65 6d62 6572 206e 616d 6520 7468 6174 member name that\n+000e1860: 2072 6566 6572 7320 746f 2074 6865 2063 refers to the c\n+000e1870: 7572 7265 6e74 2058 4d4c 2065 6c65 6d65 urrent XML eleme\n+000e1880: 6e74 2074 6167 206e 616d 653a 3c2f 703e nt tag name:

\n+000e1890: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
s\n+000e18d0: 7472 7563 7420 3c2f 7370 616e 3e5f 5f61 truct __a\n+000e18e0: 6e79 203c 2f64 6976 3e0a 3c64 6976 2063 ny
.
{.
int _\n+000e1940: 5f74 7970 653b 2020 203c 7370 616e 2063 _type; /\n+000e1960: 2f20 7468 6520 534f 4150 5f54 5950 455f / the SOAP_TYPE_\n+000e1970: 5420 706f 696e 7465 6420 746f 2062 7920 T pointed to by \n+000e1980: 5f5f 7365 6c66 3c2f 7370 616e 3e3c 2f64 __self.
void \n+000e19d0: 2a5f 5f73 656c 663b 203c 7370 616e 2063 *__self; /\n+000e19f0: 2f20 7365 7269 616c 697a 6520 616e 7920 / serialize any \n+000e1a00: 7479 7065 206f 6620 636f 6e74 656e 7420 type of content \n+000e1a10: 6f66 2074 6865 2063 7572 7265 6e74 2065 of the current e\n+000e1a20: 6c65 6d65 6e74 3c2f 7370 616e 3e3c 2f64 lement.
};
.<\n+000e1a50: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e1a60: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct ns__record<\n+000e1a90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{
.\n+000e1ab0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
__any val;\n+000e1ad0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
};.

The \n+000e1b10: 666f 6c6c 6f77 696e 6720 6578 616d 706c following exampl\n+000e1b20: 6520 696c 6c75 7374 7261 7465 7320 7468 e illustrates th\n+000e1b30: 6520 696e 6974 6961 6c69 7a61 7469 6f6e e initialization\n+000e1b40: 206f 6620 3c63 6f64 653e 5f5f 6e73 5f5f of __ns__\n+000e1b50: 7265 636f 7264 3c2f 636f 6465 3e20 7769 record wi\n+000e1b60: 7468 2061 2076 6f69 6420 706f 696e 7465 th a void pointe\n+000e1b70: 7220 746f 2061 6e20 696e 743a 3c2f 703e r to an int:

\n+000e1b80: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
s\n+000e1bc0: 7472 7563 7420 3c2f 7370 616e 3e6e 735f truct ns_\n+000e1bd0: 5f72 6563 6f72 6420 533b 203c 2f64 6976 _record S; .
in\n+000e1c10: 743c 2f73 7061 6e3e 206e 203d 2031 3233 t n = 123\n+000e1c20: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
S.val\n+000e1c40: 2e5f 5f69 7465 6d20 3d20 283c 7370 616e .__item = (void\n+000e1c70: 2a29 2661 6d70 3b6e 3b20 3c2f 6469 763e *)&n;
\n+000e1c80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
S.val.__type \n+000e1ca0: 3d20 534f 4150 5f54 5950 455f 696e 743b = SOAP_TYPE_int;\n+000e1cb0: 203c 2f64 6976 3e0a 3c2f 6469 763e 3c21
.
<\n+000e1cd0: 703e 5468 6520 7365 7269 616c 697a 6564 p>The serialized\n+000e1ce0: 206f 7574 7075 7420 6f66 203c 636f 6465 output of S contai\n+000e1d00: 6e73 2074 6865 2069 6e74 6567 6572 3a3c ns the integer:<\n+000e1d10: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
&l\n+000e1d50: 743b 3c73 7061 6e20 636c 6173 733d 226b t;ns:r\n+000e1d70: 6563 6f72 643c 2f73 7061 6e3e 2667 743b ecord>\n+000e1d80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<<\n+000e1da0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e1db0: 6f72 6474 7970 6522 3e76 616c 3c2f 7370 ordtype\">val xsi:ty\n+000e1de0: 7065 3c2f 7370 616e 3e3d 3c73 7061 6e20 pe="xsd:\n+000e1e10: 696e 7426 7175 6f74 3b3c 2f73 7061 6e3e int"\n+000e1e20: 2667 743b 3132 3326 6c74 3b2f 3c73 7061 >123</val\n+000e1e50: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
.
<\n+000e1e70: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/ns:r\n+000e1e90: 6563 6f72 643c 2f73 7061 6e3e 2667 743b ecord>\n+000e1ea0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.
<\n+000e1ec0: 2f64 6976 3e3c 703e f09f 949d 203c 6120 /div>

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

.

<\n+000e1f00: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+000e1f10: 2069 643d 2266 6978 6564 6172 7261 7973 id=\"fixedarrays\n+000e1f20: 223e 3c2f 613e 0a46 6978 6564 2d73 697a \">.Fixed-siz\n+000e1f30: 6520 6172 7261 7920 7365 7269 616c 697a e array serializ\n+000e1f40: 6174 696f 6e3c 2f68 323e 0a3c 703e 4669 ation

.

Fi\n+000e1f50: 7865 6420 7369 7a65 2061 7272 6179 7320 xed size arrays \n+000e1f60: 6172 6520 7365 7269 616c 697a 6564 2061 are serialized a\n+000e1f70: 7320 7265 7065 7469 7469 6f6e 7320 6f66 s repetitions of\n+000e1f80: 203c 656d 3e3c 636f 6465 3e69 7465 6d3c item<\n+000e1f90: 2f63 6f64 653e 3c2f 656d 3e20 656c 656d /code> elem\n+000e1fa0: 656e 7473 2077 6974 6820 7468 6520 6172 ents with the ar\n+000e1fb0: 7261 7920 7661 6c75 6573 2069 6e20 584d ray values in XM\n+000e1fc0: 4c2e 204d 756c 7469 2d64 696d 656e 7369 L. Multi-dimensi\n+000e1fd0: 6f6e 616c 2066 6978 6564 2073 697a 6520 onal fixed size \n+000e1fe0: 6172 7261 7973 2061 7265 2073 6572 6961 arrays are seria\n+000e1ff0: 6c69 7a65 6420 6173 206e 6573 7465 6420 lized as nested \n+000e2000: 3c65 6d3e 3c63 6f64 653e 6974 656d 3c2f item eleme\n+000e2020: 6e74 732c 2077 6865 7265 2074 6865 206f nts, where the o\n+000e2030: 7574 6572 2065 6c65 6d65 6e74 7320 6172 uter elements ar\n+000e2040: 6520 6172 7261 7973 2e3c 2f70 3e0a 3c70 e arrays.

.The serializati\n+000e2060: 6f6e 206f 6620 6669 7865 642d 7369 7a65 on of fixed-size\n+000e2070: 2061 7272 6179 7320 7375 7070 6f72 7473 arrays supports\n+000e2080: 2074 6865 2053 4f41 5020 5250 4320 656e the SOAP RPC en\n+000e2090: 636f 6469 6e67 206d 756c 7469 2d64 696d coding multi-dim\n+000e20a0: 656e 7369 6f6e 616c 2061 7272 6179 2066 ensional array f\n+000e20b0: 6f72 6d61 7420 6173 2077 656c 6c20 6173 ormat as well as\n+000e20c0: 2070 6172 7469 616c 6c79 2074 7261 6e73 partially trans\n+000e20d0: 6d69 7474 6564 2061 6e64 2073 7061 7273 mitted and spars\n+000e20e0: 6520 6172 7261 7920 666f 726d 6174 7320 e array formats \n+000e20f0: 7374 616e 6461 7264 697a 6564 2069 6e20 standardized in \n+000e2100: 534f 4150 2031 2e31 2061 6e64 2031 2e32 SOAP 1.1 and 1.2\n+000e2110: 2e3c 2f70 3e0a 3c70 3e46 6f72 2065 7861 .

.

For exa\n+000e2120: 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 2063 mple:

.
\n+000e2140: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
// Conte\n+000e2170: 6e74 7320 6f66 2066 696c 6520 2671 756f nts of file &quo\n+000e2180: 743b 6669 7865 642e 6826 7175 6f74 3b3a t;fixed.h":\n+000e2190: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
.<\n+000e21a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e21b0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct Example .
{
.\n+000e2210: 2020 2020 3c73 7061 6e20 636c 6173 733d fl\n+000e2230: 6f61 743c 2f73 7061 6e3e 2061 5b33 5d3b oat a[3];\n+000e2240: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
};.

Thi\n+000e2280: 7320 7370 6563 6966 6965 7320 6120 6669 s specifies a fi\n+000e2290: 7865 642d 7369 7a65 2061 7272 6179 2070 xed-size array p\n+000e22a0: 6172 7420 6f66 2074 6865 203c 636f 6465 art of the struct Example<\n+000e22c0: 2f63 6f64 653e 2e20 5468 6520 7365 7269 /code>. The seri\n+000e22d0: 616c 697a 6564 206f 7574 7075 7420 6f66 alized output of\n+000e22e0: 2061 7272 6179 203c 636f 6465 3e61 3c2f array a is:

. \n+000e2310: 3c64 6976 2063 6c61 7373 3d22 6672 6167
<a&g\n+000e2360: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
.
<\n+000e2380: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;item<\n+000e23a0: 2f73 7061 6e3e 2667 743b 312e 3026 6c74 /span>>1.0<\n+000e23b0: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/item\n+000e23d0: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
<item&\n+000e2420: 6774 3b32 2e30 266c 743b 2f3c 7370 616e gt;2.0</item\n+000e2450: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
.
&\n+000e2470: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;ite\n+000e2490: 6d3c 2f73 7061 6e3e 2667 743b 332e 3026 m>3.0&\n+000e24a0: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/it\n+000e24c0: 656d 3c2f 7370 616e 3e26 6774 3b3c 2f64 em>.
</a>\n+000e2510: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.
\n+000e2530: 3c2f 6469 763e 3c70 3e41 6e79 2064 6573

Any des\n+000e2540: 6572 6961 6c69 7a65 6420 6974 656d 7320 erialized items \n+000e2550: 6f66 2061 6e20 6172 7261 7920 7468 6174 of an array that\n+000e2560: 2064 6f20 6e6f 7420 6669 7420 696e 2074 do not fit in t\n+000e2570: 6865 2066 6978 6564 2073 697a 6520 6172 he fixed size ar\n+000e2580: 7261 792c 2069 2e65 2e20 6172 6520 6f75 ray, i.e. are ou\n+000e2590: 7420 6f66 2062 6f75 6e64 732c 2061 7265 t of bounds, are\n+000e25a0: 2069 676e 6f72 6564 2062 7920 7468 6520 ignored by the \n+000e25b0: 6465 7365 7269 616c 697a 6572 2077 6865 deserializer whe\n+000e25c0: 6e20 7468 6520 3c63 6f64 653e 2353 4f41 n the #SOA\n+000e25d0: 505f 435f 4e4f 494f 423c 2f63 6f64 653e P_C_NOIOB\n+000e25e0: 2066 6c61 6720 6973 2073 6574 2c20 6f74 flag is set, ot\n+000e25f0: 6865 7277 6973 6520 3c63 6f64 653e 2353 herwise #S\n+000e2600: 4f41 505f 494f 423c 2f63 6f64 653e 2065 OAP_IOB e\n+000e2610: 7272 6f72 7320 7769 6c6c 2062 6520 6765 rrors will be ge\n+000e2620: 6e65 7261 7465 6420 6279 2074 6865 2064 nerated by the d\n+000e2630: 6573 6572 6961 6c69 7a65 722e 3c2f 703e eserializer.

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

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

.

.\n+000e26a0: 4479 6e61 6d69 6320 6172 7261 7920 7365 Dynamic array se\n+000e26b0: 7269 616c 697a 6174 696f 6e3c 2f68 323e rialization

\n+000e26c0: 0a3c 703e 4479 6e61 6d69 6320 6172 7261 .

Dynamic arra\n+000e26d0: 7973 2061 7265 206d 7563 6820 6d6f 7265 ys are much more\n+000e26e0: 2066 6c65 7869 626c 6520 7468 616e 2066 flexible than f\n+000e26f0: 6978 6564 2d73 697a 6520 6172 7261 7973 ixed-size arrays\n+000e2700: 2e20 4479 6e61 6d69 6320 6172 7261 7973 . Dynamic arrays\n+000e2710: 2064 6563 6c61 7265 6420 696e 2074 6865 declared in the\n+000e2720: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n+000e2730: 7220 6669 6c65 2066 6f72 2073 6f61 7063 r file for soapc\n+000e2740: 7070 3220 6172 6520 6120 7370 6563 6961 pp2 are a specia\n+000e2750: 6c20 7374 7275 6374 206f 7220 636c 6173 l struct or clas\n+000e2760: 7320 6f72 2061 7265 2070 6172 7420 6f66 s or are part of\n+000e2770: 2061 2073 7472 7563 7420 6f72 2063 6c61 a struct or cla\n+000e2780: 7373 2077 6974 6820 6120 6d65 6d62 6572 ss with a member\n+000e2790: 2070 6f69 6e74 696e 6720 746f 2061 6e20 pointing to an \n+000e27a0: 6172 7261 7920 6f66 2065 6c65 6d65 6e74 array of element\n+000e27b0: 7320 616e 6420 6120 6d65 6d62 6572 2074 s and a member t\n+000e27c0: 6861 7420 7374 6f72 6573 2074 6865 2073 hat stores the s\n+000e27d0: 697a 6520 6f66 2074 6865 2061 7272 6179 ize of the array\n+000e27e0: 2e20 4479 6e61 6d69 6320 6172 7261 7920 . Dynamic array \n+000e27f0: 616c 6c6f 6361 7469 6f6e 7320 6172 6520 allocations are \n+000e2800: 6561 7379 2075 7369 6e67 2074 6865 2073 easy using the s\n+000e2810: 6f61 7063 7070 2d67 656e 6572 6174 6564 oapcpp-generated\n+000e2820: 203c 636f 6465 3e73 6f61 705f 6e65 775f soap_new_\n+000e2830: 543c 2f63 6f64 653e 2066 756e 6374 696f T functio\n+000e2840: 6e73 2066 6f72 2074 7970 6520 3c63 6f64 ns for type T. This\n+000e2860: 2066 756e 6374 696f 6e20 6973 2075 7365 function is use\n+000e2870: 6420 746f 2061 6c6c 6f63 6174 6520 616e d to allocate an\n+000e2880: 2061 7272 6179 206f 6620 7661 6c75 6573 array of values\n+000e2890: 2077 6869 6368 2063 616e 2074 6865 6e20 which can then \n+000e28a0: 6265 2061 7373 6967 6e65 6420 746f 2074 be assigned to t\n+000e28b0: 6865 2070 6f69 6e74 6572 206d 656d 6265 he pointer membe\n+000e28c0: 7220 6f66 2074 6865 2073 7472 7563 742f r of the struct/\n+000e28d0: 636c 6173 7320 7468 6174 2073 746f 7265 class that store\n+000e28e0: 7320 7468 6520 6172 7261 7920 706f 696e s the array poin\n+000e28f0: 7465 7220 7769 7468 2069 7473 2073 697a ter with its siz\n+000e2900: 652e 3c2f 703e 0a3c 703e 546f 2066 6163 e.

.

To fac\n+000e2910: 696c 6974 6174 6520 534f 4150 2052 5043 ilitate SOAP RPC\n+000e2920: 2065 6e63 6f64 696e 672c 2053 4f41 502d encoding, SOAP-\n+000e2930: 656e 636f 6465 6420 6172 7261 7973 2072 encoded arrays r\n+000e2940: 6571 7569 7265 2073 7065 6369 616c 2074 equire special t\n+000e2950: 7265 6174 6d65 6e74 2e20 534f 4150 2d65 reatment. SOAP-e\n+000e2960: 6e63 6f64 6564 2061 7272 6179 7320 6172 ncoded arrays ar\n+000e2970: 6520 7369 6e67 6c65 2d20 6f72 206d 756c e single- or mul\n+000e2980: 7469 2d64 696d 656e 7369 6f6e 616c 2061 ti-dimensional a\n+000e2990: 7272 6179 7320 7769 7468 2062 6f75 6e64 rrays with bound\n+000e29a0: 7320 7468 6174 2061 7070 6561 7220 696e s that appear in\n+000e29b0: 2058 4d4c 2e20 5468 6573 6520 6172 7261 XML. These arra\n+000e29c0: 7973 206d 6179 2061 6c73 6f20 6861 7665 ys may also have\n+000e29d0: 206f 6666 7365 7473 2074 6861 7420 6469 offsets that di\n+000e29e0: 6666 6572 2066 726f 6d20 7a65 726f 2e20 ffer from zero. \n+000e29f0: 5468 6520 696e 7465 6e74 206f 6620 534f The intent of SO\n+000e2a00: 4150 2d65 6e63 6f64 6564 2061 7272 6179 AP-encoded array\n+000e2a10: 7320 6973 2074 6f20 7265 706c 6963 6174 s is to replicat\n+000e2a20: 6520 6d75 6c74 692d 6469 6d65 6e73 696f e multi-dimensio\n+000e2a30: 6e61 6c20 6172 7261 7973 2063 6f6d 6d6f nal arrays commo\n+000e2a40: 6e6c 7920 666f 756e 6420 696e 2070 726f nly found in pro\n+000e2a50: 6772 616d 6d69 6e67 206c 616e 6775 6167 gramming languag\n+000e2a60: 6573 2e3c 2f70 3e0a 3c70 3e48 6f77 6576 es.

.

Howev\n+000e2a70: 6572 2c20 584d 4c20 616c 736f 2070 726f er, XML also pro\n+000e2a80: 7669 6465 7320 6120 7369 6d70 6c65 2077 vides a simple w\n+000e2a90: 6179 2074 6f20 7265 7072 6573 656e 7420 ay to represent \n+000e2aa0: 6120 7365 7175 656e 6365 206f 6620 7661 a sequence of va\n+000e2ab0: 6c75 6573 2077 6974 6820 6120 7365 7175 lues with a sequ\n+000e2ac0: 656e 6365 206f 6620 584d 4c20 656c 656d ence of XML elem\n+000e2ad0: 656e 7473 2e20 5468 6973 2064 6966 6665 ents. This diffe\n+000e2ae0: 7273 2066 726f 6d20 534f 4150 2d65 6e63 rs from SOAP-enc\n+000e2af0: 6f64 6564 2061 7272 6179 7320 696e 2074 oded arrays in t\n+000e2b00: 6861 7420 534f 4150 2d65 6e63 6f64 6564 hat SOAP-encoded\n+000e2b10: 2061 7272 6179 7320 6172 6520 656c 656d arrays are elem\n+000e2b20: 656e 7473 2077 6974 6820 6e65 7374 6564 ents with nested\n+000e2b30: 203c 656d 3e3c 636f 6465 3e69 7465 6d3c item<\n+000e2b40: 2f63 6f64 653e 3c2f 656d 3e20 656c 656d /code> elem\n+000e2b50: 656e 7473 2077 6974 6820 7661 6c75 6573 ents with values\n+000e2b60: 2c20 7468 6f75 6768 2053 4f41 5020 6465 , though SOAP de\n+000e2b70: 7365 7269 616c 697a 6572 7320 6d61 7920 serializers may \n+000e2b80: 6967 6e6f 7265 2074 6865 206e 616d 6520 ignore the name \n+000e2b90: 6f66 2074 6865 7365 2065 6c65 6d65 6e74 of these element\n+000e2ba0: 7320 7768 656e 2070 6172 7369 6e67 2058 s when parsing X\n+000e2bb0: 4d4c 2061 7320 7374 6174 6564 2069 6e20 ML as stated in \n+000e2bc0: 7468 6520 534f 4150 2073 7065 6369 6669 the SOAP specifi\n+000e2bd0: 6361 7469 6f6e 732e 3c2f 703e 0a3c 703e cations.

.

\n+000e2be0: 426f 7468 2053 4f41 502d 656e 636f 6465 Both SOAP-encode\n+000e2bf0: 6420 6172 7261 7973 2061 6e64 2073 6571 d arrays and seq\n+000e2c00: 7565 6e63 6573 206f 6620 584d 4c20 656c uences of XML el\n+000e2c10: 656d 656e 7473 2061 7265 2073 7570 706f ements are suppo\n+000e2c20: 7274 6564 2069 6e20 6753 4f41 502c 2075 rted in gSOAP, u\n+000e2c30: 7369 6e67 2064 796e 616d 6963 2061 7272 sing dynamic arr\n+000e2c40: 6179 7320 616e 6420 636f 6e74 6169 6e65 ays and containe\n+000e2c50: 7273 2e20 5468 6520 6261 7369 6373 2077 rs. The basics w\n+000e2c60: 696c 6c20 6265 2064 6573 6372 6962 6564 ill be described\n+000e2c70: 206e 6578 742e 2046 6f72 2061 6464 6974 next. For addit\n+000e2c80: 696f 6e61 6c20 6465 7461 696c 732c 2073 ional details, s\n+000e2c90: 6565 2074 6865 203c 6120 6872 6566 3d22 ee the C and C++ XML\n+000e2cd0: 2044 6174 6120 4269 6e64 696e 6773 3c2f Data Bindings documentation\n+000e2cf0: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

.

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

.

\n+000e2d30: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .SOAP-enc\n+000e2d60: 6f64 6564 2061 7272 6179 2062 6f75 6e64 oded array bound\n+000e2d70: 733c 2f68 333e 0a3c 703e 534f 4150 2d65 s

.

SOAP-e\n+000e2d80: 6e63 6f64 6564 2061 7272 6179 7320 7573 ncoded arrays us\n+000e2d90: 6520 7468 6520 3c65 6d3e 3c63 6f64 653e e the \n+000e2da0: 534f 4150 2d45 4e43 3a41 7272 6179 3c2f SOAP-ENC:Array attri\n+000e2dc0: 6275 7465 2069 6e20 584d 4c20 746f 2069 bute in XML to i\n+000e2dd0: 6465 6e74 6966 7920 7468 6520 6172 7261 dentify the arra\n+000e2de0: 7920 616e 6420 7468 6520 3c65 6d3e 3c63 y and the SOAP-ENC:arr\n+000e2e00: 6179 5479 7065 3c2f 636f 6465 3e3c 2f65 ayType attribute to \n+000e2e20: 6964 656e 7469 6679 2074 6865 2061 7272 identify the arr\n+000e2e30: 6179 2064 696d 656e 7369 6f6e 616c 6974 ay dimensionalit\n+000e2e40: 7920 616e 6420 6974 7320 7369 7a65 2e3c y and its size.<\n+000e2e50: 2f70 3e0a 3c70 3e41 7320 6120 7365 6375 /p>.

As a secu\n+000e2e60: 7269 7479 206d 6561 7375 7265 2074 6f20 rity measure to \n+000e2e70: 6176 6f69 6420 6465 6e69 616c 206f 6620 avoid denial of \n+000e2e80: 7365 7276 6963 6520 6174 7461 636b 7320 service attacks \n+000e2e90: 6261 7365 6420 6f6e 2073 656e 6469 6e67 based on sending\n+000e2ea0: 2061 2068 7567 6520 6172 7261 7920 7369 a huge array si\n+000e2eb0: 7a65 2076 616c 7565 2075 7369 6e67 2074 ze value using t\n+000e2ec0: 6865 203c 656d 3e3c 636f 6465 3e53 4f41 he SOA\n+000e2ed0: 502d 454e 433a 6172 7261 7954 7970 653c P-ENC:arrayType<\n+000e2ee0: 2f63 6f64 653e 3c2f 656d 3e20 6174 7472 /code> attr\n+000e2ef0: 6962 7574 652c 2072 6571 7569 7269 6e67 ibute, requiring\n+000e2f00: 2074 6865 2061 6c6c 6f63 6174 696f 6e20 the allocation \n+000e2f10: 6f66 206c 6172 6765 2063 6875 6e6b 7320 of large chunks \n+000e2f20: 6f66 206d 656d 6f72 792c 2074 6865 2074 of memory, the t\n+000e2f30: 6f74 616c 206e 756d 6265 7220 6f66 2061 otal number of a\n+000e2f40: 7272 6179 2065 6c65 6d65 6e74 7320 7365 rray elements se\n+000e2f50: 7420 6279 2074 6865 203c 656d 3e3c 636f t by the SOAP-ENC:arra\n+000e2f70: 7954 7970 653c 2f63 6f64 653e 3c2f 656d yType attribute cann\n+000e2f90: 6f74 2065 7863 6565 6420 3c63 6f64 653e ot exceed \n+000e2fa0: 2353 4f41 505f 4d41 5841 5252 4159 5349 #SOAP_MAXARRAYSI\n+000e2fb0: 5a45 3c2f 636f 6465 3e2c 2077 6869 6368 ZE, which\n+000e2fc0: 2069 7320 7365 7420 746f 2031 3030 3030 is set to 10000\n+000e2fd0: 3020 6279 2064 6566 6175 6c74 2e20 5468 0 by default. Th\n+000e2fe0: 6973 206c 696d 6974 2069 7320 6e6f 7420 is limit is not \n+000e2ff0: 6120 6861 7264 206c 696d 6974 206f 6e20 a hard limit on \n+000e3000: 7468 6520 6e75 6d62 6572 206f 6620 6172 the number of ar\n+000e3010: 7261 7920 656c 656d 656e 7473 2c20 6275 ray elements, bu\n+000e3020: 7420 7261 7468 6572 2074 6f20 6176 6f69 t rather to avoi\n+000e3030: 6420 7072 652d 616c 6c6f 6361 7469 6e67 d pre-allocating\n+000e3040: 206c 6172 6765 2061 7272 6179 7320 6173 large arrays as\n+000e3050: 2073 7461 7465 642e 2054 6865 2068 6172 stated. The har\n+000e3060: 6420 6c69 6d69 7420 6f6e 2074 6865 206e d limit on the n\n+000e3070: 756d 6265 7220 6f66 2061 7272 6179 2065 umber of array e\n+000e3080: 6c65 6d65 6e74 7320 7265 6365 6976 6564 lements received\n+000e3090: 2069 7320 3c63 6f64 653e 3c61 2063 6c61 is soap::maxoccur\n+000e3160: 733c 2f61 3e3c 2f63 6f64 653e 2077 6869 s whi\n+000e3170: 6368 2069 7320 7365 7420 746f 203c 636f ch is set to #SOAP_MAXOCCU\n+000e3190: 5253 3c2f 636f 6465 3e20 6279 2064 6566 RS by def\n+000e31a0: 6175 6c74 2e20 4279 2063 6f6e 7472 6173 ault. By contras\n+000e31b0: 742c 2074 6865 203c 636f 6465 3e23 534f t, the #SO\n+000e31c0: 4150 5f4d 4158 4152 5241 5953 495a 453c AP_MAXARRAYSIZE<\n+000e31d0: 2f63 6f64 653e 206c 696d 6974 206f 6e6c /code> limit onl\n+000e31e0: 7920 6e65 6761 7469 7665 6c79 2061 6666 y negatively aff\n+000e31f0: 6563 7473 206d 756c 7469 2d64 696d 656e ects multi-dimen\n+000e3200: 7369 6f6e 616c 2061 7272 6179 7320 6265 sional arrays be\n+000e3210: 6361 7573 6520 7468 6520 6469 6d65 6e73 cause the dimens\n+000e3220: 696f 6e61 6c69 7479 206f 6620 7468 6520 ionality of the \n+000e3230: 7265 6365 6976 696e 6720 6172 7261 7920 receiving array \n+000e3240: 6d61 7920 6265 206c 6f73 7420 7768 656e may be lost when\n+000e3250: 2074 6865 206e 756d 6265 7220 6f66 2065 the number of e\n+000e3260: 6c65 6d65 6e74 7320 6578 6365 6564 7320 lements exceeds \n+000e3270: 3130 3030 3030 2e20 4f6e 652d 6469 6d65 100000. One-dime\n+000e3280: 6e73 696f 6e61 6c20 6172 7261 7973 2061 nsional arrays a\n+000e3290: 7265 206e 6f74 2061 6666 6563 7465 6420 re not affected \n+000e32a0: 616e 6420 706f 7075 6c61 7465 6420 6166 and populated af\n+000e32b0: 7465 7220 7468 6973 206c 696d 6974 2062 ter this limit b\n+000e32c0: 7920 7369 6d70 6c79 2064 6573 6572 6961 y simply deseria\n+000e32d0: 6c69 7a69 6e67 2074 6865 2061 7272 6179 lizing the array\n+000e32e0: 2065 6c65 6d65 6e74 7320 7265 6365 6976 elements receiv\n+000e32f0: 6564 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 ed.

.

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

..One-dimension\n+000e3360: 616c 2064 796e 616d 6963 2053 4f41 502d al dynamic SOAP-\n+000e3370: 656e 636f 6465 6420 6172 7261 7973 3c2f encoded arrays.

A special\n+000e3390: 2066 6f72 6d20 6f66 2073 7472 7563 7420 form of struct \n+000e33a0: 6f72 2063 6c61 7373 2069 7320 7573 6564 or class is used\n+000e33b0: 2074 6f20 6465 6669 6e65 206f 6e65 2d64 to define one-d\n+000e33c0: 696d 656e 7369 6f6e 616c 2064 796e 616d imensional dynam\n+000e33d0: 6963 2053 4f41 502d 656e 636f 6465 6420 ic SOAP-encoded \n+000e33e0: 6172 7261 7973 2069 6e20 616e 2069 6e74 arrays in an int\n+000e33f0: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi\n+000e3400: 6c65 2066 6f72 2073 6f61 7063 7070 322e le for soapcpp2.\n+000e3410: 2045 6163 6820 6172 7261 7920 6861 7320 Each array has \n+000e3420: 6120 706f 696e 7465 7220 7661 7269 6162 a pointer variab\n+000e3430: 6c65 2061 6e64 2061 206d 656d 6265 7220 le and a member \n+000e3440: 7468 6174 2072 6563 6f72 6473 2074 6865 that records the\n+000e3450: 206e 756d 6265 7220 6f66 2065 6c65 6d65 number of eleme\n+000e3460: 6e74 7320 7468 6520 706f 696e 7465 7220 nts the pointer \n+000e3470: 706f 696e 7473 2074 6f20 696e 206d 656d points to in mem\n+000e3480: 6f72 792e 3c2f 703e 0a3c 703e 5468 6520 ory.

.

The \n+000e3490: 6765 6e65 7261 6c20 666f 726d 206f 6620 general form of \n+000e34a0: 7468 6520 7374 7275 6374 206f 7220 636c the struct or cl\n+000e34b0: 6173 7320 6465 636c 6172 6174 696f 6e20 ass declaration \n+000e34c0: 7468 6174 2063 6f6e 7461 696e 7320 6120 that contains a \n+000e34d0: 6f6e 652d 6469 6d65 6e73 696f 6e61 6c20 one-dimensional \n+000e34e0: 6479 6e61 6d69 6320 534f 4150 2d65 6e63 dynamic SOAP-enc\n+000e34f0: 6f64 6564 2061 7272 6179 2069 733a 3c2f oded array is:.

struct a\n+000e3550: 7272 6179 5f6e 616d 6520 3c2f 6469 763e rray_name
\n+000e3560: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{
.
\n+000e3590: 2054 7970 6520 2a5f 5f70 7472 3b20 203c Type *__ptr; <\n+000e35a0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000e35b0: 656e 7422 3e2f 2f20 706f 696e 7465 7220 ent\">// pointer \n+000e35c0: 746f 2061 7272 6179 206f 6620 656c 656d to array of elem\n+000e35d0: 656e 7473 2069 6e20 6d65 6d6f 7279 3c2f ents in memory
. \n+000e3600: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n+000e3620: 2f73 7061 6e3e 205f 5f73 697a 653b 2020 /span> __size; \n+000e3630: 203c 7370 616e 2063 6c61 7373 3d22 636f // number\n+000e3650: 206f 6620 656c 656d 656e 7473 2070 6f69 of elements poi\n+000e3660: 6e74 6564 2074 6f20 3c2f 7370 616e 3e3c nted to <\n+000e3670: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
int\n+000e36b0: 205f 5f6f 6666 7365 743b 203c 7370 616e __offset; // optional SOA\n+000e36e0: 5020 312e 3120 6172 7261 7920 6f66 6673 P 1.1 array offs\n+000e36f0: 6574 3c2f 7370 616e 3e3c 2f64 6976 3e0a et
.\n+000e3700: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
... \n+000e3720: 2020 2020 3c73 7061 6e20 636c 6173 733d // any\n+000e3740: 7468 696e 6720 7468 6174 2066 6f6c 6c6f thing that follo\n+000e3750: 7773 2068 6572 6520 7769 6c6c 2062 6520 ws here will be \n+000e3760: 6967 6e6f 7265 6420 3c2f 7370 616e 3e3c ignored <\n+000e3770: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
};
\n+000e3790: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

where\n+000e37b0: 2074 6865 203c 636f 6465 3e61 7272 6179 the array\n+000e37c0: 5f6e 616d 653c 2f63 6f64 653e 206d 7573 _name mus\n+000e37d0: 7420 6265 2061 206e 6f6e 2d71 7561 6c69 t be a non-quali\n+000e37e0: 6669 6564 206e 616d 6520 616e 6420 3c63 fied name and Type \n+000e3800: 6973 2074 6865 2074 7970 6520 666f 7220 is the type for \n+000e3810: 7468 6520 656c 656d 656e 7473 206f 6620 the elements of \n+000e3820: 7468 6520 6172 7261 792e 2054 6865 203c the array. The <\n+000e3830: 636f 6465 3e5f 5f70 7472 3c2f 636f 6465 code>__ptr member points \n+000e3850: 746f 2074 6865 2061 7272 6179 2076 616c to the array val\n+000e3860: 7565 7320 616e 6420 3c63 6f64 653e 5f5f ues and __\n+000e3870: 7369 7a65 3c2f 636f 6465 3e20 6973 2074 size is t\n+000e3880: 6865 2061 7272 6179 2073 697a 652e 2054 he array size. T\n+000e3890: 6865 203c 636f 6465 3e5f 5f6f 6666 7365 he __offse\n+000e38a0: 743c 2f63 6f64 653e 206d 656d 6265 7220 t member \n+000e38b0: 7370 6563 6966 6965 7320 616e 206f 7074 specifies an opt\n+000e38c0: 696f 6e61 6c20 6172 7261 7920 6f66 6673 ional array offs\n+000e38d0: 6574 2c20 7768 656e 206e 6f6e 7a65 726f et, when nonzero\n+000e38e0: 2c20 7365 6520 5365 6374 696f 6e20 3c61 , see Section One-dim\n+000e3920: 656e 7369 6f6e 616c 2064 796e 616d 6963 ensional dynamic\n+000e3930: 2053 4f41 502d 656e 636f 6465 6420 6172 SOAP-encoded ar\n+000e3940: 7261 7973 2077 6974 6820 6e6f 6e2d 7a65 rays with non-ze\n+000e3950: 726f 206f 6666 7365 7473 3c2f 613e 2e3c ro offsets.<\n+000e3960: 2f70 3e0a 3c70 3e49 6620 7468 6520 3c63 /p>.

If the array_name is qualifi\n+000e3990: 6564 2077 6974 6820 6120 6e61 6d65 7370 ed with a namesp\n+000e39a0: 6163 6520 7072 6566 6978 2074 6865 6e20 ace prefix then \n+000e39b0: 7468 6520 6172 7261 7920 6973 206e 6f74 the array is not\n+000e39c0: 2061 2053 4f41 502d 656e 636f 6465 6420 a SOAP-encoded \n+000e39d0: 6172 7261 7920 6275 7420 7261 7468 6572 array but rather\n+000e39e0: 2072 6570 7265 7365 6e74 7320 6120 7365 represents a se\n+000e39f0: 7175 656e 6365 206f 6620 584d 4c20 656c quence of XML el\n+000e3a00: 656d 656e 7473 2c20 7365 6520 5365 6374 ements, see Sect\n+000e3a10: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion Non-SOA\n+000e3a40: 5020 6479 6e61 6d69 6320 6172 7261 7973 P dynamic arrays\n+000e3a50: 3c2f 613e 2e3c 2f70 3e0a 3c70 3e54 6865 .

.

The\n+000e3a60: 2073 6f61 7063 7070 322d 6765 6e65 7261 soapcpp2-genera\n+000e3a70: 7465 6420 6465 7365 7269 616c 697a 6572 ted deserializer\n+000e3a80: 206f 6620 6120 6f6e 652d 6469 6d65 6e73 of a one-dimens\n+000e3a90: 696f 6e61 6c20 6479 6e61 6d69 6320 6172 ional dynamic ar\n+000e3aa0: 7261 7920 6361 6e20 6465 7365 7269 616c ray can deserial\n+000e3ab0: 697a 6520 7061 7274 6961 6c6c 7920 7472 ize partially tr\n+000e3ac0: 616e 736d 6974 7465 6420 616e 642f 6f72 ansmitted and/or\n+000e3ad0: 2053 4f41 502d 656e 636f 6465 6420 7370 SOAP-encoded sp\n+000e3ae0: 6172 7365 2061 7272 6179 732c 2061 6e64 arse arrays, and\n+000e3af0: 2065 7665 6e20 6d75 6c74 692d 6469 6d65 even multi-dime\n+000e3b00: 6e73 696f 6e61 6c20 6172 7261 7973 2077 nsional arrays w\n+000e3b10: 6869 6368 2077 696c 6c20 6265 2063 6f6c hich will be col\n+000e3b20: 6c61 7073 6564 2069 6e74 6f20 6120 6f6e lapsed into a on\n+000e3b30: 652d 6469 6d65 6e73 696f 6e61 6c20 6172 e-dimensional ar\n+000e3b40: 7261 7920 7769 7468 2072 6f77 2d6d 616a ray with row-maj\n+000e3b50: 6f72 206f 7264 6572 696e 672e 3c2f 703e or ordering.

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

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

.

\n+000e3c50: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .One-dimen\n+000e3c80: 7369 6f6e 616c 2064 796e 616d 6963 2053 sional dynamic S\n+000e3c90: 4f41 502d 656e 636f 6465 6420 6172 7261 OAP-encoded arra\n+000e3ca0: 7973 2077 6974 6820 6e6f 6e2d 7a65 726f ys with non-zero\n+000e3cb0: 206f 6666 7365 7473 3c2f 6833 3e0a 3c70 offsets

.The declaration\n+000e3cd0: 206f 6620 6120 6479 6e61 6d69 6320 6172 of a dynamic ar\n+000e3ce0: 7261 7920 6173 2064 6573 6372 6962 6564 ray as described\n+000e3cf0: 2069 6e20 5365 6374 696f 6e20 3c61 2063 in Section One-dimensional\n+000e3d30: 2064 796e 616d 6963 2053 4f41 502d 656e dynamic SOAP-en\n+000e3d40: 636f 6465 6420 6172 7261 7973 3c2f 613e coded arrays\n+000e3d50: 206d 6179 2069 6e63 6c75 6465 2061 6e20 may include an \n+000e3d60: 3c63 6f64 653e 696e 7420 5f5f 6f66 6673 int __offs\n+000e3d70: 6574 3c2f 636f 6465 3e20 6d65 6d62 6572 et member\n+000e3d80: 2e20 5768 656e 2073 6574 2074 6f20 616e . When set to an\n+000e3d90: 2069 6e74 6567 6572 2076 616c 7565 2c20 integer value, \n+000e3da0: 7468 6520 7365 7269 616c 697a 6572 206f the serializer o\n+000e3db0: 6620 7468 6520 6479 6e61 6d69 6320 6172 f the dynamic ar\n+000e3dc0: 7261 7920 7769 6c6c 2075 7365 2074 6869 ray will use thi\n+000e3dd0: 7320 6d65 6d62 6572 2061 7320 7468 6520 s member as the \n+000e3de0: 7374 6172 7420 696e 6465 7820 6f66 2074 start index of t\n+000e3df0: 6865 2061 7272 6179 2061 6e64 2074 6865 he array and the\n+000e3e00: 2053 4f41 502d 656e 636f 6465 6420 6172 SOAP-encoded ar\n+000e3e10: 7261 7920 6f66 6673 6574 2061 7474 7269 ray offset attri\n+000e3e20: 6275 7465 203c 656d 3e3c 636f 6465 3e53 bute S\n+000e3e30: 4f41 502d 454e 433a 6f66 6673 6574 3c2f OAP-ENC:offset will \n+000e3e50: 6170 7065 6172 2069 6e20 7468 6520 584d appear in the XM\n+000e3e60: 4c20 6d65 7373 6167 652e 204e 6f74 6520 L message. Note \n+000e3e70: 7468 6174 2061 7272 6179 206f 6666 7365 that array offse\n+000e3e80: 7473 2069 7320 6120 534f 4150 2031 2e31 ts is a SOAP 1.1\n+000e3e90: 2073 7065 6369 6669 6320 6665 6174 7572 specific featur\n+000e3ea0: 6520 7768 6963 6820 6973 206e 6f74 2073 e which is not s\n+000e3eb0: 7570 706f 7274 6564 2069 6e20 534f 4150 upported in SOAP\n+000e3ec0: 2031 2e32 2e3c 2f70 3e0a 3c70 3e46 6f72 1.2.

.

For\n+000e3ed0: 2065 7861 6d70 6c65 2c20 7468 6520 666f example, the fo\n+000e3ee0: 6c6c 6f77 696e 6720 6865 6164 6572 2066 llowing header f\n+000e3ef0: 696c 6520 6465 636c 6172 6573 2061 206e ile declares a n\n+000e3f00: 756d 6572 6963 203c 636f 6465 3e56 6563 umeric Vec\n+000e3f10: 746f 723c 2f63 6f64 653e 2063 6c61 7373 tor class\n+000e3f20: 2c20 7768 6963 6820 6973 2061 2064 796e , which is a dyn\n+000e3f30: 616d 6963 2061 7272 6179 206f 6620 666c amic array of fl\n+000e3f40: 6f61 7469 6e67 2070 6f69 6e74 2076 616c oating point val\n+000e3f50: 7565 7320 7769 7468 2061 6e20 696e 6465 ues with an inde\n+000e3f60: 7820 7468 6174 2073 7461 7274 7320 6174 x that starts at\n+000e3f70: 2031 3a3c 2f70 3e0a 3c64 6976 2063 6c61 1:

.
\n+000e3fa0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // Content\n+000e3fc0: 7320 6f66 2066 696c 6520 2671 756f 743b s of file "\n+000e3fd0: 7665 6374 6f72 2e68 2671 756f 743b 3a20 vector.h": \n+000e3fe0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n+000e4000: 3c73 7061 6e20 636c 6173 733d 226b 6579 class Vector
\n+000e4030: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{ publi\n+000e4060: 633c 2f73 7061 6e3e 3a3c 2f64 6976 3e0a c:
.\n+000e4070: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\n+000e40a0: 666c 6f61 743c 2f73 7061 6e3e 202a 5f5f float *__\n+000e40b0: 7074 723b 203c 2f64 6976 3e0a 3c64 6976 ptr;
. \n+000e40d0: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n+000e40f0: 2f73 7061 6e3e 205f 5f73 697a 653b 203c /span> __size; <\n+000e4100: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
int\n+000e4140: 205f 5f6f 6666 7365 743b 203c 2f64 6976 __offset; .
Vector()\n+000e4170: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
Ve\n+000e4190: 6374 6f72 283c 7370 616e 2063 6c61 7373 ctor(struc\n+000e41b0: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n+000e41e0: 736f 6170 3c2f 613e 202a 2c20 3c73 7061 soap *, int\n+000e4210: 206e 293b 3c2f 6469 763e 0a3c 6469 7620 n);
.
\n+000e4230: 203c 7370 616e 2063 6c61 7373 3d22 6b65 float\n+000e4250: 3c2f 7370 616e 3e26 616d 703b 206f 7065 & ope\n+000e4260: 7261 746f 725b 5d28 3c73 7061 6e20 636c rator[](int i);\n+000e4290: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
..};\n+000e4370: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.
The implementat\n+000e43a0: 696f 6e73 206f 6620 7468 6520 3c63 6f64 ions of the Vector \n+000e43c0: 6d65 7468 6f64 7320 6172 653a 3c2f 703e methods are:

\n+000e43d0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
Vector:\n+000e4400: 3a56 6563 746f 7228 293c 2f64 6976 3e0a :Vector()
.\n+000e4410: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{
.
th\n+000e4440: 6973 2d26 6774 3b73 6f61 705f 6465 6661 is->soap_defa\n+000e4450: 756c 7428 4e55 4c4c 293b 3c2f 6469 763e ult(NULL);
\n+000e4460: 0a3c 6469 7620 636c 6173 733d 226c 696e .
}
.
Vec\n+000e4490: 746f 723a 3a56 6563 746f 7228 3c73 7061 tor::Vector(struct \n+000e44c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+000e44f0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+000e4520: 2c20 3c73 7061 6e20 636c 6173 733d 226b , int<\n+000e4540: 2f73 7061 6e3e 206e 2920 3c2f 6469 763e /span> n)
\n+000e4550: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{
.
t\n+000e4580: 6869 732d 2667 743b 736f 6170 203d 203c his->soap = <\n+000e4590: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+000e45a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+000e45b0: 6874 6d6c 2361 3734 3066 3837 3630 6636 html#a740f8760f6\n+000e45c0: 6565 3463 3635 3834 6532 3563 3631 3266 ee4c6584e25c612f\n+000e45d0: 3538 3564 3730 223e 736f 6170 3c2f 613e 585d70\">soap\n+000e45e0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
__pt\n+000e4600: 7220 3d20 736f 6170 5f6e 6577 5f66 6c6f r = soap_new_flo\n+000e4610: 6174 283c 6120 636c 6173 733d 2263 6f64 at(soap, n);
.<\n+000e4650: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e4660: 3e20 205f 5f73 697a 6520 3d20 6e3b 203c > __size = n; <\n+000e4670: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
__offs\n+000e4690: 6574 203d 2031 3b20 3c2f 6469 763e 0a3c et = 1;
.<\n+000e46a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e46b0: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}
.
float& Vector::\n+000e4700: 6f70 6572 6174 6f72 5b5d 283c 7370 616e operator[](int \n+000e4730: 6929 203c 2f64 6976 3e0a 3c64 6976 2063 i)
.
{.
return \n+000e4790: 5f5f 7074 725b 6920 2d20 5f5f 6f66 6673 __ptr[i - __offs\n+000e47a0: 6574 5d3b 203c 2f64 6976 3e0a 3c64 6976 et];
.}<\n+000e47c0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

\n+000e47e0: 416e 2065 7861 6d70 6c65 2070 726f 6772 An example progr\n+000e47f0: 616d 2066 7261 676d 656e 7420 7468 6174 am fragment that\n+000e4800: 2073 6572 6961 6c69 7a65 7320 6120 7665 serializes a ve\n+000e4810: 6374 6f72 206f 6620 3320 656c 656d 656e ctor of 3 elemen\n+000e4820: 7473 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ts:

.
\n+000e4850: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+000e48a0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+000e48d0: 3c2f 613e 203d 203c 6120 636c 6173 733d = soap\n+000e4930: 5f6e 6577 3c2f 613e 2829 3b20 3c2f 6469 _new(); .
Vector v(soap, 3\n+000e4990: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
.
v[1] \n+000e49b0: 3d20 312e 303b 203c 2f64 6976 3e0a 3c64 = 1.0;
.\n+000e49d0: 765b 325d 203d 2032 2e30 3b20 3c2f 6469 v[2] = 2.0; .
v[3] = 3.0;\n+000e4a00: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
soap_w\n+000e4a20: 7269 7465 5f56 6563 746f 7228 3c61 2063 rite_Vector(soap, &am\n+000e4a60: 703b 7629 3b3c 2f64 6976 3e0a 3c64 6976 p;v);
.soap_destroy<\n+000e4ae0: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+000e4b10: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
.soap_end(\n+000e4b90: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+000e4bc0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.

T\n+000e4c90: 6865 206f 7574 7075 7420 6973 2061 2070 he output is a p\n+000e4ca0: 6172 7469 616c 6c79 2074 7261 6e73 6d69 artially transmi\n+000e4cb0: 7474 6564 2061 7272 6179 3a3c 2f70 3e0a tted array:

.\n+000e4cc0: 3c64 6976 2063 6c61 7373 3d22 616c 7422
<SOAP-ENC\n+000e4d20: 3a41 7272 6179 3c2f 7370 616e 3e20 3c73 :Array SOAP-ENC:arr\n+000e4d50: 6179 5479 7065 3c2f 7370 616e 3e3d 3c73 ayType="\n+000e4d80: 7873 643a 666c 6f61 745b 345d 2671 756f xsd:float[4]&quo\n+000e4d90: 743b 3c2f 7370 616e 3e20 3c73 7061 6e20 t; \n+000e4db0: 534f 4150 2d45 4e43 3a6f 6666 7365 743c SOAP-ENC:offset<\n+000e4dc0: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="[1]&quo\n+000e4df0: 743b 3c2f 7370 616e 3e26 6774 3b20 3c2f t;> .
<item>1</item>
. \n+000e4e90: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <i\n+000e4eb0: 7465 6d3c 2f73 7061 6e3e 2667 743b 3226 tem>2&\n+000e4ec0: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/it\n+000e4ee0: 656d 3c2f 7370 616e 3e26 6774 3b20 3c2f em> .
<item>3</item>
.&\n+000e4f80: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/SO\n+000e4fa0: 4150 2d45 4e43 3a41 7272 6179 3c2f 7370 AP-ENC:Array>
.

N\n+000e4fe0: 6f74 6520 7468 6174 203c 656d 3e3c 636f ote that xsd:float[4]<\n+000e5000: 2f63 6f64 653e 3c2f 656d 3e20 6973 2074 /code> is t\n+000e5010: 6865 2074 7970 6520 616e 6420 7368 6170 he type and shap\n+000e5020: 6520 6f66 2074 6865 2065 6e63 6f64 6564 e of the encoded\n+000e5030: 2061 7272 6179 2c20 7768 6963 6820 7374 array, which st\n+000e5040: 6172 7473 2061 7420 6f66 6673 6574 2031 arts at offset 1\n+000e5050: 2061 6e64 2074 6865 7265 666f 7265 2074 and therefore t\n+000e5060: 6865 2065 6c65 6d65 6e74 2061 7420 3020 he element at 0 \n+000e5070: 6973 206f 6d69 7474 6564 2e3c 2f70 3e0a is omitted.

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

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

.

.Nes\n+000e50e0: 7465 6420 6f6e 652d 6469 6d65 6e73 696f ted one-dimensio\n+000e50f0: 6e61 6c20 6479 6e61 6d69 6320 534f 4150 nal dynamic SOAP\n+000e5100: 2d65 6e63 6f64 6564 2061 7272 6179 733c -encoded arrays<\n+000e5110: 2f68 333e 0a3c 703e 4f6e 652d 6469 6d65 /h3>.

One-dime\n+000e5120: 6e73 696f 6e61 6c20 534f 4150 2d65 6e63 nsional SOAP-enc\n+000e5130: 6f64 6564 2064 796e 616d 6963 2061 7272 oded dynamic arr\n+000e5140: 6179 7320 6d61 7920 6265 206e 6573 7465 ays may be neste\n+000e5150: 642e 2046 6f72 2065 7861 6d70 6c65 2c20 d. For example, \n+000e5160: 7573 696e 6720 3c63 6f64 653e 636c 6173 using clas\n+000e5170: 7320 5665 6374 6f72 3c2f 636f 6465 3e20 s Vector \n+000e5180: 6465 636c 6172 6564 2069 6e20 7468 6520 declared in the \n+000e5190: 7072 6576 696f 7573 2073 6563 7469 6f6e previous section\n+000e51a0: 2c20 3c63 6f64 653e 636c 6173 7320 4d61 , class Ma\n+000e51b0: 7472 6978 3c2f 636f 6465 3e20 6973 2064 trix is d\n+000e51c0: 6563 6c61 7265 643a 3c2f 703e 0a3c 6469 eclared:

.
// Co\n+000e5210: 6e74 656e 7473 206f 6620 6669 6c65 2026 ntents of file &\n+000e5220: 7175 6f74 3b6d 6174 7269 782e 6826 7175 quot;matrix.h&qu\n+000e5230: 6f74 3b3a 203c 2f73 7061 6e3e 3c2f 6469 ot;: .
class\n+000e5270: 203c 2f73 7061 6e3e 4d61 7472 6978 203c Matrix <\n+000e5280: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{ \n+000e52b0: 7075 626c 6963 3c2f 7370 616e 3e3a 203c public: <\n+000e52c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
Vect\n+000e52e0: 6f72 202a 5f5f 7074 723b 203c 2f64 6976 or *__ptr; .
int __s\n+000e5330: 697a 653b 203c 2f64 6976 3e0a 3c64 6976 ize;
. \n+000e5350: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n+000e5370: 2f73 7061 6e3e 205f 5f6f 6666 7365 743b /span> __offset;\n+000e5380: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
Ma\n+000e53a0: 7472 6978 2829 3b20 3c2f 6469 763e 0a3c trix();
.<\n+000e53b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e53c0: 3e20 2020 204d 6174 7269 7828 3c73 7061 > Matrix(struct \n+000e53f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+000e5420: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+000e5450: 2c20 3c73 7061 6e20 636c 6173 733d 226b , int<\n+000e5470: 2f73 7061 6e3e 206e 2c20 3c73 7061 6e20 /span> n, int m\n+000e54a0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
.
\n+000e54c0: 5665 6374 6f72 2661 6d70 3b20 6f70 6572 Vector& oper\n+000e54d0: 6174 6f72 5b5d 283c 7370 616e 2063 6c61 ator[](int i); \n+000e5500: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
struct soap\n+000e5570: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap<\n+000e55c0: 2f61 3e3b 3c2f 6469 763e 0a3c 6469 7620 /a>;
.
}; \n+000e55e0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.
The Matrix type\n+000e5610: 2069 7320 6573 7365 6e74 6961 6c6c 7920 is essentially \n+000e5620: 616e 2061 7272 6179 206f 6620 706f 696e an array of poin\n+000e5630: 7465 7273 2074 6f20 6172 7261 7973 2077 ters to arrays w\n+000e5640: 6869 6368 206d 616b 6520 7570 2074 6865 hich make up the\n+000e5650: 2072 6f77 7320 6f66 2061 206d 6174 7269 rows of a matri\n+000e5660: 782e 2054 6865 2073 6572 6961 6c69 7a61 x. The serializa\n+000e5670: 7469 6f6e 206f 6620 7468 6520 7477 6f2d tion of the two-\n+000e5680: 6469 6d65 6e73 696f 6e61 6c20 6479 6e61 dimensional dyna\n+000e5690: 6d69 6320 6172 7261 7920 696e 2069 7320 mic array in is \n+000e56a0: 6e65 7374 6564 2066 6f72 6d20 696e 2058 nested form in X\n+000e56b0: 4d4c 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 ML.

.

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

.\n+000e5710: 3c2f 613e 0a4d 756c 7469 2d64 696d 656e .Multi-dimen\n+000e5720: 7369 6f6e 616c 2064 796e 616d 6963 2053 sional dynamic S\n+000e5730: 4f41 502d 656e 636f 6465 6420 6172 7261 OAP-encoded arra\n+000e5740: 7973 3c2f 6833 3e0a 3c70 3e41 2073 7065 ys

.

A spe\n+000e5750: 6369 616c 2066 6f72 6d20 6f66 203c 636f cial form of struct\n+000e5770: 206f 7220 3c63 6f64 653e 636c 6173 733c or class<\n+000e5780: 2f63 6f64 653e 2069 7320 7573 6564 2074 /code> is used t\n+000e5790: 6f20 6465 6669 6e65 206d 756c 7469 2d64 o define multi-d\n+000e57a0: 696d 656e 7369 6f6e 616c 2064 796e 616d imensional dynam\n+000e57b0: 6963 2053 4f41 502d 656e 636f 6465 6420 ic SOAP-encoded \n+000e57c0: 6172 7261 7973 2e20 4561 6368 2061 7272 arrays. Each arr\n+000e57d0: 6179 2068 6173 2061 2070 6f69 6e74 6572 ay has a pointer\n+000e57e0: 2076 6172 6961 626c 6520 616e 6420 6120 variable and a \n+000e57f0: 6d65 6d62 6572 2074 6861 7420 7265 636f member that reco\n+000e5800: 7264 7320 7468 6520 6e75 6d62 6572 206f rds the number o\n+000e5810: 6620 656c 656d 656e 7473 2070 6572 2064 f elements per d\n+000e5820: 696d 656e 7369 6f6e 2e20 4120 3c63 6f64 imension. A K-dimen\n+000e5840: 7369 6f6e 616c 2061 7272 6179 2069 7320 sional array is \n+000e5850: 6465 636c 6172 6564 2061 733a 3c2f 703e declared as:

\n+000e5860: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
s\n+000e58a0: 7472 7563 7420 3c2f 7370 616e 3e61 7272 truct arr\n+000e58b0: 6179 5f6e 616d 6520 3c2f 6469 763e 0a3c ay_name
.<\n+000e58c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e58d0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
.
T\n+000e58f0: 7970 6520 2a5f 5f70 7472 3b20 2020 2020 ype *__ptr; \n+000e5900: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // pointer\n+000e5920: 2074 6f20 6172 7261 7920 6f66 2065 6c65 to array of ele\n+000e5930: 6d65 6e74 7320 696e 206d 656d 6f72 793c ments in memory<\n+000e5940: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
. \n+000e5960: 2020 203c 7370 616e 2063 6c61 7373 3d22 int\n+000e5980: 3c2f 7370 616e 3e20 5f5f 7369 7a65 5b4b __size[K\n+000e5990: 5d3b 2020 203c 7370 616e 2063 6c61 7373 ]; // nu\n+000e59b0: 6d62 6572 206f 6620 656c 656d 656e 7473 mber of elements\n+000e59c0: 2070 6572 2064 696d 656e 7369 6f6e 3c2f per dimension
. \n+000e59f0: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n+000e5a10: 2f73 7061 6e3e 205f 5f6f 6666 7365 745b /span> __offset[\n+000e5a20: 4b5d 3b20 3c73 7061 6e20 636c 6173 733d K]; // opt\n+000e5a40: 696f 6e61 6c20 534f 4150 2031 2e31 2061 ional SOAP 1.1 a\n+000e5a50: 7272 6179 206f 6666 7365 743c 2f73 7061 rray offset
.
.\n+000e5a80: 2e2e 2020 2020 2020 2020 2020 2020 2020 .. \n+000e5a90: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // anythin\n+000e5ab0: 6720 7468 6174 2066 6f6c 6c6f 7773 2068 g that follows h\n+000e5ac0: 6572 6520 7769 6c6c 2062 6520 6967 6e6f ere will be igno\n+000e5ad0: 7265 6420 3c2f 7370 616e 3e3c 2f64 6976 red .
};
.

where the\n+000e5b20: 203c 636f 6465 3e61 7272 6179 5f6e 616d array_nam\n+000e5b30: 653c 2f63 6f64 653e 206d 7573 7420 6265 e must be\n+000e5b40: 2061 206e 6f6e 2d71 7561 6c69 6669 6564 a non-qualified\n+000e5b50: 206e 616d 6520 616e 6420 3c63 6f64 653e name and \n+000e5b60: 5479 7065 3c2f 636f 6465 3e20 6973 2074 Type is t\n+000e5b70: 6865 2074 7970 6520 666f 7220 7468 6520 he type for the \n+000e5b80: 656c 656d 656e 7473 206f 6620 7468 6520 elements of the \n+000e5b90: 6172 7261 792e 2054 6865 203c 636f 6465 array. The __ptr me\n+000e5bb0: 6d62 6572 2070 6f69 6e74 7320 746f 2074 mber points to t\n+000e5bc0: 6865 2061 7272 6179 2076 616c 7565 732e he array values.\n+000e5bd0: 2054 6865 203c 636f 6465 3e5f 5f73 697a The __siz\n+000e5be0: 653c 2f63 6f64 653e 2061 7272 6179 2073 e array s\n+000e5bf0: 7065 6369 6669 6573 2074 6865 206e 756d pecifies the num\n+000e5c00: 6265 7220 6f66 2061 7272 6179 2065 6c65 ber of array ele\n+000e5c10: 6d65 6e74 7320 7065 7220 6469 6d65 6e73 ments per dimens\n+000e5c20: 696f 6e2e 2054 6865 203c 636f 6465 3e5f ion. The _\n+000e5c30: 5f6f 6666 7365 743c 2f63 6f64 653e 2061 _offset a\n+000e5c40: 7272 6179 2073 7065 6369 6669 6573 2061 rray specifies a\n+000e5c50: 6e20 6f70 7469 6f6e 616c 206f 6666 7365 n optional offse\n+000e5c60: 7420 7065 7220 6469 6d65 6e73 696f 6e2e t per dimension.\n+000e5c70: 3c2f 703e 0a3c 703e 466f 7220 6578 616d

.

For exam\n+000e5c80: 706c 652c 2074 6865 2066 6f6c 6c6f 7769 ple, the followi\n+000e5c90: 6e67 2064 6563 6c61 7261 7469 6f6e 2073 ng declaration s\n+000e5ca0: 7065 6369 6669 6573 2061 206d 6174 7269 pecifies a matri\n+000e5cb0: 7820 636c 6173 733a 3c2f 703e 0a3c 6469 x class:

.
class\n+000e5d00: 203c 2f73 7061 6e3e 4d61 7472 6978 203c Matrix <\n+000e5d10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{ \n+000e5d40: 7075 626c 6963 3c2f 7370 616e 3e3a 203c public: <\n+000e5d50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
float *__ptr; .
int __s\n+000e5de0: 697a 655b 325d 3b20 3c2f 6469 763e 0a3c ize[2];
.<\n+000e5df0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e5e00: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n+000e5e20: 6e74 3c2f 7370 616e 3e20 5f5f 6f66 6673 nt __offs\n+000e5e30: 6574 5b32 5d3b 203c 2f64 6976 3e0a 3c64 et[2];
.\n+000e5e50: 7d3b 203c 2f64 6976 3e0a 3c2f 6469 763e };
.
\n+000e5e60: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

\n+000e6650: 5468 6520 7365 636f 6e64 2066 6f72 6d20 The second form \n+000e6660: 6973 206d 6f72 6520 6765 6e65 7269 632c is more generic,\n+000e6670: 2062 6563 6175 7365 2074 6865 2061 7272 because the arr\n+000e6680: 6179 2063 616e 2062 6520 6465 636c 6172 ay can be declar\n+000e6690: 6564 2061 6e79 7768 6572 6520 696e 2074 ed anywhere in t\n+000e66a0: 6865 2073 7472 7563 7420 6f72 2063 6c61 he struct or cla\n+000e66b0: 7373 2061 6e64 206d 756c 7469 706c 6520 ss and multiple \n+000e66c0: 6172 7261 7973 2063 616e 2062 6520 7573 arrays can be us\n+000e66d0: 6564 2061 7320 6d65 6d62 6572 732c 2065 ed as members, e\n+000e66e0: 6163 6820 7769 7468 2061 203c 636f 6465 ach with a __size m\n+000e6700: 656d 6265 7220 283c 636f 6465 3e5f 5f73 ember (__s\n+000e6710: 697a 654e 616d 653c 2f63 6f64 653e 2069 izeName i\n+000e6720: 7320 616c 736f 2061 6c6c 6f77 6564 2920 s also allowed) \n+000e6730: 7468 6174 2070 7265 6365 6465 7320 6120 that precedes a \n+000e6740: 706f 696e 7465 7220 6d65 6d62 6572 3a3c pointer member:<\n+000e6750: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

struct \n+000e67a0: 7072 6566 6978 5f5f 6172 7261 795f 6e61 prefix__array_na\n+000e67b0: 6d65 203c 2f64 6976 3e0a 3c64 6976 2063 me
.
{.
... \n+000e67f0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e6800: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // other m\n+000e6820: 656d 6265 7273 2074 6861 7420 6172 6520 embers that are \n+000e6830: 7365 7269 616c 697a 6564 3c2f 7370 616e serialized
.
int __size_of_arr\n+000e6890: 6179 313b 203c 7370 616e 2063 6c61 7373 ay1; // nu\n+000e68b0: 6d62 6572 206f 6620 656c 656d 656e 7473 mber of elements\n+000e68c0: 2070 6f69 6e74 6564 2074 6f20 3c2f 7370 pointed to
.
\n+000e68f0: 5479 7065 3120 2a61 7272 6179 313b 2020 Type1 *array1; \n+000e6900: 2020 2020 2020 3c73 7061 6e20 636c 6173 // p\n+000e6920: 6f69 6e74 6572 2074 6f20 6172 7261 7920 ointer to array \n+000e6930: 6f66 2065 6c65 6d65 6e74 7320 696e 206d of elements in m\n+000e6940: 656d 6f72 793c 2f73 7061 6e3e 3c2f 6469 emory.
... \n+000e6970: 2020 2020 2020 2020 2020 2020 2020 203c <\n+000e6980: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000e6990: 656e 7422 3e2f 2f20 6f74 6865 7220 6d65 ent\">// other me\n+000e69a0: 6d62 6572 7320 7468 6174 2061 7265 2073 mbers that are s\n+000e69b0: 6572 6961 6c69 7a65 643c 2f73 7061 6e3e erialized\n+000e69c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
int __size_of_arra\n+000e6a10: 7931 3b20 3c73 7061 6e20 636c 6173 733d y1; // num\n+000e6a30: 6265 7220 6f66 2065 6c65 6d65 6e74 7320 ber of elements \n+000e6a40: 706f 696e 7465 6420 746f 203c 2f73 7061 pointed to
.
T\n+000e6a70: 7970 6532 202a 6172 7261 7932 3b20 2020 ype2 *array2; \n+000e6a80: 2020 2020 203c 7370 616e 2063 6c61 7373 // po\n+000e6aa0: 696e 7465 7220 746f 2061 7272 6179 206f inter to array o\n+000e6ab0: 6620 656c 656d 656e 7473 2069 6e20 6d65 f elements in me\n+000e6ac0: 6d6f 7279 3c2f 7370 616e 3e3c 2f64 6976 mory.
... \n+000e6af0: 2020 2020 2020 2020 2020 2020 2020 3c73 // other mem\n+000e6b20: 6265 7273 2074 6861 7420 6172 6520 7365 bers that are se\n+000e6b30: 7269 616c 697a 6564 3c2f 7370 616e 3e3c rialized<\n+000e6b40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
};
\n+000e6b60: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

The <\n+000e6b80: 636f 6465 3e5f 5f73 697a 653c 2f63 6f64 code>__size member should\n+000e6ba0: 2062 6520 616e 203c 636f 6465 3e69 6e74 be an int\n+000e6bb0: 3c2f 636f 6465 3e20 7479 7065 2061 6e64 type and\n+000e6bc0: 2063 616e 6e6f 7420 6265 2061 203c 636f cannot be a size_t\n+000e6be0: 2074 7970 6520 6f72 206f 7468 6572 2069 type or other i\n+000e6bf0: 6e74 6567 6572 2074 7970 652e 3c2f 703e nteger type.

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

For example,\n+000e6c10: 2077 6520 6465 6669 6e65 2061 204d 6170 we define a Map\n+000e6c20: 2073 7472 7563 7475 7265 2074 6861 7420 structure that \n+000e6c30: 636f 6e74 6169 6e73 2061 2073 6571 7565 contains a seque\n+000e6c40: 6e63 6520 6f66 206b 6579 2d76 616c 2070 nce of key-val p\n+000e6c50: 6169 7273 3a3c 2f70 3e0a 3c64 6976 2063 airs:

.
\n+000e6c70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
struct <\n+000e6ca0: 2f73 7061 6e3e 6e73 5f5f 4d61 7020 3c2f /span>ns__Map .
{
.<\n+000e6cd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e6ce0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n+000e6d00: 6e74 3c2f 7370 616e 3e20 5f5f 7369 7a65 nt __size\n+000e6d10: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // numbe\n+000e6d30: 7220 6f66 2070 6169 7273 203c 2f73 7061 r of pairs
.
<\n+000e6d60: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e6d70: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct ns__Pair.
{
.\n+000e6db0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
char \n+000e6df0: 2a6b 6579 3b3c 2f64 6976 3e0a 3c64 6976 *key;
. \n+000e6e10: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n+000e6e30: 6368 6172 3c2f 7370 616e 3e20 2a76 616c char *val\n+000e6e40: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
} \n+000e6e60: 2a70 6169 723b 2020 2020 3c73 7061 6e20 *pair; \n+000e6e80: 2f2f 2061 7272 6179 206f 6620 7061 6972 // array of pair\n+000e6e90: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
.<\n+000e6ea0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e6eb0: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
.
\n+000e6ec0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

\n+000e7200: 5468 6520 6172 7261 7920 7769 6c6c 2062 The array will b\n+000e7210: 6520 7365 7269 616c 697a 6564 2069 6e20 e serialized in \n+000e7220: 584d 4c20 6173 2061 2073 6571 7565 6e63 XML as a sequenc\n+000e7230: 6520 6f66 2070 6169 7273 3a3c 2f70 3e0a e of pairs:

.\n+000e7240: 3c64 6976 2063 6c61 7373 3d22 616c 7422
<ns:Map>
\n+000e72b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<pair&g\n+000e72f0: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
\n+000e7310: 266c 743b 3c73 7061 6e20 636c 6173 733d <ke\n+000e7330: 793c 2f73 7061 6e3e 2667 743b 3c73 7061 y>Joe<\n+000e7360: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /key>
\n+000e7390: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<val&\n+000e73d0: 6774 3b35 3535 2037 3720 3132 3334 266c gt;555 77 1234&l\n+000e73e0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/val\n+000e7400: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
</pair>
. \n+000e7470: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <p\n+000e7490: 6169 723c 2f73 7061 6e3e 2667 743b 203c air> <\n+000e74a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
<\n+000e74c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 key>Su\n+000e7500: 7361 6e3c 2f73 7061 6e3e 266c 743b 2f3c san</<\n+000e7510: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e7520: 6f72 6474 7970 6522 3e6b 6579 3c2f 7370 ordtype\">key>
.<\n+000e7540: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000e7550: 3e20 2020 2026 6c74 3b3c 7370 616e 2063 > <val>\n+000e7580: 3b35 3535 2031 3220 3637 3235 266c 743b ;555 12 6725<\n+000e7590: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /val>
\n+000e75c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
</pair&\n+000e7600: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
&\n+000e7620: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;pai\n+000e7640: 723c 2f73 7061 6e3e 2667 743b 203c 2f64 r> .
<key>Pete\n+000e76b0: 3c2f 7370 616e 3e26 6c74 3b2f 3c73 7061 </key\n+000e76e0: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
. \n+000e7700: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n+000e7720: 7661 6c3c 2f73 7061 6e3e 2667 743b 3535 val>55\n+000e7730: 3520 3939 2034 3332 3126 6c74 3b2f 3c73 5 99 4321</val>
.\n+000e7780: 2020 266c 743b 2f3c 7370 616e 2063 6c61 </pair>\n+000e77b0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
</<\n+000e77d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e77e0: 6f72 6474 7970 6522 3e6e 733a 4d61 703c ordtype\">ns:Map<\n+000e77f0: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
\n+000e7800: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .
<\n+000e7820: 703e 4465 7365 7269 616c 697a 6174 696f p>Deserializatio\n+000e7830: 6e20 6973 206c 6573 7320 6566 6669 6369 n is less effici\n+000e7840: 656e 7420 636f 6d70 6172 6564 2074 6f20 ent compared to \n+000e7850: 6120 534f 4150 2d65 6e63 6f64 6564 2061 a SOAP-encoded a\n+000e7860: 7272 6179 2c20 6265 6361 7573 6520 7468 rray, because th\n+000e7870: 6520 7369 7a65 206f 6620 7468 6520 7365 e size of the se\n+000e7880: 7175 656e 6365 2069 7320 6e6f 7420 7061 quence is not pa\n+000e7890: 7274 206f 6620 7468 6520 534f 4150 2065 rt of the SOAP e\n+000e78a0: 6e63 6f64 696e 672e 2042 7566 6665 7269 ncoding. Bufferi\n+000e78b0: 6e67 2069 7320 7573 6564 2062 7920 7468 ng is used by th\n+000e78c0: 6520 6465 7365 7269 616c 697a 6572 2074 e deserializer t\n+000e78d0: 6f20 636f 6c6c 6563 7420 7468 6520 656c o collect the el\n+000e78e0: 656d 656e 7473 2069 6e20 6d65 6d6f 7279 ements in memory\n+000e78f0: 2e20 5768 656e 2074 6865 2065 6e64 206f . When the end o\n+000e7900: 6620 7468 6520 6c69 7374 2069 7320 7265 f the list is re\n+000e7910: 6163 6865 642c 2074 6865 2062 7566 6665 ached, the buffe\n+000e7920: 7265 6420 656c 656d 656e 7473 2061 7265 red elements are\n+000e7930: 2063 6f70 6965 6420 746f 2061 206e 6577 copied to a new\n+000e7940: 6c79 2061 6c6c 6f63 6174 6564 206d 616e ly allocated man\n+000e7950: 6167 6564 2073 7061 6365 206f 6e20 7468 aged space on th\n+000e7960: 6520 6865 6170 2066 6f72 2074 6865 2064 e heap for the d\n+000e7970: 796e 616d 6963 2061 7272 6179 2e3c 2f70 ynamic array..

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

.
\n+000e79f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct ns__Contact \n+000e7a20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{
\n+000e7a40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
char *fi\n+000e7a80: 7273 744e 616d 653b 203c 2f64 6976 3e0a rstName;
.\n+000e7a90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\n+000e7ac0: 6368 6172 3c2f 7370 616e 3e20 2a6c 6173 char *las\n+000e7ad0: 744e 616d 653b 203c 2f64 6976 3e0a 3c64 tName;
.\n+000e7af0: 2020 2420 3c73 7061 6e20 636c 6173 733d $ in\n+000e7b10: 743c 2f73 7061 6e3e 206e 5068 6f6e 6573 t nPhones\n+000e7b20: 3b20 2020 2020 2020 2020 203c 7370 616e ; // number of Ph\n+000e7b50: 6f6e 6573 3c2f 7370 616e 3e3c 2f64 6976 ones.
ULONG6\n+000e7bd0: 343c 2f61 3e20 2a70 686f 6e65 4e75 6d62 4 *phoneNumb\n+000e7be0: 6572 3b20 3c73 7061 6e20 636c 6173 733d er; // arr\n+000e7c00: 6179 206f 6620 7068 6f6e 6520 6e75 6d62 ay of phone numb\n+000e7c10: 6572 7320 3c2f 7370 616e 3e3c 2f64 6976 ers .
$ int nEm\n+000e7c60: 6169 6c73 3b20 2020 2020 2020 2020 203c ails; <\n+000e7c70: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000e7c80: 656e 7422 3e2f 2f20 6e75 6d62 6572 206f ent\">// number o\n+000e7c90: 6620 656d 6169 6c73 203c 2f73 7061 6e3e f emails \n+000e7ca0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
char **emailAddres\n+000e7cf0: 733b 2020 3c73 7061 6e20 636c 6173 733d s; // arr\n+000e7d10: 6179 206f 6620 656d 6169 6c20 6164 6472 ay of email addr\n+000e7d20: 6573 7365 7320 3c2f 7370 616e 3e3c 2f64 esses .
};
.<\n+000e7d50: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

The XML\n+000e7d70: 2073 6572 6961 6c69 7a61 7469 6f6e 206f serialization o\n+000e7d80: 6620 616e 2065 7861 6d70 6c65 203c 636f f an example ns__Contact is:

. \n+000e7dc0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
<ns:Contact\n+000e7e10: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
<firstName>J\n+000e7e80: 6f65 3c2f 7370 616e 3e26 6c74 3b2f 3c73 oe</firstNam\n+000e7eb0: 653c 2f73 7061 6e3e 2667 743b 203c 2f64 e> .
<lastName>S\n+000e7f20: 6d69 7468 3c2f 7370 616e 3e26 6c74 3b2f mith</\n+000e7f30: 3c73 7061 6e20 636c 6173 733d 226b 6579 lastNa\n+000e7f50: 6d65 3c2f 7370 616e 3e26 6774 3b20 3c2f me> .
<phoneNumb\n+000e7fa0: 6572 3c2f 7370 616e 3e26 6774 3b35 3535 er>555\n+000e7fb0: 3131 3132 3232 3226 6c74 3b2f 3c73 7061 1112222</phoneNumbe\n+000e7fe0: 723c 2f73 7061 6e3e 2667 743b 203c 2f64 r> .
<phoneNumbe\n+000e8030: 723c 2f73 7061 6e3e 2667 743b 3535 3531 r>5551\n+000e8040: 3233 3435 3637 266c 743b 2f3c 7370 616e 234567</phoneNumber\n+000e8070: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
<phoneNumber\n+000e80c0: 3c2f 7370 616e 3e26 6774 3b35 3535 3233 >55523\n+000e80d0: 3438 3930 3126 6c74 3b2f 3c73 7061 6e20 48901</phoneNumber<\n+000e8100: 2f73 7061 6e3e 2667 743b 203c 2f64 6976 /span>> .
<emailAddress\n+000e8150: 3c2f 7370 616e 3e26 6774 3b3c 7370 616e >Joe.Smith@mail.com\n+000e81a0: 3c2f 7370 616e 3e26 6c74 3b2f 3c73 7061 </emailAddre\n+000e81d0: 7373 3c2f 7370 616e 3e26 6774 3b20 3c2f ss> .
<emailAddr\n+000e8220: 6573 733c 2f73 7061 6e3e 2667 743b 3c73 ess>Joe@<\n+000e8250: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e8260: 6f72 6422 3e53 6d69 7468 2e63 6f6d 3c2f ord\">Smith.com</emailAddress\n+000e82a0: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
</ns:Contact>
.\n+000e8300: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d
For C++, a bett\n+000e8330: 6572 2061 6c74 6572 6e61 7469 7665 2074 er alternative t\n+000e8340: 6f20 6172 7261 7973 2061 7265 2063 6f6e o arrays are con\n+000e8350: 7461 696e 6572 732c 2077 6869 6368 2061 tainers, which a\n+000e8360: 7265 2064 6573 6372 6962 6564 206e 6578 re described nex\n+000e8370: 742e 3c2f 703e 0a3c 703e f09f 949d 203c t.

.

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

..STL conta\n+000e83e0: 696e 6572 733c 2f68 333e 0a3c 703e 5468 iners.

Th\n+000e83f0: 6520 5354 4c20 636f 6e74 6169 6e65 7273 e STL containers\n+000e8400: 203c 636f 6465 3e73 7464 3a3a 6465 7175 std::dequ\n+000e8410: 653c 2f63 6f64 653e 2c20 3c63 6f64 653e e, \n+000e8420: 7374 643a 3a6c 6973 743c 2f63 6f64 653e std::list\n+000e8430: 2c20 3c63 6f64 653e 7374 643a 3a73 6574 , std::set\n+000e8440: 3c2f 636f 6465 3e2c 2061 6e64 203c 636f , and std::vector are serial\n+000e8470: 697a 6162 6c65 2069 6e20 584d 4c20 6279 izable in XML by\n+000e8480: 2074 6865 2073 6f61 7063 7070 322d 6765 the soapcpp2-ge\n+000e8490: 6e65 7261 7465 6420 7365 7269 616c 697a nerated serializ\n+000e84a0: 6572 732e 3c2f 703e 0a3c 703e 496e 206f ers.

.

In o\n+000e84b0: 7264 6572 2074 6f20 7573 6520 636f 6e74 rder to use cont\n+000e84c0: 6169 6e65 7273 2069 6e20 616e 2069 6e74 ainers in an int\n+000e84d0: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi\n+000e84e0: 6c65 2066 6f72 2073 6f61 7063 7070 322c le for soapcpp2,\n+000e84f0: 2069 6d70 6f72 7420 3c65 6d3e 3c63 6f64 import stldeque.h, stllist.h, <\n+000e8540: 636f 6465 3e73 746c 7365 742e 683c 2f63 code>stlset.h, or stlvecto\n+000e8570: 722e 683c 2f63 6f64 653e 3c2f 656d 3e20 r.h \n+000e8580: 746f 2065 6e61 626c 6520 3c63 6f64 653e to enable \n+000e8590: 7374 643a 3a64 6571 7565 3c2f 636f 6465 std::deque, std::li\n+000e85b0: 7374 3c2f 636f 6465 3e2c 203c 636f 6465 st, std::set\n+000e85d0: 2c20 616e 6420 3c63 6f64 653e 7374 643a , and std:\n+000e85e0: 3a76 6563 746f 723c 2f63 6f64 653e 2c20 :vector, \n+000e85f0: 7265 7370 6563 7469 7665 6c79 2e20 466f respectively. Fo\n+000e8600: 7220 6578 616d 706c 653a 3c2f 703e 0a3c r example:

.<\n+000e8610: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+000e8620: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
#import "\n+000e8660: 7374 6c76 6563 746f 722e 6826 7175 6f74 stlvector.h"\n+000e8670: 3b3c 2f73 7061 6e3e 203c 2f64 6976 3e0a ;
.\n+000e8680: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
class ns__myClass\n+000e86c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
{ public:\n+000e8700: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
st\n+000e8720: 643a 3a76 6563 746f 7226 6c74 3b69 6e74 d::vector<int\n+000e8730: 2667 743b 2020 2020 2020 2020 2020 6e75 > nu\n+000e8740: 6d62 6572 2031 3a31 303b 203c 7370 616e mber 1:10; // 1 to 10 numb\n+000e8770: 6572 733c 2f73 7061 6e3e 3c2f 6469 763e ers
\n+000e8780: 0a3c 6469 7620 636c 6173 733d 226c 696e .
std::vect\n+000e87a0: 6f72 266c 743b 7374 643a 3a73 7472 696e or<std::strin\n+000e87b0: 6726 6774 3b20 2a6e 616d 6520 2020 323b g> *name 2;\n+000e87c0: 2020 2020 3c73 7061 6e20 636c 6173 733d // mor\n+000e87e0: 6520 7468 616e 2032 206e 616d 6573 3c2f e than 2 names
.};\n+000e8810: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.
The use of poin\n+000e8840: 7465 7220 6d65 6d62 6572 7320 7375 6368 ter members such\n+000e8850: 2061 7320 666f 7220 3c63 6f64 653e 6e61 as for na\n+000e8860: 6d65 3c2f 636f 6465 3e20 7368 6f77 6e20 me shown \n+000e8870: 6162 6f76 6520 6973 2070 6f73 7369 626c above is possibl\n+000e8880: 652c 2062 7574 206e 6f74 2072 6571 7569 e, but not requi\n+000e8890: 7265 642e 2041 6c73 6f20 3c63 6f64 653e red. Also \n+000e88a0: 6d69 6e4f 6363 7572 7320 3a20 6d61 784f minOccurs : maxO\n+000e88b0: 6363 7572 733c 2f63 6f64 653e 2061 6e64 ccurs and\n+000e88c0: 203c 636f 6465 3e6d 696e 4f63 6375 7273 minOccurs\n+000e88d0: 3c2f 636f 6465 3e20 6c65 6e67 7468 2063 length c\n+000e88e0: 6f6e 7374 7261 696e 7473 2063 616e 2062 onstraints can b\n+000e88f0: 6520 7370 6563 6966 6965 6420 6173 2073 e specified as s\n+000e8900: 686f 776e 2069 6e20 7468 6520 6578 616d hown in the exam\n+000e8910: 706c 6520 6162 6f76 652e 2054 6865 2058 ple above. The X\n+000e8920: 4d4c 2073 6368 656d 6120 7468 6174 2063 ML schema that c\n+000e8930: 6f72 7265 7370 6f6e 6473 2074 6f20 7468 orresponds to th\n+000e8940: 6520 3c63 6f64 653e 6e73 5f5f 6d79 436c e ns__myCl\n+000e8950: 6173 733c 2f63 6f64 653e 2074 7970 6520 ass type \n+000e8960: 6973 3a3c 2f70 3e0a 3c64 6976 2063 6c61 is:

.
\n+000e8990: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
<\n+000e89c0: 636f 6d70 6c65 7854 7970 653c 2f73 7061 complexType name="myClass&q\n+000e8a20: 756f 743b 3c2f 7370 616e 3e26 6774 3b20 uot;> \n+000e8a30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<<\n+000e8a50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e8a60: 6f72 6474 7970 6522 3e73 6571 7565 6e63 ordtype\">sequenc\n+000e8a70: 653c 2f73 7061 6e3e 2667 743b 203c 2f64 e> .
<element<\n+000e8ac0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> nam\n+000e8ae0: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="numbe\n+000e8b10: 7226 7175 6f74 3b3c 2f73 7061 6e3e 203c r" <\n+000e8b20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e8b30: 6f72 6422 3e74 7970 653c 2f73 7061 6e3e ord\">type\n+000e8b40: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n+000e8b60: 6f74 3b78 7364 3a69 6e74 2671 756f 743b ot;xsd:int"\n+000e8b70: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c mi\n+000e8b90: 6e4f 6363 7572 733c 2f73 7061 6e3e 3d3c nOccurs=<\n+000e8ba0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000e8bb0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000e8bc0: 3b31 2671 756f 743b 3c2f 7370 616e 3e20 ;1" \n+000e8bd0: 3c73 7061 6e20 636c 6173 733d 226b 6579 maxOccurs<\n+000e8bf0: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="10"\n+000e8c20: 3b3c 2f73 7061 6e3e 2f26 6774 3b20 3c2f ;/> .
<<\n+000e8c50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000e8c60: 6f72 6474 7970 6522 3e65 6c65 6d65 6e74 ordtype\">element\n+000e8c70: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c na\n+000e8c90: 6d65 3c2f 7370 616e 3e3d 3c73 7061 6e20 me="name\n+000e8cc0: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " type=\n+000e8cf0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+000e8d10: 743b 7873 643a 7374 7269 6e67 2671 756f t;xsd:string&quo\n+000e8d20: 743b 3c2f 7370 616e 3e20 3c73 7061 6e20 t; \n+000e8d40: 6d69 6e4f 6363 7572 733c 2f73 7061 6e3e minOccurs\n+000e8d50: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n+000e8d70: 6f74 3b32 2671 756f 743b 3c2f 7370 616e ot;2" maxOccur\n+000e8da0: 733c 2f73 7061 6e3e 3d3c 7370 616e 2063 s="unbou\n+000e8dd0: 6e64 6564 2671 756f 743b 3c2f 7370 616e nded"/>
.\n+000e8e00: 2020 266c 743b 2f3c 7370 616e 2063 6c61 </sequence\n+000e8e30: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
.&l\n+000e8e50: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/com\n+000e8e70: 706c 6578 5479 7065 3c2f 7370 616e 3e26 plexType&\n+000e8e80: 6774 3b3c 2f64 6976 3e0a 3c2f 6469 763e gt;
.
\n+000e8e90: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

To e\n-000eaa50: 6e61 626c 6520 7468 6520 636f 6e74 6169 nable the contai\n-000eaa60: 6e65 722c 2077 6520 6164 6420 7468 6520 ner, we add the \n-000eaa70: 666f 6c6c 6f77 696e 6720 7477 6f20 6c69 following two li\n-000eaa80: 6e65 7320 746f 2074 6865 2069 6e74 6572 nes to the inter\n-000eaa90: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file\n-000eaaa0: 2066 6f72 2073 6f61 7063 7070 323a 3c2f for soapcpp2:.

#include &\n-000eab00: 7175 6f74 3b73 696d 706c 6556 6563 746f quot;simpleVecto\n-000eab10: 722e 6826 7175 6f74 3b3c 2f73 7061 6e3e r.h"\n-000eab20: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
\n-000eab50: 7465 6d70 6c61 7465 3c2f 7370 616e 3e20 template \n-000eab60: 266c 743b 3c73 7061 6e20 636c 6173 733d <class<\n-000eab80: 2f73 7061 6e3e 2054 2667 743b 203c 7370 /span> T> class \n-000eabb0: 7369 6d70 6c65 5665 6374 6f72 3b3c 2f64 simpleVector;.

Th\n-000eabe0: 6520 636f 6e74 6169 6e65 7220 636c 6173 e container clas\n-000eabf0: 7320 6974 7365 6c66 2073 686f 756c 6420 s itself should \n-000eac00: 6e6f 7420 6265 2064 6566 696e 6564 2069 not be defined i\n-000eac10: 6e20 7468 6520 696e 7465 7266 6163 6520 n the interface \n-000eac20: 6865 6164 6572 2066 696c 652c 206f 6e6c header file, onl\n-000eac30: 7920 7468 6520 7465 6d70 6c61 7465 2064 y the template d\n-000eac40: 6563 6c61 7261 7469 6f6e 2073 7566 6669 eclaration suffi\n-000eac50: 6365 7320 666f 7220 736f 6170 6370 7032 ces for soapcpp2\n-000eac60: 2074 6f20 6765 6e65 7261 7465 2073 6572 to generate ser\n-000eac70: 6961 6c69 7a65 7273 2e20 5265 6361 6c6c ializers. Recall\n-000eac80: 2074 6861 7420 7468 6520 3c63 6f64 653e that the \n-000eac90: 2369 6e63 6c75 6465 3c2f 636f 6465 3e20 #include \n-000eaca0: 6469 7265 6374 6976 6573 2061 7265 206e directives are n\n-000eacb0: 6f74 2065 7865 6375 7465 6420 6279 2073 ot executed by s\n-000eacc0: 6f61 7063 7070 3220 6275 7420 7369 6d70 oapcpp2 but simp\n-000eacd0: 6c79 2070 6173 7365 6420 6f6e 2074 6f20 ly passed on to \n-000eace0: 7468 6520 6765 6e65 7261 7465 6420 736f the generated so\n-000eacf0: 7572 6365 2063 6f64 652e 2054 6869 7320 urce code. This \n-000ead00: 696e 636c 7564 6520 7370 6563 6966 6965 include specifie\n-000ead10: 7320 696e 2074 6865 2067 656e 6572 6174 s in the generat\n-000ead20: 6564 2073 6f75 7263 6520 636f 6465 2077 ed source code w\n-000ead30: 6865 7265 2074 6865 2063 6f6e 7461 696e here the contain\n-000ead40: 6572 2069 7320 6163 7475 616c 6c79 2064 er is actually d\n-000ead50: 6566 696e 6564 2e3c 2f70 3e0a 3c70 3ef0 efined.

.

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

<\n-000eadc0: 2f61 3e0a 506f 6c79 6d6f 7270 6869 6320 /a>.Polymorphic \n-000eadd0: 6479 6e61 6d69 6320 6172 7261 7973 2061 dynamic arrays a\n-000eade0: 6e64 206c 6973 7473 3c2f 6833 3e0a 3c70 nd lists

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

.
class\n-000eaed0: 203c 2f73 7061 6e3e 6e73 5f5f 4f62 6a65 ns__Obje\n-000eaee0: 6374 203c 2f64 6976 3e0a 3c64 6976 2063 ct
.
{ public:
.
\n-000eaf40: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // mem\n-000eaf60: 6265 7273 206f 6620 6e73 5f5f 4f62 6a65 bers of ns__Obje\n-000eaf70: 6374 3c2f 7370 616e 3e3c 2f64 6976 3e0a ct
.\n-000eaf80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
};
.class ns__Data : public \n-000eb000: 6e73 5f5f 4f62 6a65 6374 203c 2f64 6976 ns__Object .
{ publ\n-000eb040: 6963 3c2f 7370 616e 3e3a 203c 2f64 6976 ic: .
... // members of \n-000eb090: 6e73 5f5f 4461 7461 3c2f 7370 616e 3e3c ns__Data<\n-000eb0a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
}; .
class \n-000eb0f0: 3c2f 7370 616e 3e41 7272 6179 4f66 4f62 ArrayOfOb\n-000eb100: 6a65 6374 203c 2f64 6976 3e0a 3c64 6976 ject
.{ \n-000eb120: 3c73 7061 6e20 636c 6173 733d 226b 6579 public:
. \n-000eb160: 2020 6e73 5f5f 4f62 6a65 6374 202a 2a5f ns__Object **_\n-000eb170: 5f70 7472 3b20 3c73 7061 6e20 636c 6173 _ptr; // p\n-000eb190: 6f69 6e74 6572 2074 6f20 6172 7261 7920 ointer to array \n-000eb1a0: 6f66 2070 6f69 6e74 6572 7320 746f 2062 of pointers to b\n-000eb1b0: 6173 6520 6f72 2064 6572 6976 6564 206f ase or derived o\n-000eb1c0: 626a 6563 7473 203c 2f73 7061 6e3e 3c2f bjects .
int \n-000eb210: 5f5f 7369 7a65 3b20 2020 2020 2020 2020 __size; \n-000eb220: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // size of\n-000eb240: 2074 6865 2061 7272 6179 3c2f 7370 616e the array
.
}; .
clas\n-000eb2a0: 7320 3c2f 7370 616e 3e6e 735f 5f4f 626a s ns__Obj\n-000eb2b0: 6563 7473 203c 2f64 6976 3e0a 3c64 6976 ects
.{ \n-000eb2d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 public:
. \n-000eb310: 2020 7374 643a 3a76 6563 746f 7226 6c74 std::vector<\n-000eb320: 3b6e 735f 5f4f 626a 6563 7426 6774 3b20 ;ns__Object> \n-000eb330: 6f62 6a65 6374 733b 203c 7370 616e 2063 objects; /\n-000eb350: 2f20 7665 6374 6f72 206f 6620 6261 7365 / vector of base\n-000eb360: 206f 7220 6465 7269 7665 6420 6f62 6a65 or derived obje\n-000eb370: 6374 7320 3c2f 7370 616e 3e3c 2f64 6976 cts .
};
.

The point\n-000eb3c0: 6572 7320 696e 2074 6865 2061 7272 6179 ers in the array\n-000eb3d0: 2063 616e 2070 6f69 6e74 2074 6f20 7468 can point to th\n-000eb3e0: 6520 3c63 6f64 653e 6e73 5f5f 4f62 6a65 e ns__Obje\n-000eb3f0: 6374 3c2f 636f 6465 3e20 6261 7365 2069 ct base i\n-000eb400: 6e73 7461 6e63 6573 206f 7220 3c63 6f64 nstances or ns__Data derived instan\n-000eb430: 6365 732c 2077 6869 6368 2077 696c 6c20 ces, which will \n-000eb440: 6265 2073 6572 6961 6c69 7a65 6420 6163 be serialized ac\n-000eb450: 636f 7264 696e 676c 7920 696e 2058 4d4c cordingly in XML\n-000eb460: 2e20 4465 7269 7665 6420 696e 7374 616e . Derived instan\n-000eb470: 6365 7320 6172 6520 696e 6469 6361 7465 ces are indicate\n-000eb480: 6420 6279 203c 656d 3e3c 636f 6465 3e78 d by x\n-000eb490: 7369 3a74 7970 653c 2f63 6f64 653e 3c2f si:type attribute in\n-000eb4b0: 2058 4d4c 2077 6974 6820 7468 6520 7175 XML with the qu\n-000eb4c0: 616c 6966 6965 6420 6e61 6d65 206f 6620 alified name of \n-000eb4d0: 7468 6520 636c 6173 732c 2074 6f20 6469 the class, to di\n-000eb4e0: 7374 696e 6775 6973 6820 6465 7269 7665 stinguish derive\n-000eb4f0: 6420 696e 7374 616e 6365 7320 6672 6f6d d instances from\n-000eb500: 2074 6865 2062 6173 6520 696e 7374 616e the base instan\n-000eb510: 6365 732e 2057 6974 686f 7574 2074 6869 ces. Without thi\n-000eb520: 7320 6174 7472 6962 7574 6520 7468 6520 s attribute the \n-000eb530: 6465 7365 7269 616c 697a 6572 2077 696c deserializer wil\n-000eb540: 6c20 6e6f 7420 696e 7374 616e 7469 6174 l not instantiat\n-000eb550: 6520 7468 6520 6465 7269 7665 6420 696e e the derived in\n-000eb560: 7374 616e 6365 2062 7574 2061 2062 6173 stance but a bas\n-000eb570: 6520 696e 7374 616e 6365 2073 696e 6365 e instance since\n-000eb580: 2074 6865 7265 2069 7320 6e6f 2069 6465 there is no ide\n-000eb590: 6e74 6966 7969 6e67 2069 6e66 6f72 6d61 ntifying informa\n-000eb5a0: 7469 6f6e 2074 6f20 6469 7374 696e 6775 tion to distingu\n-000eb5b0: 6973 6820 7468 6520 584d 4c20 666f 726d ish the XML form\n-000eb5c0: 7320 6578 6365 7074 2066 6f72 2074 6865 s except for the\n-000eb5d0: 203c 656d 3e3c 636f 6465 3e78 7369 3a74 xsi:t\n-000eb5e0: 7970 653c 2f63 6f64 653e 3c2f 656d 3e20 ype \n-000eb5f0: 6174 7472 6962 7574 652e 3c2f 703e 0a3c attribute.

.<\n-000eb600: 703e 5369 6e63 6520 7765 2063 616e 6e6f p>Since we canno\n-000eb610: 7420 7573 6520 6479 6e61 6d69 6320 6269 t use dynamic bi\n-000eb620: 6e64 696e 6720 746f 2073 7570 706f 7274 nding to support\n-000eb630: 2070 6f6c 796d 6f72 7068 6973 6d20 696e polymorphism in\n-000eb640: 2043 2c20 616e 6f74 6865 7220 6d65 6368 C, another mech\n-000eb650: 616e 6973 6d20 7765 2063 616e 2075 7365 anism we can use\n-000eb660: 2069 7320 766f 6964 2070 6f69 6e74 6572 is void pointer\n-000eb670: 7320 2e20 4865 7265 2069 7320 616e 2065 s . Here is an e\n-000eb680: 7861 6d70 6c65 206f 6620 6120 706f 6c79 xample of a poly\n-000eb690: 6d6f 7270 6869 6320 534f 4150 2d65 6e63 morphic SOAP-enc\n-000eb6a0: 6f64 6564 2061 7272 6179 203c 636f 6465 oded array ArrayOfObject and a non-\n-000eb6d0: 534f 4150 2064 796e 616d 6963 2061 7272 SOAP dynamic arr\n-000eb6e0: 6179 203c 636f 6465 3e6e 735f 5f4f 626a ay ns__Obj\n-000eb6f0: 6563 7473 3c2f 636f 6465 3e20 7468 6174 ects that\n-000eb700: 2068 6f6c 6420 7661 6c75 6573 206f 6620 hold values of \n-000eb710: 616e 7920 7365 7269 616c 697a 6162 6c65 any serializable\n-000eb720: 2074 7970 653a 3c2f 703e 0a3c 6469 7620 type:

.
struct \n-000eb770: 3c2f 7370 616e 3e5f 5f77 7261 7070 6572 __wrapper\n-000eb780: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
{.
int __t\n-000eb7e0: 7970 653b 2020 203c 7370 616e 2063 6c61 ype; // \n-000eb800: 6964 656e 7469 6679 2074 6865 2074 7970 identify the typ\n-000eb810: 6520 6265 6c6f 7720 6279 2053 4f41 505f e below by SOAP_\n-000eb820: 5459 5045 5f54 203c 2f73 7061 6e3e 3c2f TYPE_T .
void\n-000eb870: 202a 5f5f 6974 656d 3b20 3c73 7061 6e20 *__item; \n-000eb890: 2f2f 2070 6f69 6e74 6572 2074 6f20 6461 // pointer to da\n-000eb8a0: 7461 206f 6620 7479 7065 2054 203c 2f73 ta of type T
.
}; \n-000eb8d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
s\n-000eb900: 7472 7563 7420 3c2f 7370 616e 3e41 7272 truct Arr\n-000eb910: 6179 4f66 4f62 6a65 6374 203c 2f64 6976 ayOfObject .
{
. \n-000eb950: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n-000eb970: 2f73 7061 6e3e 5f5f 7772 6170 7065 7220 /span>__wrapper \n-000eb980: 2a5f 5f70 7472 3b20 3c73 7061 6e20 636c *__ptr; //\n-000eb9a0: 2070 6f69 6e74 6572 2074 6f20 6172 7261 pointer to arra\n-000eb9b0: 793c 2f73 7061 6e3e 3c2f 6469 763e 0a3c y
.<\n-000eb9c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000eb9d0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n-000eb9f0: 6e74 3c2f 7370 616e 3e20 5f5f 7369 7a65 nt __size\n-000eba00: 3b20 2020 2020 2020 2020 2020 2020 203c ; <\n-000eba10: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-000eba20: 656e 7422 3e2f 2f20 7369 7a65 206f 6620 ent\">// size of \n-000eba30: 7468 6520 6172 7261 793c 2f73 7061 6e3e the array\n-000eba40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
}; .
struc\n-000eba90: 7420 3c2f 7370 616e 3e6e 735f 5f4f 626a t ns__Obj\n-000ebaa0: 6563 7473 203c 2f64 6976 3e0a 3c64 6976 ects
.{<\n-000ebac0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
int\n-000ebb00: 205f 5f73 697a 653b 2020 2020 2020 2020 __size; \n-000ebb10: 2020 2020 2020 2020 3c73 7061 6e20 636c //\n-000ebb30: 2073 697a 6520 6f66 2074 6865 2061 7272 size of the arr\n-000ebb40: 6179 3c2f 7370 616e 3e3c 2f64 6976 3e0a ay
.\n-000ebb50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
stru\n-000ebb80: 6374 203c 2f73 7061 6e3e 5f5f 7772 6170 ct __wrap\n-000ebb90: 7065 7220 2a6f 626a 6563 7473 3b20 3c73 per *objects; // pointer t\n-000ebbc0: 6f20 6172 7261 793c 2f73 7061 6e3e 3c2f o array.
};
.\n-000ebbf0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

This e\n-000ebc10: 7861 6d70 6c65 2075 7365 7320 616e 2022 xample uses an \"\n-000ebc20: 696e 7669 7369 626c 6522 2074 7970 6520 invisible\" type \n-000ebc30: 3c63 6f64 653e 5f5f 7772 6170 7065 723c __wrapper<\n-000ebc40: 2f63 6f64 653e 2061 6e64 206d 656d 6265 /code> and membe\n-000ebc50: 7220 3c63 6f64 653e 5f5f 6172 7261 793c r __array<\n-000ebc60: 2f63 6f64 653e 2c20 7768 6963 6820 7374 /code>, which st\n-000ebc70: 6172 7420 7769 7468 2061 2064 6f75 626c art with a doubl\n-000ebc80: 6520 756e 6465 7273 636f 7265 2e20 5468 e underscore. Th\n-000ebc90: 6573 6520 6e61 6d65 7320 6172 6520 6e65 ese names are ne\n-000ebca0: 7665 7220 7669 7369 626c 6520 696e 2073 ver visible in s\n-000ebcb0: 6572 6961 6c69 7a65 6420 584d 4c2e 2054 erialized XML. T\n-000ebcc0: 6865 203c 636f 6465 3e5f 5f74 7970 653c he __type<\n-000ebcd0: 2f63 6f64 653e 206d 656d 6265 7220 6f66 /code> member of\n-000ebce0: 203c 636f 6465 3e5f 5f77 7261 7070 6572 __wrapper\n-000ebcf0: 3c2f 636f 6465 3e20 6973 2061 203c 636f is a SOAP_TYPE_T value that\n-000ebd20: 2069 6465 6e74 6966 6965 7320 7468 6520 identifies the \n-000ebd30: 7479 7065 203c 636f 6465 3e54 3c2f 636f type T that _\n-000ebd50: 5f69 7465 6d3c 2f63 6f64 653e 2070 6f69 _item poi\n-000ebd60: 6e74 7320 746f 2c20 7365 6520 5365 6374 nts to, see Sect\n-000ebd70: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion Void po\n-000ebda0: 696e 7465 7220 7365 7269 616c 697a 6174 inter serializat\n-000ebdb0: 696f 6e3c 2f61 3e2e 3c2f 703e 0a3c 703e ion.

.

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

.Ho\n-000ebe20: 7720 746f 2063 6861 6e67 6520 7468 6520 w to change the \n-000ebe30: 7461 6720 6e61 6d65 7320 6f66 2061 7272 tag names of arr\n-000ebe40: 6179 2069 7465 6d20 656c 656d 656e 7473 ay item elements\n-000ebe50: 3c2f 6833 3e0a 3c70 3e54 6865 2064 6566

.

The def\n-000ebe60: 6175 6c74 2058 4d4c 2065 6c65 6d65 6e74 ault XML element\n-000ebe70: 2074 6167 206e 616d 6520 666f 7220 6172 tag name for ar\n-000ebe80: 7261 7920 656c 656d 656e 7473 2069 7320 ray elements is \n-000ebe90: 3c65 6d3e 3c63 6f64 653e 6974 656d 3c2f item, whic\n-000ebeb0: 6820 6361 6e20 6265 2063 6861 6e67 6564 h can be changed\n-000ebec0: 2e20 5468 6520 3c63 6f64 653e 5f5f 7074 . The __pt\n-000ebed0: 723c 2f63 6f64 653e 206d 656d 6265 7220 r member \n-000ebee0: 696e 2061 2073 7472 7563 7420 6f72 2063 in a struct or c\n-000ebef0: 6c61 7373 206f 6620 6120 6479 6e61 6d69 lass of a dynami\n-000ebf00: 6320 6172 7261 7920 6d61 7920 6861 7665 c array may have\n-000ebf10: 2061 6e20 6f70 7469 6f6e 616c 2073 7566 an optional suf\n-000ebf20: 6669 7820 7061 7274 2074 6861 7420 7370 fix part that sp\n-000ebf30: 6563 6966 6965 7320 7468 6520 6e61 6d65 ecifies the name\n-000ebf40: 206f 6620 7468 6520 656c 656d 656e 7420 of the element \n-000ebf50: 7461 6720 696e 2058 4d4c 2e20 5468 6174 tag in XML. That\n-000ebf60: 2069 732c 2074 6865 2073 7566 6669 7820 is, the suffix \n-000ebf70: 6973 2070 6172 7420 6f66 2074 6865 203c is part of the <\n-000ebf80: 636f 6465 3e5f 5f70 7472 3c2f 636f 6465 code>__ptr member name:.

Type \n-000ebfd0: 2a5f 5f70 7472 6172 7261 795f 656c 745f *__ptrarray_elt_\n-000ebfe0: 6e61 6d65 3c2f 6469 763e 0a3c 2f64 6976 name
.

The arr\n-000ec170: 6179 2069 7320 7365 7269 616c 697a 6564 ay is serialized\n-000ec180: 2061 733a 3c2f 703e 0a3c 6469 7620 636c as:

.
<SOAP-ENC:Array<\n-000ec1f0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> SOA\n-000ec210: 502d 454e 433a 6172 7261 7954 7970 653c P-ENC:arrayType<\n-000ec220: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="xsd:str\n-000ec250: 696e 675b 325d 2671 756f 743b 3c2f 7370 ing[2]">
.<\n-000ec270: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000ec280: 3e20 2026 6c74 3b3c 7370 616e 2063 6c61 > <string&g\n-000ec2b0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;Hello</string\n-000ec300: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
. \n-000ec320: 266c 743b 3c73 7061 6e20 636c 6173 733d <st\n-000ec340: 7269 6e67 3c2f 7370 616e 3e26 6774 3b3c ring><\n-000ec350: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000ec360: 6f72 6422 3e57 6f72 6c64 3c2f 7370 616e ord\">World</\n-000ec390: 7374 7269 6e67 3c2f 7370 616e 3e26 6774 string>\n-000ec3a0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
</\n-000ec3c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 SOAP-E\n-000ec3e0: 4e43 3a41 7272 6179 3c2f 7370 616e 3e26 NC:Array&\n-000ec3f0: 6774 3b3c 2f64 6976 3e0a 3c2f 6469 763e gt;
.
\n-000ec400: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

The advant\n-000ec890: 6167 6520 6f66 2074 6869 7320 7374 7275 age of this stru\n-000ec8a0: 6374 206f 7220 636c 6173 7320 6973 2074 ct or class is t\n-000ec8b0: 6865 2061 6269 6c69 7479 2074 6f20 7365 he ability to se\n-000ec8c0: 7269 616c 697a 6572 2072 6177 2062 696e rializer raw bin\n-000ec8d0: 6172 7920 6461 7461 2066 726f 6d20 6d65 ary data from me\n-000ec8e0: 6d6f 7279 2c20 7369 6e63 6520 7468 6520 mory, since the \n-000ec8f0: 736f 6170 6370 7032 2d67 656e 6572 6174 soapcpp2-generat\n-000ec900: 6564 2073 6572 6961 6c69 7a65 7220 636f ed serializer co\n-000ec910: 6e76 6572 7473 2074 6865 2062 696e 6172 nverts the binar\n-000ec920: 7920 6461 7461 2074 6f2f 6672 6f6d 2062 y data to/from b\n-000ec930: 6173 6536 3420 696e 2058 4d4c 2e3c 2f70 ase64 in XML..

To introduc\n-000ec950: 6520 6120 6e65 7720 584d 4c20 7363 6865 e a new XML sche\n-000ec960: 6d61 2074 7970 6520 6465 7269 7665 6420 ma type derived \n-000ec970: 6672 6f6d 203c 656d 3e3c 636f 6465 3e62 from b\n-000ec980: 6173 6536 3442 696e 6172 793c 2f63 6f64 ase64Binary use the \n-000ec9a0: 7361 6d65 2073 7472 7563 7420 6f72 2063 same struct or c\n-000ec9b0: 6c61 7373 2073 7472 7563 7475 7265 2c20 lass structure, \n-000ec9c0: 6275 7420 7769 7468 2061 6e6f 7468 6572 but with another\n-000ec9d0: 206e 616d 652e 2046 6f72 2065 7861 6d70 name. For examp\n-000ec9e0: 6c65 3a3c 2f70 3e0a 3c64 6976 2063 6c61 le:

.
\n-000eca10: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct ns__binary.
{
.<\n-000eca60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000eca70: 3e20 2020 203c 7370 616e 2063 6c61 7373 > u\n-000eca90: 6e73 6967 6e65 643c 2f73 7061 6e3e 203c nsigned <\n-000ecaa0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000ecab0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *__ptr; .
int _\n-000ecb10: 5f73 697a 653b 203c 2f64 6976 3e0a 3c64 _size;
.\n-000ecb30: 7d3b 3c2f 6469 763e 0a3c 2f64 6976 3e3c };
.
<\n-000ecb40: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-000ecb50: 3c70 3e54 6865 2072 6573 756c 7469 6e67

The resulting\n-000ecb60: 2058 4d4c 2073 6368 656d 6120 7479 7065 XML schema type\n-000ecb70: 2069 733a 3c2f 703e 0a3c 6469 7620 636c is:

.
<simpleType name="binary&qu\n-000ecc30: 6f74 3b3c 2f73 7061 6e3e 2667 743b 3c2f ot;>.
<restricti\n-000ecc80: 6f6e 3c2f 7370 616e 3e20 3c73 7061 6e20 on \n-000ecca0: 6261 7365 3c2f 7370 616e 3e3d 3c73 7061 base="xs\n-000eccd0: 643a 6261 7365 3634 4269 6e61 7279 2671 d:base64Binary&q\n-000ecce0: 756f 743b 3c2f 7370 616e 3e26 6774 3b3c uot;><\n-000eccf0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
</<\n-000ecd10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000ecd20: 6f72 6474 7970 6522 3e72 6573 7472 6963 ordtype\">restric\n-000ecd30: 7469 6f6e 3c2f 7370 616e 3e26 6774 3b3c tion><\n-000ecd40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
</simpleTyp\n-000ecd80: 653c 2f73 7061 6e3e 2667 743b 3c2f 6469 e>.

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

.

\n-000ece10: 0a68 6578 4269 6e61 7279 2073 6572 6961 .hexBinary seria\n-000ece20: 6c69 7a61 7469 6f6e 3c2f 6832 3e0a 3c70 lization

.The b\n-000ece40: 6173 6536 3442 696e 6172 793c 2f63 6f64 ase64Binary XSD type\n-000ece60: 2069 7320 696e 7472 6f64 7563 6564 2069 is introduced i\n-000ece70: 6e20 616e 2069 6e74 6572 6661 6365 2068 n an interface h\n-000ece80: 6561 6465 7220 6669 6c65 2066 6f72 2073 eader file for s\n-000ece90: 6f61 7063 7070 3220 7573 696e 6720 6120 oapcpp2 using a \n-000ecea0: 7374 7275 6374 206f 7220 636c 6173 7320 struct or class \n-000eceb0: 7468 6174 2063 6f6e 7461 696e 7320 616e that contains an\n-000ecec0: 2061 7272 6179 206f 6620 3c63 6f64 653e array of \n-000eced0: 756e 7369 676e 6564 2063 6861 723c 2f63 unsigned char values:

\n-000ecef0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
s\n-000ecf30: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct xsd__hexBinary<\n-000ecf80: 2f61 3e20 3c2f 6469 763e 0a3c 6469 7620 /a>
.
{.
unsigned c\n-000ed000: 6861 723c 2f73 7061 6e3e 202a 3c61 2063 har *__ptr; .
int <\n-000ed0b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-000ed0c0: 7265 663d 2273 7472 7563 7478 7364 5f5f ref=\"structxsd__\n-000ed0d0: 5f5f 6865 785f 6269 6e61 7279 2e68 746d __hex_binary.htm\n-000ed0e0: 6c23 6134 6332 3133 6434 3438 6166 3339 l#a4c213d448af39\n-000ed0f0: 3535 6633 3764 6465 6434 6632 3338 3330 55f37dded4f23830\n-000ed100: 3165 3622 3e5f 5f73 697a 653c 2f61 3e3b 1e6\">__size;\n-000ed110: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
};.

The\n-000ed150: 2061 6476 616e 7461 6765 206f 6620 7468 advantage of th\n-000ed160: 6973 2073 7472 7563 7420 6f72 2063 6c61 is struct or cla\n-000ed170: 7373 2069 7320 7468 6520 6162 696c 6974 ss is the abilit\n-000ed180: 7920 746f 2073 6572 6961 6c69 7a65 7220 y to serializer \n-000ed190: 7261 7720 6269 6e61 7279 2064 6174 6120 raw binary data \n-000ed1a0: 6672 6f6d 206d 656d 6f72 792c 2073 696e from memory, sin\n-000ed1b0: 6365 2074 6865 2073 6f61 7063 7070 322d ce the soapcpp2-\n-000ed1c0: 6765 6e65 7261 7465 6420 7365 7269 616c generated serial\n-000ed1d0: 697a 6572 2063 6f6e 7665 7274 7320 7468 izer converts th\n-000ed1e0: 6520 6269 6e61 7279 2064 6174 6120 746f e binary data to\n-000ed1f0: 2f66 726f 6d20 6865 7861 6465 6369 6d61 /from hexadecima\n-000ed200: 6c20 696e 2058 4d4c 2e3c 2f70 3e0a 3c70 l in XML.

.If a binary typ\n-000ed220: 6520 7375 6368 2061 7320 3c63 6f64 653e e such as \n-000ed230: 3c61 2063 6c61 7373 3d22 656c 2220 6872 xs\n-000ed2a0: 645f 5f62 6173 6536 3442 696e 6172 793c d__base64Binary<\n-000ed2b0: 2f61 3e3c 2f63 6f64 653e 2069 7320 616c /a> is al\n-000ed2c0: 7265 6164 7920 6465 6669 6e65 642c 2074 ready defined, t\n-000ed2d0: 6865 6e20 7765 2063 616e 2073 696d 706c hen we can simpl\n-000ed2e0: 7920 7573 6520 6120 3c63 6f64 653e 7479 y use a ty\n-000ed2f0: 7065 6465 663c 2f63 6f64 653e 2074 6f20 pedef to \n-000ed300: 696e 7472 6f64 7563 6520 7468 6520 6865 introduce the he\n-000ed310: 7820 7661 7269 616e 743a 3c2f 703e 0a3c x variant:

.<\n-000ed320: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-000ed330: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
.{\n-000ed3d0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 public:
. \n-000ed410: 2020 203c 7370 616e 2063 6c61 7373 3d22 uns\n-000ed430: 6967 6e65 643c 2f73 7061 6e3e 203c 7370 igned char *__p\n-000ed4c0: 7472 3c2f 613e 3b20 3c2f 6469 763e 0a3c tr;
.<\n-000ed4d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000ed4e0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n-000ed500: 6e74 3c2f 7370 616e 3e20 3c61 2063 6c61 nt __size; <\n-000ed570: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
}; .
typede\n-000ed5c0: 663c 2f73 7061 6e3e 203c 6120 636c 6173 f \n-000ed600: 7873 645f 5f62 6173 6536 3442 696e 6172 xsd__base64Binar\n-000ed610: 793c 2f61 3e20 3c61 2063 6c61 7373 3d22 y xsd__h\n-000ed650: 6578 4269 6e61 7279 3c2f 613e 3b20 3c73 exBinary; // serialize\n-000ed680: 7320 696e 746f 2068 6578 2063 6f6e 7465 s into hex conte\n-000ed690: 6e74 3c2f 7370 616e 3e3c 2f64 6976 3e0a nt
.\n-000ed6a0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

This l\n-000ed6c0: 6574 7320 736f 6170 6370 7032 2067 656e ets soapcpp2 gen\n-000ed6d0: 6572 6174 6520 3c65 6d3e 3c63 6f64 653e erate \n-000ed6e0: 7873 643a 6261 7365 3634 4269 6e61 7279 xsd:base64Binary\n-000ed6f0: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 6e64 and\n-000ed700: 203c 656d 3e3c 636f 6465 3e78 7364 3a68 xsd:h\n-000ed710: 6578 4269 6e61 7279 3c2f 636f 6465 3e3c exBinary<\n-000ed720: 2f65 6d3e 2073 6572 6961 6c69 7a65 7273 /em> serializers\n-000ed730: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

.

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

.

\n-000ed770: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 <\n-000ed790: 2f61 3e0a 534f 4150 2052 5043 2065 6e63 /a>.SOAP RPC enc\n-000ed7a0: 6f64 6564 2076 6572 7375 7320 646f 6375 oded versus docu\n-000ed7b0: 6d65 6e74 2f6c 6974 6572 616c 2073 7479 ment/literal sty\n-000ed7c0: 6c65 3c2f 6832 3e0a 3c70 3e53 4f41 5020 le

.

SOAP \n-000ed7d0: 6861 7320 7365 7665 7261 6c20 7374 796c has several styl\n-000ed7e0: 6573 3a3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 es:

.
    .SOAP RPC encodi\n-000ed800: 6e67 2075 7365 7320 584d 4c20 7468 6174 ng uses XML that\n-000ed810: 2069 7320 7265 7374 7269 6374 6564 2074 is restricted t\n-000ed820: 6f20 534f 4150 2073 7472 7563 7475 7265 o SOAP structure\n-000ed830: 7320 746f 2065 6e73 7572 6520 7072 6f67 s to ensure prog\n-000ed840: 7261 6d6d 696e 672d 6c61 6e67 7561 6765 ramming-language\n-000ed850: 2069 6e74 6572 6f70 6572 6162 696c 6974 interoperabilit\n-000ed860: 792e 204e 6f74 2061 6c6c 6f77 6564 2061 y. Not allowed a\n-000ed870: 7265 2076 616c 7565 7320 7365 7269 616c re values serial\n-000ed880: 697a 6564 2061 7320 584d 4c20 6174 7472 ized as XML attr\n-000ed890: 6962 7574 6573 2c20 6172 7261 7973 2073 ibutes, arrays s\n-000ed8a0: 686f 756c 6420 6265 2073 6572 6961 6c69 hould be seriali\n-000ed8b0: 7a65 6420 6173 2053 4f41 502d 656e 636f zed as SOAP-enco\n-000ed8c0: 6465 6420 6172 7261 7973 2069 6e73 7465 ded arrays inste\n-000ed8d0: 6164 206f 6620 584d 4c20 656c 656d 656e ad of XML elemen\n-000ed8e0: 7420 7265 7065 7469 7469 6f6e 7320 2869 t repetitions (i\n-000ed8f0: 2e65 2e20 3c65 6d3e 3c63 6f64 653e 7873 .e. xs\n-000ed900: 643a 7365 7175 656e 6365 206d 6178 4f63 d:sequence maxOc\n-000ed910: 6375 7273 3d22 756e 626f 756e 6465 6422 curs=\"unbounded\"\n-000ed920: 3c2f 636f 6465 3e3c 2f65 6d3e 2069 7320 is \n-000ed930: 6e6f 7420 616c 6c6f 7765 6429 2c20 616e not allowed), an\n-000ed940: 6420 3c65 6d3e 3c63 6f64 653e 7873 643a d xsd:\n-000ed950: 6368 6f69 6365 3c2f 636f 6465 3e3c 2f65 choice components ar\n-000ed970: 6520 6e6f 7420 616c 6c6f 7765 642e 204d e not allowed. M\n-000ed980: 756c 7469 2d72 6566 6572 656e 6365 6420 ulti-referenced \n-000ed990: 656c 656d 656e 7473 2061 7265 2075 7365 elements are use\n-000ed9a0: 6420 746f 2073 6572 6961 6c69 7a65 2064 d to serialize d\n-000ed9b0: 6174 6120 7374 7275 6374 7572 6520 6772 ata structure gr\n-000ed9c0: 6170 6873 2e20 4265 6361 7573 6520 6164 aphs. Because ad\n-000ed9d0: 6469 7469 6f6e 616c 2053 4f41 502d 656e ditional SOAP-en\n-000ed9e0: 636f 6469 6e67 2073 7065 6369 6669 6320 coding specific \n-000ed9f0: 6174 7472 6962 7574 6573 2061 7265 2070 attributes are p\n-000eda00: 7265 7365 6e74 2074 6861 7420 6172 6520 resent that are \n-000eda10: 6e6f 7420 6465 6669 6e65 6420 696e 2074 not defined in t\n-000eda20: 6865 2058 4d4c 2073 6368 656d 6120 286f he XML schema (o\n-000eda30: 6620 7468 6520 5753 444c 292c 2073 7472 f the WSDL), str\n-000eda40: 6963 7420 584d 4c20 7363 6865 6d61 2076 ict XML schema v\n-000eda50: 616c 6964 6174 6f72 7320 6d61 7920 7265 alidators may re\n-000eda60: 6a65 6374 2053 4f41 502d 656e 636f 6465 ject SOAP-encode\n-000eda70: 6420 636f 6e74 656e 742e 2054 6865 2053 d content. The S\n-000eda80: 4f41 5020 426f 6479 2063 6f6e 7461 696e OAP Body contain\n-000eda90: 7320 6174 206d 6f73 7420 6f6e 6520 7365 s at most one se\n-000edaa0: 7276 6963 6520 6f70 6572 6174 696f 6e20 rvice operation \n-000edab0: 7265 7175 6573 7420 656c 656d 656e 7420 request element \n-000edac0: 6f72 2061 7420 6d6f 7374 206f 6e65 2073 or at most one s\n-000edad0: 6572 7669 6365 206f 7065 7261 7469 6f6e ervice operation\n-000edae0: 2072 6573 706f 6e73 6520 656c 656d 656e response elemen\n-000edaf0: 7420 616e 6420 7468 6520 656e 636f 6469 t and the encodi\n-000edb00: 6e67 2073 7479 6c65 2069 7320 696e 6469 ng style is indi\n-000edb10: 6361 7465 6420 7769 7468 2074 6865 203c cated with the <\n-000edb20: 656d 3e3c 636f 6465 3e53 4f41 502d 454e em>SOAP-EN\n-000edb30: 563a 656e 636f 6469 6e67 5374 796c 653d V:encodingStyle=\n-000edb40: 222e 2e2e 223c 2f63 6f64 653e 3c2f 656d \"...\" attribute in t\n-000edb60: 6865 2053 4f41 5020 426f 6479 206f 7220 he SOAP Body or \n-000edb70: 6f6e 6520 6f72 206d 6f72 6520 6f66 2069 one or more of i\n-000edb80: 7473 2073 7562 2d65 6c65 6d65 6e74 732e ts sub-elements.\n-000edb90: 2054 6869 7320 7374 796c 6520 6973 2073 This style is s\n-000edba0: 7065 6369 6669 6564 2066 6f72 2074 6865 pecified for the\n-000edbb0: 2065 6e74 6972 6520 7365 7276 6963 6520 entire service \n-000edbc0: 6465 636c 6172 6564 2075 6e64 6572 206e declared under n\n-000edbd0: 616d 6573 7061 6365 2070 7265 6669 7820 amespace prefix \n-000edbe0: 3c63 6f64 653e 6e73 3c2f 636f 6465 3e20 ns \n-000edbf0: 7769 7468 3a20 3c64 6976 2063 6c61 7373 with:
    //gsoap ns s\n-000edc40: 6572 7669 6365 2073 7479 6c65 3a20 2020 ervice style: \n-000edc50: 2072 7063 3c2f 7370 616e 3e3c 2f64 6976 rpc.
    //gsoa\n-000edc90: 7020 6e73 2073 6572 7669 6365 2065 6e63 p ns service enc\n-000edca0: 6f64 696e 673a 2065 6e63 6f64 6564 3c2f oding: encoded
    ..
  • SOA\n-000edce0: 5020 646f 6375 6d65 6e74 2f6c 6974 6572 P document/liter\n-000edcf0: 616c 2075 7365 7320 584d 4c20 636f 6e73 al uses XML cons\n-000edd00: 7472 6169 6e65 6420 746f 2074 6865 2058 trained to the X\n-000edd10: 4d4c 2073 6368 656d 6120 7468 6174 2064 ML schema that d\n-000edd20: 6566 696e 6573 2074 6865 2058 4d4c 2063 efines the XML c\n-000edd30: 6f6e 7465 6e74 2e20 5468 6520 7365 7269 ontent. The seri\n-000edd40: 616c 697a 6174 696f 6e20 6f66 2074 7265 alization of tre\n-000edd50: 652d 6261 7365 6420 6461 7461 2073 7472 e-based data str\n-000edd60: 7563 7475 7265 7320 6973 2061 6363 7572 uctures is accur\n-000edd70: 6174 6520 696e 2058 4d4c 2e20 5468 6520 ate in XML. The \n-000edd80: 7365 7269 616c 697a 6174 696f 6e20 6f66 serialization of\n-000edd90: 2064 6967 7261 7068 2d73 6861 7065 6420 digraph-shaped \n-000edda0: 6461 7461 2073 7472 7563 7475 7265 7320 data structures \n-000eddb0: 7265 7375 6c74 7320 696e 2074 6865 2064 results in the d\n-000eddc0: 7570 6c69 6361 7469 6f6e 206f 6620 6461 uplication of da\n-000eddd0: 7461 206e 6f64 6573 2074 6861 7420 6172 ta nodes that ar\n-000edde0: 6520 636f 2d72 6566 6572 656e 6365 732e e co-references.\n-000eddf0: 2043 7963 6c69 6320 6461 7461 2073 7472 Cyclic data str\n-000ede00: 7563 7475 7265 7320 6361 6e6e 6f74 2062 uctures cannot b\n-000ede10: 6520 6163 6375 7261 7465 6c79 2073 6572 e accurately ser\n-000ede20: 6961 6c69 7a65 642c 2062 7574 2079 6f75 ialized, but you\n-000ede30: 2063 616e 2075 7365 203c 636f 6465 3e23 can use #\n-000ede40: 534f 4150 5f58 4d4c 5f47 5241 5048 3c2f SOAP_XML_GRAPH to force t\n-000ede60: 6865 2075 7365 206f 6620 6964 2d72 6566 he use of id-ref\n-000ede70: 2074 6f20 6163 6375 7261 7465 6c79 2073 to accurately s\n-000ede80: 6572 6961 6c69 7a65 2064 6967 7261 7068 erialize digraph\n-000ede90: 7320 616e 6420 6379 636c 6963 2064 6174 s and cyclic dat\n-000edea0: 6120 7374 7275 6374 7572 6573 2e20 5468 a structures. Th\n-000edeb0: 6520 534f 4150 2042 6f64 7920 6d61 7920 e SOAP Body may \n-000edec0: 636f 6e74 6169 6e20 616e 7920 6e75 6d62 contain any numb\n-000eded0: 6572 206f 6620 584d 4c20 656c 656d 656e er of XML elemen\n-000edee0: 7473 2c20 6173 2069 6620 7468 6520 534f ts, as if the SO\n-000edef0: 4150 2042 6f64 7920 6973 2074 6865 2072 AP Body is the r\n-000edf00: 6f6f 7420 6f66 2061 6e20 584d 4c20 646f oot of an XML do\n-000edf10: 6375 6d65 6e74 2e20 4e6f 203c 656d 3e3c cument. No <\n-000edf20: 636f 6465 3e53 4f41 502d 454e 563a 656e code>SOAP-ENV:en\n-000edf30: 636f 6469 6e67 5374 796c 653d 222e 2e2e codingStyle=\"...\n-000edf40: 223c 2f63 6f64 653e 3c2f 656d 3e20 6174 \" at\n-000edf50: 7472 6962 7574 6520 7368 6f75 6c64 2061 tribute should a\n-000edf60: 7070 6561 7220 696e 206c 6974 6572 616c ppear in literal\n-000edf70: 2063 6f6e 7465 6e74 2e20 5468 6973 2073 content. This s\n-000edf80: 7479 6c65 2069 7320 7370 6563 6966 6965 tyle is specifie\n-000edf90: 6420 666f 7220 7468 6520 656e 7469 7265 d for the entire\n-000edfa0: 2073 6572 7669 6365 2064 6563 6c61 7265 service declare\n-000edfb0: 6420 756e 6465 7220 6e61 6d65 7370 6163 d under namespac\n-000edfc0: 6520 7072 6566 6978 203c 636f 6465 3e6e e prefix n\n-000edfd0: 733c 2f63 6f64 653e 2077 6974 683a 203c s with: <\n-000edfe0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-000edff0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    //g\n-000ee020: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n-000ee030: 7374 796c 653a 2020 2020 646f 6375 6d65 style: docume\n-000ee040: 6e74 3c2f 7370 616e 3e3c 2f64 6976 3e0a nt
    .\n-000ee050: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n-000ee080: 6e73 2073 6572 7669 6365 2065 6e63 6f64 ns service encod\n-000ee090: 696e 673a 206c 6974 6572 616c 3c2f 7370 ing: literal
    .
  • \n-000ee0b0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d <\n-000ee370: 2f6c 693e 0a3c 2f75 6c3e 0a3c 703e 4265 /li>.
.

Be\n-000ee380: 7369 6465 7320 3c63 6f64 653e 2f2f 6773 sides //gs\n-000ee390: 6f61 7020 6e73 2073 6572 7669 6365 2073 oap ns service s\n-000ee3a0: 7479 6c65 3c2f 636f 6465 3e20 616e 6420 tyle and \n-000ee3b0: 3c63 6f64 653e 2f2f 6773 6f61 7020 6e73 //gsoap ns\n-000ee3c0: 2073 6572 7669 6365 2065 6e63 6f64 696e service encodin\n-000ee3d0: 673c 2f63 6f64 653e 2074 6865 7265 2061 g there a\n-000ee3e0: 7265 2061 6c73 6f20 7468 6520 7365 7276 re also the serv\n-000ee3f0: 6963 6520 6f70 6572 6174 696f 6e20 7370 ice operation sp\n-000ee400: 6563 6966 6963 2076 6572 7369 6f6e 7320 ecific versions \n-000ee410: 3c63 6f64 653e 2f2f 6773 6f61 7020 6e73 //gsoap ns\n-000ee420: 2073 6572 7669 6365 206d 6574 686f 642d service method-\n-000ee430: 7374 796c 653c 2f63 6f64 653e 2c20 3c63 style, //gsoap ns s\n-000ee450: 6572 7669 6365 206d 6574 686f 642d 7265 ervice method-re\n-000ee460: 7370 6f6e 7365 2d73 7479 6c65 3c2f 636f sponse-style, //gso\n-000ee480: 6170 206e 7320 7365 7276 6963 6520 6d65 ap ns service me\n-000ee490: 7468 6f64 2d65 6e63 6f64 696e 673c 2f63 thod-encoding, and \n-000ee4b0: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n-000ee4c0: 6365 206d 6574 686f 642d 7265 7370 6f6e ce method-respon\n-000ee4d0: 7365 2d65 6e63 6f64 696e 673c 2f63 6f64 se-encoding that explicit\n-000ee4f0: 6c79 2073 7065 6369 6679 2053 4f41 5020 ly specify SOAP \n-000ee500: 5250 4320 656e 636f 6465 642c 2064 6f63 RPC encoded, doc\n-000ee510: 756d 656e 742f 6c69 7465 7261 6c2c 206f ument/literal, o\n-000ee520: 7220 5250 4320 6c69 7465 7261 6c20 7374 r RPC literal st\n-000ee530: 796c 6520 6d65 7373 6167 6573 2066 6f72 yle messages for\n-000ee540: 2074 6865 2069 6e64 6963 6174 6564 2073 the indicated s\n-000ee550: 6572 7669 6365 206f 7065 7261 7469 6f6e ervice operation\n-000ee560: 206d 6574 686f 6473 2e3c 2f70 3e0a 3c70 methods.

.To enable SOAP \n-000ee580: 5250 4320 656e 636f 6469 6e67 2066 6f72 RPC encoding for\n-000ee590: 2061 2070 6172 7469 6375 6c61 7220 7365 a particular se\n-000ee5a0: 7276 6963 6520 6f70 6572 6174 696f 6e2c rvice operation,\n-000ee5b0: 2075 7365 3a3c 2f70 3e0a 3c64 6976 2063 use:

.
.
int n 0 = 5; \n-000f0520: 203c 7370 616e 2063 6c61 7373 3d22 636f // elemen\n-000f0540: 7420 7769 7468 2064 6566 6175 6c74 2076 t with default v\n-000f0550: 616c 7565 2035 2c20 6d69 6e4f 6363 7572 alue 5, minOccur\n-000f0560: 733d 302c 206d 6178 4f63 6375 7273 3d31 s=0, maxOccurs=1\n-000f0570: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-000f0590: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n-000f05b0: 743c 2f73 7061 6e3e 206d 3b20 2020 2020 t m; \n-000f05c0: 2020 2020 2020 203c 7370 616e 2063 6c61 // \n-000f05e0: 656c 656d 656e 7420 7769 7468 206d 696e element with min\n-000f05f0: 4f63 6375 7273 3d31 203c 2f73 7061 6e3e Occurs=1 \n-000f0600: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
\n-000ee5d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
//gsoap \n-000ee600: 6e73 2073 6572 7669 6365 206d 6574 686f ns service metho\n-000ee610: 642d 7374 796c 653a 2020 2020 7765 626d d-style: webm\n-000ee620: 6574 686f 6420 7270 6320 3c2f 7370 616e ethod rpc
.
\n-000ee660: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n-000ee670: 6365 206d 6574 686f 642d 656e 636f 6469 ce method-encodi\n-000ee680: 6e67 3a20 7765 626d 6574 686f 6420 656e ng: webmethod en\n-000ee690: 636f 6465 6420 3c2f 7370 616e 3e3c 2f64 coded .
\n-000ee6d0: 696e 743c 2f73 7061 6e3e 206e 735f 5f77 int ns__w\n-000ee6e0: 6562 6d65 7468 6f64 282e 2e2e 293c 2f64 ebmethod(...).

To\n-000ee710: 2065 6e61 626c 6520 534f 4150 2052 5043 enable SOAP RPC\n-000ee720: 2065 6e63 6f64 696e 6720 666f 7220 6120 encoding for a \n-000ee730: 7061 7274 6963 756c 6172 2073 6572 7669 particular servi\n-000ee740: 6365 206f 7065 7261 7469 6f6e 2072 6573 ce operation res\n-000ee750: 706f 6e73 652c 2075 7365 3a3c 2f70 3e0a ponse, use:

.\n-000ee760: 3c64 6976 2063 6c61 7373 3d22 6672 6167
//\n-000ee7a0: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n-000ee7b0: 206d 6574 686f 642d 7265 7370 6f6e 7365 method-response\n-000ee7c0: 2d73 7479 6c65 3a20 2020 2077 6562 6d65 -style: webme\n-000ee7d0: 7468 6f64 2072 7063 203c 2f73 7061 6e3e thod rpc \n-000ee7e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
/\n-000ee810: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n-000ee820: 6520 6d65 7468 6f64 2d72 6573 706f 6e73 e method-respons\n-000ee830: 652d 656e 636f 6469 6e67 3a20 7765 626d e-encoding: webm\n-000ee840: 6574 686f 6420 656e 636f 6465 6420 3c2f ethod encoded
.int ns__webmethod\n-000ee8a0: 282e 2e2e 293c 2f64 6976 3e0a 3c2f 6469 (...)
.

Likewise, \n-000ee8d0: 796f 7520 6361 6e20 7370 6563 6966 7920 you can specify \n-000ee8e0: 646f 6375 6d65 6e74 2f6c 6974 6572 616c document/literal\n-000ee8f0: 2061 6e64 2052 5043 206c 6974 6572 616c and RPC literal\n-000ee900: 206d 6573 7361 6765 732e 2054 6865 2064 messages. The d\n-000ee910: 6566 6175 6c74 2073 7479 6c65 2069 7320 efault style is \n-000ee920: 646f 6375 6d65 6e74 2f6c 6974 6572 616c document/literal\n-000ee930: 2c20 756e 6c65 7373 203c 623e 3c63 6f64 , unless soapcpp2 -e option \n-000ee960: 3c62 3e3c 636f 6465 3e2d 653c 2f63 6f64 -e is used t\n-000ee980: 6f20 7365 7420 534f 4150 2052 5043 2065 o set SOAP RPC e\n-000ee990: 6e63 6f64 696e 6720 6279 2064 6566 6175 ncoding by defau\n-000ee9a0: 6c74 2e3c 2f70 3e0a 3c70 3e46 6f72 2074 lt.

.

For t\n-000ee9b0: 6865 203c 636f 6465 3e73 7479 6c65 3c2f he style directives\n-000ee9d0: 2079 6f75 2063 616e 2073 7065 6369 6679 you can specify\n-000ee9e0: 203c 636f 6465 3e72 7063 3c2f 636f 6465 rpc or docum\n-000eea00: 656e 743c 2f63 6f64 653e 2e20 466f 7220 ent. For \n-000eea10: 7468 6520 3c63 6f64 653e 656e 636f 6469 the encodi\n-000eea20: 6e67 3c2f 636f 6465 3e20 6469 7265 6374 ng direct\n-000eea30: 6976 6573 2079 6f75 2063 616e 2073 7065 ives you can spe\n-000eea40: 6369 6679 203c 636f 6465 3e6c 6974 6572 cify liter\n-000eea50: 616c 3c2f 636f 6465 3e2c 203c 636f 6465 al, encoded,\n-000eea70: 206f 7220 6576 656e 2061 2063 7573 746f or even a custo\n-000eea80: 6d20 5552 4920 7468 6174 2069 6e64 6963 m URI that indic\n-000eea90: 6174 6573 2073 6f6d 6520 6375 7374 6f6d ates some custom\n-000eeaa0: 206f 7220 7072 6f70 7269 6574 6172 7920 or proprietary \n-000eeab0: 656e 636f 6469 6e67 2066 6f72 6d61 7420 encoding format \n-000eeac0: 696e 2058 4d4c 2077 6869 6368 2077 696c in XML which wil\n-000eead0: 6c20 6e6f 7420 696e 7465 726f 7065 7261 l not interopera\n-000eeae0: 7465 2077 6974 6820 534f 4150 2070 726f te with SOAP pro\n-000eeaf0: 6365 7373 6f72 7320 7468 6174 2061 7265 cessors that are\n-000eeb00: 206e 6f74 2063 6f6d 7061 7469 626c 6520 not compatible \n-000eeb10: 7769 7468 2074 6865 2073 7065 6369 6669 with the specifi\n-000eeb20: 6564 2065 6e63 6f64 696e 6720 666f 726d ed encoding form\n-000eeb30: 6174 2e20 5365 6520 616c 736f 2053 6563 at. See also Sec\n-000eeb40: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion \n-000eeb70: 4469 7265 6374 6976 6573 3c2f 613e 2e3c Directives.<\n-000eeb80: 2f70 3e0a 3c70 3e53 6565 2061 6c73 6f20 /p>.

See also \n-000eeb90: 3c61 2068 7265 663d 222e 2e2f 2e2e 2f64 C an\n-000eebc0: 6420 432b 2b20 584d 4c20 6461 7461 2062 d C++ XML data b\n-000eebd0: 696e 6469 6e67 733c 2f61 3e20 646f 6375 indings docu\n-000eebe0: 6d65 6e74 6174 696f 6e20 666f 7220 6469 mentation for di\n-000eebf0: 6666 6572 656e 6365 7320 696e 2058 4d4c fferences in XML\n-000eec00: 2073 6572 6961 6c69 7a61 7469 6f6e 2077 serialization w\n-000eec10: 6865 6e20 7573 696e 6720 7468 6520 534f hen using the SO\n-000eec20: 4150 2052 5043 2065 6e63 6f64 6564 2061 AP RPC encoded a\n-000eec30: 6e64 2064 6f63 756d 656e 742f 6c69 7465 nd document/lite\n-000eec40: 7261 6c20 6d65 7373 6167 696e 6720 7374 ral messaging st\n-000eec50: 796c 6573 2e3c 2f70 3e0a 3c70 3ef0 9f94 yles.

.

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

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

.Seriali\n-000eecc0: 7a69 6e67 206d 6978 6564 2063 6f6e 7465 zing mixed conte\n-000eecd0: 6e74 2077 6974 6820 6c69 7465 7261 6c20 nt with literal \n-000eece0: 584d 4c20 7374 7269 6e67 733c 2f68 333e XML strings

\n-000eecf0: 0a3c 703e 584d 4c20 6973 2073 746f 7265 .

XML is store\n-000eed00: 6420 696e 2022 6c69 7465 7261 6c22 2058 d in \"literal\" X\n-000eed10: 4d4c 2073 7472 696e 6773 2077 6869 6368 ML strings which\n-000eed20: 2061 7265 2074 6865 2062 7569 6c74 2d69 are the built-i\n-000eed30: 6e20 3c63 6f64 653e 5f58 4d4c 3c2f 636f n _XML type that is\n-000eed50: 2061 2072 6567 756c 6172 203c 636f 6465 a regular char* st\n-000eed70: 7269 6e67 206f 7220 796f 7520 6361 6e20 ring or you can \n-000eed80: 6465 636c 6172 6520 6120 7769 6465 2063 declare a wide c\n-000eed90: 6861 7261 6374 6572 2073 7472 696e 6720 haracter string \n-000eeda0: 696e 2061 6e20 696e 7465 7266 6163 6520 in an interface \n-000eedb0: 6865 6164 6572 2066 696c 6520 666f 7220 header file for \n-000eedc0: 736f 6170 6370 7032 2061 7320 666f 6c6c soapcpp2 as foll\n-000eedd0: 6f77 733a 3c2f 703e 0a3c 6469 7620 636c ows:

.
<\n-000eedf0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000eee00: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >typedef \n-000eee40: 7763 6861 725f 743c 2f73 7061 6e3e 202a wchar_t *\n-000eee50: 584d 4c3b 3c2f 6469 763e 0a3c 2f64 6976 XML;
.\n-000eef30: 3c70 3e4f 7220 7573 6520 6120 7769 6465

Or use a wide\n-000eef40: 2063 6861 7261 6374 6572 2073 7472 696e character strin\n-000eef50: 673a 3c2f 703e 0a3c 6469 7620 636c 6173 g:

.
<\n-000eef80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000eef90: 6f72 6422 3e74 7970 6564 6566 3c2f 7370 ord\">typedef std::wstring\n-000eefb0: 2058 4d4c 3b3c 2f64 6976 3e0a 3c2f 6469 XML;
.

To use bot\n-000eefe0: 6820 6174 2074 6865 2073 616d 6520 7469 h at the same ti\n-000eeff0: 6d65 3a3c 2f70 3e0a 3c64 6976 2063 6c61 me:

.
\n-000ef020: 3c73 7061 6e20 636c 6173 733d 226b 6579 typedef std::string\n-000ef050: 2020 584d 4c3b 3c2f 6469 763e 0a3c 6469 XML;
.<\n-000ef070: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000ef080: 6f72 6422 3e74 7970 6564 6566 3c2f 7370 ord\">typedef std::wstring\n-000ef0a0: 2058 4d4c 5f3b 3c2f 6469 763e 0a3c 2f64 XML_;
.

The diffe\n-000ef0d0: 7265 6e63 6573 2062 6574 7765 656e 2074 rences between t\n-000ef0e0: 6865 2075 7365 206f 6620 7265 6775 6c61 he use of regula\n-000ef0f0: 7220 382d 6269 7420 7374 7269 6e67 7320 r 8-bit strings \n-000ef100: 7665 7273 7573 2077 6964 6520 6368 6172 versus wide char\n-000ef110: 6163 7465 7220 7374 7269 6e67 7320 666f acter strings fo\n-000ef120: 7220 584d 4c20 646f 6375 6d65 6e74 7320 r XML documents \n-000ef130: 6172 653a 3c2f 703e 0a3c 756c 3e0a 3c6c are:

.
    .XML literal st\n-000ef150: 7269 6e67 7320 6d75 7374 2068 6f6c 6420 rings must hold \n-000ef160: 5554 462d 3820 584d 4c20 636f 6e74 656e UTF-8 XML conten\n-000ef170: 742e 3c2f 6c69 3e0a 3c6c 693e 5769 6465 t..
  • Wide\n-000ef180: 2063 6861 7261 6374 6572 2058 4d4c 206c character XML l\n-000ef190: 6974 6572 616c 2073 7472 696e 6773 2061 iteral strings a\n-000ef1a0: 7265 2063 6f6e 7665 7274 6564 2074 6f20 re converted to \n-000ef1b0: 616e 6420 6672 6f6d 2055 5446 2d38 2e3c and from UTF-8.<\n-000ef1c0: 2f6c 693e 0a3c 2f75 6c3e 0a3c 703e f09f /li>.
.

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

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

.XML \n-000ef230: 7661 6c69 6461 7469 6f6e 3c2f 6831 3e0a validation

.\n-000ef240: 3c70 3e53 6f6d 6520 584d 4c20 7661 6c69

Some XML vali\n-000ef250: 6461 7469 6f6e 2063 6f6e 7374 7261 696e dation constrain\n-000ef260: 7473 2061 7265 206e 6f74 2061 7574 6f6d ts are not autom\n-000ef270: 6174 6963 616c 6c79 2076 6572 6966 6965 atically verifie\n-000ef280: 6420 756e 6c65 7373 2065 7870 6c69 6369 d unless explici\n-000ef290: 746c 7920 7365 7420 7573 696e 6720 7468 tly set using th\n-000ef2a0: 6520 3c63 6f64 653e 2353 4f41 505f 584d e #SOAP_XM\n-000ef2b0: 4c5f 5354 5249 4354 3c2f 636f 6465 3e20 L_STRICT \n-000ef2c0: 666c 6167 2e20 534f 4150 2052 5043 2065 flag. SOAP RPC e\n-000ef2d0: 6e63 6f64 696e 6720 6973 2061 6e20 584d ncoding is an XM\n-000ef2e0: 4c20 666f 726d 6174 2074 6861 7420 646f L format that do\n-000ef2f0: 6573 206e 6f74 2061 6666 6f72 6420 7374 es not afford st\n-000ef300: 7269 6374 2058 4d4c 2076 616c 6964 6174 rict XML validat\n-000ef310: 696f 6e2c 2062 6563 6175 7365 206f 6620 ion, because of \n-000ef320: 7468 6520 6164 6469 7469 6f6e 206f 6620 the addition of \n-000ef330: 534f 4150 2d73 7065 6369 6669 6320 6174 SOAP-specific at\n-000ef340: 7472 6962 7574 6573 2061 6e64 206f 7468 tributes and oth\n-000ef350: 6572 2073 6d61 6c6c 2064 6576 6961 7469 er small deviati\n-000ef360: 6f6e 7320 7468 6174 2077 696c 6c20 6265 ons that will be\n-000ef370: 2064 6574 6563 7465 6420 6279 2061 6e20 detected by an \n-000ef380: 6167 6772 6573 7369 7665 2058 4d4c 2076 aggressive XML v\n-000ef390: 616c 6964 6174 6f72 2c20 6c65 6164 696e alidator, leadin\n-000ef3a0: 6720 7468 6520 6d65 7373 6167 696e 6720 g the messaging \n-000ef3b0: 6661 696c 7572 6573 2e20 4279 2074 6f6e failures. By ton\n-000ef3c0: 696e 6720 584d 4c20 7661 6c69 6461 7469 ing XML validati\n-000ef3d0: 6f6e 2064 6f77 6e2c 2069 7420 6865 6c70 on down, it help\n-000ef3e0: 7320 746f 2069 6d70 726f 7665 2053 4f41 s to improve SOA\n-000ef3f0: 5020 5250 4320 656e 636f 6469 6e67 2069 P RPC encoding i\n-000ef400: 6e74 6572 6f70 6572 6162 696c 6974 792e nteroperability.\n-000ef410: 3c2f 703e 0a3c 703e 5374 7269 6374 2076

.

Strict v\n-000ef420: 616c 6964 6174 696f 6e20 636f 6e73 7472 alidation constr\n-000ef430: 6169 6e74 7320 6172 6520 656e 6162 6c65 aints are enable\n-000ef440: 6420 7769 7468 2074 6865 203c 636f 6465 d with the #SOAP_XML_STRIC\n-000ef460: 543c 2f63 6f64 653e 206d 6f64 6520 666c T mode fl\n-000ef470: 6167 2073 6574 2c20 652e 672e 2077 6974 ag set, e.g. wit\n-000ef480: 6820 3c63 6f64 653e 736f 6170 5f73 6574 h soap_set\n-000ef490: 5f69 6d6f 6465 2873 6f61 702c 2053 4f41 _imode(soap, SOA\n-000ef4a0: 505f 584d 4c5f 5354 5249 4354 293c 2f63 P_XML_STRICT) or so\n-000ef4c0: 6170 5f6e 6577 2853 4f41 505f 584d 4c5f ap_new(SOAP_XML_\n-000ef4d0: 5354 5249 4354 293c 2f63 6f64 653e 2c20 STRICT), \n-000ef4e0: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section Run-time flags\n-000ef520: 3c2f 613e 2066 6f72 2074 6865 2063 6f6d for the com\n-000ef530: 706c 6574 6520 6c69 7374 206f 6620 666c plete list of fl\n-000ef540: 6167 732e 3c2f 703e 0a3c 703e 5468 6520 ags.

.

The \n-000ef550: 6e65 7874 2073 6563 7469 6f6e 7320 6465 next sections de\n-000ef560: 7363 7269 6265 2074 6865 2074 7970 6520 scribe the type \n-000ef570: 6f66 2063 6f6e 7374 7261 696e 7473 2076 of constraints v\n-000ef580: 616c 6964 6174 6564 2077 6865 6e20 3c63 alidated when #SOAP_XML_ST\n-000ef5a0: 5249 4354 3c2f 636f 6465 3e20 6973 2065 RICT is e\n-000ef5b0: 6e61 626c 6564 2061 6e64 2076 616c 6964 nabled and valid\n-000ef5c0: 6174 696f 6e20 636f 6e73 7472 6169 6e74 ation constraint\n-000ef5d0: 7320 6172 6520 7370 6563 6966 6965 6420 s are specified \n-000ef5e0: 696e 2074 6865 2069 6e74 6572 6661 6365 in the interface\n-000ef5f0: 2068 6561 6465 7220 6669 6c65 2e3c 2f70 header file..

Use compile\n-000ef610: 7220 666c 6167 203c 636f 6465 3e23 5749 r flag #WI\n-000ef620: 5448 5f52 4550 4c41 4345 5f49 4c4c 4547 TH_REPLACE_ILLEG\n-000ef630: 414c 5f55 5446 383c 2f63 6f64 653e 2074 AL_UTF8 t\n-000ef640: 6f20 666f 7263 6520 7374 7269 6374 2055 o force strict U\n-000ef650: 5446 2d38 2074 6578 7420 636f 6e76 6572 TF-8 text conver\n-000ef660: 7369 6f6e 732c 2077 6869 6368 2072 6570 sions, which rep\n-000ef670: 6c61 6365 7320 696e 7661 6c69 6420 5554 laces invalid UT\n-000ef680: 462d 3820 7769 7468 2055 2b46 4646 442e F-8 with U+FFFD.\n-000ef690: 3c2f 703e 0a3c 703e 5365 6520 616c 736f

.

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

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

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

.

\n-000ef770: 3c2f 613e 0a44 6566 6175 6c74 2076 616c .Default val\n-000ef780: 7565 733c 2f68 323e 0a3c 703e 4465 6661 ues

.

Defa\n-000ef790: 756c 7420 7661 6c75 6573 2063 616e 2062 ult values can b\n-000ef7a0: 6520 6465 6669 6e65 6420 666f 7220 6f70 e defined for op\n-000ef7b0: 7469 6f6e 616c 2065 6c65 6d65 6e74 7320 tional elements \n-000ef7c0: 616e 6420 6174 7472 6962 7574 6573 2c20 and attributes, \n-000ef7d0: 7768 6963 6820 6d65 616e 7320 7468 6174 which means that\n-000ef7e0: 2074 6865 2064 6566 6175 6c74 2076 616c the default val\n-000ef7f0: 7565 2077 696c 6c20 6265 2075 7365 6420 ue will be used \n-000ef800: 7768 656e 2074 6865 2065 6c65 6d65 6e74 when the element\n-000ef810: 206f 7220 6174 7472 6962 7574 6520 7661 or attribute va\n-000ef820: 6c75 6520 6973 206e 6f74 2070 7265 7365 lue is not prese\n-000ef830: 6e74 2069 6e20 7468 6520 7061 7273 6564 nt in the parsed\n-000ef840: 2058 4d4c 2e20 5365 6520 616c 736f 2053 XML. See also S\n-000ef850: 6563 7469 6f6e 203c 6120 636c 6173 733d ection D\n-000ef880: 6566 6175 6c74 2076 616c 7565 7320 666f efault values fo\n-000ef890: 7220 6f6d 6974 7465 6420 584d 4c20 656c r omitted XML el\n-000ef8a0: 656d 656e 7473 2061 6e64 2061 7474 7269 ements and attri\n-000ef8b0: 6275 7465 733c 2f61 3e20 616e 6420 6578 butes and ex\n-000ef8c0: 616d 706c 6573 2069 6e20 7375 6273 6571 amples in subseq\n-000ef8d0: 7565 6e74 2073 7562 7365 6374 696f 6e73 uent subsections\n-000ef8e0: 2062 656c 6f77 2e3c 2f70 3e0a 3c70 3e44 below.

.

D\n-000ef8f0: 6566 6175 6c74 2076 616c 7565 7320 6d75 efault values mu\n-000ef900: 7374 2062 6520 7072 696d 6974 6976 6520 st be primitive \n-000ef910: 7479 7065 732c 2069 6e74 6567 6572 2c20 types, integer, \n-000ef920: 666c 6f61 742c 2073 7472 696e 672c 2065 float, string, e\n-000ef930: 7463 2e20 6f72 2070 6f69 6e74 6572 7320 tc. or pointers \n-000ef940: 746f 2070 7269 6d69 7469 7665 2074 7970 to primitive typ\n-000ef950: 6573 2e20 4465 6661 756c 7420 7661 6c75 es. Default valu\n-000ef960: 6573 2063 616e 2062 6520 7370 6563 6966 es can be specif\n-000ef970: 6965 6420 666f 7220 7374 7275 6374 2061 ied for struct a\n-000ef980: 6e64 2063 6c61 7373 206d 656d 6265 7273 nd class members\n-000ef990: 2c20 6173 2073 686f 776e 2069 6e20 7468 , as shown in th\n-000ef9a0: 6520 6578 616d 706c 6520 6265 6c6f 773a e example below:\n-000ef9b0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

.
struct ns__MyRecord .
{
.<\n-000efa30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000efa40: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n-000efa60: 6e74 3c2f 7370 616e 3e20 6e20 3d20 353b nt n = 5;\n-000efa70: 2020 2020 2020 2020 2020 203c 7370 616e // optional ele\n-000efaa0: 6d65 6e74 2077 6974 6820 6465 6661 756c ment with defaul\n-000efab0: 7420 7661 6c75 6520 3520 3c2f 7370 616e t value 5
.
char *name = "no\n-000efb30: 6e65 2671 756f 743b 3c2f 7370 616e 3e3b ne";\n-000efb40: 203c 7370 616e 2063 6c61 7373 3d22 636f // option\n-000efb60: 616c 2065 6c65 6d65 6e74 2077 6974 6820 al element with \n-000efb70: 6465 6661 756c 7420 7661 6c75 6520 2671 default value &q\n-000efb80: 756f 743b 6e6f 6e65 2671 756f 743b 203c uot;none" <\n-000efb90: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
. \n-000efbb0: 2040 203c 7370 616e 2063 6c61 7373 3d22 @ enum ns__color {\n-000efbe0: 2052 4544 2c20 5748 4954 452c 2042 4c55 RED, WHITE, BLU\n-000efbf0: 4520 7d20 636f 6c6f 7220 3d20 5245 443b E } color = RED;\n-000efc00: 203c 7370 616e 2063 6c61 7373 3d22 636f // option\n-000efc20: 616c 2061 7474 7269 6275 7465 2077 6974 al attribute wit\n-000efc30: 6820 6465 6661 756c 7420 7661 6c75 6520 h default value \n-000efc40: 5245 4420 3c2f 7370 616e 3e3c 2f64 6976 RED .
};
.

Upon dese\n-000efc90: 7269 616c 697a 6174 696f 6e20 6f66 2061 rialization of a\n-000efca0: 6273 656e 7420 6461 7461 2c20 7468 6573 bsent data, thes\n-000efcb0: 6520 6d65 6d62 6572 7320 7769 6c6c 2062 e members will b\n-000efcc0: 6520 7365 7420 6163 636f 7264 696e 676c e set accordingl\n-000efcd0: 792e 2057 6865 6e20 636c 6173 7365 7320 y. When classes \n-000efce0: 6172 6520 696e 7374 616e 7469 6174 6564 are instantiated\n-000efcf0: 2077 6974 6820 3c63 6f64 653e 736f 6170 with soap\n-000efd00: 5f6e 6577 5f43 6c61 7373 4e61 6d65 3c2f _new_ClassName the instan\n-000efd20: 6365 2077 696c 6c20 6265 2069 6e69 7469 ce will be initi\n-000efd30: 616c 697a 6564 2077 6974 6820 6465 6661 alized with defa\n-000efd40: 756c 7420 7661 6c75 6573 2e3c 2f70 3e0a ult values.

.\n-000efd50: 3c70 3e53 6565 2061 6c73 6f20 3c61 2068

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

.

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

.Occ\n-000efe30: 7572 7265 6e63 6520 636f 6e73 7472 6169 urrence constrai\n-000efe40: 6e74 733c 2f68 323e 0a3c 703e 4f63 6375 nts

.

Occu\n-000efe50: 7272 656e 6365 2063 6f6e 7374 7261 696e rrence constrain\n-000efe60: 7473 2073 7065 6369 6679 2074 6865 206d ts specify the m\n-000efe70: 696e 696d 756d 2061 6e64 2f6f 7220 6d61 inimum and/or ma\n-000efe80: 7869 6d75 6d20 6672 6571 7565 6e63 7920 ximum frequency \n-000efe90: 6f72 206f 7074 696f 6e61 6c69 7479 206f or optionality o\n-000efea0: 6620 6f66 2061 7474 7269 6275 7465 7320 f of attributes \n-000efeb0: 616e 6420 656c 656d 656e 7473 2e3c 2f70 and elements..

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

.

.E\n-000eff20: 6c65 6d65 6e74 7320 7769 7468 206d 696e lements with min\n-000eff30: 4f63 6375 7273 2061 6e64 206d 6178 4f63 Occurs and maxOc\n-000eff40: 6375 7273 2072 6573 7472 6963 7469 6f6e curs restriction\n-000eff50: 733c 2f68 333e 0a3c 703e 546f 2066 6f72 s

.

To for\n-000eff60: 6365 2074 6865 2076 616c 6964 6174 696f ce the validatio\n-000eff70: 6e20 6f66 206d 696e 4f63 6375 7273 2061 n of minOccurs a\n-000eff80: 6e64 206d 6178 4f63 6375 7273 2063 6f6e nd maxOccurs con\n-000eff90: 7374 7261 696e 7473 2074 6865 203c 636f straints the #SOAP_XML_STR\n-000effb0: 4943 543c 2f63 6f64 653e 2069 6e70 7574 ICT input\n-000effc0: 206d 6f64 6520 666c 6167 206d 7573 7420 mode flag must \n-000effd0: 6265 2073 6574 2e20 5468 6520 6d69 6e4f be set. The minO\n-000effe0: 6363 7572 7320 616e 6420 6d61 784f 6363 ccurs and maxOcc\n-000efff0: 7572 7320 636f 6e73 7472 6169 6e74 7320 urs constraints \n-000f0000: 6172 6520 7370 6563 6966 6965 6420 666f are specified fo\n-000f0010: 7220 6d65 6d62 6572 7320 6f66 2061 2073 r members of a s\n-000f0020: 7472 7563 7420 616e 6420 6d65 6d62 6572 truct and member\n-000f0030: 7320 6f66 2061 2063 6c61 7373 2069 6e20 s of a class in \n-000f0040: 6120 6865 6164 6572 2066 696c 6520 7573 a header file us\n-000f0050: 696e 6720 7468 6520 666f 6c6c 6f77 696e ing the followin\n-000f0060: 6720 7379 6e74 6178 3a3c 2f70 3e0a 3c64 g syntax:

.
Type membe\n-000f00a0: 726e 616d 6520 3c73 7061 6e20 636c 6173 rname null\n-000f00c0: 7074 723c 2f73 7061 6e3e 206d 696e 4f63 ptr minOc\n-000f00d0: 6375 7273 203a 206d 6178 4f63 6375 7273 curs : maxOccurs\n-000f00e0: 203d 2076 616c 7565 3b3c 2f64 6976 3e0a = value;
.\n-000f00f0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

The nullptr is optional a\n-000f0130: 6e64 2069 6e64 6963 6174 6573 2074 6861 nd indicates tha\n-000f0140: 7420 7468 6520 6d65 6d62 6572 2069 7320 t the member is \n-000f0150: 6e69 6c6c 6162 6c65 2028 6753 4f41 5020 nillable (gSOAP \n-000f0160: 7665 7273 696f 6e20 322e 382e 3234 206f version 2.8.24 o\n-000f0170: 7220 6772 6561 7465 7229 2c20 7768 6963 r greater), whic\n-000f0180: 6820 6d65 616e 7320 7468 6174 2077 6865 h means that whe\n-000f0190: 6e20 4e55 4c4c 2061 6e20 656d 7074 7920 n NULL an empty \n-000f01a0: 656c 656d 656e 7420 7769 7468 203c 656d element with xsi:nil=\"\n-000f01c0: 7472 7565 223c 2f63 6f64 653e 3c2f 656d true\" is added in th\n-000f01e0: 6520 7365 7269 616c 697a 6564 2058 4d4c e serialized XML\n-000f01f0: 2e3c 2f70 3e0a 3c70 3e54 6865 203c 636f .

.

The minOccurs and ma\n-000f0220: 784f 6363 7572 733c 2f63 6f64 653e 2061 xOccurs a\n-000f0230: 7265 206f 7074 696f 6e61 6c20 7661 6c75 re optional valu\n-000f0240: 6573 2074 6861 7420 6d75 7374 2062 6520 es that must be \n-000f0250: 696e 7465 6765 7220 6c69 7465 7261 6c73 integer literals\n-000f0260: 2e20 5768 656e 203c 636f 6465 3e6d 6178 . When max\n-000f0270: 4f63 6375 7273 3c2f 636f 6465 3e20 6973 Occurs is\n-000f0280: 206e 6f74 2073 7065 6369 6669 6564 2074 not specified t\n-000f0290: 6865 6e20 7468 6520 636f 6c6f 6e20 6361 hen the colon ca\n-000f02a0: 6e20 6265 206f 6d69 7474 6564 2e20 5768 n be omitted. Wh\n-000f02b0: 656e 203c 636f 6465 3e6d 696e 4f63 6375 en minOccu\n-000f02c0: 7273 3c2f 636f 6465 3e20 6973 206e 6f74 rs is not\n-000f02d0: 2073 7065 6369 6669 6564 2069 7420 6973 specified it is\n-000f02e0: 2061 7373 756d 6564 2074 6f20 6265 206f assumed to be o\n-000f02f0: 6e65 2028 3129 2066 6f72 206e 6f6e 2d70 ne (1) for non-p\n-000f0300: 6f69 6e74 6572 206d 656d 6265 7273 2074 ointer members t\n-000f0310: 6861 7420 6172 6520 656c 656d 656e 7473 hat are elements\n-000f0320: 2061 6e64 207a 6572 6f20 2830 2920 666f and zero (0) fo\n-000f0330: 7220 6d65 6d62 6572 7320 7468 6174 2061 r members that a\n-000f0340: 7265 2070 6f69 6e74 6572 7320 6f72 2061 re pointers or a\n-000f0350: 7265 2061 7474 7269 6275 7465 7320 2869 re attributes (i\n-000f0360: 2e65 2e20 6861 7665 2061 203c 636f 6465 .e. have a @ qualif\n-000f0380: 6965 7229 2e3c 2f70 3e0a 3c70 3e41 2064 ier).

.

A d\n-000f0390: 6566 6175 6c74 2069 6e69 7469 616c 697a efault initializ\n-000f03a0: 6174 696f 6e20 3c63 6f64 653e 7661 6c75 ation valu\n-000f03b0: 653c 2f63 6f64 653e 206d 6179 2062 6520 e may be \n-000f03c0: 7072 6f76 6964 6564 2061 6e64 2069 7320 provided and is \n-000f03d0: 6f70 7469 6f6e 616c 2e3c 2f70 3e0a 3c70 optional.

.A fixed initial\n-000f03f0: 697a 6174 696f 6e20 7661 6c75 6520 6361 ization value ca\n-000f0400: 6e20 6265 2073 7065 6369 6669 6564 2077 n be specified w\n-000f0410: 6974 6820 3c63 6f64 653e 3d3d 3c2f 636f ith == (gSOAP versi\n-000f0430: 6f6e 2032 2e38 2e34 3820 6f72 2067 7265 on 2.8.48 or gre\n-000f0440: 6174 6572 292e 3c2f 703e 0a3c 703e 466f ater).

.

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

.
stru\n-000f04a0: 6374 203c 2f73 7061 6e3e 6e73 5f5f 4d79 ct ns__My\n-000f04b0: 5265 636f 7264 203c 2f64 6976 3e0a 3c64 Record
.\n-000f04d0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
.
int *k nullp\n-000f0660: 7472 3c2f 7370 616e 3e20 313b 203c 7370 tr 1; // element wi\n-000f0690: 7468 206d 696e 4f63 6375 7273 3d31 2061 th minOccurs=1 a\n-000f06a0: 6e64 206e 696c 6c61 626c 653d 7472 7565 nd nillable=true\n-000f06b0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
.<\n-000f06c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000f06d0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n-000f06f0: 6e74 3c2f 7370 616e 3e20 7620 3d3d 2032 nt v == 2\n-000f0700: 3b20 2020 2020 2020 3c73 7061 6e20 636c ; //\n-000f0720: 2065 6c65 6d65 6e74 2077 6974 6820 6d69 element with mi\n-000f0730: 6e4f 6363 7572 733d 3120 616e 6420 6669 nOccurs=1 and fi\n-000f0740: 7865 6420 7661 6c75 6520 3220 3c2f 7370 xed value 2
.
\n-000f0770: 3c73 7061 6e20 636c 6173 733d 226b 6579 int __size 0:10\n-000f07a0: 3b20 203c 7370 616e 2063 6c61 7373 3d22 ; // sequ\n-000f07c0: 656e 6365 2026 6c74 3b69 7465 6d26 6774 ence <item>\n-000f07d0: 3b20 7769 7468 206d 696e 4f63 6375 7273 ; with minOccurs\n-000f07e0: 3d30 2c20 6d61 784f 6363 7572 733d 3130 =0, maxOccurs=10\n-000f07f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-000f0810: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n-000f0830: 743c 2f73 7061 6e3e 202a 6974 656d 3b20 t *item; \n-000f0840: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
std\n-000f0860: 3a3a 7665 6374 6f72 266c 743b 646f 7562 ::vector<doub\n-000f0870: 6c65 2667 743b 206e 756d 7320 323b 203c le> nums 2; <\n-000f0880: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-000f0890: 656e 7422 3e2f 2f20 7365 7175 656e 6365 ent\">// sequence\n-000f08a0: 2026 6c74 3b6e 756d 7326 6774 3b20 7769 <nums> wi\n-000f08b0: 7468 206d 696e 4f63 6375 7273 3d32 2c20 th minOccurs=2, \n-000f08c0: 6d61 784f 6363 7572 733d 756e 626f 756e maxOccurs=unboun\n-000f08d0: 6465 6420 3c2f 7370 616e 3e3c 2f64 6976 ded .
};
.\n-000f0910: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
\n-000f0940: 7374 7275 6374 203c 2f73 7061 6e3e 6172 struct ar\n-000f0950: 7261 794f 6669 6e74 203c 2f64 6976 3e0a rayOfint
.\n-000f0960: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{
.
\n-000f0990: 3c73 7061 6e20 636c 6173 733d 226b 6579 int *__ptr 1:10\n-000f09c0: 303b 203c 7370 616e 2063 6c61 7373 3d22 0; // minO\n-000f09e0: 6363 7572 733d 312c 206d 6178 4f63 6375 ccurs=1, maxOccu\n-000f09f0: 7273 3d31 3030 203c 2f73 7061 6e3e 3c2f rs=100 .
int \n-000f0a40: 7369 7a65 3b20 3c2f 6469 763e 0a3c 6469 size;
.}\n-000f0a60: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.
<\n-000f0a80: 703e 5365 6520 616c 736f 203c 6120 6872 p>See also C and C++\n-000f0ac0: 2058 4d4c 2064 6174 6120 6269 6e64 696e XML data bindin\n-000f0ad0: 6773 3c2f 613e 2064 6f63 756d 656e 7461 gs documenta\n-000f0ae0: 7469 6f6e 2066 6f72 206d 6f72 6520 6465 tion for more de\n-000f0af0: 7461 696c 732e 3c2f 703e 0a3c 703e f09f tails.

.

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

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

.Required \n-000f0b70: 616e 6420 7072 6f68 6962 6974 6564 2061 and prohibited a\n-000f0b80: 7474 7269 6275 7465 733c 2f68 333e 0a3c ttributes

.<\n-000f0b90: 703e 5369 6d69 6c61 7220 746f 2074 6865 p>Similar to the\n-000f0ba0: 206d 696e 4f63 6375 7273 2061 6e64 206d minOccurs and m\n-000f0bb0: 6178 4f63 6375 7273 2061 6e6e 6f74 6174 axOccurs annotat\n-000f0bc0: 696f 6e73 2064 6566 696e 6564 2069 6e20 ions defined in \n-000f0bd0: 7468 6520 7072 6576 696f 7573 2073 6563 the previous sec\n-000f0be0: 7469 6f6e 2c20 6174 7472 6962 7574 6573 tion, attributes\n-000f0bf0: 2069 6e20 6120 7374 7275 6374 206f 7220 in a struct or \n-000f0c00: 636c 6173 7320 6361 6e20 6265 2061 6e6e class can be ann\n-000f0c10: 6f74 6174 6564 2077 6974 6820 6f63 6375 otated with occu\n-000f0c20: 7272 656e 6365 2063 6f6e 7374 7261 696e rrence constrain\n-000f0c30: 7473 2074 6f20 6d61 6b65 2074 6865 6d20 ts to make them \n-000f0c40: 6f70 7469 6f6e 616c 2028 3029 2c20 7265 optional (0), re\n-000f0c50: 7175 6972 6564 2028 3129 2c20 6f72 2070 quired (1), or p\n-000f0c60: 726f 6869 6269 7465 6420 2830 3a30 292e rohibited (0:0).\n-000f0c70: 2044 6566 6175 6c74 2076 616c 7565 7320 Default values \n-000f0c80: 6361 6e20 6265 2061 7373 6967 6e65 6420 can be assigned \n-000f0c90: 746f 206f 7074 696f 6e61 6c20 6174 7472 to optional attr\n-000f0ca0: 6962 7574 6573 2e3c 2f70 3e0a 3c70 3e46 ibutes.

.

F\n-000f0cb0: 6f72 2065 7861 6d70 6c65 3c2f 703e 0a3c or example

.<\n-000f0cc0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-000f0cd0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
str\n-000f0d00: 7563 7420 3c2f 7370 616e 3e6e 735f 5f4d uct ns__M\n-000f0d10: 7952 6563 6f72 6420 3c2f 6469 763e 0a3c yRecord
.<\n-000f0d20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000f0d30: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
.
@ <\n-000f0d50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f0d60: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int m 1; // required att\n-000f0da0: 7269 6275 7465 2028 6f63 6375 7273 2061 ribute (occurs a\n-000f0db0: 7420 6c65 6173 7420 6f6e 6365 2920 3c2f t least once)
. \n-000f0de0: 4020 3c73 7061 6e20 636c 6173 733d 226b @ int<\n-000f0e00: 2f73 7061 6e3e 206e 203d 2035 3b20 3c73 /span> n = 5; // optional \n-000f0e30: 6174 7472 6962 7574 6520 7769 7468 2064 attribute with d\n-000f0e40: 6566 6175 6c74 2076 616c 7565 2035 3c2f efault value 5
. \n-000f0e70: 4020 3c73 7061 6e20 636c 6173 733d 226b @ int<\n-000f0e90: 2f73 7061 6e3e 206f 2030 3b20 2020 3c73 /span> o 0; // optional \n-000f0ec0: 6174 7472 6962 7574 6520 286d 6179 206f attribute (may o\n-000f0ed0: 7220 6d61 7920 6e6f 7420 6f63 6375 7229 r may not occur)\n-000f0ee0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
.<\n-000f0ef0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000f0f00: 3e20 2040 203c 7370 616e 2063 6c61 7373 > @ i\n-000f0f20: 6e74 3c2f 7370 616e 3e20 7020 303a 303b nt p 0:0;\n-000f0f30: 203c 7370 616e 2063 6c61 7373 3d22 636f // prohib\n-000f0f50: 6974 6564 2061 7474 7269 6275 7465 203c ited attribute <\n-000f0f60: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.}\n-000f0f80: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.
<\n-000f0fa0: 703e 5265 6d65 6d62 6572 2074 6f20 7365 p>Remember to se\n-000f0fb0: 7420 7468 6520 3c63 6f64 653e 2353 4f41 t the #SOA\n-000f0fc0: 505f 584d 4c5f 5354 5249 4354 3c2f 636f P_XML_STRICT input mode f\n-000f0fe0: 6c61 6720 746f 2065 6e61 626c 6520 7468 lag to enable th\n-000f0ff0: 6520 7661 6c69 6461 7469 6f6e 206f 6620 e validation of \n-000f1000: 6174 7472 6962 7574 6520 6f63 6375 7272 attribute occurr\n-000f1010: 656e 6365 2063 6f6e 7374 7261 696e 7473 ence constraints\n-000f1020: 2e3c 2f70 3e0a 3c70 3e53 6565 2061 6c73 .

.

See als\n-000f1030: 6f20 3c61 2068 7265 663d 222e 2e2f 2e2e o C \n-000f1060: 616e 6420 432b 2b20 584d 4c20 6461 7461 and C++ XML data\n-000f1070: 2062 696e 6469 6e67 733c 2f61 3e20 646f bindings do\n-000f1080: 6375 6d65 6e74 6174 696f 6e20 666f 7220 cumentation for \n-000f1090: 6d6f 7265 2064 6574 6169 6c73 2e3c 2f70 more details..

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

.

.Value c\n-000f1110: 6f6e 7374 7261 696e 7473 3c2f 6832 3e0a onstraints

.\n-000f1120: 3c70 3e56 616c 7565 2063 6f6e 7374 7261

Value constra\n-000f1130: 696e 7473 2072 6573 7472 6963 7420 7468 ints restrict th\n-000f1140: 6520 6c65 6e67 7468 206f 6620 7374 7269 e length of stri\n-000f1150: 6e67 7320 616e 6420 7468 6520 7261 6e67 ngs and the rang\n-000f1160: 6520 6f66 2076 616c 7565 7320 6f66 206e e of values of n\n-000f1170: 756d 6572 6963 2074 7970 6573 2e3c 2f70 umeric types..

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

.

.Data l\n-000f11f0: 656e 6774 6820 7265 7374 7269 6374 696f ength restrictio\n-000f1200: 6e73 3c2f 6833 3e0a 3c70 3e41 2073 6368 ns

.

A sch\n-000f1210: 656d 6120 7369 6d70 6c65 5479 7065 2069 ema simpleType i\n-000f1220: 7320 6465 6669 6e65 6420 7769 7468 2061 s defined with a\n-000f1230: 203c 636f 6465 3e74 7970 6564 6566 3c2f typedef by taking \n-000f1250: 6120 6261 7365 2070 7269 6d69 7469 7665 a base primitive\n-000f1260: 2074 6f20 6465 6669 6e65 6420 6120 6465 to defined a de\n-000f1270: 7269 7665 6420 7369 6d70 6c65 5479 7065 rived simpleType\n-000f1280: 2e20 466f 7220 6578 616d 706c 653a 3c2f . For example:.

typedef \n-000f12e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int time__secon\n-000f1310: 6473 3b3c 2f64 6976 3e0a 3c2f 6469 763e ds;
.
\n-000f1320: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d <\n-000f1560: 2f64 6976 3e3c 703e 4120 636f 6d70 6c65 /div>

A comple\n-000f1570: 7854 7970 6520 7769 7468 2073 696d 706c xType with simpl\n-000f1580: 6543 6f6e 7465 6e74 2069 7320 6465 6669 eContent is defi\n-000f1590: 6e65 6420 7769 7468 2061 2077 7261 7070 ned with a wrapp\n-000f15a0: 6572 2073 7472 7563 742f 636c 6173 733a er struct/class:\n-000f15b0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

.
struct time__date .
{
. \n-000f1640: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha\n-000f1660: 723c 2f73 7061 6e3e 202a 5f5f 6974 656d r *__item\n-000f1670: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // some \n-000f1690: 6375 7374 6f6d 2066 6f72 6d61 7420 6461 custom format da\n-000f16a0: 7465 2028 7265 7374 7269 6374 696f 6e20 te (restriction \n-000f16b0: 6f66 2073 7472 696e 6729 203c 2f73 7061 of string)
.
@ <\n-000f16e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f16f0: 6f72 6422 3e65 6e75 6d3c 2f73 7061 6e3e ord\">enum\n-000f1700: 2074 696d 655f 5f7a 6f6e 6520 7b20 4553 time__zone { ES\n-000f1710: 542c 2047 4d54 2c20 2e2e 2e20 7d20 7a6f T, GMT, ... } zo\n-000f1720: 6e65 3b20 3c2f 6469 763e 0a3c 6469 7620 ne;
.
}.

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

. <\n-000f17c0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-000f17d0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
<complexType\n-000f1810: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c na\n-000f1830: 6d65 3c2f 7370 616e 3e3d 3c73 7061 6e20 me="date\n-000f1860: 2671 756f 743b 3c2f 7370 616e 3e26 6774 ">\n-000f1870: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n-000f1890: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;simpl\n-000f18b0: 6543 6f6e 7465 6e74 3c2f 7370 616e 3e26 eContent&\n-000f18c0: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
\n-000f18e0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <e\n-000f1900: 7874 656e 7369 6f6e 3c2f 7370 616e 3e20 xtension \n-000f1910: 3c73 7061 6e20 636c 6173 733d 226b 6579 base=&q\n-000f1950: 756f 743b 7873 643a 7374 7269 6e67 2671 uot;xsd:string&q\n-000f1960: 756f 743b 3c2f 7370 616e 3e2f 2667 743b uot;/>\n-000f1970: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
<\n-000f1990: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /simpl\n-000f19b0: 6543 6f6e 7465 6e74 3c2f 7370 616e 3e26 eContent&\n-000f19c0: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
&\n-000f19e0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;att\n-000f1a00: 7269 6275 7465 3c2f 7370 616e 3e20 3c73 ribute name=\n-000f1a30: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-000f1a50: 743b 7a6f 6e65 2671 756f 743b 3c2f 7370 t;zone" type="time:zon\n-000f1ab0: 6526 7175 6f74 3b3c 2f73 7061 6e3e 203c e" <\n-000f1ac0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f1ad0: 6f72 6422 3e75 7365 3c2f 7370 616e 3e3d ord\">use=\n-000f1ae0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-000f1b00: 743b 6f70 7469 6f6e 616c 2671 756f 743b t;optional"\n-000f1b10: 3c2f 7370 616e 3e2f 2667 743b 203c 2f64 /> .
</complexType\n-000f1b60: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
<simpleType name="zone&quo\n-000f1c00: 743b 3c2f 7370 616e 3e26 6774 3b20 3c2f t;> .
<restricti\n-000f1c50: 6f6e 3c2f 7370 616e 3e20 3c73 7061 6e20 on \n-000f1c70: 6261 7365 3c2f 7370 616e 3e3d 3c73 7061 base="xs\n-000f1ca0: 643a 7374 7269 6e67 2671 756f 743b 3c2f d:string">
\n-000f1cc0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<enumeration\n-000f1d00: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c va\n-000f1d20: 6c75 653c 2f73 7061 6e3e 3d3c 7370 616e lue="EST\n-000f1d50: 2671 756f 743b 3c2f 7370 616e 3e2f 2667 "/&g\n-000f1d60: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
\n-000f1d80: 266c 743b 3c73 7061 6e20 636c 6173 733d <en\n-000f1da0: 756d 6572 6174 696f 6e3c 2f73 7061 6e3e umeration\n-000f1db0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 value=\n-000f1df0: 2671 756f 743b 474d 5426 7175 6f74 3b3c "GMT"<\n-000f1e00: 2f73 7061 6e3e 2f26 6774 3b20 3c2f 6469 /span>/> .
... .
</restricti\n-000f1e70: 6f6e 3c2f 7370 616e 3e26 6774 3b20 3c2f on> .
</simpleType\n-000f1ec0: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
\n-000f1ef0: 3c70 3e44 6174 6120 7661 6c75 6520 6c65

Data value le\n-000f1f00: 6e67 7468 2063 6f6e 7374 7261 696e 7473 ngth constraints\n-000f1f10: 206f 6620 7369 6d70 6c65 5479 7065 7320 of simpleTypes \n-000f1f20: 616e 6420 636f 6d70 6c65 7854 7970 6573 and complexTypes\n-000f1f30: 2077 6974 6820 7369 6d70 6c65 436f 6e74 with simpleCont\n-000f1f40: 656e 7420 6172 6520 6465 6669 6e65 6420 ent are defined \n-000f1f50: 6173 2066 6f6c 6c6f 7773 3a3c 2f70 3e0a as follows:

.\n-000f1f60: 3c64 6976 2063 6c61 7373 3d22 6672 6167
ty\n-000f1fa0: 7065 6465 663c 2f73 7061 6e3e 203c 7370 pedef char *ns__string25\n-000f1fe0: 3620 303a 3235 363b 203c 7370 616e 2063 6 0:256; /\n-000f2000: 2f20 7369 6d70 6c65 5479 7065 2072 6573 / simpleType res\n-000f2010: 7472 6963 7469 6f6e 206f 6620 7374 7269 triction of stri\n-000f2020: 6e67 2077 6974 6820 6d61 7820 6c65 6e67 ng with max leng\n-000f2030: 7468 2032 3536 2063 6861 7261 6374 6572 th 256 character\n-000f2040: 7320 3c2f 7370 616e 3e3c 2f64 6976 3e0a s
.\n-000f2050: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
typedef<\n-000f2080: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *ns\n-000f20b0: 5f5f 7374 7269 6e67 3130 2031 303a 3130 __string10 10:10\n-000f20c0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // simpl\n-000f20e0: 6554 7970 6520 7265 7374 7269 6374 696f eType restrictio\n-000f20f0: 6e20 6f66 2073 7472 696e 6720 7769 7468 n of string with\n-000f2100: 206c 656e 6774 6820 6f66 2031 3020 6368 length of 10 ch\n-000f2110: 6172 6163 7465 7273 203c 2f73 7061 6e3e aracters \n-000f2120: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
t\n-000f2150: 7970 6564 6566 3c2f 7370 616e 3e20 7374 ypedef st\n-000f2160: 643a 3a73 7472 696e 6720 2a6e 735f 5f73 d::string *ns__s\n-000f2170: 7472 696e 6738 2038 3b20 3c73 7061 6e20 tring8 8; \n-000f2190: 2f2f 2073 696d 706c 6554 7970 6520 7265 // simpleType re\n-000f21a0: 7374 7269 6374 696f 6e20 6f66 2073 7472 striction of str\n-000f21b0: 696e 6720 7769 7468 2061 7420 6c65 6173 ing with at leas\n-000f21c0: 7420 3820 6368 6172 6163 7465 7273 203c t 8 characters <\n-000f21d0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.<\n-000f21f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f2200: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct ns__data // simpleConte\n-000f2240: 6e74 2077 7261 7070 6572 203c 2f73 7061 nt wrapper
.
{.
char *\n-000f22b0: 5f5f 6974 656d 203a 3235 363b 203c 7370 __item :256; // simpleCont\n-000f22e0: 656e 7420 7769 7468 2061 7420 6d6f 7374 ent with at most\n-000f22f0: 2032 3536 2063 6861 7261 6374 6572 7320 256 characters \n-000f2300: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-000f2320: 2020 4020 3c73 7061 6e20 636c 6173 733d @ ch\n-000f2340: 6172 3c2f 7370 616e 3e20 2a6e 616d 6520 ar *name \n-000f2350: 313b 2020 2020 2020 3c73 7061 6e20 636c 1; //\n-000f2370: 2072 6571 7569 7265 6420 6e61 6d65 2061 required name a\n-000f2380: 7474 7269 6275 7465 203c 2f73 7061 6e3e ttribute \n-000f2390: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
}; .
struc\n-000f23e0: 7420 3c2f 7370 616e 3e74 696d 655f 5f64 t time__d\n-000f23f0: 6174 6520 3c73 7061 6e20 636c 6173 733d ate // sim\n-000f2410: 706c 6543 6f6e 7465 6e74 2077 7261 7070 pleContent wrapp\n-000f2420: 6572 203c 2f73 7061 6e3e 3c2f 6469 763e er
\n-000f2430: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{
.
\n-000f2460: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-000f2480: 2f73 7061 6e3e 202a 5f5f 6974 656d 203a /span> *__item :\n-000f2490: 3130 303b 203c 2f64 6976 3e0a 3c64 6976 100;
. \n-000f24b0: 4020 3c73 7061 6e20 636c 6173 733d 226b @ enum time__zone {\n-000f24e0: 2045 5354 2c20 474d 542c 202e 2e2e 207d EST, GMT, ... }\n-000f24f0: 207a 6f6e 6520 3d20 474d 543b 203c 2f64 zone = GMT; .
}
.

Set the \n-000f2540: 3c63 6f64 653e 2353 4f41 505f 584d 4c5f #SOAP_XML_\n-000f2550: 5354 5249 4354 3c2f 636f 6465 3e20 6d6f STRICT mo\n-000f2560: 6465 2066 6c61 6720 746f 2065 6e61 626c de flag to enabl\n-000f2570: 6520 7468 6520 7661 6c69 6461 7469 6f6e e the validation\n-000f2580: 206f 6620 7661 6c75 6520 6c65 6e67 7468 of value length\n-000f2590: 2063 6f6e 7374 7261 696e 7473 2e3c 2f70 constraints..

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

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

.Value \n-000f2690: 7261 6e67 6520 7265 7374 7269 6374 696f range restrictio\n-000f26a0: 6e73 3c2f 6833 3e0a 3c70 3e53 696d 696c ns

.

Simil\n-000f26b0: 6172 2074 6f20 6461 7461 206c 656e 6774 ar to data lengt\n-000f26c0: 6820 636f 6e73 7472 6169 6e74 7320 666f h constraints fo\n-000f26d0: 7220 7374 7269 6e67 2d62 6173 6564 2064 r string-based d\n-000f26e0: 6174 612c 2069 6e74 6567 6572 2061 6e64 ata, integer and\n-000f26f0: 2066 6c6f 6174 696e 6720 706f 696e 7420 floating point \n-000f2700: 7661 6c75 6520 7261 6e67 6520 636f 6e73 value range cons\n-000f2710: 7472 6169 6e74 7320 6f6e 206e 756d 6572 traints on numer\n-000f2720: 6963 2073 696d 706c 6554 7970 6573 2061 ic simpleTypes a\n-000f2730: 6e64 2063 6f6d 706c 6578 5479 7065 7320 nd complexTypes \n-000f2740: 7769 7468 2073 696d 706c 6543 6f6e 7465 with simpleConte\n-000f2750: 6e74 2061 7265 2064 6563 6c61 7265 6420 nt are declared \n-000f2760: 7769 7468 203c 636f 6465 3e6c 6f77 203a with low :\n-000f2770: 2068 6967 683c 2f63 6f64 653e 2c20 7768 high, wh\n-000f2780: 6572 6520 3c63 6f64 653e 6c6f 773c 2f63 ere low and h\n-000f27a0: 6967 683c 2f63 6f64 653e 2061 7265 206f igh are o\n-000f27b0: 7074 696f 6e61 6c2e 3c2f 703e 0a3c 703e ptional.

.

\n-000f27c0: 4173 206f 6620 6753 4f41 5020 322e 382e As of gSOAP 2.8.\n-000f27d0: 3236 2c20 666c 6f61 7469 6e67 2070 6f69 26, floating poi\n-000f27e0: 6e74 2076 616c 7565 2072 616e 6765 7320 nt value ranges \n-000f27f0: 616e 6420 696e 7465 6765 7220 7261 6e67 and integer rang\n-000f2800: 6573 2063 616e 2062 6520 6578 636c 7573 es can be exclus\n-000f2810: 6976 6520 6279 2061 6464 696e 6720 3c63 ive by adding < \n-000f2830: 6f6e 2065 6974 6865 7220 7369 6465 206f on either side o\n-000f2840: 6620 7468 6520 3c63 6f64 653e 3a3c 2f63 f the : range opera\n-000f2860: 746f 723a 3c2f 703e 0a3c 7461 626c 6520 tor:

...\n-000f2910: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..<\n-000f2970: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-000f2980: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-000f2990: 3e31 2026 6c74 3b3d 2078 2020 2020 3c2f >1 <= x ...<\n-000f2a40: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-000f2a50: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n-000f2a60: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n-000f2ad0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ....\n-000f2be0: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n-000f2c20: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ......<\n-000f2e00: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>....\n-000f2ec0: 3c74 6420 636c 6173 733d 226d 6172 6b64 <\n-000f2f00: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-000f2f10: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-000f2f20: 3e31 2026 6c74 3b20 7820 2020 203c 2f74 >1 < x ...<\n-000f2fd0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-000f2fe0: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n-000f2ff0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ..
range \n-000f28d0: 3c2f 7468 3e3c 7468 2063 6c61 7373 3d22 validatio\n-000f2900: 6e20 6368 6563 6b20 2020 203c 2f74 683e n check
1\n-000f2960: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
1 : \n-000f2a00: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 1 <= x\n-000f2a30: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
: 10 x &\n-000f2ac0: 6c74 3b3d 2031 3020 2020 203c 2f74 643e lt;= 10
\n-000f2b20: 3120 3a20 3130 3c2f 636f 6465 3e20 2020 1 : 10 \n-000f2b30: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 1 <= x\n-000f2b60: 2026 6c74 3b3d 2031 3020 2020 203c 2f74 <= 10
1 < : < 1\n-000f2bd0: 303c 2f63 6f64 653e 2020 203c 2f74 643e 0 1 < x < \n-000f2c10: 3130 2020 2020 3c2f 7464 3e3c 2f74 723e 10
1 <\n-000f2c70: 3b20 3130 3c2f 636f 6465 3e20 2020 3c2f ; 10 1 < x &l\n-000f2cb0: 743b 2031 3020 2020 203c 2f74 643e 3c2f t; 10
1 :\n-000f2d10: 2026 6c74 3b20 3130 3c2f 636f 6465 3e20 < 10 \n-000f2d20: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 1 <=\n-000f2d50: 2078 2026 6c74 3b20 3130 2020 2020 3c2f x < 10
: < 10 x &\n-000f2df0: 6c74 3b20 3130 2020 2020 3c2f 7464 3e3c lt; 10
&l\n-000f2e50: 743b 2031 303c 2f63 6f64 653e 2020 203c t; 10 <\n-000f2e60: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>x < 10 \n-000f2e90: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
1 < :\n-000f2ef0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
1 < \n-000f2f90: 203c 2f74 643e 3c74 6420 636c 6173 733d 1 < x\n-000f2fc0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
1 < \n-000f3020: 3a20 3130 3c2f 636f 6465 3e20 2020 3c2f : 10 1 < x &l\n-000f3060: 743b 3d20 3130 2020 203c 2f74 643e 3c2f t;= 10
.

\n-000f3080: 466f 7220 6578 616d 706c 653a 3c2f 703e For example:

\n-000f3090: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
t\n-000f30d0: 7970 6564 6566 3c2f 7370 616e 3e20 3c73 ypedef int ns__int10 0:1\n-000f3110: 303b 203c 7370 616e 2063 6c61 7373 3d22 0; // simp\n-000f3130: 6c65 5479 7065 2072 6573 7472 6963 7469 leType restricti\n-000f3140: 6f6e 206f 6620 696e 7420 302e 2e31 3020 on of int 0..10 \n-000f3150: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-000f3170: 3c73 7061 6e20 636c 6173 733d 226b 6579 typedef LONG64 ns__long -1000\n-000f3200: 3030 303a 3130 3030 3030 303b 203c 7370 000:1000000; // simpleType\n-000f3230: 2072 6573 7472 6963 7469 6f6e 206f 6620 restriction of \n-000f3240: 6c6f 6e67 3634 202d 3130 3030 3030 302e long64 -1000000.\n-000f3250: 2e31 3030 3030 3030 203c 2f73 7061 6e3e .1000000 \n-000f3260: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
t\n-000f3290: 7970 6564 6566 3c2f 7370 616e 3e20 3c73 ypedef float ns__float -\n-000f32d0: 312e 3020 266c 743b 3a26 6c74 3b20 3130 1.0 <:< 10\n-000f32e0: 2e35 3b20 3c73 7061 6e20 636c 6173 733d .5; // sim\n-000f3300: 706c 6554 7970 6520 7265 7374 7269 6374 pleType restrict\n-000f3310: 696f 6e20 6f66 2066 6c6f 6174 2069 6e20 ion of float in \n-000f3320: 282d 312c 3130 2e35 2920 3c2f 7370 616e (-1,10.5)
.
\n-000f3360: 7374 7275 6374 203c 2f73 7061 6e3e 6e73 struct ns\n-000f3370: 5f5f 6461 7461 203c 7370 616e 2063 6c61 __data // \n-000f3390: 7369 6d70 6c65 436f 6e74 656e 7420 7772 simpleContent wr\n-000f33a0: 6170 7065 7220 3c2f 7370 616e 3e3c 2f64 apper .
{
.\n-000f33e0: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n-000f3400: 743c 2f73 7061 6e3e 205f 5f69 7465 6d20 t __item \n-000f3410: 303a 3130 3b20 3c73 7061 6e20 636c 6173 0:10; // s\n-000f3430: 696d 706c 6543 6f6e 7465 6e74 2072 616e impleContent ran\n-000f3440: 6765 2030 2e2e 3130 203c 2f73 7061 6e3e ge 0..10 \n-000f3450: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
@ char *name 1; <\n-000f34a0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-000f34b0: 656e 7422 3e2f 2f20 7265 7175 6972 6564 ent\">// required\n-000f34c0: 206e 616d 6520 6174 7472 6962 7574 6520 name attribute \n-000f34d0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-000f34f0: 7d3b 3c2f 6469 763e 0a3c 2f64 6976 3e3c };
.
<\n-000f3500: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-000f3510: 3c70 3e53 6574 2074 6865 203c 636f 6465

Set the #SOAP_XML_STRIC\n-000f3530: 543c 2f63 6f64 653e 206d 6f64 6520 666c T mode fl\n-000f3540: 6167 2074 6f20 656e 6162 6c65 2074 6865 ag to enable the\n-000f3550: 2076 616c 6964 6174 696f 6e20 6f66 2076 validation of v\n-000f3560: 616c 7565 2072 616e 6765 2063 6f6e 7374 alue range const\n-000f3570: 7261 696e 7473 2e3c 2f70 3e0a 3c70 3e53 raints.

.

S\n-000f3580: 6565 2061 6c73 6f20 3c61 2068 7265 663d ee also C and C++ XM\n-000f35c0: 4c20 6461 7461 2062 696e 6469 6e67 733c L data bindings<\n-000f35d0: 2f61 3e20 646f 6375 6d65 6e74 6174 696f /a> documentatio\n-000f35e0: 6e20 666f 7220 6d6f 7265 2064 6574 6169 n for more detai\n-000f35f0: 6c73 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 ls.

.

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

.\n-000f3660: 0a50 6174 7465 726e 2072 6573 7472 6963 .Pattern restric\n-000f3670: 7469 6f6e 733c 2f68 333e 0a3c 703e 5061 tions.

Pa\n-000f3680: 7474 6572 6e73 2063 616e 2062 6520 6465 tterns can be de\n-000f3690: 6669 6e65 6420 666f 7220 7369 6d70 6c65 fined for simple\n-000f36a0: 5479 7065 2063 6f6e 7465 6e74 2e20 486f Type content. Ho\n-000f36b0: 7765 7665 722c 2070 6174 7465 726e 2076 wever, pattern v\n-000f36c0: 616c 6964 6174 696f 6e20 6973 206e 6f74 alidation is not\n-000f36d0: 2065 6e66 6f72 6365 6420 756e 6c65 7373 enforced unless\n-000f36e0: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap::fsvalidat\n-000f3790: 653c 2f61 3e3c 2f63 6f64 653e 2061 6e64 e and\n-000f37a0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::fwvalida\n-000f3850: 7465 3c2f 613e 3c2f 636f 6465 3e20 6361 te ca\n-000f3860: 6c6c 6261 636b 7320 6172 6520 7365 7420 llbacks are set \n-000f3870: 746f 2061 2072 6567 6578 206d 6174 6368 to a regex match\n-000f3880: 6572 2e3c 2f70 3e0a 3c70 3e54 6f20 6173 er.

.

To as\n-000f3890: 736f 6369 6174 6520 6120 7061 7474 6572 sociate a patter\n-000f38a0: 6e20 7769 7468 2061 2073 696d 706c 6554 n with a simpleT\n-000f38b0: 7970 652c 2079 6f75 2063 616e 2064 6566 ype, you can def\n-000f38c0: 696e 6520 6120 7369 6d70 6c65 5479 7065 ine a simpleType\n-000f38d0: 2077 6974 6820 6120 3c63 6f64 653e 7479 with a ty\n-000f38e0: 7065 6465 663c 2f63 6f64 653e 2061 6e64 pedef and\n-000f38f0: 2061 2070 6174 7465 726e 2073 7472 696e a pattern strin\n-000f3900: 673a 3c2f 703e 0a3c 6469 7620 636c 6173 g:

.
<\n-000f3930: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f3940: 6f72 6422 3e74 7970 6564 6566 3c2f 7370 ord\">typedef in\n-000f3970: 743c 2f73 7061 6e3e 2074 696d 655f 5f73 t time__s\n-000f3980: 6563 6f6e 6420 3c73 7061 6e20 636c 6173 econd "[1-5]?[0\n-000f39b0: 2d39 5d7c 3630 2671 756f 743b 3c2f 7370 -9]|60";
.

T\n-000f3d30: 6865 2070 6174 7465 726e 2073 7472 696e he pattern strin\n-000f3d40: 6720 6d75 7374 2063 6f6e 7461 696e 2061 g must contain a\n-000f3d50: 2076 616c 6964 2072 6567 756c 6172 2065 valid regular e\n-000f3d60: 7870 7265 7373 696f 6e2e 3c2f 703e 0a3c xpression.

.<\n-000f3d70: 703e 4120 7370 6563 6961 6c20 6361 7365 p>A special case\n-000f3d80: 2066 6f72 2043 2066 6f72 6d61 7420 7374 for C format st\n-000f3d90: 7269 6e67 2070 6174 7465 726e 7320 6973 ring patterns is\n-000f3da0: 2069 6e74 726f 6475 6365 6420 696e 2067 introduced in g\n-000f3db0: 534f 4150 2032 2e38 2e31 382e 2057 6865 SOAP 2.8.18. Whe\n-000f3dc0: 6e20 3c65 6d3e 3c63 6f64 653e 7873 643a n xsd:\n-000f3dd0: 746f 7461 6c44 6967 6974 733c 2f63 6f64 totalDigits and \n-000f3df0: 3c63 6f64 653e 7873 643a 6672 6163 7469 xsd:fracti\n-000f3e00: 6f6e 4469 6769 7473 3c2f 636f 6465 3e3c onDigits<\n-000f3e10: 2f65 6d3e 2061 7265 2067 6976 656e 2069 /em> are given i\n-000f3e20: 6e20 6120 5853 4420 6669 6c65 2c20 7468 n a XSD file, th\n-000f3e30: 656e 2061 2043 2066 6f72 6d61 7420 7374 en a C format st\n-000f3e40: 7269 6e67 2069 7320 7072 6f64 7563 6564 ring is produced\n-000f3e50: 2074 6f20 6f75 7470 7574 2066 6c6f 6174 to output float\n-000f3e60: 696e 6720 706f 696e 7420 7661 6c75 6573 ing point values\n-000f3e70: 2077 6974 6820 7468 6520 7072 6f70 6572 with the proper\n-000f3e80: 2070 7265 6369 7369 6f6e 2061 6e64 2073 precision and s\n-000f3e90: 6361 6c65 2e20 466f 7220 6578 616d 706c cale. For exampl\n-000f3ea0: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

.
<\n-000f3ed0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000f3ee0: 3e26 6c74 3b3c 7370 616e 2063 6c61 7373 ><s\n-000f3f00: 696d 706c 6554 7970 653c 2f73 7061 6e3e impleType\n-000f3f10: 203c 7370 616e 2063 6c61 7373 3d22 6b65 name=&\n-000f3f50: 7175 6f74 3b72 6174 696f 2671 756f 743b quot;ratio"\n-000f3f60: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
<restriction\n-000f3fb0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c ba\n-000f3fd0: 7365 3c2f 7370 616e 3e3d 3c73 7061 6e20 se="xsd:\n-000f4000: 666c 6f61 7426 7175 6f74 3b3c 2f73 7061 float">
.\n-000f4030: 2020 2020 266c 743b 3c73 7061 6e20 636c <totalDigits value\n-000f4080: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="5"\n-000f40b0: 3b3c 2f73 7061 6e3e 2f26 6774 3b20 3c2f ;/> .
<<\n-000f40e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f40f0: 6f72 6474 7970 6522 3e66 7261 6374 696f ordtype\">fractio\n-000f4100: 6e44 6967 6974 733c 2f73 7061 6e3e 203c nDigits <\n-000f4110: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f4120: 6f72 6422 3e76 616c 7565 3c2f 7370 616e ord\">value=&q\n-000f4150: 756f 743b 3226 7175 6f74 3b3c 2f73 7061 uot;2"/>
.<\n-000f4170: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000f4180: 3e20 2026 6c74 3b2f 3c73 7061 6e20 636c > </restriction>
.\n-000f41c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
</simpleType>
.

pr\n-000f4230: 6f64 7563 6573 3a3c 2f70 3e0a 3c64 6976 oduces:

.
typede\n-000f4280: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f float \n-000f42b0: 7469 6d65 5f5f 7261 7469 6f20 3c73 7061 time__ratio "%5\n-000f42e0: 2e32 6626 7175 6f74 3b3c 2f73 7061 6e3e .2f"\n-000f42f0: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.
<\n-000f4310: 703e 5468 6520 666f 726d 6174 2073 7472 p>The format str\n-000f4320: 696e 6720 6973 2075 7365 6420 746f 2066 ing is used to f\n-000f4330: 6f72 6d61 7420 7468 6520 6f75 7470 7574 ormat the output\n-000f4340: 2074 6865 2066 6c6f 6174 696e 6720 706f the floating po\n-000f4350: 696e 7420 7661 6c75 6520 696e 2058 4d4c int value in XML\n-000f4360: 2e3c 2f70 3e0a 3c70 3e53 6565 2061 6c73 .

.

See als\n-000f4370: 6f20 3c61 2068 7265 663d 222e 2e2f 2e2e o C \n-000f43a0: 616e 6420 432b 2b20 584d 4c20 6461 7461 and C++ XML data\n-000f43b0: 2062 696e 6469 6e67 733c 2f61 3e20 646f bindings do\n-000f43c0: 6375 6d65 6e74 6174 696f 6e20 666f 7220 cumentation for \n-000f43d0: 6d6f 7265 2064 6574 6169 6c73 2e3c 2f70 more details..

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

.

.Element and at\n-000f4450: 7472 6962 7574 6520 7175 616c 6966 6965 tribute qualifie\n-000f4460: 642f 756e 7175 616c 6966 6965 6420 666f d/unqualified fo\n-000f4470: 726d 733c 2f68 323e 0a3c 703e 5374 7275 rms

.

Stru\n-000f4480: 6374 2c20 636c 6173 732c 2061 6e64 2075 ct, class, and u\n-000f4490: 6e69 6f6e 206d 656d 6265 7273 2072 6570 nion members rep\n-000f44a0: 7265 7365 6e74 2065 6c65 6d65 6e74 7320 resent elements \n-000f44b0: 616e 6420 6174 7472 6962 7574 6573 2074 and attributes t\n-000f44c0: 6861 7420 6172 6520 6175 746f 6d61 7469 hat are automati\n-000f44d0: 6361 6c6c 7920 7175 616c 6966 6965 6420 cally qualified \n-000f44e0: 6f72 2075 6e71 7561 6c69 6669 6564 2064 or unqualified d\n-000f44f0: 6570 656e 6469 6e67 206f 6e20 7468 6520 epending on the \n-000f4500: 7363 6865 6d61 2065 6c65 6d65 6e74 2061 schema element a\n-000f4510: 6e64 2061 7474 7269 6275 7465 2064 6566 nd attribute def\n-000f4520: 6175 6c74 2066 6f72 6d73 2073 7065 6369 ault forms speci\n-000f4530: 6669 6564 2e20 5468 6520 656e 6769 6e65 fied. The engine\n-000f4540: 2061 6c77 6179 7320 7661 6c69 6461 7465 always validate\n-000f4550: 7320 7468 6520 7072 6566 6978 6573 206f s the prefixes o\n-000f4560: 6620 656c 656d 656e 7473 2061 6e64 2061 f elements and a\n-000f4570: 7474 7269 6275 7465 732e 2057 6865 6e20 ttributes. When \n-000f4580: 6120 6e61 6d65 7370 6163 6520 6d69 736d a namespace mism\n-000f4590: 6174 6368 206f 6363 7572 732c 2074 6865 atch occurs, the\n-000f45a0: 2065 6c65 6d65 6e74 206f 7220 6174 7472 element or attr\n-000f45b0: 6962 7574 6520 6973 206e 6f74 2063 6f6e ibute is not con\n-000f45c0: 7375 6d65 6420 7768 6963 6820 6361 6e20 sumed which can \n-000f45d0: 6c65 6164 2074 6f20 6120 7661 6c69 6461 lead to a valida\n-000f45e0: 7469 6f6e 2065 7272 6f72 2028 756e 6c65 tion error (unle\n-000f45f0: 7373 2074 6865 2063 6f6d 706c 6578 5479 ss the complexTy\n-000f4600: 7065 2069 7320 6578 7465 6e73 6962 6c65 pe is extensible\n-000f4610: 206f 7220 7768 656e 203c 636f 6465 3e23 or when #\n-000f4620: 534f 4150 5f58 4d4c 5f53 5452 4943 543c SOAP_XML_STRICT<\n-000f4630: 2f63 6f64 653e 2069 7320 7475 726e 6564 /code> is turned\n-000f4640: 206f 6666 292e 3c2f 703e 0a3c 703e 436f off).

.

Co\n-000f4650: 6e73 6964 6572 2066 6f72 2065 7861 6d70 nsider for examp\n-000f4660: 6c65 3a3c 2f70 3e0a 3c64 6976 2063 6c61 le:

.
\n-000f4690: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n-000f46b0: 2073 6368 656d 6120 656c 656d 656e 7446 schema elementF\n-000f46c0: 6f72 6d3a 2071 7561 6c69 6669 6564 203c orm: qualified <\n-000f46d0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.<\n-000f46f0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-000f4700: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n-000f4710: 7363 6865 6d61 2061 7474 7269 6275 7465 schema attribute\n-000f4720: 466f 726d 3a20 756e 7175 616c 6966 6965 Form: unqualifie\n-000f4730: 6420 3c2f 7370 616e 3e3c 2f64 6976 3e0a d
.\n-000f4740: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
struct <\n-000f4770: 2f73 7061 6e3e 6e73 5f5f 7265 636f 7264 /span>ns__record\n-000f4780: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
{.
@ char * \n-000f47e0: 7479 7065 3b20 3c2f 6469 763e 0a3c 6469 type;
. \n-000f4800: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha\n-000f4820: 723c 2f73 7061 6e3e 202a 206e 616d 653b r * name;\n-000f4830: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
};.

Her\n-000f4870: 652c 2074 6865 203c 636f 6465 3e6e 735f e, the ns_\n-000f4880: 5f72 6563 6f72 643c 2f63 6f64 653e 2073 _record s\n-000f4890: 7472 7563 7420 6973 2073 6572 6961 6c69 truct is seriali\n-000f48a0: 7a65 6420 7769 7468 2071 7561 6c69 6669 zed with qualifi\n-000f48b0: 6564 2065 6c65 6d65 6e74 203c 636f 6465 ed element name and\n-000f48d0: 2075 6e71 7561 6c69 6669 6564 2061 7474 unqualified att\n-000f48e0: 7269 6275 7465 203c 636f 6465 3e74 7970 ribute typ\n-000f48f0: 653c 2f63 6f64 653e 3a3c 2f70 3e0a 3c64 e:

. \n-000f4910: 3c64 6976 2063 6c61 7373 3d22 6672 6167
<ns:record<\n-000f4960: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> typ\n-000f4980: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="...&q\n-000f49b0: 756f 743b 3c2f 7370 616e 3e26 6774 3b20 uot;> \n-000f49c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<<\n-000f49e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f49f0: 6f72 6474 7970 6522 3e6e 733a 6e61 6d65 ordtype\">ns:name\n-000f4a00: 3c2f 7370 616e 3e26 6774 3b2e 2e2e 266c >...&l\n-000f4a10: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/ns:\n-000f4a30: 6e61 6d65 3c2f 7370 616e 3e26 6774 3b20 name> \n-000f4a40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
</ns:recor\n-000f4a80: 643c 2f73 7061 6e3e 2667 743b 3c2f 6469 d>.

The \"colon n\n-000f4ac0: 6f74 6174 696f 6e22 2066 6f72 2073 7472 otation\" for str\n-000f4ad0: 7563 742f 636c 6173 732f 756e 696f 6e20 uct/class/union \n-000f4ae0: 6d65 6d62 6572 206e 616d 6573 2069 7320 member names is \n-000f4af0: 7573 6564 2074 6f20 6f76 6572 7269 6465 used to override\n-000f4b00: 2065 6c65 6d65 6e74 2061 6e64 2061 7474 element and att\n-000f4b10: 7269 6275 7465 2071 7561 6c69 6669 6564 ribute qualified\n-000f4b20: 206f 7220 756e 7175 616c 6966 6965 6420 or unqualified \n-000f4b30: 666f 726d 732e 2054 6f20 6f76 6572 7269 forms. To overri\n-000f4b40: 6465 2074 6865 2066 6f72 6d20 666f 7220 de the form for \n-000f4b50: 696e 6469 7669 6475 616c 206d 656d 6265 individual membe\n-000f4b60: 7273 2074 6861 7420 7265 7072 6573 656e rs that represen\n-000f4b70: 7420 656c 656d 656e 7473 2061 6e64 2061 t elements and a\n-000f4b80: 7474 7269 6275 7465 732c 2075 7365 2061 ttributes, use a\n-000f4b90: 206e 616d 6573 7061 6365 2070 7265 6669 namespace prefi\n-000f4ba0: 7820 616e 6420 636f 6c6f 6e20 7769 7468 x and colon with\n-000f4bb0: 2074 6865 206d 656d 6265 7220 6e61 6d65 the member name\n-000f4bc0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
//gsoap ns s\n-000f4c10: 6368 656d 6120 656c 656d 656e 7446 6f72 chema elementFor\n-000f4c20: 6d3a 2071 7561 6c69 6669 6564 203c 2f73 m: qualified
.
//gsoap ns sc\n-000f4c70: 6865 6d61 2061 7474 7269 6275 7465 466f hema attributeFo\n-000f4c80: 726d 3a20 756e 7175 616c 6966 6965 6420 rm: unqualified \n-000f4c90: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-000f4cb0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct ns__record <\n-000f4ce0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{
.\n-000f4d00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
@ \n-000f4d30: 6368 6172 3c2f 7370 616e 3e20 2a20 6e73 char * ns\n-000f4d40: 3a74 7970 653b 203c 2f64 6976 3e0a 3c64 :type;
.\n-000f4d60: 2020 2020 3c73 7061 6e20 636c 6173 733d ch\n-000f4d80: 6172 3c2f 7370 616e 3e20 2a20 3a6e 616d ar * :nam\n-000f4d90: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
.
};.

w\n-000f4dd0: 6865 7265 203c 636f 6465 3e6e 616d 653c here name<\n-000f4de0: 2f63 6f64 653e 2069 7320 756e 7175 616c /code> is unqual\n-000f4df0: 6966 6965 6420 616e 6420 3c63 6f64 653e ified and \n-000f4e00: 7479 7065 3c2f 636f 6465 3e20 6973 2071 type is q\n-000f4e10: 7561 6c69 6669 6564 3a3c 2f70 3e0a 3c64 ualified:

. \n-000f4e30: 3c64 6976 2063 6c61 7373 3d22 6672 6167
<ns:record<\n-000f4e80: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> ns:\n-000f4ea0: 7479 7065 3c2f 7370 616e 3e3d 3c73 7061 type="..\n-000f4ed0: 2e26 7175 6f74 3b3c 2f73 7061 6e3e 2667 ."&g\n-000f4ee0: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
&l\n-000f4f00: 743b 3c73 7061 6e20 636c 6173 733d 226b t;name\n-000f4f20: 3c2f 7370 616e 3e26 6774 3b2e 2e2e 266c >...&l\n-000f4f30: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/nam\n-000f4f50: 653c 2f73 7061 6e3e 2667 743b 203c 2f64 e> .
</ns:record>
.\n-000f4fb0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d
The colon notat\n-000f4fe0: 696f 6e20 6973 2061 2073 796e 7461 6374 ion is a syntact\n-000f4ff0: 6963 206e 6f74 6174 696f 6e20 7573 6564 ic notation used\n-000f5000: 206f 6e6c 7920 696e 2074 6865 2069 6e74 only in the int\n-000f5010: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi\n-000f5020: 6c65 2073 796e 7461 782c 2069 7420 6973 le syntax, it is\n-000f5030: 206e 6f74 2074 7261 6e73 6c61 7465 6420 not translated \n-000f5040: 746f 2074 6865 2043 2f43 2b2b 206f 7574 to the C/C++ out\n-000f5050: 7075 742e 3c2f 703e 0a3c 703e 5468 6520 put.

.

The \n-000f5060: 636f 6c6f 6e20 6e6f 7461 7469 6f6e 2064 colon notation d\n-000f5070: 6f65 7320 6e6f 7420 6176 6f69 6420 6e61 oes not avoid na\n-000f5080: 6d65 2063 6c61 7368 6573 2062 6574 7765 me clashes betwe\n-000f5090: 656e 206d 656d 6265 7273 2e20 466f 7220 en members. For \n-000f50a0: 6578 616d 706c 653a 3c2f 703e 0a3c 6469 example:

.
struc\n-000f50f0: 7420 3c2f 7370 616e 3e78 5f5f 7265 636f t x__reco\n-000f5100: 7264 203c 2f64 6976 3e0a 3c64 6976 2063 rd
.
{.
@ char \n-000f5160: 2a20 6e61 6d65 3b20 3c2f 6469 763e 0a3c * name;
.<\n-000f5170: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000f5180: 3e20 2020 203c 7370 616e 2063 6c61 7373 > c\n-000f51a0: 6861 723c 2f73 7061 6e3e 202a 2078 3a6e har * x:n\n-000f51b0: 616d 653b 203c 2f64 6976 3e0a 3c64 6976 ame;
.};\n-000f51d0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.
results in a re\n-000f5200: 6465 6669 6e69 7469 6f6e 2065 7272 6f72 definition error\n-000f5210: 2c20 7369 6e63 6520 626f 7468 206d 656d , since both mem\n-000f5220: 6265 7273 2068 6176 6520 7468 6520 7361 bers have the sa\n-000f5230: 6d65 206e 616d 652e 2054 6f20 6176 6f69 me name. To avoi\n-000f5240: 6420 6e61 6d65 2063 6c61 7368 6573 2c20 d name clashes, \n-000f5250: 7573 6520 6120 756e 6465 7273 636f 7265 use a underscore\n-000f5260: 2073 7566 6669 783a 3c2f 703e 0a3c 6469 suffix:

.
struc\n-000f52b0: 7420 3c2f 7370 616e 3e78 5f5f 7265 636f t x__reco\n-000f52c0: 7264 203c 2f64 6976 3e0a 3c64 6976 2063 rd
.
{.
@ char \n-000f5320: 2a20 6e61 6d65 3b20 3c2f 6469 763e 0a3c * name;
.<\n-000f5330: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000f5340: 3e20 2020 203c 7370 616e 2063 6c61 7373 > c\n-000f5360: 6861 723c 2f73 7061 6e3e 202a 2078 3a6e har * x:n\n-000f5370: 616d 655f 3b20 3c2f 6469 763e 0a3c 6469 ame_;
.}\n-000f5390: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.
<\n-000f53b0: 703e 4e6f 7420 7468 6174 2074 6865 206e p>Not that the n\n-000f53c0: 616d 6573 7061 6365 2070 7265 6669 7820 amespace prefix \n-000f53d0: 636f 6e76 656e 7469 6f6e 2063 616e 2062 convention can b\n-000f53e0: 6520 7573 6564 2069 6e73 7465 6164 3a3c e used instead:<\n-000f53f0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
struct \n-000f5440: 785f 5f72 6563 6f72 6420 3c2f 6469 763e x__record
\n-000f5450: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{
.
@\n-000f5480: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-000f54a0: 2f73 7061 6e3e 202a 206e 616d 653b 203c /span> * name; <\n-000f54b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
char * x__name; .
};
.<\n-000f5520: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

which a\n-000f5540: 766f 6964 7320 7468 6520 6e61 6d65 2063 voids the name c\n-000f5550: 6c61 7368 2e20 486f 7765 7665 722c 2074 lash. However, t\n-000f5560: 6865 2072 6573 756c 7469 6e67 2073 6368 he resulting sch\n-000f5570: 656d 6120 6973 2064 6966 6665 7265 6e74 ema is different\n-000f5580: 2073 696e 6365 2074 6865 206c 6173 7420 since the last \n-000f5590: 6578 616d 706c 6520 6765 6e65 7261 7465 example generate\n-000f55a0: 7320 6120 676c 6f62 616c 203c 636f 6465 s a global name ele\n-000f55c0: 6d65 6e74 2064 6566 696e 6974 696f 6e20 ment definition \n-000f55d0: 7468 6174 2069 7320 7265 6665 7265 6e63 that is referenc\n-000f55e0: 6564 2062 7920 7468 6520 6c6f 6361 6c20 ed by the local \n-000f55f0: 656c 656d 656e 742e 3c2f 703e 0a3c 703e element.

.

\n-000f5600: 4d6f 7265 2073 7065 6369 6669 6361 6c6c More specificall\n-000f5610: 792c 2074 6865 2064 6966 6665 7265 6e63 y, the differenc\n-000f5620: 6520 6265 7477 6565 6e20 7468 6520 6e61 e between the na\n-000f5630: 6d65 7370 6163 6520 7072 6566 6978 2063 mespace prefix c\n-000f5640: 6f6e 7665 6e74 696f 6e20 7769 7468 2064 onvention with d\n-000f5650: 6f75 626c 6520 756e 6465 7273 636f 7265 ouble underscore\n-000f5660: 7320 616e 6420 636f 6c6f 6e20 6e6f 7461 s and colon nota\n-000f5670: 7469 6f6e 2069 7320 7468 6174 2074 6865 tion is that the\n-000f5680: 206e 616d 6573 7061 6365 2070 7265 6669 namespace prefi\n-000f5690: 7820 636f 6e76 656e 7469 6f6e 2067 656e x convention gen\n-000f56a0: 6572 6174 6573 2073 6368 656d 6120 656c erates schema el\n-000f56b0: 656d 656e 742f 6174 7472 6962 7574 6520 ement/attribute \n-000f56c0: 7265 6665 7265 6e63 6573 2074 6f20 656c references to el\n-000f56d0: 656d 656e 7473 2f61 7474 7269 6275 7465 ements/attribute\n-000f56e0: 7320 6174 2074 6865 2074 6f70 206c 6576 s at the top lev\n-000f56f0: 656c 2c20 7768 696c 6520 7468 6520 636f el, while the co\n-000f5700: 6c6f 6e20 6e6f 7461 7469 6f6e 206f 6e6c lon notation onl\n-000f5710: 7920 6166 6665 6374 7320 7468 6520 6c6f y affects the lo\n-000f5720: 6361 6c20 656c 656d 656e 742f 6174 7472 cal element/attr\n-000f5730: 6962 7574 6520 6e61 6d65 7370 6163 6520 ibute namespace \n-000f5740: 7175 616c 6966 6963 6174 696f 6e20 6279 qualification by\n-000f5750: 2066 6f72 6d20 6f76 6572 7269 6469 6e67 form overriding\n-000f5760: 2e20 5468 6973 2069 7320 6265 7374 2069 . This is best i\n-000f5770: 6c6c 7573 7472 6174 6564 2062 7920 616e llustrated by an\n-000f5780: 2065 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 example:

.
stru\n-000f57d0: 6374 203c 2f73 7061 6e3e 785f 5f72 6563 ct x__rec\n-000f57e0: 6f72 6420 3c2f 6469 763e 0a3c 6469 7620 ord
.
{.
char\n-000f5840: 202a 203a 6e61 6d65 3b20 3c2f 6469 763e * :name;
\n-000f5850: 0a3c 6469 7620 636c 6173 733d 226c 696e .
char * x\n-000f5890: 3a70 686f 6e65 3b20 3c2f 6469 763e 0a3c :phone;
.<\n-000f58a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000f58b0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > c\n-000f58d0: 6861 723c 2f73 7061 6e3e 202a 2078 5f5f har * x__\n-000f58e0: 6661 783b 203c 2f64 6976 3e0a 3c64 6976 fax;
. \n-000f5900: 2020 3c73 7061 6e20 636c 6173 733d 226b char\n-000f5920: 3c2f 7370 616e 3e20 2a20 795f 5f7a 6970 * y__zip\n-000f5930: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
};.

wh\n-000f5970: 6963 6820 6765 6e65 7261 7465 7320 7468 ich generates th\n-000f5980: 6520 666f 6c6c 6f77 696e 6720 3c65 6d3e e following \n-000f5990: 3c63 6f64 653e 782e 7873 643c 2f63 6f64 x.xsdschema:.

<\n-000f59f0: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;compl\n-000f5a10: 6578 5479 7065 3c2f 7370 616e 3e20 3c73 exType name=\n-000f5a40: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-000f5a60: 743b 7265 636f 7264 2671 756f 743b 3c2f t;record">
\n-000f5a80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<sequence>
.\n-000f5ae0: 2020 2020 266c 743b 3c73 7061 6e20 636c <element\n-000f5b10: 203c 7370 616e 2063 6c61 7373 3d22 6b65 name=&\n-000f5b50: 7175 6f74 3b6e 616d 6526 7175 6f74 3b3c quot;name"<\n-000f5b60: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> typ\n-000f5b80: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="xsd:s\n-000f5bb0: 7472 696e 6726 7175 6f74 3b3c 2f73 7061 tring" minOccu\n-000f5be0: 7273 3c2f 7370 616e 3e3d 3c73 7061 6e20 rs="0&qu\n-000f5c10: 6f74 3b3c 2f73 7061 6e3e 203c 7370 616e ot; maxOccurs=&q\n-000f5c60: 756f 743b 3126 7175 6f74 3b3c 2f73 7061 uot;1" nillabl\n-000f5c90: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="true&\n-000f5cc0: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; form=<\n-000f5cf0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-000f5d00: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-000f5d10: 3b75 6e71 7561 6c69 6669 6564 2671 756f ;unqualified&quo\n-000f5d20: 743b 3c2f 7370 616e 3e2f 2667 743b 203c t;/> <\n-000f5d30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
<\n-000f5d50: 3c73 7061 6e20 636c 6173 733d 226b 6579 elemen\n-000f5d70: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t n\n-000f5d90: 616d 653c 2f73 7061 6e3e 3d3c 7370 616e ame="pho\n-000f5dc0: 6e65 2671 756f 743b 3c2f 7370 616e 3e20 ne" \n-000f5dd0: 3c73 7061 6e20 636c 6173 733d 226b 6579 type=&q\n-000f5e10: 756f 743b 7873 643a 7374 7269 6e67 2671 uot;xsd:string&q\n-000f5e20: 756f 743b 3c2f 7370 616e 3e20 3c73 7061 uot; minOccurs=&\n-000f5e70: 7175 6f74 3b30 2671 756f 743b 3c2f 7370 quot;0" maxOcc\n-000f5ea0: 7572 733c 2f73 7061 6e3e 3d3c 7370 616e urs="1&q\n-000f5ed0: 756f 743b 3c2f 7370 616e 3e20 3c73 7061 uot; nillable=&q\n-000f5f20: 756f 743b 7472 7565 2671 756f 743b 3c2f uot;true" form\n-000f5f50: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="qualif\n-000f5f80: 6965 6426 7175 6f74 3b3c 2f73 7061 6e3e ied"\n-000f5f90: 2f26 6774 3b20 3c2f 6469 763e 0a3c 6469 />
. \n-000f5fb0: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <element \n-000f5fe0: 3c73 7061 6e20 636c 6173 733d 226b 6579 ref\n-000f6000: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n-000f6020: 6f74 3b78 3a66 6178 2671 756f 743b 3c2f ot;x:fax" minO\n-000f6050: 6363 7572 733c 2f73 7061 6e3e 3d3c 7370 ccurs="0\n-000f6080: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " maxOccurs="1"/> .
<element ref="y:zip&qu\n-000f6180: 6f74 3b3c 2f73 7061 6e3e 203c 7370 616e ot; minOccurs=&q\n-000f61d0: 756f 743b 3026 7175 6f74 3b3c 2f73 7061 uot;0" maxOccu\n-000f6200: 7273 3c2f 7370 616e 3e3d 3c73 7061 6e20 rs="1&qu\n-000f6230: 6f74 3b3c 2f73 7061 6e3e 2f26 6774 3b20 ot;/> \n-000f6240: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
</\n-000f6260: 3c73 7061 6e20 636c 6173 733d 226b 6579 sequen\n-000f6280: 6365 3c2f 7370 616e 3e26 6774 3b20 3c2f ce> .
</complexTyp\n-000f62d0: 653c 2f73 7061 6e3e 2667 743b 203c 2f64 e> .
<element name="fax"\n-000f6370: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c ty\n-000f6390: 7065 3c2f 7370 616e 3e3d 3c73 7061 6e20 pe="xsd:\n-000f63c0: 7374 7269 6e67 2671 756f 743b 3c2f 7370 string"/>
.<\n-000f63e0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

\n-000f6400: 616e 6420 7468 6520 3c65 6d3e 3c63 6f64 and the y.xsd schema defin\n-000f6430: 6573 2063 6f6e 7461 696e 733a 3c2f 703e es contains:

\n-000f6440: 0a3c 6469 7620 636c 6173 733d 2261 6c74 .
<<\n-000f6480: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000f6490: 6f72 6474 7970 6522 3e65 6c65 6d65 6e74 ordtype\">element\n-000f64a0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c na\n-000f64c0: 6d65 3c2f 7370 616e 3e3d 3c73 7061 6e20 me="zip&\n-000f64f0: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; type=<\n-000f6520: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-000f6530: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-000f6540: 3b78 7364 3a73 7472 696e 6726 7175 6f74 ;xsd:string"\n-000f6550: 3b3c 2f73 7061 6e3e 2f26 6774 3b3c 2f64 ;/>.

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

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

.XML \n-000f6660: 6e61 6d65 7370 6163 6573 2061 6e64 2074 namespaces and t\n-000f6670: 6865 206e 616d 6573 7061 6365 206d 6170 he namespace map\n-000f6680: 7069 6e67 2074 6162 6c65 3c2f 6831 3e0a ping table

.\n-000f6690: 3c70 3e41 206e 616d 6573 7061 6365 206d

A namespace m\n-000f66a0: 6170 7069 6e67 2074 6162 6c65 2073 686f apping table sho\n-000f66b0: 756c 6420 6265 2069 6e63 6c75 6465 6420 uld be included \n-000f66c0: 696e 2074 6865 2073 6f75 7263 6520 636f in the source co\n-000f66d0: 6465 206f 6620 636c 6965 6e74 2061 6e64 de of client and\n-000f66e0: 2073 6572 7669 6365 2061 7070 6c69 6361 service applica\n-000f66f0: 7469 6f6e 732e 2054 6865 206d 6170 7069 tions. The mappi\n-000f6700: 6e67 2074 6162 6c65 2069 7320 7573 6564 ng table is used\n-000f6710: 2062 7920 7468 6520 7365 7269 616c 697a by the serializ\n-000f6720: 6572 7320 616e 6420 6465 7365 7269 616c ers and deserial\n-000f6730: 697a 6572 7320 6f66 2074 6865 2073 7475 izers of the stu\n-000f6740: 6220 616e 6420 736b 656c 6574 6f6e 2066 b and skeleton f\n-000f6750: 756e 6374 696f 6e73 2074 6f20 7072 6f64 unctions to prod\n-000f6760: 7563 6520 7661 6c69 6420 584d 4c20 6d65 uce valid XML me\n-000f6770: 7373 6167 6573 2061 6e64 2074 6f20 7061 ssages and to pa\n-000f6780: 7273 6520 616e 6420 7661 6c69 6461 7465 rse and validate\n-000f6790: 2058 4d4c 206d 6573 7361 6765 732e 2041 XML messages. A\n-000f67a0: 2074 7970 6963 616c 206d 6170 7069 6e67 typical mapping\n-000f67b0: 2074 6162 6c65 2069 7320 7368 6f77 6e20 table is shown \n-000f67c0: 6265 6c6f 773a 3c2f 703e 0a3c 6469 7620 below:

.
struct \n-000f6810: 3c2f 7370 616e 3e3c 6120 636c 6173 733d Namespace namespa\n-000f68b0: 6365 733c 2f61 3e5b 5d20 3d20 3c2f 6469 ces[] = .
{
. \n-000f68f0: 203c 7370 616e 2063 6c61 7373 3d22 636f // { &quo\n-000f6910: 743b 7072 6566 6978 2671 756f 743b 2c20 t;prefix", \n-000f6920: 2671 756f 743b 5552 4926 7175 6f74 3b2c "URI",\n-000f6930: 2026 7175 6f74 3b55 5249 2d70 6174 7465 "URI-patte\n-000f6940: 726e 2671 756f 743b 2028 6f70 7469 6f6e rn" (option\n-000f6950: 616c 2920 7d20 3c2f 7370 616e 3e3c 2f64 al) } .
{ "SOAP\n-000f69a0: 2d45 4e56 2671 756f 743b 3c2f 7370 616e -ENV", &\n-000f69d0: 7175 6f74 3b68 7474 703a 2f2f 7363 6865 quot;http://sche\n-000f69e0: 6d61 732e 786d 6c73 6f61 702e 6f72 672f mas.xmlsoap.org/\n-000f69f0: 736f 6170 2f65 6e76 656c 6f70 652f 2671 soap/envelope/&q\n-000f6a00: 756f 743b 3c2f 7370 616e 3e20 7d2c 203c uot; }, <\n-000f6a10: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-000f6a20: 656e 7422 3e2f 2f20 6d75 7374 2062 6520 ent\">// must be \n-000f6a30: 6669 7273 7420 3c2f 7370 616e 3e3c 2f64 first .
{ "SOAP\n-000f6a80: 2d45 4e43 2671 756f 743b 3c2f 7370 616e -ENC", &\n-000f6ab0: 7175 6f74 3b68 7474 703a 2f2f 7363 6865 quot;http://sche\n-000f6ac0: 6d61 732e 786d 6c73 6f61 702e 6f72 672f mas.xmlsoap.org/\n-000f6ad0: 736f 6170 2f65 6e63 6f64 696e 672f 2671 soap/encoding/&q\n-000f6ae0: 756f 743b 3c2f 7370 616e 3e20 7d2c 203c uot; }, <\n-000f6af0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-000f6b00: 656e 7422 3e2f 2f20 6d75 7374 2062 6520 ent\">// must be \n-000f6b10: 7365 636f 6e64 203c 2f73 7061 6e3e 3c2f second .
{ "xsi\n-000f6b60: 2671 756f 743b 3c2f 7370 616e 3e2c 2020 ", \n-000f6b70: 2020 2020 3c73 7061 6e20 636c 6173 733d \n-000f6b90: 2671 756f 743b 6874 7470 3a2f 2f77 7777 "http://www\n-000f6ba0: 2e77 332e 6f72 672f 3230 3031 2f58 4d4c .w3.org/2001/XML\n-000f6bb0: 5363 6865 6d61 2d69 6e73 7461 6e63 6526 Schema-instance&\n-000f6bc0: 7175 6f74 3b3c 2f73 7061 6e3e 207d 2c20 quot; }, \n-000f6bd0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // must be\n-000f6bf0: 2074 6869 7264 203c 2f73 7061 6e3e 3c2f third .
{ "xsd\n-000f6c40: 2671 756f 743b 3c2f 7370 616e 3e2c 2020 ", \n-000f6c50: 2020 2020 3c73 7061 6e20 636c 6173 733d \n-000f6c70: 2671 756f 743b 6874 7470 3a2f 2f77 7777 "http://www\n-000f6c80: 2e77 332e 6f72 672f 3230 3031 2f58 4d4c .w3.org/2001/XML\n-000f6c90: 5363 6865 6d61 2671 756f 743b 3c2f 7370 Schema" }, \n-000f6cb0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // must be\n-000f6cd0: 2066 6f75 7274 683c 2f73 7061 6e3e 3c2f fourth.
{ "ns&\n-000f6d20: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, \n-000f6d30: 2020 2020 3c73 7061 6e20 636c 6173 733d \n-000f6d50: 2671 756f 743b 7572 6e3a 6d79 2d73 6572 "urn:my-ser\n-000f6d60: 7669 6365 2d55 5249 2671 756f 743b 3c2f vice-URI" }, /\n-000f6d90: 2f20 6269 6e64 7320 2671 756f 743b 6e73 / binds "ns\n-000f6da0: 2671 756f 743b 206e 616d 6573 7061 6365 " namespace\n-000f6db0: 2070 7265 6669 7820 746f 2073 6368 656d prefix to schem\n-000f6dc0: 6120 5552 493c 2f73 7061 6e3e 3c2f 6469 a URI.
{ NULL, N\n-000f6df0: 554c 4c20 7d20 3c73 7061 6e20 636c 6173 ULL } // e\n-000f6e10: 6e64 206f 6620 7461 626c 6520 3c2f 7370 nd of table
.
}; <\n-000f6e40: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

\n-000f6e60: 4561 6368 206e 616d 6573 7061 6365 2070 Each namespace p\n-000f6e70: 7265 6669 7820 7573 6564 2062 7920 6120 refix used by a \n-000f6e80: 6964 656e 7469 6669 6572 206e 616d 6520 identifier name \n-000f6e90: 696e 2074 6865 2068 6561 6465 7220 6669 in the header fi\n-000f6ea0: 6c65 2073 7065 6369 6669 6361 7469 6f6e le specification\n-000f6eb0: 2c20 7365 6520 5365 6374 696f 6e20 3c61 , see Section C/C++ iden\n-000f6ef0: 7469 6669 6572 206e 616d 6520 746f 2058 tifier name to X\n-000f6f00: 4d4c 2074 6167 206e 616d 6520 7472 616e ML tag name tran\n-000f6f10: 736c 6174 696f 6e3c 2f61 3e2c 206d 7573 slation, mus\n-000f6f20: 7420 6861 7665 2061 2062 696e 6469 6e67 t have a binding\n-000f6f30: 2074 6f20 6120 6e61 6d65 7370 6163 6520 to a namespace \n-000f6f40: 5552 4920 696e 2074 6865 206d 6170 7069 URI in the mappi\n-000f6f50: 6e67 2074 6162 6c65 2e20 5468 6520 656e ng table. The en\n-000f6f60: 6420 6f66 2074 6865 206e 616d 6573 7061 d of the namespa\n-000f6f70: 6365 206d 6170 7069 6e67 2074 6162 6c65 ce mapping table\n-000f6f80: 206d 7573 7420 6265 2069 6e64 6963 6174 must be indicat\n-000f6f90: 6564 2062 7920 7468 6520 4e55 4c4c 2070 ed by the NULL p\n-000f6fa0: 6169 722e 2054 6865 206e 616d 6573 7061 air. The namespa\n-000f6fb0: 6365 2055 5249 206d 6174 6368 696e 6720 ce URI matching \n-000f6fc0: 6973 2063 6173 6520 696e 7365 6e73 6974 is case insensit\n-000f6fd0: 6976 652e 2041 206e 616d 6573 7061 6365 ive. A namespace\n-000f6fe0: 2070 7265 6669 7820 6973 2064 6973 7469 prefix is disti\n-000f6ff0: 6e67 7569 7368 6564 2062 7920 7468 6520 nguished by the \n-000f7000: 6f63 6375 7272 656e 6365 206f 6620 6120 occurrence of a \n-000f7010: 7061 6972 206f 6620 756e 6465 7273 636f pair of undersco\n-000f7020: 7265 7320 283c 636f 6465 3e5f 5f3c 2f63 res (__) in an iden\n-000f7040: 7469 6669 6572 206f 7220 6279 2075 7369 tifier or by usi\n-000f7050: 6e67 2063 6f6c 6f6e 206e 6f74 6174 696f ng colon notatio\n-000f7060: 6e2c 2073 6565 2053 6563 7469 6f6e 203c n, see Section <\n-000f7070: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-000f7080: 663d 2269 6e64 6578 2e68 746d 6c23 6964 f=\"index.html#id\n-000f7090: 7472 616e 7322 3e43 2f43 2b2b 2069 6465 trans\">C/C++ ide\n-000f70a0: 6e74 6966 6965 7220 6e61 6d65 2074 6f20 ntifier name to \n-000f70b0: 584d 4c20 7461 6720 6e61 6d65 2074 7261 XML tag name tra\n-000f70c0: 6e73 6c61 7469 6f6e 3c2f 613e 2e3c 2f70 nslation..

An optional\n-000f70e0: 2074 6869 7264 2063 6f6c 756d 6e20 696e third column in\n-000f70f0: 2074 6865 206e 616d 6573 7061 6365 206d the namespace m\n-000f7100: 6170 7069 6e67 2074 6162 6c65 206d 6179 apping table may\n-000f7110: 2062 6520 7370 6563 6966 6965 6420 7468 be specified th\n-000f7120: 6174 2063 6f6e 7461 696e 7320 6120 6e61 at contains a na\n-000f7130: 6d65 7370 6163 6520 5552 4920 7061 7474 mespace URI patt\n-000f7140: 6572 6e2e 2054 6865 2070 6174 7465 726e ern. The pattern\n-000f7150: 7320 7072 6f76 6964 6520 616e 2061 6c74 s provide an alt\n-000f7160: 6572 6e61 7469 7665 206e 616d 6573 7061 ernative namespa\n-000f7170: 6365 2066 6f72 2074 6865 2076 616c 6964 ce for the valid\n-000f7180: 6174 696f 6e20 6f66 2070 6172 7365 6420 ation of parsed \n-000f7190: 584d 4c20 6d65 7373 6167 6573 2e20 496e XML messages. In\n-000f71a0: 2074 6869 7320 7061 7474 6572 6e2c 2064 this pattern, d\n-000f71b0: 6173 6865 7320 283c 636f 6465 3e2d 3c2f ashes (-) are singl\n-000f71d0: 652d 6368 6172 6163 7465 7220 7769 6c64 e-character wild\n-000f71e0: 6361 7264 7320 616e 6420 6173 7465 7269 cards and asteri\n-000f71f0: 736b 7320 283c 636f 6465 3e2a 3c2f 636f sks (*) are multi-c\n-000f7210: 6861 7261 6374 6572 2077 696c 6463 6172 haracter wildcar\n-000f7220: 6473 2e20 466f 7220 6578 616d 706c 652c ds. For example,\n-000f7230: 2074 6f20 6163 6365 7074 2061 6c74 6572 to accept alter\n-000f7240: 6e61 7469 7665 2076 6572 7369 6f6e 7320 native versions \n-000f7250: 6f66 2058 4d4c 2073 6368 656d 6173 2077 of XML schemas w\n-000f7260: 6974 6820 6469 6666 6572 656e 7420 6175 ith different au\n-000f7270: 7468 6f72 696e 6720 6461 7465 732c 2066 thoring dates, f\n-000f7280: 6f75 7220 6461 7368 6573 2063 616e 2062 our dashes can b\n-000f7290: 6520 7573 6564 2069 6e20 706c 6163 6520 e used in place \n-000f72a0: 6f66 2074 6865 2073 7065 6369 6669 6320 of the specific \n-000f72b0: 6461 7465 7320 696e 2074 6865 206e 616d dates in the nam\n-000f72c0: 6573 7061 6365 206d 6170 7069 6e67 2074 espace mapping t\n-000f72d0: 6162 6c65 2070 6174 7465 726e 3a3c 2f70 able pattern:.

\n-000f7320: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct Names\n-000f7360: 7061 6365 3c2f 613e 203c 6120 636c 6173 pace \n-000f73c0: 6e61 6d65 7370 6163 6573 3c2f 613e 5b5d namespaces[]\n-000f73d0: 203d 203c 2f64 6976 3e0a 3c64 6976 2063 =
.
{.
//\n-000f7420: 207b 2026 7175 6f74 3b70 7265 6669 7826 { "prefix&\n-000f7430: 7175 6f74 3b2c 2026 7175 6f74 3b55 5249 quot;, "URI\n-000f7440: 2671 756f 743b 2c20 2671 756f 743b 5552 ", "UR\n-000f7450: 492d 7061 7474 6572 6e26 7175 6f74 3b20 I-pattern" \n-000f7460: 286f 7074 696f 6e61 6c29 207d 203c 2f73 (optional) }
.
{\n-000f7490: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-000f74b0: 6f74 3b53 4f41 502d 454e 5626 7175 6f74 ot;SOAP-ENV"\n-000f74c0: 3b3c 2f73 7061 6e3e 2c20 3c73 7061 6e20 ;, "http\n-000f74f0: 3a2f 2f73 6368 656d 6173 2e78 6d6c 736f ://schemas.xmlso\n-000f7500: 6170 2e6f 7267 2f73 6f61 702f 656e 7665 ap.org/soap/enve\n-000f7510: 6c6f 7065 2f26 7175 6f74 3b3c 2f73 7061 lope/" }, // m\n-000f7540: 7573 7420 6265 2066 6972 7374 203c 2f73 ust be first
.
{\n-000f7570: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-000f7590: 6f74 3b53 4f41 502d 454e 4326 7175 6f74 ot;SOAP-ENC"\n-000f75a0: 3b3c 2f73 7061 6e3e 2c20 3c73 7061 6e20 ;, "http\n-000f75d0: 3a2f 2f73 6368 656d 6173 2e78 6d6c 736f ://schemas.xmlso\n-000f75e0: 6170 2e6f 7267 2f73 6f61 702f 656e 636f ap.org/soap/enco\n-000f75f0: 6469 6e67 2f26 7175 6f74 3b3c 2f73 7061 ding/" }, // m\n-000f7620: 7573 7420 6265 2073 6563 6f6e 6420 3c2f ust be second
. \n-000f7650: 7b20 3c73 7061 6e20 636c 6173 733d 2273 { &q\n-000f7670: 756f 743b 7873 6926 7175 6f74 3b3c 2f73 uot;xsi", "htt\n-000f76b0: 703a 2f2f 7777 772e 7733 2e6f 7267 2f32 p://www.w3.org/2\n-000f76c0: 3030 312f 584d 4c53 6368 656d 612d 696e 001/XMLSchema-in\n-000f76d0: 7374 616e 6365 2671 756f 743b 3c2f 7370 stance", "http://ww\n-000f7710: 772e 7733 2e6f 7267 2f2d 2d2d 2d2f 584d w.w3.org/----/XM\n-000f7720: 4c53 6368 656d 612d 696e 7374 616e 6365 LSchema-instance\n-000f7730: 2671 756f 743b 3c2f 7370 616e 3e20 7d2c " },\n-000f7740: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
{ "\n-000f7780: 7873 6426 7175 6f74 3b3c 2f73 7061 6e3e xsd"\n-000f7790: 2c20 2020 2020 203c 7370 616e 2063 6c61 , "http://\n-000f77c0: 7777 772e 7733 2e6f 7267 2f32 3030 312f www.w3.org/2001/\n-000f77d0: 584d 4c53 6368 656d 6126 7175 6f74 3b3c XMLSchema"<\n-000f77e0: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, "http:/\n-000f7810: 2f77 7777 2e77 332e 6f72 672f 2d2d 2d2d /www.w3.org/----\n-000f7820: 2f58 4d4c 5363 6865 6d61 2671 756f 743b /XMLSchema"\n-000f7830: 3c2f 7370 616e 3e20 7d2c 203c 2f64 6976 }, .
... \n-000f7870: 2f2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a //
.\n-000f7880: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{ NULL, NULL\n-000f78a0: 207d 203c 7370 616e 2063 6c61 7373 3d22 } // end \n-000f78c0: 6f66 2074 6162 6c65 203c 2f73 7061 6e3e of table \n-000f78d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
};.

Or a\n-000f7910: 6c74 6572 6e61 7469 7665 6c79 2c20 6173 lternatively, as\n-000f7920: 7465 7269 736b 7320 6361 6e20 6265 2075 terisks can be u\n-000f7930: 7365 6420 6173 2077 696c 6463 6172 6473 sed as wildcards\n-000f7940: 2066 6f72 206d 756c 7469 706c 6520 6368 for multiple ch\n-000f7950: 6172 6163 7465 7273 3a3c 2f70 3e0a 3c64 aracters:

.
stru\n-000f79a0: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct Namespace\n-000f79e0: 3c2f 613e 203c 6120 636c 6173 733d 2263 name\n-000f7a40: 7370 6163 6573 3c2f 613e 5b5d 203d 203c spaces[] = <\n-000f7a50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{
.\n-000f7a70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
// { &\n-000f7aa0: 7175 6f74 3b70 7265 6669 7826 7175 6f74 quot;prefix"\n-000f7ab0: 3b2c 2026 7175 6f74 3b55 5249 2671 756f ;, "URI&quo\n-000f7ac0: 743b 2c20 2671 756f 743b 5552 492d 7061 t;, "URI-pa\n-000f7ad0: 7474 6572 6e26 7175 6f74 3b20 286f 7074 ttern" (opt\n-000f7ae0: 696f 6e61 6c29 207d 203c 2f73 7061 6e3e ional) } \n-000f7af0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{ "S\n-000f7b30: 4f41 502d 454e 5626 7175 6f74 3b3c 2f73 OAP-ENV", "http://s\n-000f7b70: 6368 656d 6173 2e78 6d6c 736f 6170 2e6f chemas.xmlsoap.o\n-000f7b80: 7267 2f73 6f61 702f 656e 7665 6c6f 7065 rg/soap/envelope\n-000f7b90: 2f26 7175 6f74 3b3c 2f73 7061 6e3e 207d /" }\n-000f7ba0: 2c20 3c73 7061 6e20 636c 6173 733d 2263 , // must \n-000f7bc0: 6265 2066 6972 7374 203c 2f73 7061 6e3e be first \n-000f7bd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{ "S\n-000f7c10: 4f41 502d 454e 4326 7175 6f74 3b3c 2f73 OAP-ENC", "http://s\n-000f7c50: 6368 656d 6173 2e78 6d6c 736f 6170 2e6f chemas.xmlsoap.o\n-000f7c60: 7267 2f73 6f61 702f 656e 636f 6469 6e67 rg/soap/encoding\n-000f7c70: 2f26 7175 6f74 3b3c 2f73 7061 6e3e 207d /" }\n-000f7c80: 2c20 3c73 7061 6e20 636c 6173 733d 2263 , // must \n-000f7ca0: 6265 2073 6563 6f6e 6420 3c2f 7370 616e be second
.
{ "\n-000f7cf0: 7873 6926 7175 6f74 3b3c 2f73 7061 6e3e xsi"\n-000f7d00: 2c20 2020 2020 203c 7370 616e 2063 6c61 , "http://\n-000f7d30: 7777 772e 7733 2e6f 7267 2f32 3030 312f www.w3.org/2001/\n-000f7d40: 584d 4c53 6368 656d 612d 696e 7374 616e XMLSchema-instan\n-000f7d50: 6365 2671 756f 743b 3c2f 7370 616e 3e2c ce",\n-000f7d60: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-000f7d80: 6f74 3b68 7474 703a 2f2f 7777 772e 7733 ot;http://www.w3\n-000f7d90: 2e6f 7267 2f2a 2f58 4d4c 5363 6865 6d61 .org/*/XMLSchema\n-000f7da0: 2d69 6e73 7461 6e63 6526 7175 6f74 3b3c -instance"<\n-000f7db0: 2f73 7061 6e3e 207d 2c20 3c2f 6469 763e /span> },
\n-000f7dc0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{ "xsd&quo\n-000f7e00: 743b 3c2f 7370 616e 3e2c 2020 2020 2020 t;, \n-000f7e10: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-000f7e30: 743b 6874 7470 3a2f 2f77 7777 2e77 332e t;http://www.w3.\n-000f7e40: 6f72 672f 3230 3031 2f58 4d4c 5363 6865 org/2001/XMLSche\n-000f7e50: 6d61 2671 756f 743b 3c2f 7370 616e 3e2c ma",\n-000f7e60: 2020 2020 2020 2020 2020 3c73 7061 6e20 "http\n-000f7e90: 3a2f 2f77 7777 2e77 332e 6f72 672f 2a2f ://www.w3.org/*/\n-000f7ea0: 584d 4c53 6368 656d 6126 7175 6f74 3b3c XMLSchema"<\n-000f7eb0: 2f73 7061 6e3e 207d 2c20 3c2f 6469 763e /span> },
\n-000f7ec0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
... /\n-000f7ef0: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
.<\n-000f7f00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000f7f10: 3e20 207b 204e 554c 4c2c 204e 554c 4c7d > { NULL, NULL}\n-000f7f20: 203c 7370 616e 2063 6c61 7373 3d22 636f // end of\n-000f7f40: 2074 6162 6c65 203c 2f73 7061 6e3e 3c2f table .
};
.\n-000f7f70: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

A name\n-000f7f90: 7370 6163 6520 6d61 7070 696e 6720 7461 space mapping ta\n-000f7fa0: 626c 6520 6973 2061 7574 6f6d 6174 6963 ble is automatic\n-000f7fb0: 616c 6c79 2067 656e 6572 6174 6564 2077 ally generated w\n-000f7fc0: 6974 6820 7072 6566 6978 6573 2061 6e64 ith prefixes and\n-000f7fd0: 2055 5249 7320 696e 2074 6865 2074 6162 URIs in the tab\n-000f7fe0: 6c65 2074 6861 7420 6172 6520 6465 636c le that are decl\n-000f7ff0: 6172 6564 2077 6974 6820 3c63 6f64 653e ared with \n-000f8000: 2f2f 6773 6f61 7020 266c 743b 7072 6566 //gsoap <pref\n-000f8010: 6978 2667 743b 2073 6368 656d 6120 6e61 ix> schema na\n-000f8020: 6d65 7370 6163 653a 3c2f 636f 6465 3e20 mespace: \n-000f8030: 6469 7265 6374 6976 6573 2069 6e20 7468 directives in th\n-000f8040: 6520 696e 7465 7266 6163 6520 6865 6164 e interface head\n-000f8050: 6572 2066 696c 652c 2073 6565 2053 6563 er file, see Sec\n-000f8060: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion \n-000f8090: 4469 7265 6374 6976 6573 3c2f 613e 2e20 Directives. \n-000f80a0: 4966 2064 6972 6563 7469 7665 7320 6172 If directives ar\n-000f80b0: 6520 6e6f 7420 7072 6f76 6964 6564 2069 e not provided i\n-000f80c0: 6e20 7468 6520 6865 6164 6572 2066 696c n the header fil\n-000f80d0: 6520 7468 656e 2064 6566 6175 6c74 2055 e then default U\n-000f80e0: 5249 7320 6f66 2074 6865 2066 6f72 6d20 RIs of the form \n-000f80f0: 3c65 6d3e 3c63 6f64 653e 3c61 2068 7265 http://tempuri\n-000f8130: 2e6f 7267 2f70 7265 6669 782e 7873 643c .org/prefix.xsd<\n-000f8140: 2f61 3e3c 2f63 6f64 653e 3c2f 656d 3e20 /a> \n-000f8150: 666f 7220 6561 6368 206e 616d 6573 7061 for each namespa\n-000f8160: 6365 203c 656d 3e3c 636f 6465 3e70 7265 ce pre\n-000f8170: 6669 783c 2f63 6f64 653e 3c2f 656d 3e2e fix.\n-000f8180: 2054 6865 2073 6f61 7063 7070 3220 746f The soapcpp2 to\n-000f8190: 6f6c 2061 6c73 6f20 6765 6e65 7261 7465 ol also generate\n-000f81a0: 7320 6120 5753 444c 2061 6e64 206f 6e65 s a WSDL and one\n-000f81b0: 206f 7220 6d6f 7265 2058 5344 2066 696c or more XSD fil\n-000f81c0: 6573 2c20 6f6e 6520 666f 7220 6561 6368 es, one for each\n-000f81d0: 2058 4d4c 206e 616d 6573 7061 6365 2e3c XML namespace.<\n-000f81e0: 2f70 3e0a 3c70 3e57 6865 6e20 7061 7273 /p>.

When pars\n-000f81f0: 696e 6720 584d 4c20 616e 6420 6465 7365 ing XML and dese\n-000f8200: 7269 616c 697a 696e 6720 6461 7461 2c20 rializing data, \n-000f8210: 6e61 6d65 7370 6163 6520 5552 4973 2069 namespace URIs i\n-000f8220: 6e20 7468 6520 584d 4c20 6d65 7373 6167 n the XML messag\n-000f8230: 6573 2061 7265 206d 6174 6368 6564 2061 es are matched a\n-000f8240: 6761 696e 7374 2074 6865 2073 6563 6f6e gainst the secon\n-000f8250: 6420 616e 6420 7468 6972 6420 636f 6c75 d and third colu\n-000f8260: 6d6e 206f 6620 7468 6520 6e61 6d65 7370 mn of the namesp\n-000f8270: 6163 6520 6d61 7070 696e 6720 7461 626c ace mapping tabl\n-000f8280: 652c 2073 6561 7263 6869 6e67 2066 726f e, searching fro\n-000f8290: 6d20 7468 6520 746f 7020 746f 2074 6865 m the top to the\n-000f82a0: 2062 6f74 746f 6d20 6f66 2074 6865 2074 bottom of the t\n-000f82b0: 6162 6c65 2e20 5468 6520 6163 7475 616c able. The actual\n-000f82c0: 2070 7265 6669 7820 7573 6564 2069 6e20 prefix used in \n-000f82d0: 7468 6520 584d 4c20 6d65 7373 6167 6520 the XML message \n-000f82e0: 6973 2069 7272 656c 6576 616e 7420 6173 is irrelevant as\n-000f82f0: 2074 6865 2055 5249 2061 7373 6f63 6961 the URI associa\n-000f8300: 7465 6420 7769 7468 2074 6865 2070 7265 ted with the pre\n-000f8310: 6669 7820 6973 2072 656c 6576 616e 7420 fix is relevant \n-000f8320: 746f 2064 6566 696e 6520 7468 6520 584d to define the XM\n-000f8330: 4c20 6e61 6d65 7370 6163 6520 746f 2077 L namespace to w\n-000f8340: 6869 6368 2061 2071 7561 6c69 6669 6564 hich a qualified\n-000f8350: 2065 6c65 6d65 6e74 206f 7220 6174 7472 element or attr\n-000f8360: 6962 7574 6520 6265 6c6f 6e67 732e 2057 ibute belongs. W\n-000f8370: 6865 6e20 6120 6d61 7463 6820 6973 2066 hen a match is f\n-000f8380: 6f75 6e64 2c20 7468 6520 6e61 6d65 7370 ound, the namesp\n-000f8390: 6163 6520 7072 6566 6978 2069 6e20 7468 ace prefix in th\n-000f83a0: 6520 6669 7273 7420 636f 6c75 6d6e 206f e first column o\n-000f83b0: 6620 7468 6520 7461 626c 6520 6973 2063 f the table is c\n-000f83c0: 6f6e 7369 6465 7265 6420 7365 6d61 6e74 onsidered semant\n-000f83d0: 6963 616c 6c79 2069 6465 6e74 6963 616c ically identical\n-000f83e0: 2074 6f20 7468 6520 6e61 6d65 7370 6163 to the namespac\n-000f83f0: 6520 7072 6566 6978 2075 7365 6420 6279 e prefix used by\n-000f8400: 2074 6865 2071 7561 6c69 6669 6564 2058 the qualified X\n-000f8410: 4d4c 2065 6c65 6d65 6e74 2061 6e64 2061 ML element and a\n-000f8420: 7474 7269 6275 7465 2070 6172 7365 642c ttribute parsed,\n-000f8430: 2065 7665 6e20 7768 656e 2074 6865 2070 even when the p\n-000f8440: 7265 6669 7820 6e61 6d65 7320 6469 6666 refix names diff\n-000f8450: 6572 2e20 5468 6973 206e 6f72 6d61 6c69 er. This normali\n-000f8460: 7a61 7469 6f6e 206f 6620 7072 6566 6978 zation of prefix\n-000f8470: 6573 2069 7320 696e 7669 7369 626c 6520 es is invisible \n-000f8480: 746f 2074 6865 2075 7365 7220 6f66 2067 to the user of g\n-000f8490: 534f 4150 2061 6e64 206d 616b 6573 2063 SOAP and makes c\n-000f84a0: 6f64 696e 6720 7769 7468 2058 4d4c 2065 oding with XML e\n-000f84b0: 6173 6965 722e 2046 6f72 2065 7861 6d70 asier. For examp\n-000f84c0: 6c65 2c20 7768 656e 2058 5344 2051 4e61 le, when XSD QNa\n-000f84d0: 6d65 7320 6172 6520 7061 7273 6564 2069 mes are parsed i\n-000f84e0: 6e74 6f20 7374 7269 6e67 7320 7573 696e nto strings usin\n-000f84f0: 6720 7468 6520 6275 696c 742d 696e 2073 g the built-in s\n-000f8500: 6f61 7063 7070 3220 3c63 6f64 653e 5f51 oapcpp2 _Q\n-000f8510: 4e61 6d65 3c2f 636f 6465 3e20 7479 7065 Name type\n-000f8520: 206f 7220 6120 514e 616d 6520 6465 636c or a QName decl\n-000f8530: 6172 6564 2077 6974 6820 3c63 6f64 653e ared with \n-000f8540: 7479 7065 6465 6620 7374 643a 3a73 7472 typedef std::str\n-000f8550: 696e 6720 7873 645f 5f51 4e61 6d65 3c2f ing xsd__QName, then this\n-000f8570: 2051 4e61 6d65 2073 7472 696e 6720 7769 QName string wi\n-000f8580: 6c6c 2061 6c77 6179 7320 636f 6e74 6169 ll always contai\n-000f8590: 6e20 7175 616c 6966 6965 6420 6e61 6d65 n qualified name\n-000f85a0: 7320 7769 7468 206e 6f72 6d61 6c69 7a65 s with normalize\n-000f85b0: 6420 7072 6566 6978 6573 2c20 692e 652e d prefixes, i.e.\n-000f85c0: 2070 7265 6669 7865 7320 6465 6669 6e65 prefixes define\n-000f85d0: 6420 696e 2074 6865 206e 616d 6573 7061 d in the namespa\n-000f85e0: 6365 206d 6170 7069 6e67 2074 6162 6c65 ce mapping table\n-000f85f0: 2c20 756e 6c65 7373 2074 6865 2074 6162 , unless the tab\n-000f8600: 6c65 2068 6173 206e 6f20 656e 7472 792c le has no entry,\n-000f8610: 2073 6565 2053 6563 7469 6f6e 203c 6120 see Section How to use QN\n-000f8650: 616d 6520 6174 7472 6962 7574 6573 2061 ame attributes a\n-000f8660: 6e64 2065 6c65 6d65 6e74 733c 2f61 3e2e nd elements.\n-000f8670: 3c2f 703e 0a3c 703e 466f 7220 6578 616d

.

For exam\n-000f8680: 706c 652c 206c 6574 2773 2073 6179 2077 ple, let's say w\n-000f8690: 6520 6861 7665 2074 6865 2066 6f6c 6c6f e have the follo\n-000f86a0: 7769 6e67 2073 7472 7563 7473 3a3c 2f70 wing structs:.

\n-000f86f0: 7374 7275 6374 203c 2f73 7061 6e3e 615f struct a_\n-000f8700: 5f65 6c74 207b 202e 2e2e 207d 3b20 3c2f _elt { ... }; .
str\n-000f8740: 7563 7420 3c2f 7370 616e 3e62 5f5f 656c uct b__el\n-000f8750: 7420 7b20 2e2e 2e20 7d3b 203c 2f64 6976 t { ... }; .
struct\n-000f8790: 203c 2f73 7061 6e3e 6b5f 5f65 6c74 207b k__elt {\n-000f87a0: 202e 2e2e 207d 3b20 3c2f 6469 763e 0a3c ... };
.<\n-000f87b0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

The nam\n-000f87d0: 6573 7061 6365 206d 6170 7069 6e67 2074 espace mapping t\n-000f87e0: 6162 6c65 2067 656e 6572 6174 6564 2062 able generated b\n-000f87f0: 7920 736f 6170 6370 7032 2068 6173 2074 y soapcpp2 has t\n-000f8800: 6865 2066 6f6c 6c6f 7769 6e67 2065 6e74 he following ent\n-000f8810: 7269 6573 3a3c 2f70 3e0a 3c64 6976 2063 ries:

.
\n-000f8830: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
struct <\n-000f8860: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>Namespace\n-000f88a0: 203c 6120 636c 6173 733d 2263 6f64 6522 namespac\n-000f8900: 6573 3c2f 613e 5b5d 203d 203c 2f64 6976 es[] = .
{
. \n-000f8940: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // { "\n-000f8960: 3b70 7265 6669 7826 7175 6f74 3b2c 2026 ;prefix", &\n-000f8970: 7175 6f74 3b55 5249 2671 756f 743b 2c20 quot;URI", \n-000f8980: 2671 756f 743b 5552 492d 7061 7474 6572 "URI-patter\n-000f8990: 6e26 7175 6f74 3b20 286f 7074 696f 6e61 n" (optiona\n-000f89a0: 6c29 207d 203c 2f73 7061 6e3e 3c2f 6469 l) } .
... // the four SOA\n-000f89f0: 5020 616e 6420 5853 4420 6e61 6d65 7370 P and XSD namesp\n-000f8a00: 6163 6520 6269 6e64 696e 6773 3c2f 7370 ace bindings
.
{ \n-000f8a30: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-000f8a50: 743b 6126 7175 6f74 3b3c 2f73 7061 6e3e t;a"\n-000f8a60: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n-000f8a80: 756f 743b 6874 7470 3a2f 2f74 656d 7075 uot;http://tempu\n-000f8a90: 7269 2e6f 7267 2f61 2e78 7364 2671 756f ri.org/a.xsd&quo\n-000f8aa0: 743b 3c2f 7370 616e 3e20 7d2c 203c 2f64 t; }, .
{ "b&qu\n-000f8af0: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "ht\n-000f8b20: 7470 3a2f 2f74 656d 7075 7269 2e6f 7267 tp://tempuri.org\n-000f8b30: 2f62 2e78 7364 2671 756f 743b 3c2f 7370 /b.xsd" },
.\n-000f8b60: 2020 7b20 3c73 7061 6e20 636c 6173 733d { \n-000f8b80: 2671 756f 743b 6326 7175 6f74 3b3c 2f73 "c", "http://t\n-000f8bc0: 656d 7075 7269 2e6f 7267 2f63 2e78 7364 empuri.org/c.xsd\n-000f8bd0: 2671 756f 743b 3c2f 7370 616e 3e20 7d2c " },\n-000f8be0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
... \n-000f8c00: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //<\n-000f8c20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{ NULL\n-000f8c40: 2c20 4e55 4c4c 207d 3c2f 6469 763e 0a3c , NULL }
.<\n-000f8c50: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000f8c60: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
.
\n-000f8c70: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

Likewis\n-000f9820: 652c 206f 6e20 7468 6520 7365 7276 6572 e, on the server\n-000f9830: 2073 6964 6520 6361 6c6c 203c 636f 6465 side call soap_set_namesp\n-000f9910: 6163 6573 3c2f 613e 3c2f 636f 6465 3e20 aces \n-000f9920: 6265 666f 7265 2063 616c 6c69 6e67 203c before calling <\n-000f9930: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_serve. Chang\n-000f99c0: 696e 6720 7468 6520 6e61 6d65 7370 6163 ing the namespac\n-000f99d0: 6573 2074 6162 6c65 2069 6e20 7365 7276 es table in serv\n-000f99e0: 6963 6520 6f70 6572 6174 696f 6e73 2068 ice operations h\n-000f99f0: 6173 206e 6f20 6566 6665 6374 2e3c 2f70 as no effect..

The XML mes\n-000f9a10: 7361 6765 7320 7072 6f64 7563 6564 2062 sages produced b\n-000f9a20: 7920 7468 6520 6753 4f41 5020 656e 6769 y the gSOAP engi\n-000f9a30: 6e65 2069 6e63 6c75 6465 2061 6c6c 203c ne include all <\n-000f9a40: 656d 3e3c 636f 6465 3e78 6d6c 736e 3c2f em>xmlsn names\n-000f9a60: 7061 6365 2062 696e 6469 6e67 7320 696e pace bindings in\n-000f9a70: 2074 6865 2072 6f6f 7420 656c 656d 656e the root elemen\n-000f9a80: 742c 2077 6869 6368 2069 7320 6765 6e65 t, which is gene\n-000f9a90: 7261 6c6c 7920 6d6f 7265 2065 6666 6963 rally more effic\n-000f9aa0: 6965 6e74 2066 6f72 206c 6172 6765 7220 ient for larger \n-000f9ab0: 584d 4c20 646f 6375 6d65 6e74 7320 696e XML documents in\n-000f9ac0: 2077 6869 6368 206f 7468 6572 7769 7365 which otherwise\n-000f9ad0: 2074 6865 203c 656d 3e3c 636f 6465 3e78 the x\n-000f9ae0: 6d6c 736e 3c2f 636f 6465 3e3c 2f65 6d3e mlsn\n-000f9af0: 206e 616d 6573 7061 6365 2062 696e 6469 namespace bindi\n-000f9b00: 6e67 7320 7769 6c6c 2062 6520 7370 7269 ngs will be spri\n-000f9b10: 6e6b 6c65 6420 7468 726f 7567 686f 7574 nkled throughout\n-000f9b20: 2e20 4279 2063 6f6e 7472 6173 742c 2063 . By contrast, c\n-000f9b30: 616e 6f6e 6963 616c 2058 4d4c 2072 6571 anonical XML req\n-000f9b40: 7569 7265 7320 3c65 6d3e 3c63 6f64 653e uires \n-000f9b50: 786d 6c73 6e3c 2f63 6f64 653e 3c2f 656d xmlsn namespace bind\n-000f9b70: 696e 6773 206f 6e6c 7920 746f 2062 6520 ings only to be \n-000f9b80: 696e 636c 7564 6564 2077 6865 6e20 7574 included when ut\n-000f9b90: 696c 697a 6564 2e20 5468 6572 6566 6f72 ilized. Therefor\n-000f9ba0: 652c 2074 6865 203c 636f 6465 3e23 534f e, the #SO\n-000f9bb0: 4150 5f58 4d4c 5f43 414e 4f4e 4943 414c AP_XML_CANONICAL\n-000f9bc0: 3c2f 636f 6465 3e20 636f 6e74 6578 7420 context \n-000f9bd0: 666c 6167 2070 726f 6475 6365 7320 4331 flag produces C1\n-000f9be0: 344e 2065 7863 6c75 7369 7665 2058 4d4c 4N exclusive XML\n-000f9bf0: 206d 6573 7361 6765 7320 616e 6420 646f messages and do\n-000f9c00: 6375 6d65 6e74 732c 2077 6869 6368 2065 cuments, which e\n-000f9c10: 6c69 6d69 6e61 7465 7320 756e 7573 6564 liminates unused\n-000f9c20: 203c 656d 3e3c 636f 6465 3e78 6d6c 736e xmlsn\n-000f9c30: 3c2f 636f 6465 3e3c 2f65 6d3e 206e 616d nam\n-000f9c40: 6573 7061 6365 2062 696e 6469 6e67 7320 espace bindings \n-000f9c50: 6672 6f6d 2058 4d4c 2e20 556e 666f 7274 from XML. Unfort\n-000f9c60: 756e 6174 656c 792c 2074 6865 2063 7572 unately, the cur\n-000f9c70: 7265 6e74 2043 3134 4e20 7374 616e 6461 rent C14N standa\n-000f9c80: 7264 2069 7320 6275 6767 7920 7769 7468 rd is buggy with\n-000f9c90: 2072 6573 7065 6374 2074 6f20 5853 4420 respect to XSD \n-000f9ca0: 514e 616d 6520 636f 6e74 656e 742c 2062 QName content, b\n-000f9cb0: 6563 6175 7365 2070 7265 6669 7865 7320 ecause prefixes \n-000f9cc0: 7573 6564 2069 6e20 514e 616d 6520 636f used in QName co\n-000f9cd0: 6e74 656e 7420 6172 6520 6e6f 7420 636f ntent are not co\n-000f9ce0: 6e73 6964 6572 6564 2075 7469 6c69 7a65 nsidered utilize\n-000f9cf0: 642e 2054 6865 2067 534f 4150 2065 6e67 d. The gSOAP eng\n-000f9d00: 696e 6520 636f 6e73 6964 6572 7320 514e ine considers QN\n-000f9d10: 616d 6520 636f 6e74 656e 7420 7072 6566 ame content pref\n-000f9d20: 6978 6573 2075 7469 6c69 7a65 6420 616e ixes utilized an\n-000f9d30: 6420 7468 6572 6566 6f72 6520 7072 6f64 d therefore prod\n-000f9d40: 7563 6573 2063 6f72 7265 6374 6564 2063 uces corrected c\n-000f9d50: 616e 6f6e 6963 616c 697a 6564 2058 4d4c anonicalized XML\n-000f9d60: 206f 7574 7075 7420 7468 6174 2070 7265 output that pre\n-000f9d70: 7665 6e74 7320 7468 6520 6c6f 7373 206f vents the loss o\n-000f9d80: 6620 6e61 6d65 7370 6163 6520 696e 666f f namespace info\n-000f9d90: 726d 6174 696f 6e20 666f 7220 514e 616d rmation for QNam\n-000f9da0: 6573 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 es.

.

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

.\n-000f9e00: 3c2f 613e 0a53 4f41 5020 4865 6164 6572 .SOAP Header\n-000f9e10: 2070 726f 6365 7373 696e 673c 2f68 313e processing\n-000f9e20: 0a3c 703e 4120 6275 696c 742d 696e 2053 .

A built-in S\n-000f9e30: 4f41 5020 4865 6164 6572 2064 6174 6120 OAP Header data \n-000f9e40: 7374 7275 6374 7572 6520 3c63 6f64 653e structure \n-000f9e50: 3c61 2063 6c61 7373 3d22 656c 2220 6872 SOAP_\n-000f9eb0: 454e 565f 5f48 6561 6465 723c 2f61 3e3c ENV__Header<\n-000f9ec0: 2f63 6f64 653e 2069 7320 6765 6e65 7261 /code> is genera\n-000f9ed0: 7465 6420 6279 2074 6865 2073 6f61 7063 ted by the soapc\n-000f9ee0: 7070 3220 746f 6f6c 2066 6f72 2065 7863 pp2 tool for exc\n-000f9ef0: 6861 6e67 696e 6720 534f 4150 2068 6561 hanging SOAP hea\n-000f9f00: 6465 7273 2069 6e20 534f 4150 206d 6573 ders in SOAP mes\n-000f9f10: 7361 6765 732e 2054 6869 7320 7374 7275 sages. This stru\n-000f9f20: 6374 7572 6520 6973 2065 6d70 7479 2075 cture is empty u\n-000f9f30: 6e6c 6573 7320 6865 6164 6572 7320 6172 nless headers ar\n-000f9f40: 6520 6164 6465 6420 6279 2070 6c75 6769 e added by plugi\n-000f9f50: 6e73 2061 6e64 2068 6561 6465 7273 2073 ns and headers s\n-000f9f60: 7065 6369 6669 6564 2062 7920 5753 444c pecified by WSDL\n-000f9f70: 2073 7065 6369 6669 6361 7469 6f6e 7320 specifications \n-000f9f80: 2869 2e65 2e20 7773 646c 3268 2061 6464 (i.e. wsdl2h add\n-000f9f90: 7320 534f 4150 2048 6561 6465 7273 292e s SOAP Headers).\n-000f9fa0: 3c2f 703e 0a3c 703e 596f 7520 6361 6e20

.

You can \n-000f9fb0: 6372 6561 7465 2079 6f75 7220 6f77 6e20 create your own \n-000f9fc0: 534f 4150 2048 6561 6465 7220 7374 7275 SOAP Header stru\n-000f9fd0: 6374 2073 696d 706c 7920 6279 2064 6563 ct simply by dec\n-000f9fe0: 6c61 7269 6e67 2069 7420 696e 2061 6e20 laring it in an \n-000f9ff0: 696e 7465 7266 6163 6520 6865 6164 6572 interface header\n-000fa000: 2066 696c 6520 666f 7220 736f 6170 6370 file for soapcp\n-000fa010: 7032 2061 6e64 2062 7920 6164 6469 6e67 p2 and by adding\n-000fa020: 206d 656d 6265 7273 2074 6861 7420 6d75 members that mu\n-000fa030: 7374 2062 6520 7175 616c 6966 6965 6420 st be qualified \n-000fa040: 7769 7468 206e 616d 6573 7061 6365 2070 with namespace p\n-000fa050: 7265 6669 7865 7320 746f 2063 6f6e 666f refixes to confo\n-000fa060: 726d 2074 6f20 7468 6520 534f 4150 2048 rm to the SOAP H\n-000fa070: 6561 6465 7220 7072 6f63 6573 7369 6e67 eader processing\n-000fa080: 2072 6571 7569 7265 6d65 6e74 7320 7468 requirements th\n-000fa090: 6174 2053 4f41 5020 4865 6164 6572 2065 at SOAP Header e\n-000fa0a0: 6c65 6d65 6e74 7320 6d75 7374 2062 6520 lements must be \n-000fa0b0: 6e61 6d65 7370 6163 6520 7175 616c 6966 namespace qualif\n-000fa0c0: 6965 642e 3c2f 703e 0a3c 703e 466f 7220 ied.

.

For \n-000fa0d0: 6578 616d 706c 652c 2061 7373 756d 6520 example, assume \n-000fa0e0: 7468 6174 2074 7261 6e73 6163 7469 6f6e that transaction\n-000fa0f0: 2064 6174 6120 7368 6f75 6c64 2062 6520 data should be \n-000fa100: 7069 6767 792d 6261 636b 6564 2077 6974 piggy-backed wit\n-000fa110: 6820 534f 4150 206d 6573 7361 6765 7320 h SOAP messages \n-000fa120: 696e 2053 4f41 5020 4865 6164 6572 3a3c in SOAP Header:<\n-000fa130: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

struct \n-000fa180: 745f 5f74 7261 6e73 6163 7469 6f6e 3c2f t__transaction.
{
.<\n-000fa1b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000fa1c0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n-000fa1e0: 6e74 3c2f 7370 616e 3e20 6e75 6d62 6572 nt number\n-000fa1f0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
const\n-000fa230: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-000fa250: 2f73 7061 6e3e 202a 6473 6372 6970 7469 /span> *dscripti\n-000fa260: 6f6e 3b3c 2f64 6976 3e0a 3c64 6976 2063 on;
.
};.
str\n-000fa2b0: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct SOAP_EN\n-000fa300: 565f 5f48 6561 6465 723c 2f61 3e20 3c2f V__Header .
{
.<\n-000fa330: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000fa340: 3e20 2020 206d 7573 7455 6e64 6572 7374 > mustUnderst\n-000fa350: 616e 6420 3c73 7061 6e20 636c 6173 733d and struct\n-000fa370: 203c 2f73 7061 6e3e 745f 5f74 7261 6e73 t__trans\n-000fa380: 6163 7469 6f6e 202a 745f 5f74 7261 6e73 action *t__trans\n-000fa390: 6163 7469 6f6e 3b20 3c2f 6469 763e 0a3c action;
.<\n-000fa3a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000fa3b0: 3e7d 3b3c 2f64 6976 3e0a 3c64 6976 2063 >};
.
//gsoap ns ser\n-000fa3f0: 7669 6365 206d 6574 686f 642d 696e 7075 vice method-inpu\n-000fa400: 742d 6865 6164 6572 2d70 6172 743a 2077 t-header-part: w\n-000fa410: 6562 6d65 7468 6f64 2074 5f5f 7472 616e ebmethod t__tran\n-000fa420: 7361 6374 696f 6e3c 2f73 7061 6e3e 3c2f saction.
int ns__\n-000fa470: 7765 626d 6574 686f 6428 2e2e 2e29 3b3c webmethod(...);<\n-000fa480: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

\n-000fa4a0: 5468 6520 3c63 6f64 653e 6d75 7374 556e The mustUn\n-000fa4b0: 6465 7273 7461 6e64 3c2f 636f 6465 3e20 derstand \n-000fa4c0: 7175 616c 6966 6965 7220 7370 6563 6966 qualifier specif\n-000fa4d0: 6965 7320 7468 6174 2074 6865 2065 6c65 ies that the ele\n-000fa4e0: 6d65 6e74 206d 7573 7420 6265 2070 726f ment must be pro\n-000fa4f0: 6365 7373 6564 2062 7920 7468 6520 534f cessed by the SO\n-000fa500: 4150 2070 726f 6365 7373 6f72 2061 6e64 AP processor and\n-000fa510: 2063 616e 6e6f 7420 6265 2069 676e 6f72 cannot be ignor\n-000fa520: 6564 2069 6620 7468 6520 7072 6f63 6573 ed if the proces\n-000fa530: 736f 7220 6861 7320 6e6f 206c 6f67 6963 sor has no logic\n-000fa540: 2069 6e20 706c 6163 6520 666f 7220 7468 in place for th\n-000fa550: 6973 2053 4f41 5020 6865 6164 6572 2c20 is SOAP header, \n-000fa560: 7768 6963 6820 6973 2064 6f6e 6520 6279 which is done by\n-000fa570: 2061 6464 696e 6720 6120 3c65 6d3e 3c63 adding a SOAP-ENV:mus\n-000fa590: 7455 6e64 6572 7374 616e 643d 2274 7275 tUnderstand=\"tru\n-000fa5a0: 6522 3c2f 636f 6465 3e3c 2f65 6d3e 2061 e\" a\n-000fa5b0: 7474 7269 6275 7465 2074 6f20 7468 6520 ttribute to the \n-000fa5c0: 3c65 6d3e 3c63 6f64 653e 743a 7472 616e t:tran\n-000fa5d0: 7361 6374 696f 6e3c 2f63 6f64 653e 3c2f saction element. The\n-000fa5f0: 2073 6f61 7063 7070 322d 6765 6e65 7261 soapcpp2-genera\n-000fa600: 7465 6420 7365 7269 616c 697a 6572 7320 ted serializers \n-000fa610: 6f62 6579 2074 6869 7320 7361 6665 7479 obey this safety\n-000fa620: 2070 7269 6e63 6970 6c65 2e3c 2f70 3e0a principle.

.\n-000fa630: 3c70 3e54 6869 7320 6465 636c 6172 6573

This declares\n-000fa640: 2061 2073 6572 7669 6365 206f 7065 7261 a service opera\n-000fa650: 7469 6f6e 2074 6861 7420 7365 6e64 7320 tion that sends \n-000fa660: 6d65 7373 6167 6573 2077 6974 6820 616e messages with an\n-000fa670: 2069 6e70 7574 2053 4f41 5020 6865 6164 input SOAP head\n-000fa680: 6572 203c 636f 6465 3e74 5f5f 7472 616e er t__tran\n-000fa690: 7361 6374 696f 6e3c 2f63 6f64 653e 2c20 saction, \n-000fa6a0: 6173 2063 616e 2062 6520 7365 656e 2069 as can be seen i\n-000fa6b0: 6e20 7468 6520 6765 6e65 7261 7465 6420 n the generated \n-000fa6c0: 5753 444c 2062 696e 6469 6e67 3a3c 2f70 WSDL binding:.

<\n-000fa710: 3c73 7061 6e20 636c 6173 733d 226b 6579 bindin\n-000fa730: 673c 2f73 7061 6e3e 203c 7370 616e 2063 g n\n-000fa750: 616d 653c 2f73 7061 6e3e 3d3c 7370 616e ame="Ser\n-000fa780: 7669 6365 2671 756f 743b 3c2f 7370 616e vice" type=\n-000fa7d0: 2671 756f 743b 746e 733a 5365 7276 6963 "tns:Servic\n-000fa7e0: 6550 6f72 7454 7970 6526 7175 6f74 3b3c ePortType"<\n-000fa7f0: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
\n-000fa800: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<SOAP:binding<\n-000fa840: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> sty\n-000fa860: 6c65 3c2f 7370 616e 3e3d 3c73 7061 6e20 le="docu\n-000fa890: 6d65 6e74 2671 756f 743b 3c2f 7370 616e ment" transpor\n-000fa8c0: 743c 2f73 7061 6e3e 3d3c 7370 616e 2063 t="http:\n-000fa8f0: 2f2f 7363 6865 6d61 732e 786d 6c73 6f61 //schemas.xmlsoa\n-000fa900: 702e 6f72 672f 736f 6170 2f68 7474 7026 p.org/soap/http&\n-000fa910: 7175 6f74 3b3c 2f73 7061 6e3e 2f26 6774 quot;/>\n-000fa920: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
<\n-000fa940: 3c73 7061 6e20 636c 6173 733d 226b 6579 operat\n-000fa960: 696f 6e3c 2f73 7061 6e3e 203c 7370 616e ion name="w\n-000fa9b0: 6562 6d65 7468 6f64 2671 756f 743b 3c2f ebmethod">
.\n-000fa9d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
<SOAP:operati\n-000faa10: 6f6e 3c2f 7370 616e 3e20 3c73 7061 6e20 on \n-000faa30: 736f 6170 4163 7469 6f6e 3c2f 7370 616e soapAction=&q\n-000faa60: 756f 743b 2671 756f 743b 3c2f 7370 616e uot;"/>
. \n-000faa90: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <input>\n-000faac0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
\n-000faae0: 2020 2020 266c 743b 3c73 7061 6e20 636c <SOAP:body use=\n-000fab50: 2671 756f 743b 6c69 7465 7261 6c26 7175 "literal&qu\n-000fab60: 6f74 3b3c 2f73 7061 6e3e 203c 7370 616e ot; parts="\n-000fabb0: 426f 6479 2671 756f 743b 3c2f 7370 616e Body"/>
. \n-000fabe0: 2020 2020 2020 2020 2026 6c74 3b3c 7370 <SOAP:head\n-000fac10: 6572 3c2f 7370 616e 3e20 3c73 7061 6e20 er \n-000fac30: 7573 653c 2f73 7061 6e3e 3d3c 7370 616e use="lit\n-000fac60: 6572 616c 2671 756f 743b 3c2f 7370 616e eral" message<\n-000fac90: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="tns:Ser\n-000facc0: 7669 6365 4865 6164 6572 2671 756f 743b viceHeader"\n-000facd0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c pa\n-000facf0: 7274 3c2f 7370 616e 3e3d 3c73 7061 6e20 rt="tran\n-000fad20: 7361 6374 696f 6e26 7175 6f74 3b3c 2f73 saction"/>
.\n-000fad40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
</input>
. \n-000fada0: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n-000fadc0: 6f75 7470 7574 3c2f 7370 616e 3e26 6774 output>\n-000fadd0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
\n-000fadf0: 2020 2020 266c 743b 3c73 7061 6e20 636c <SOAP:body use=\n-000fae60: 2671 756f 743b 6c69 7465 7261 6c26 7175 "literal&qu\n-000fae70: 6f74 3b3c 2f73 7061 6e3e 203c 7370 616e ot; parts="\n-000faec0: 426f 6479 2671 756f 743b 3c2f 7370 616e Body"/>
. \n-000faef0: 2020 2026 6c74 3b2f 3c73 7061 6e20 636c </output&\n-000faf20: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
.
&l\n-000faf40: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/ope\n-000faf60: 7261 7469 6f6e 3c2f 7370 616e 3e26 6774 ration>\n-000faf70: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
</<\n-000faf90: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000fafa0: 6f72 6474 7970 6522 3e62 696e 6469 6e67 ordtype\">binding\n-000fafb0: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
\n-000fafe0: 3c70 3e4c 696b 6577 6973 652c 2079 6f75

Likewise, you\n-000faff0: 2063 616e 2073 7065 6369 6679 2074 6861 can specify tha\n-000fb000: 7420 626f 7468 2069 6e70 7574 2061 6e64 t both input and\n-000fb010: 206f 7574 7075 7420 6d65 7373 6167 6573 output messages\n-000fb020: 2068 6176 6520 7468 6520 7361 6d65 2068 have the same h\n-000fb030: 6561 6465 7220 7769 7468 203c 636f 6465 eader with //gsoap ns serv\n-000fb050: 6963 6520 6d65 7468 6f64 2d68 6561 6465 ice method-heade\n-000fb060: 722d 7061 7274 3a3c 2f63 6f64 653e 206f r-part: o\n-000fb070: 7220 7468 6520 6f75 7470 7574 206d 6573 r the output mes\n-000fb080: 7361 6765 2068 6173 2061 2068 6561 6465 sage has a heade\n-000fb090: 7220 7769 7468 203c 636f 6465 3e2f 2f67 r with //g\n-000fb0a0: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n-000fb0b0: 6d65 7468 6f64 2d6f 7574 7075 742d 6865 method-output-he\n-000fb0c0: 6164 6572 2d70 6172 743a 3c2f 636f 6465 ader-part:. Multiple head\n-000fb0e0: 6572 7320 6361 6e20 6265 2073 7065 6369 ers can be speci\n-000fb0f0: 6669 6564 2074 6869 7320 7761 792e 3c2f fied this way..

To set up \n-000fb110: 6120 534f 4150 2048 6561 6465 7220 6174 a SOAP Header at\n-000fb120: 2074 6865 2063 6c69 656e 7420 7369 6465 the client side\n-000fb130: 2074 6861 7420 636f 6e74 6169 6e73 2074 that contains t\n-000fb140: 6865 203c 636f 6465 3e74 5f5f 7472 616e he t__tran\n-000fb150: 7361 6374 696f 6e3c 2f63 6f64 653e 206d saction m\n-000fb160: 656d 6265 723a 3c2f 703e 0a3c 6469 7620 ember:

.
struct \n-000fb1b0: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n-000fb1e0: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n-000fb210: 6f61 703c 2f61 3e20 3d20 3c61 2063 6c61 oap = s\n-000fb270: 6f61 705f 6e65 773c 2f61 3e28 293b 203c oap_new(); <\n-000fb280: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
... //.
soap<\n-000fb300: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.hea\n-000fb350: 6465 723c 2f61 3e20 3d20 4e55 4c4c 3b20 der = NULL; \n-000fb360: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // erase a\n-000fb380: 6e79 2053 4f41 5020 4865 6164 6572 2077 ny SOAP Header w\n-000fb390: 6520 6861 7665 2073 6f20 6661 723c 2f73 e have so far
.
soap_header\n-000fb420: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-000fb450: 293b 2020 3c73 7061 6e20 636c 6173 733d ); // all\n-000fb470: 6f63 6174 6520 616e 6420 696e 6974 6961 ocate and initia\n-000fb480: 6c69 7a65 2061 206e 6577 2053 4f41 5020 lize a new SOAP \n-000fb490: 4865 6164 6572 3c2f 7370 616e 3e3c 2f64 Header.
soa\n-000fb4e0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->header-&g\n-000fb540: 743b 745f 5f74 7261 6e73 6163 7469 6f6e t;t__transaction\n-000fb550: 203d 2073 6f61 705f 6e65 775f 745f 5f74 = soap_new_t__t\n-000fb560: 7261 6e73 6163 7469 6f6e 283c 6120 636c ransaction(soap, -1);\n-000fb5a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
\n-000fb5e0: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->header\n-000fb640: 2d26 6774 3b74 5f5f 7472 616e 7361 6374 ->t__transact\n-000fb650: 696f 6e2d 2667 743b 6e75 6d62 6572 203d ion->number =\n-000fb660: 206e 756d 3b3c 2f64 6976 3e0a 3c64 6976 num;
.soap-&g\n-000fb6b0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;heade\n-000fb700: 723c 2f61 3e2d 2667 743b 745f 5f74 7261 r->t__tra\n-000fb710: 6e73 6163 7469 6f6e 2d26 6774 3b64 6573 nsaction->des\n-000fb720: 6372 6970 7469 6f6e 203d 203c 7370 616e cription = "Tra\n-000fb750: 6e73 6163 7469 6f6e 616c 2064 6174 6126 nsactional data&\n-000fb760: 7175 6f74 3b3c 2f73 7061 6e3e 3b3c 2f64 quot;;.
\n-000fb7a0: 6966 3c2f 7370 616e 3e20 2873 6f61 705f if (soap_\n-000fb7b0: 6361 6c6c 5f77 6562 6d65 7468 6f64 283c call_webmethod(<\n-000fb7c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-000fb7d0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-000fb7e0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-000fb7f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 endpoin\n-000fb840: 743c 2f61 3e2c 204e 554c 4c2c 202e 2e2e t, NULL, ...\n-000fb850: 2929 3c2f 6469 763e 0a3c 6469 7620 636c ))
.
...\n-000fb870: 203c 7370 616e 2063 6c61 7373 3d22 636f // error<\n-000fb890: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.\n-000fb960: 7374 7275 6374 2053 4f41 505f 454e 565f struct SOAP_ENV_\n-000fb970: 5f48 6561 6465 7220 2a20 6865 6164 6572 _Header * header\n-000fb980: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
The soa\n-000fb9a0: 703a 3a68 6561 6465 7220 706f 696e 7473 p::header points\n-000fb9b0: 2074 6f20 6120 534f 4150 5f45 4e56 5f5f to a SOAP_ENV__\n-000fb9c0: 4865 6164 6572 2073 7472 7563 7475 7265 Header structure\n-000fb9d0: 2077 6974 6820 7468 6520 534f 4150 2048 with the SOAP H\n-000fb9e0: 6561 6465 7220 7468 6174 2077 6173 2072 eader that was r\n-000fb9f0: 6563 6569 7665 6420 6f72 2074 6861 2e2e eceived or tha..\n-000fba00: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
Def\n-000fba20: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n-000fba30: 736f 6170 322e 683a 3239 3535 3c2f 6469 soap2.h:2955
.
<\n-000fba50: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-000fba60: 3c70 3e54 6865 2053 4f41 5020 5765 6220

The SOAP Web \n-000fba70: 7365 7276 6963 6520 7265 7175 6573 7420 service request \n-000fba80: 696e 636c 7564 6573 2074 6865 2053 4f41 includes the SOA\n-000fba90: 5020 4865 6164 6572 2077 6974 6820 7468 P Header with th\n-000fbaa0: 6520 7472 616e 7361 6374 696f 6e20 6461 e transaction da\n-000fbab0: 7461 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ta:

.
\n-000fbae0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
<\n-000fbb10: 534f 4150 2d45 4e56 3a45 6e76 656c 6f70 SOAP-ENV:Envelop\n-000fbb20: 653c 2f73 7061 6e3e 202e 2e2e 2667 743b e ...>\n-000fbb30: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
<\n-000fbb50: 3c73 7061 6e20 636c 6173 733d 226b 6579 SOAP-E\n-000fbb70: 4e56 3a48 6561 6465 723c 2f73 7061 6e3e NV:Header\n-000fbb80: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
. \n-000fbba0: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n-000fbbc0: 743a 7472 616e 7361 6374 696f 6e3c 2f73 t:transaction SOAP-\n-000fbbf0: 454e 563a 6d75 7374 556e 6465 7273 7461 ENV:mustUndersta\n-000fbc00: 6e64 3c2f 7370 616e 3e3d 3c73 7061 6e20 nd="true\n-000fbc30: 2671 756f 743b 3c2f 7370 616e 3e26 6774 ">\n-000fbc40: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
\n-000fbc60: 266c 743b 3c73 7061 6e20 636c 6173 733d <nu\n-000fbc80: 6d62 6572 3c2f 7370 616e 3e26 6774 3b31 mber>1\n-000fbc90: 3233 3435 266c 743b 2f3c 7370 616e 2063 2345</number\n-000fbcc0: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
.
\n-000fbce0: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <description>Tra\n-000fbd30: 6e73 6163 7469 6f6e 616c 3c2f 7370 616e nsactional data</description>
.<\n-000fbda0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000fbdb0: 3e20 2020 2026 6c74 3b2f 3c73 7061 6e20 > </t:transactio\n-000fbde0: 6e3c 2f73 7061 6e3e 2667 743b 203c 2f64 n> .
</SOAP-ENV:\n-000fbe30: 4865 6164 6572 3c2f 7370 616e 3e26 6774 Header>\n-000fbe40: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n-000fbe60: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;SOAP-\n-000fbe80: 454e 563a 426f 6479 3c2f 7370 616e 3e26 ENV:Body&\n-000fbe90: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
\n-000fbeb0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <n\n-000fbed0: 733a 7765 626d 6574 686f 643c 2f73 7061 s:webmethod>
. \n-000fbf00: 2020 2020 202e 2e2e 3c2f 6469 763e 0a3c ...
.<\n-000fbf10: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000fbf20: 3e20 2020 2026 6c74 3b2f 3c73 7061 6e20 > </ns:webmethod\n-000fbf50: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
</SOAP-ENV:Bo\n-000fbfa0: 6479 3c2f 7370 616e 3e26 6774 3b20 3c2f dy> .
</SOAP-ENV:E\n-000fbff0: 6e76 656c 6f70 653c 2f73 7061 6e3e 2667 nvelope&g\n-000fc000: 743b 3c2f 6469 763e 0a3c 2f64 6976 3e3c t;
.
<\n-000fc010: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-000fc020: 203c 2f64 6976 3e3c 703e 4174 2074 6865

At the\n-000fc030: 2072 6563 6569 7669 6e67 2073 6964 652c receiving side,\n-000fc040: 2061 2053 4f41 5020 4865 6164 6572 2063 a SOAP Header c\n-000fc050: 616e 2062 6520 696e 7370 6563 7465 6420 an be inspected \n-000fc060: 6279 2063 6865 636b 696e 6720 666f 7220 by checking for \n-000fc070: 6120 6e6f 6e2d 4e55 4c4c 203c 636f 6465 a non-NULL soap::h\n-000fc140: 6561 6465 723c 2f61 3e3c 2f63 6f64 653e eader\n-000fc150: 2e3c 2f70 3e0a 3c64 6c20 636c 6173 733d .

.
Warning
When SOAP \n-000fc190: 4865 6164 6572 7320 6172 6520 7573 6564 Headers are used\n-000fc1a0: 2c20 796f 7520 6d75 7374 206d 616b 6520 , you must make \n-000fc1b0: 7375 7265 2074 6f20 7365 7420 3c63 6f64 sure to set soap::\n-000fc280: 6865 6164 6572 3c2f 613e 3c2f 636f 6465 header to NULL when n\n-000fc2a0: 6f20 534f 4150 2048 6561 6465 7220 7368 o SOAP Header sh\n-000fc2b0: 6f75 6c64 2062 6520 7365 6e74 2c20 6f74 ould be sent, ot\n-000fc2c0: 6865 7277 6973 6520 616e 7920 534f 4150 herwise any SOAP\n-000fc2d0: 2048 6561 6465 7273 2063 7572 7265 6e74 Headers current\n-000fc2e0: 6c79 2070 7265 7365 6e74 2069 6e20 7468 ly present in th\n-000fc2f0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e SOAP_ENV__Hea\n-000fc360: 6465 723c 2f61 3e3c 2f63 6f64 653e 2073 der s\n-000fc370: 7472 7563 7420 706f 696e 7465 6420 746f truct pointed to\n-000fc380: 2062 7920 3c63 6f64 653e 3c61 2063 6c61 by soap::header will b\n-000fc460: 6520 696e 636c 7564 6564 2069 6e20 7468 e included in th\n-000fc470: 6520 6d65 7373 6167 652e 3c2f 6464 3e3c e message.
<\n-000fc480: 2f64 6c3e 0a3c 703e 4174 2074 6865 2063 /dl>.

At the c\n-000fc490: 6c69 656e 7420 7369 6465 2c20 7468 6520 lient side, the \n-000fc4a0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n-000fc560: 6170 3a3a 6163 746f 723c 2f61 3e3c 2f63 ap::actor string vari\n-000fc580: 6162 6c65 2063 616e 2062 6520 7365 7420 able can be set \n-000fc590: 746f 2073 6574 2074 6865 2053 4f41 5020 to set the SOAP \n-000fc5a0: 3c65 6d3e 3c63 6f64 653e 534f 4150 2d45 SOAP-E\n-000fc5b0: 4e56 3a61 6374 6f72 3c2f 636f 6465 3e3c NV:actor<\n-000fc5c0: 2f65 6d3e 2061 7474 7269 6275 7465 2e20 /em> attribute. \n-000fc5d0: 5468 6520 3c65 6d3e 3c63 6f64 653e 534f The SO\n-000fc5e0: 4150 2d45 4e56 3a6d 7573 7455 6e64 6572 AP-ENV:mustUnder\n-000fc5f0: 7374 616e 643d 2274 7275 6522 3c2f 636f stand=\"true\" attribu\n-000fc610: 7465 2074 6865 6e20 696e 6469 6361 7465 te then indicate\n-000fc620: 7320 7468 6520 7265 7175 6972 656d 656e s the requiremen\n-000fc630: 7420 7468 6174 2074 6865 2072 6563 6970 t that the recip\n-000fc640: 6965 6e74 2063 6f72 7265 7370 6f6e 6469 ient correspondi\n-000fc650: 6e67 2074 6f20 7468 6520 3c65 6d3e 3c63 ng to the SOAP-ENV:act\n-000fc670: 6f72 3c2f 636f 6465 3e3c 2f65 6d3e 2061 or a\n-000fc680: 7474 7269 6275 7465 2076 616c 7565 2069 ttribute value i\n-000fc690: 7320 7265 7370 6f6e 7369 626c 6520 746f s responsible to\n-000fc6a0: 2070 726f 6365 7373 2074 6865 2053 4f41 process the SOA\n-000fc6b0: 5020 4865 6164 6572 2065 6c65 6d65 6e74 P Header element\n-000fc6c0: 2e20 5468 6520 6465 7461 696c 7320 6f66 . The details of\n-000fc6d0: 2077 6869 6368 2063 616e 2062 6520 666f which can be fo\n-000fc6e0: 756e 6420 696e 2074 6865 2053 4f41 5020 und in the SOAP \n-000fc6f0: 312e 312f 312e 3220 7370 6563 6966 6963 1.1/1.2 specific\n-000fc700: 6174 696f 6e73 2074 6861 7420 7468 6520 ations that the \n-000fc710: 6753 4f41 5020 746f 6f6c 7320 636f 6e66 gSOAP tools conf\n-000fc720: 6f72 6d20 746f 2e3c 2f70 3e0a 3c70 3e54 orm to.

.

T\n-000fc730: 6865 2053 4f41 5020 4865 6164 6572 2073 he SOAP Header s\n-000fc740: 7472 7563 7475 7265 203c 636f 6465 3e3c tructure <\n-000fc750: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-000fc760: 663d 2273 7472 7563 745f 735f 6f5f 615f f=\"struct_s_o_a_\n-000fc770: 705f 5f5f 655f 6e5f 765f 5f5f 5f5f 6865 p___e_n_v_____he\n-000fc780: 6164 6572 2e68 746d 6c22 2074 6974 6c65 ader.html\" title\n-000fc790: 3d22 534f 4150 2048 6561 6465 7220 7374 =\"SOAP Header st\n-000fc7a0: 7275 6374 7572 652e 223e 534f 4150 5f45 ructure.\">SOAP_E\n-000fc7b0: 4e56 5f5f 4865 6164 6572 3c2f 613e 3c2f NV__Header is declare\n-000fc7d0: 6420 3c63 6f64 653e 6d75 7461 626c 653c d mutable<\n-000fc7e0: 2f63 6f64 653e 2c20 7768 6963 6820 6d65 /code>, which me\n-000fc7f0: 616e 7320 7468 6174 2072 652d 6465 636c ans that re-decl\n-000fc800: 6172 6174 696f 6e73 206f 6620 7468 6520 arations of the \n-000fc810: 7374 7275 6374 7572 6573 2061 7265 2070 structures are p\n-000fc820: 6572 6d69 7474 6564 2061 6e64 2061 6464 ermitted and add\n-000fc830: 6974 696f 6e61 6c20 6d65 6d62 6572 7320 itional members \n-000fc840: 6172 6520 636f 6c6c 6563 7465 6420 696e are collected in\n-000fc850: 746f 206f 6e65 2066 696e 616c 2073 7472 to one final str\n-000fc860: 7563 7475 7265 2062 7920 7468 6520 736f ucture by the so\n-000fc870: 6170 6370 7032 2074 6f6f 6c2e 3c2f 703e apcpp2 tool.

\n-000fc880: 0a3c 703e 466f 7220 616e 6f74 6865 7220 .

For another \n-000fc890: 6578 616d 706c 652c 2063 6f6e 7369 6465 example, conside\n-000fc8a0: 723a 3c2f 703e 0a3c 6469 7620 636c 6173 r:

.
<\n-000fc8d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-000fc8e0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct SOAP_ENV__Heade\n-000fc940: 723c 2f61 3e20 3c2f 6469 763e 0a3c 6469 r
.{\n-000fc960: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
char *h__transacti\n-000fc9b0: 6f6e 3b20 3c2f 6469 763e 0a3c 6469 7620 on;
.
\n-000fc9d0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct UserAuth *h\n-000fca00: 5f5f 6175 7468 656e 7469 6361 7469 6f6e __authentication\n-000fca10: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
};.

Su\n-000fca50: 7070 6f73 6520 6d65 7468 6f64 203c 636f ppose method ns__login uses both he\n-000fca80: 6164 6572 2070 6172 7473 2028 6174 206d ader parts (at m\n-000fca90: 6f73 7429 2c20 7468 656e 2074 6869 7320 ost), then this \n-000fcaa0: 6973 2064 6563 6c61 7265 6420 6173 3a3c is declared as:<\n-000fcab0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

//gsoap ns ser\n-000fcb00: 7669 6365 206d 6574 686f 642d 6865 6164 vice method-head\n-000fcb10: 6572 2d70 6172 743a 206c 6f67 696e 2068 er-part: login h\n-000fcb20: 5f5f 7472 616e 7361 6374 696f 6e20 3c2f __transaction
.//gsoap ns s\n-000fcb70: 6572 7669 6365 206d 6574 686f 642d 6865 ervice method-he\n-000fcb80: 6164 6572 2d70 6172 743a 206c 6f67 696e ader-part: login\n-000fcb90: 2068 5f5f 6175 7468 656e 7469 6361 7469 h__authenticati\n-000fcba0: 6f6e 203c 2f73 7061 6e3e 3c2f 6469 763e on
\n-000fcbb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
int\n-000fcbe0: 3c2f 7370 616e 3e20 6e73 5f5f 6c6f 6769 ns__logi\n-000fcbf0: 6e28 2e2e 2e29 3b3c 2f64 6976 3e0a 3c2f n(...);
.

Suppose \n-000fcc20: 6d65 7468 6f64 203c 636f 6465 3e6e 735f method ns_\n-000fcc30: 5f73 6561 7263 683c 2f63 6f64 653e 2075 _search u\n-000fcc40: 7365 7320 6f6e 6c79 2074 6865 2066 6972 ses only the fir\n-000fcc50: 7374 2068 6561 6465 7220 7061 7274 2c20 st header part, \n-000fcc60: 7468 656e 2074 6869 7320 6973 2064 6563 then this is dec\n-000fcc70: 6c61 7265 6420 6173 3a3c 2f70 3e0a 3c64 lared as:

.
//gs\n-000fccc0: 6f61 7020 6e73 2073 6572 7669 6365 206d oap ns service m\n-000fccd0: 6574 686f 642d 6865 6164 6572 2d70 6172 ethod-header-par\n-000fcce0: 743a 2073 6561 7263 6820 685f 5f74 7261 t: search h__tra\n-000fccf0: 6e73 6163 7469 6f6e 203c 2f73 7061 6e3e nsaction \n-000fcd00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
int ns\n-000fcd40: 5f5f 7365 6172 6368 282e 2e2e 293b 3c2f __search(...);.

N\n-000fcd70: 6f74 6520 7468 6174 2074 6865 206d 6574 ote that the met\n-000fcd80: 686f 6420 6e61 6d65 2061 6e64 2068 6561 hod name and hea\n-000fcd90: 6465 7220 7061 7274 206e 616d 6573 206d der part names m\n-000fcda0: 7573 7420 6265 206e 616d 6573 7061 6365 ust be namespace\n-000fcdb0: 2071 7561 6c69 6669 6564 2e20 5468 6520 qualified. The \n-000fcdc0: 6865 6164 6572 7320 6d75 7374 2062 6520 headers must be \n-000fcdd0: 7072 6573 656e 7420 696e 2061 6c6c 206f present in all o\n-000fcde0: 7065 7261 7469 6f6e 7320 7468 6174 2064 perations that d\n-000fcdf0: 6563 6c61 7265 6420 7468 6520 6865 6164 eclared the head\n-000fce00: 6572 2070 6172 7473 2e3c 2f70 3e0a 3c70 er parts.

.To specify the \n-000fce20: 6865 6164 6572 2070 6172 7473 2066 6f72 header parts for\n-000fce30: 2074 6865 206d 6574 686f 6420 696e 7075 the method inpu\n-000fce40: 7420 286d 6574 686f 6420 7265 7175 6573 t (method reques\n-000fce50: 7420 6d65 7373 6167 6529 2c20 7573 653a t message), use:\n-000fce60: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

.
//gsoap names\n-000fceb0: 7061 6365 2d70 7265 6669 7820 7365 7276 pace-prefix serv\n-000fcec0: 6963 6520 6d65 7468 6f64 2d69 6e70 7574 ice method-input\n-000fced0: 2d68 6561 6465 722d 7061 7274 3a20 6d65 -header-part: me\n-000fcee0: 7468 6f64 2d6e 616d 6520 6865 6164 6572 thod-name header\n-000fcef0: 2d70 6172 743c 2f73 7061 6e3e 3c2f 6469 -part.

Sim\n-000fcf20: 696c 6172 6c79 2c20 746f 2073 7065 6369 ilarly, to speci\n-000fcf30: 6679 2074 6865 2068 6561 6465 7220 7061 fy the header pa\n-000fcf40: 7274 7320 666f 7220 7468 6520 6d65 7468 rts for the meth\n-000fcf50: 6f64 206f 7574 7075 7420 286d 6574 686f od output (metho\n-000fcf60: 6420 7265 7370 6f6e 7365 206d 6573 7361 d response messa\n-000fcf70: 6765 292c 2075 7365 3a3c 2f70 3e0a 3c64 ge), use:

.
//gs\n-000fcfc0: 6f61 7020 6e61 6d65 7370 6163 652d 7072 oap namespace-pr\n-000fcfd0: 6566 6978 2073 6572 7669 6365 206d 6574 efix service met\n-000fcfe0: 686f 642d 6f75 7470 7574 2d68 6561 6465 hod-output-heade\n-000fcff0: 722d 7061 7274 3a20 6d65 7468 6f64 2d6e r-part: method-n\n-000fd000: 616d 6520 6865 6164 6572 2d70 6172 743c ame header-part<\n-000fd010: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 2f64 /span>
.

The decla\n-000fd040: 7261 7469 6f6e 7320 6f6e 6c79 2061 6666 rations only aff\n-000fd050: 6563 7420 7468 6520 5753 444c 2e20 466f ect the WSDL. Fo\n-000fd060: 7220 6578 616d 706c 653a 3c2f 703e 0a3c r example:

.<\n-000fd070: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-000fd080: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
str\n-000fd0b0: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct SOAP_EN\n-000fd100: 565f 5f48 6561 6465 723c 2f61 3e20 3c2f V__Header .
{
.<\n-000fd130: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000fd140: 3e20 2020 203c 7370 616e 2063 6c61 7373 > c\n-000fd160: 6861 723c 2f73 7061 6e3e 202a 685f 5f74 har *h__t\n-000fd170: 7261 6e73 6163 7469 6f6e 3b20 3c2f 6469 ransaction; .
s\n-000fd1b0: 7472 7563 7420 3c2f 7370 616e 3e55 7365 truct Use\n-000fd1c0: 7241 7574 6820 2a68 5f5f 6175 7468 656e rAuth *h__authen\n-000fd1d0: 7469 6361 7469 6f6e 3b20 3c2f 6469 763e tication;
\n-000fd1e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
};
.<\n-000fd210: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-000fd220: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n-000fd230: 7365 7276 6963 6520 6d65 7468 6f64 2d69 service method-i\n-000fd240: 6e70 7574 2d68 6561 6465 722d 7061 7274 nput-header-part\n-000fd250: 3a20 6c6f 6769 6e20 685f 5f61 7574 6865 : login h__authe\n-000fd260: 6e74 6963 6174 696f 6e20 3c2f 7370 616e ntication
.
\n-000fd2a0: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n-000fd2b0: 6365 206d 6574 686f 642d 696e 7075 742d ce method-input-\n-000fd2c0: 6865 6164 6572 2d70 6172 743a 206c 6f67 header-part: log\n-000fd2d0: 696e 2068 5f5f 7472 616e 7361 6374 696f in h__transactio\n-000fd2e0: 6e20 3c2f 7370 616e 3e3c 2f64 6976 3e0a n
.\n-000fd2f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
//gsoap \n-000fd320: 6e73 2073 6572 7669 6365 206d 6574 686f ns service metho\n-000fd330: 642d 6f75 7470 7574 2d68 6561 6465 722d d-output-header-\n-000fd340: 7061 7274 3a20 6c6f 6769 6e20 685f 5f74 part: login h__t\n-000fd350: 7261 6e73 6163 7469 6f6e 203c 2f73 7061 ransaction
.
int \n-000fd3a0: 6e73 5f5f 6c6f 6769 6e28 2e2e 2e29 3b3c ns__login(...);<\n-000fd3b0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

\n-000fd3d0: 5468 6520 6865 6164 6572 7320 6d75 7374 The headers must\n-000fd3e0: 2062 6520 7072 6573 656e 7420 696e 2061 be present in a\n-000fd3f0: 6c6c 206f 7065 7261 7469 6f6e 7320 7468 ll operations th\n-000fd400: 6174 2064 6563 6c61 7265 6420 7468 6520 at declared the \n-000fd410: 6865 6164 6572 2070 6172 7473 2e3c 2f70 header parts..

See also AP\n-000fd430: 4920 646f 6375 6d65 6e74 6174 696f 6e20 I documentation \n-000fd440: 4d6f 6475 6c65 203c 6120 636c 6173 733d Module Header str\n-000fd480: 7563 7475 7265 2061 6e64 2066 756e 6374 ucture and funct\n-000fd490: 696f 6e73 3c2f 613e 2e3c 2f70 3e0a 3c70 ions.

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

.SOAP F\n-000fd500: 6175 6c74 2070 726f 6365 7373 696e 673c ault processing<\n-000fd510: 2f68 313e 0a3c 703e 4120 6275 696c 742d /h1>.

A built-\n-000fd520: 696e 2053 4f41 5020 4661 756c 7420 6461 in SOAP Fault da\n-000fd530: 7461 2073 7472 7563 7475 7265 203c 636f ta structure SOAP\n-000fd5a0: 5f45 4e56 5f5f 4661 756c 743c 2f61 3e3c _ENV__Fault<\n-000fd5b0: 2f63 6f64 653e 2069 7320 6765 6e65 7261 /code> is genera\n-000fd5c0: 7465 6420 6279 2074 6865 2073 6f61 7063 ted by the soapc\n-000fd5d0: 7070 3220 746f 6f6c 2066 6f72 2065 7863 pp2 tool for exc\n-000fd5e0: 6861 6e67 696e 6720 6578 6365 7074 696f hanging exceptio\n-000fd5f0: 6e20 6d65 7373 6167 6573 2e20 5468 6973 n messages. This\n-000fd600: 2073 7472 7563 7475 7265 2068 6173 2074 structure has t\n-000fd610: 6865 2067 656e 6572 616c 2066 6f72 6d3a he general form:\n-000fd620: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

.
.
{..<\n-000fd800: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000fd810: 3e20 2020 203c 7370 616e 2063 6c61 7373 > c\n-000fd830: 6861 723c 2f73 7061 6e3e 202a 3c61 2063 har *fault\n-000fd8a0: 7374 7269 6e67 3c2f 613e 3b20 3c2f 6469 string; .
char *\n-000fd8f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 f\n-000fd950: 6175 6c74 6163 746f 723c 2f61 3e3b 203c aultactor; <\n-000fd960: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
struct \n-000fd9a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SO\n-000fd9e0: 4150 5f45 4e56 5f5f 4465 7461 696c 3c2f AP_ENV__Detail *detail; <\n-000fda60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..\n-000fdc70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
char *SOA\n-000fdd10: 505f 454e 565f 5f4e 6f64 653c 2f61 3e3b P_ENV__Node;\n-000fdd20: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
..<\n-000fdde0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-000fddf0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > struc\n-000fde10: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t SOAP_ENV_\n-000fde60: 5f44 6574 6169 6c3c 2f61 3e20 2a3c 6120 _Detail *SOAP\n-000fded0: 5f45 4e56 5f5f 4465 7461 696c 3c2f 613e _ENV__Detail\n-000fdee0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // SOAP \n-000fdf00: 312e 3220 6465 7461 696c 206d 656d 6265 1.2 detail membe\n-000fdf10: 7220 3c2f 7370 616e 3e3c 2f64 6976 3e0a r
.\n-000fdf20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
};
.struct SO\n-000fdfb0: 4150 5f45 4e56 5f5f 436f 6465 3c2f 613e AP_ENV__Code\n-000fdfc0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
{..\n-000fe0d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
stru\n-000fe100: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct SOAP_ENV__\n-000fe150: 436f 6465 3c2f 613e 202a 3c61 2063 6c61 Code *SOAP_ENV\n-000fe1c0: 5f5f 5375 6263 6f64 653c 2f61 3e3b 203c __Subcode; <\n-000fe1d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
}; .
struct\n-000fe220: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 SOAP_ENV__\n-000fe270: 4465 7461 696c 3c2f 613e 203c 2f64 6976 Detail .
{
. \n-000fe2b0: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n-000fe2d0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> __type; // The\n-000fe360: 2053 4f41 505f 5459 5045 5f20 6f66 2074 SOAP_TYPE_ of t\n-000fe370: 6865 206f 626a 6563 7420 7365 7269 616c he object serial\n-000fe380: 697a 6564 2061 7320 4661 756c 7420 6465 ized as Fault de\n-000fe390: 7461 696c 203c 2f73 7061 6e3e 3c2f 6469 tail .
void *\n-000fe3e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n-000fe440: 6661 756c 743c 2f61 3e3b 203c 7370 616e fault; // pointer to t\n-000fe470: 6865 2066 6175 6c74 206f 626a 6563 742c he fault object,\n-000fe480: 206f 7220 4e55 4c4c 203c 2f73 7061 6e3e or NULL \n-000fe490: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
\n-000fe500: 5f58 4d4c 3c2f 613e 203c 6120 636c 6173 _XML __any; // an\n-000fe590: 7920 6f74 6865 7220 6465 7461 696c 2065 y other detail e\n-000fe5a0: 6c65 6d65 6e74 2063 6f6e 7465 6e74 2028 lement content (\n-000fe5b0: 7374 6f72 6564 2069 6e20 584d 4c20 666f stored in XML fo\n-000fe5c0: 726d 6174 2920 3c2f 7370 616e 3e3c 2f64 rmat) .
};
.<\n-000fe5f0: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-000fe600: 6964 3d22 6173 7472 7563 745f 735f 6f5f id=\"astruct_s_o_\n-000fe610: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____\n-000fe620: 636f 6465 5f68 746d 6c22 3e3c 6469 7620 code_html\">
SOAP Fa\n-000fe6a0: 756c 7420 436f 6465 2073 7472 7563 7475 ult Code structu\n-000fe6b0: 7265 2e3c 2f64 6976 3e3c 6469 7620 636c re.
D\n-000fe6d0: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-000fe6e0: 7464 736f 6170 322e 683a 3934 3731 3c2f tdsoap2.h:9471
.\n-000fe880: 3c64 6976 2063 6c61 7373 3d22 7474 6465
Definition\n-000fe8a0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-000fe8b0: 3a39 3437 353c 2f64 6976 3e3c 2f64 6976 :9475
.
Optional elemen\n-000fea00: 7420 534f 4150 2d45 4e56 3a56 616c 7565 t SOAP-ENV:Value\n-000fea10: 206f 6620 5853 4420 7479 7065 2078 7364 of XSD type xsd\n-000fea20: 3a51 4e61 6d65 3c2f 6469 763e 3c64 6976 :QName
<\n-000fea40: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:947\n-000fea60: 333c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 3
.\n-000feac0: 3c61 2068 7265 663d 2273 7472 7563 745f SOAP_ENV__Detai\n-000feb00: 6c3c 2f61 3e3c 2f64 6976 3e3c 6469 7620 l
SO\n-000feb20: 4150 2046 6175 6c74 2044 6574 6169 6c20 AP Fault Detail \n-000feb30: 7374 7275 6374 7572 652e 3c2f 6469 763e structure.
\n-000feb40: 3c64 6976 2063 6c61 7373 3d22 7474 6465
Definition\n-000feb60: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-000feb70: 3a39 3438 323c 2f64 6976 3e3c 2f64 6976 :9482
.
vo\n-000fec80: 6964 202a 2066 6175 6c74 3c2f 6469 763e id * fault
\n-000fec90: 3c64 6976 2063 6c61 7373 3d22 7474 646f
Any data of s\n-000fecb0: 6f6d 6520 7479 7065 2054 2073 6572 6961 ome type T seria\n-000fecc0: 6c69 7a65 6420 6173 2066 6175 6c74 2065 lized as fault e\n-000fecd0: 6c65 6d65 6e74 2077 6865 6e20 6974 7320 lement when its \n-000fece0: 534f 4150 5f54 5950 455f 5420 6973 2061 SOAP_TYPE_T is a\n-000fecf0: 7373 6967 6e65 6420 746f 205f 5f74 7970 ssigned to __typ\n-000fed00: 653c 2f64 6976 3e3c 6469 7620 636c 6173 e
Def\n-000fed20: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n-000fed30: 736f 6170 322e 683a 3934 3836 3c2f 6469 soap2.h:9486
.
\n-000fee10: 534f 4150 5f45 4e56 5f5f 4465 7461 696c SOAP_ENV__Detail\n-000fee20: 3a3a 5f5f 616e 793c 2f61 3e3c 2f64 6976 ::__any
_XML __any<\n-000fee50: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
Any XML \n-000fee70: 636f 6e74 656e 742e 3c2f 6469 763e 3c64 content.
Definition:<\n-000feea0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a39 /b> stdsoap2.h:9\n-000feeb0: 3438 383c 2f64 6976 3e3c 2f64 6976 3e0a 488
.\n-000feec0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
\n-000fef20: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 \n-000fefe0: 416e 7920 6461 7461 206f 6620 736f 6d65 Any data of some\n-000feff0: 2074 7970 6520 5420 7365 7269 616c 697a type T serializ\n-000ff000: 6564 2061 7320 6661 756c 7420 656c 656d ed as fault elem\n-000ff010: 656e 7420 7768 656e 2069 7473 2053 4f41 ent when its SOA\n-000ff020: 505f 5459 5045 5f54 2069 7320 6173 7369 P_TYPE_T is assi\n-000ff030: 676e 6564 2074 6f20 5f5f 7479 7065 3c2f gned to __type
Defini\n-000ff060: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n-000ff070: 7032 2e68 3a39 3438 343c 2f64 6976 3e3c p2.h:9484
<\n-000ff080: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
SOAP_\n-000ff150: 454e 565f 5f46 6175 6c74 3a3a 534f 4150 ENV__Fault::SOAP\n-000ff160: 5f45 4e56 5f5f 4e6f 6465 3c2f 613e 3c2f _ENV__Node
char * S\n-000ff190: 4f41 505f 454e 565f 5f4e 6f64 653c 2f64 OAP_ENV__Node
Optional e\n-000ff1c0: 6c65 6d65 6e74 2053 4f41 502d 454e 563a lement SOAP-ENV:\n-000ff1d0: 4e6f 6465 206f 6620 5853 4420 7479 7065 Node of XSD type\n-000ff1e0: 2078 7364 3a73 7472 696e 673c 2f64 6976 xsd:string
Definitio\n-000ff210: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n-000ff220: 683a 3934 3630 3c2f 6469 763e 3c2f 6469 h:9460
.
SOAP_ENV\n-000ff300: 5f5f 4661 756c 743a 3a53 4f41 505f 454e __Fault::SOAP_EN\n-000ff310: 565f 5f44 6574 6169 6c3c 2f61 3e3c 2f64 V__Detail
struct SO\n-000ff340: 4150 5f45 4e56 5f5f 4465 7461 696c 202a AP_ENV__Detail *\n-000ff350: 2053 4f41 505f 454e 565f 5f44 6574 6169 SOAP_ENV__Detai\n-000ff360: 6c3c 2f64 6976 3e3c 6469 7620 636c 6173 l
Option\n-000ff380: 616c 2065 6c65 6d65 6e74 2053 4f41 502d al element SOAP-\n-000ff390: 454e 563a 4465 7461 696c 206f 6620 5853 ENV:Detail of XS\n-000ff3a0: 4420 7479 7065 2053 4f41 502d 454e 563a D type SOAP-ENV:\n-000ff3b0: 4465 7461 696c 3c2f 6469 763e 3c64 6976 Detail
<\n-000ff3d0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:946\n-000ff3f0: 343c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 4
.SOAP_ENV__Fau\n-000ff4d0: 6c74 3a3a 534f 4150 5f45 4e56 5f5f 526f lt::SOAP_ENV__Ro\n-000ff4e0: 6c65 3c2f 613e 3c2f 6469 763e 3c64 6976 le
\n-000ff500: 6368 6172 202a 2053 4f41 505f 454e 565f char * SOAP_ENV_\n-000ff510: 5f52 6f6c 653c 2f64 6976 3e3c 6469 7620 _Role
Op\n-000ff530: 7469 6f6e 616c 2065 6c65 6d65 6e74 2053 tional element S\n-000ff540: 4f41 502d 454e 563a 526f 6c65 206f 6620 OAP-ENV:Role of \n-000ff550: 5853 4420 7479 7065 2078 7364 3a73 7472 XSD type xsd:str\n-000ff560: 696e 673c 2f64 6976 3e3c 6469 7620 636c ing
D\n-000ff580: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-000ff590: 7464 736f 6170 322e 683a 3934 3632 3c2f tdsoap2.h:9462
.
\n-000ff670: 534f 4150 5f45 4e56 5f5f 4661 756c 743a SOAP_ENV__Fault:\n-000ff680: 3a53 4f41 505f 454e 565f 5f52 6561 736f :SOAP_ENV__Reaso\n-000ff690: 6e3c 2f61 3e3c 2f64 6976 3e3c 6469 7620 n
s\n-000ff6b0: 7472 7563 7420 534f 4150 5f45 4e56 5f5f truct SOAP_ENV__\n-000ff6c0: 5265 6173 6f6e 202a 2053 4f41 505f 454e Reason * SOAP_EN\n-000ff6d0: 565f 5f52 6561 736f 6e3c 2f64 6976 3e3c V__Reason
<\n-000ff6e0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-000ff6f0: 223e 4f70 7469 6f6e 616c 2065 6c65 6d65 \">Optional eleme\n-000ff700: 6e74 2053 4f41 502d 454e 563a 5265 6173 nt SOAP-ENV:Reas\n-000ff710: 6f6e 206f 6620 5853 4420 7479 7065 2053 on of XSD type S\n-000ff720: 4f41 502d 454e 563a 5265 6173 6f6e 3c2f OAP-ENV:Reason
Defini\n-000ff750: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n-000ff760: 7032 2e68 3a39 3435 383c 2f64 6976 3e3c p2.h:9458
<\n-000ff770: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
SOAP_\n-000ff840: 454e 565f 5f46 6175 6c74 3a3a 6661 756c ENV__Fault::faul\n-000ff850: 7473 7472 696e 673c 2f61 3e3c 2f64 6976 tstring
char * faul\n-000ff880: 7473 7472 696e 673c 2f64 6976 3e3c 6469 tstring
\n-000ff8a0: 4f70 7469 6f6e 616c 2065 6c65 6d65 6e74 Optional element\n-000ff8b0: 2066 6175 6c74 7374 7269 6e67 206f 6620 faultstring of \n-000ff8c0: 5853 4420 7479 7065 2078 7364 3a73 7472 XSD type xsd:str\n-000ff8d0: 696e 673c 2f64 6976 3e3c 6469 7620 636c ing
D\n-000ff8f0: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-000ff900: 7464 736f 6170 322e 683a 3934 3530 3c2f tdsoap2.h:9450
.
\n-000ff9e0: 534f 4150 5f45 4e56 5f5f 4661 756c 743a SOAP_ENV__Fault:\n-000ff9f0: 3a53 4f41 505f 454e 565f 5f43 6f64 653c :SOAP_ENV__Code<\n-000ffa00: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
str\n-000ffa20: 7563 7420 534f 4150 5f45 4e56 5f5f 436f uct SOAP_ENV__Co\n-000ffa30: 6465 202a 2053 4f41 505f 454e 565f 5f43 de * SOAP_ENV__C\n-000ffa40: 6f64 653c 2f64 6976 3e3c 6469 7620 636c ode
Opti\n-000ffa60: 6f6e 616c 2065 6c65 6d65 6e74 2053 4f41 onal element SOA\n-000ffa70: 502d 454e 563a 436f 6465 206f 6620 5853 P-ENV:Code of XS\n-000ffa80: 4420 7479 7065 2053 4f41 502d 454e 563a D type SOAP-ENV:\n-000ffa90: 436f 6465 3c2f 6469 763e 3c64 6976 2063 Code
\n-000ffab0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n-000ffac0: 7374 6473 6f61 7032 2e68 3a39 3435 363c stdsoap2.h:9456<\n-000ffad0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
.
<\n-000ffb50: 6120 6872 6566 3d22 7374 7275 6374 5f73 a href=\"struct_s\n-000ffb60: 5f6f 5f61 5f70 5f5f 5f65 5f6e 5f76 5f5f _o_a_p___e_n_v__\n-000ffb70: 5f5f 5f66 6175 6c74 2e68 746d 6c23 6164 ___fault.html#ad\n-000ffb80: 3830 3064 6264 3332 6233 3032 6363 3965 800dbd32b302cc9e\n-000ffb90: 3039 3665 3663 3331 3164 6632 3964 6522 096e6c311df29de\"\n-000ffba0: 3e53 4f41 505f 454e 565f 5f46 6175 6c74 >SOAP_ENV__Fault\n-000ffbb0: 3a3a 6661 756c 7463 6f64 653c 2f61 3e3c ::faultcode<\n-000ffbc0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
_QName \n-000ffbe0: 6661 756c 7463 6f64 653c 2f64 6976 3e3c faultcode
<\n-000ffbf0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-000ffc00: 223e 4f70 7469 6f6e 616c 2065 6c65 6d65 \">Optional eleme\n-000ffc10: 6e74 2066 6175 6c74 636f 6465 206f 6620 nt faultcode of \n-000ffc20: 5853 4420 7479 7065 2078 7364 3a51 4e61 XSD type xsd:QNa\n-000ffc30: 6d65 3c2f 6469 763e 3c64 6976 2063 6c61 me
De\n-000ffc50: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-000ffc60: 6473 6f61 7032 2e68 3a39 3434 383c 2f64 dsoap2.h:9448
.
S\n-000ffd40: 4f41 505f 454e 565f 5f46 6175 6c74 3a3a OAP_ENV__Fault::\n-000ffd50: 6661 756c 7461 6374 6f72 3c2f 613e 3c2f faultactor
char * f\n-000ffd80: 6175 6c74 6163 746f 723c 2f64 6976 3e3c aultactor
<\n-000ffd90: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-000ffda0: 223e 4f70 7469 6f6e 616c 2065 6c65 6d65 \">Optional eleme\n-000ffdb0: 6e74 2066 6175 6c74 6163 746f 7220 6f66 nt faultactor of\n-000ffdc0: 2058 5344 2074 7970 6520 7873 643a 7374 XSD type xsd:st\n-000ffdd0: 7269 6e67 3c2f 6469 763e 3c64 6976 2063 ring
\n-000ffdf0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n-000ffe00: 7374 6473 6f61 7032 2e68 3a39 3435 323c stdsoap2.h:9452<\n-000ffe10: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
.
<\n-000ffe90: 6120 6872 6566 3d22 7374 7275 6374 5f73 a href=\"struct_s\n-000ffea0: 5f6f 5f61 5f70 5f5f 5f65 5f6e 5f76 5f5f _o_a_p___e_n_v__\n-000ffeb0: 5f5f 5f66 6175 6c74 2e68 746d 6c23 6166 ___fault.html#af\n-000ffec0: 3439 6332 6131 3932 3665 6266 3463 3836 49c2a1926ebf4c86\n-000ffed0: 3564 6464 3434 3439 3630 6239 6164 6222 5ddd444960b9adb\"\n-000ffee0: 3e53 4f41 505f 454e 565f 5f46 6175 6c74 >SOAP_ENV__Fault\n-000ffef0: 3a3a 6465 7461 696c 3c2f 613e 3c2f 6469 ::detail
struct SOA\n-000fff20: 505f 454e 565f 5f44 6574 6169 6c20 2a20 P_ENV__Detail * \n-000fff30: 6465 7461 696c 3c2f 6469 763e 3c64 6976 detail
O\n-000fff50: 7074 696f 6e61 6c20 656c 656d 656e 7420 ptional element \n-000fff60: 6465 7461 696c 206f 6620 5853 4420 7479 detail of XSD ty\n-000fff70: 7065 2053 4f41 502d 454e 563a 4465 7461 pe SOAP-ENV:Deta\n-000fff80: 696c 3c2f 6469 763e 3c64 6976 2063 6c61 il
De\n-000fffa0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-000fffb0: 6473 6f61 7032 2e68 3a39 3435 343c 2f64 dsoap2.h:9454
.
\n-000fffd0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d In the example,\n-00100f60: 2074 6865 2053 4f41 5020 4661 756c 7420 the SOAP Fault \n-00100f70: 6465 7461 696c 7320 7765 7265 2065 6d70 details were emp\n-00100f80: 7479 2028 4e55 4c4c 292e 2059 6f75 206d ty (NULL). You m\n-00100f90: 6179 2070 6173 7320 616e 2058 4d4c 2066 ay pass an XML f\n-00100fa0: 7261 676d 656e 742c 2077 6869 6368 2077 ragment, which w\n-00100fb0: 696c 6c20 6265 206c 6974 6572 616c 6c79 ill be literally\n-00100fc0: 2069 6e63 6c75 6465 6420 696e 2074 6865 included in the\n-00100fd0: 2053 4f41 5020 4661 756c 7420 6d65 7373 SOAP Fault mess\n-00100fe0: 6167 652e 2046 6f72 2057 532d 4920 4261 age. For WS-I Ba\n-00100ff0: 7369 6320 5072 6f66 696c 6520 636f 6d70 sic Profile comp\n-00101000: 6c69 616e 6365 2c20 796f 7520 6d75 7374 liance, you must\n-00101010: 2070 6173 7320 616e 2058 4d4c 2073 7472 pass an XML str\n-00101020: 696e 6720 7769 7468 206f 6e65 206f 7220 ing with one or \n-00101030: 6d6f 7265 206e 616d 6573 7061 6365 2071 more namespace q\n-00101040: 7561 6c69 6669 6564 2065 6c65 6d65 6e74 ualified element\n-00101050: 732c 2073 7563 6820 6173 3a3c 2f70 3e0a s, such as:

.\n-00101060: 3c64 6976 2063 6c61 7373 3d22 6672 6167
return \n-001010b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_receiver\n-00101110: 5f66 6175 6c74 3c2f 613e 283c 6120 636c _fault(soap, "Re\n-00101170: 736f 7572 6365 2074 656d 706f 7261 7269 source temporari\n-00101180: 6c79 2075 6e61 7661 696c 6162 6c65 2671 ly unavailable&q\n-00101190: 756f 743b 3c2f 7370 616e 3e2c 203c 7370 uot;, "&\n-001011c0: 6c74 3b65 7272 6f72 636f 6465 2078 6d6c lt;errorcode xml\n-001011d0: 6e73 3d26 2333 393b 6874 7470 3a2f 2f74 ns='http://t\n-001011e0: 656d 7075 7269 2e6f 7267 2623 3339 3b26 empuri.org'&\n-001011f0: 6774 3b31 3233 266c 743b 2f65 7272 6f72 gt;123</error\n-00101200: 636f 6465 2667 743b 266c 743b 6572 726f code><erro\n-00101210: 7269 6e66 6f20 786d 6c6e 733d 2623 3339 rinfo xmlns='\n-00101220: 3b68 7474 703a 2f2f 7465 6d70 7572 692e ;http://tempuri.\n-00101230: 6f72 6726 2333 393b 2667 743b 6162 6326 org'>abc&\n-00101240: 6c74 3b2f 6572 726f 7269 6e66 6f26 6774 lt;/errorinfo>\n-00101250: 3b26 7175 6f74 3b3c 2f73 7061 6e3e 293b ;");\n-00101260: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.
When a service \n-00101290: 6f70 6572 6174 696f 6e20 6e65 6564 7320 operation needs \n-001012a0: 746f 2070 6f70 756c 6174 6520 534f 4150 to populate SOAP\n-001012b0: 2046 6175 6c74 2064 6574 6169 6c73 2077 Fault details w\n-001012c0: 6974 6820 6120 6170 706c 6963 6174 696f ith a applicatio\n-001012d0: 6e2d 7370 6563 6966 6963 2064 6174 612c n-specific data,\n-001012e0: 2069 7420 646f 6573 2073 6f20 6279 2061 it does so by a\n-001012f0: 7373 6967 6e69 6e67 2074 6865 203c 636f ssigning the soap:\n-001013c0: 3a66 6175 6c74 3c2f 613e 3c2f 636f 6465 :fault member of the \n-001013e0: 6375 7272 656e 7420 7265 6665 7265 6e63 current referenc\n-001013f0: 6520 746f 2074 6865 2063 6f6e 7465 7874 e to the context\n-00101400: 2077 6974 6820 6170 7072 6f70 7269 6174 with appropriat\n-00101410: 6520 6461 7461 2061 7373 6f63 6961 7465 e data associate\n-00101420: 6420 7769 7468 2074 6865 2065 7863 6570 d with the excep\n-00101430: 7469 6f6e 2061 6e64 2062 7920 7265 7475 tion and by retu\n-00101440: 726e 696e 6720 7468 6520 6572 726f 7220 rning the error \n-00101450: 3c63 6f64 653e 2353 4f41 505f 4641 554c #SOAP_FAUL\n-00101460: 543c 2f63 6f64 653e 2e20 466f 7220 6578 T. For ex\n-00101470: 616d 706c 653a 3c2f 703e 0a3c 6469 7620 ample:

.
soap_recei\n-00101500: 7665 725f 6661 756c 743c 2f61 3e28 3c61 ver_fault(soap, <\n-00101540: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-00101550: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-00101560: 3b45 7272 6f72 206d 6573 7361 6765 2671 ;Error message&q\n-00101570: 756f 743b 3c2f 7370 616e 3e2c 204e 554c uot;, NUL\n-00101580: 4c29 3b20 3c2f 6469 763e 0a3c 6469 7620 L);
.
if\n-001015c0: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap->v\n-00101640: 6572 7369 6f6e 3c2f 613e 203d 3d20 3229 ersion == 2)\n-00101650: 203c 7370 616e 2063 6c61 7373 3d22 636f // SOAP 1\n-00101670: 2e32 2069 7320 7573 6564 203c 2f73 7061 .2 is used
.
{.
so\n-001016e0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->fault-&g\n-00101740: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;SOAP_ENV__Detai\n-001017b0: 6c3c 2f61 3e20 3d20 736f 6170 5f6e 6577 l = soap_new\n-001017c0: 5f53 4f41 505f 454e 565f 5f44 6574 6169 _SOAP_ENV__Detai\n-001017d0: 6c28 3c61 2063 6c61 7373 3d22 636f 6465 l(soap, -1);
.\n-00101820: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->f\n-001018a0: 6175 6c74 3c2f 613e 2d26 6774 3b3c 6120 ault->SOAP\n-00101910: 5f45 4e56 5f5f 4465 7461 696c 3c2f 613e _ENV__Detail\n-00101920: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->__type \n-00101990: 3d20 534f 4150 5f54 5950 455f 6e73 315f = SOAP_TYPE_ns1_\n-001019a0: 5f6d 7953 7461 636b 4461 7461 5479 7065 _myStackDataType\n-001019b0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // stack\n-001019d0: 2074 7970 6520 3c2f 7370 616e 3e3c 2f64 type .
s\n-00101a20: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->fault-&\n-00101a80: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;SOAP_ENV__Deta\n-00101af0: 696c 3c2f 613e 2d26 6774 3b3c 6120 636c il->fault\n-00101b60: 3c2f 613e 203d 2073 703b 2020 2020 2020 = sp; \n+000e9aa0: 2020 2020 2020 2020 207e 7369 6d70 6c65 ~simple\n+000e9ab0: 5f76 6563 746f 7228 2920 2020 2020 207b _vector() {\n+000e9ac0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (head) delete[\n+000e9b10: 5d20 6865 6164 3b20 7d20 3c2f 6469 763e ] head; }
\n+000e9b20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
void \n+000e9b60: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000e9b70: 2020 2020 2020 2020 636c 6561 7228 2920 clear() \n+000e9b80: 2020 2020 2020 2020 2020 2020 2020 7b20 { \n+000e9b90: 7461 696c 203d 2068 6561 643b 207d 203c tail = head; } <\n+000e9ba0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
/*\n+000e9bd0: 2074 6865 206d 656d 6265 7220 6675 6e63 the member func\n+000e9be0: 7469 6f6e 7320 6265 6c6f 7720 6172 6520 tions below are \n+000e9bf0: 7265 7175 6972 6564 2066 6f72 2073 6572 required for ser\n+000e9c00: 6961 6c69 7a61 7469 6f6e 206f 6620 7465 ialization of te\n+000e9c10: 6d70 6c61 7465 7320 2a2f 3c2f 7370 616e mplates */
.
i\n+000e9c40: 7465 7261 746f 7220 2020 2020 2020 2020 terator \n+000e9c50: 2020 2020 2020 2020 2020 2020 2020 2062 b\n+000e9c60: 6567 696e 2829 2020 2020 2020 2020 2020 egin() \n+000e9c70: 2020 2020 207b 203c 7370 616e 2063 6c61 { return h\n+000e9ca0: 6561 643b 207d 203c 2f64 6976 3e0a 3c64 ead; }
.\n+000e9cc0: 2020 2020 636f 6e73 745f 6974 6572 6174 const_iterat\n+000e9cd0: 6f72 2020 2020 2020 2020 2020 2020 2020 or \n+000e9ce0: 2020 2020 6265 6769 6e28 293c 7370 616e begin() const {\n+000e9d10: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n+000e9d30: 6e3c 2f73 7061 6e3e 2068 6561 643b 207d n head; }\n+000e9d40: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
it\n+000e9d60: 6572 6174 6f72 2020 2020 2020 2020 2020 erator \n+000e9d70: 2020 2020 2020 2020 2020 2020 2020 656e en\n+000e9d80: 6428 2920 2020 2020 2020 2020 2020 2020 d() \n+000e9d90: 2020 2020 7b20 3c73 7061 6e20 636c 6173 { \n+000e9db0: 7265 7475 726e 3c2f 7370 616e 3e20 7461 return ta\n+000e9dc0: 696c 3b20 7d20 3c2f 6469 763e 0a3c 6469 il; }
. \n+000e9de0: 2020 2063 6f6e 7374 5f69 7465 7261 746f const_iterato\n+000e9df0: 7220 2020 2020 2020 2020 2020 2020 2020 r \n+000e9e00: 2020 2065 6e64 2829 3c73 7061 6e20 636c end() c\n+000e9e20: 6f6e 7374 203c 2f73 7061 6e3e 7b20 3c73 onst { return tail; } .
size_t \n+000e9eb0: 2020 2020 2020 2020 2020 2020 7369 7a65 size\n+000e9ec0: 2829 3c73 7061 6e20 636c 6173 733d 226b () const <\n+000e9ee0: 2f73 7061 6e3e 7b20 3c73 7061 6e20 636c /span>{ return \n+000e9f10: 7461 696c 202d 2068 6561 643b 207d 203c tail - head; } <\n+000e9f20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
iter\n+000e9f40: 6174 6f72 2020 2020 2020 2020 2020 2020 ator \n+000e9f50: 2020 2020 2020 2020 2020 2020 696e 7365 inse\n+000e9f60: 7274 2869 7465 7261 746f 7220 706f 732c rt(iterator pos,\n+000e9f70: 2063 6f6e 7374 5f72 6566 6572 656e 6365 const_reference\n+000e9f80: 2076 616c 2920 3c2f 6469 763e 0a3c 6469 val)
. \n+000e9fa0: 2020 207b 3c2f 6469 763e 0a3c 6469 7620 {
.
\n+000e9fc0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if<\n+000e9fe0: 2f73 7061 6e3e 2028 2168 6561 6429 203c /span> (!head) <\n+000e9ff0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
\n+000ea010: 6865 6164 203d 2074 6169 6c20 3d20 3c73 head = tail = new v\n+000ea040: 616c 7565 5f74 7970 655b 6361 7061 6369 alue_type[capaci\n+000ea050: 7479 203d 2031 5d3b 203c 2f64 6976 3e0a ty = 1];
.\n+000ea060: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
else if (tail >= he\n+000ea0d0: 6164 202b 2063 6170 6163 6974 7929 203c ad + capacity) <\n+000ea0e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{<\n+000ea100: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
\n+000ea120: 6974 6572 6174 6f72 2069 203d 2068 6561 iterator i = hea\n+000ea130: 643b 203c 2f64 6976 3e0a 3c64 6976 2063 d;
.
\n+000ea150: 2020 2020 6974 6572 6174 6f72 206a 203d iterator j =\n+000ea160: 203c 7370 616e 2063 6c61 7373 3d22 6b65 new value_type[cap\n+000ea190: 6163 6974 7920 2a3d 2032 5d3b 203c 2f64 acity *= 2]; .
it\n+000ea1c0: 6572 6174 6f72 206b 203d 206a 3b20 3c2f erator k = j; .
<\n+000ea1f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000ea200: 6f72 6466 6c6f 7722 3e77 6869 6c65 3c2f ordflow\">while (i < ta\n+000ea220: 696c 2920 3c2f 6469 763e 0a3c 6469 7620 il)
.
\n+000ea240: 2020 2020 2020 202a 6b2b 2b20 3d20 2a69 *k++ = *i\n+000ea250: 2b2b 3b20 3c2f 6469 763e 0a3c 6469 7620 ++;
.
\n+000ea270: 2020 2020 203c 7370 616e 2063 6c61 7373 i\n+000ea290: 663c 2f73 7061 6e3e 2028 706f 7329 203c f (pos) <\n+000ea2a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
\n+000ea2c0: 2020 706f 7320 3d20 6a20 2b20 2870 6f73 pos = j + (pos\n+000ea2d0: 202d 2068 6561 6429 3b20 3c2f 6469 763e - head);
\n+000ea2e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
tail \n+000ea300: 3d20 6a20 2b20 2874 6169 6c20 2d20 6865 = j + (tail - he\n+000ea310: 6164 293b 203c 2f64 6976 3e0a 3c64 6976 ad);
. \n+000ea330: 2020 2020 2020 3c73 7061 6e20 636c 6173 dele\n+000ea350: 7465 3c2f 7370 616e 3e5b 5d20 6865 6164 te[] head\n+000ea360: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
\n+000ea380: 2020 2068 6561 6420 3d20 6a3b 203c 2f64 head = j; .
} .
if\n+000ea3f0: 2028 706f 7320 2661 6d70 3b26 616d 703b (pos &&\n+000ea400: 2070 6f73 2026 6774 3b3d 2068 6561 6420 pos >= head \n+000ea410: 2661 6d70 3b26 616d 703b 2070 6f73 2026 && pos &\n+000ea420: 6c74 3b20 7461 696c 2920 3c2f 6469 763e lt; tail)
\n+000ea430: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{
\n+000ea450: 0a3c 6469 7620 636c 6173 733d 226c 696e .
itera\n+000ea470: 746f 7220 6920 3d20 7461 696c 3b20 3c2f tor i = tail; .
i\n+000ea4a0: 7465 7261 746f 7220 6a20 3d20 6920 2d20 terator j = i - \n+000ea4b0: 313b 203c 2f64 6976 3e0a 3c64 6976 2063 1;
.
\n+000ea4d0: 2020 2020 3c73 7061 6e20 636c 6173 733d wh\n+000ea4f0: 696c 653c 2f73 7061 6e3e 2028 6a20 213d ile (j !=\n+000ea500: 2070 6f73 2920 3c2f 6469 763e 0a3c 6469 pos)
. \n+000ea520: 2020 2020 2020 2020 2020 2a69 2d2d 203d *i-- =\n+000ea530: 202a 6a2d 2d3b 203c 2f64 6976 3e0a 3c64 *j--;
.\n+000ea550: 2020 2020 2020 2020 2a70 6f73 203d 2076 *pos = v\n+000ea560: 616c 3b20 3c2f 6469 763e 0a3c 6469 7620 al;
.
\n+000ea580: 2020 207d 203c 2f64 6976 3e0a 3c64 6976 }
. \n+000ea5a0: 2020 2020 3c73 7061 6e20 636c 6173 733d el\n+000ea5c0: 7365 3c2f 7370 616e 3e20 3c2f 6469 763e se
\n+000ea5d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{
\n+000ea5f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
pos =\n+000ea610: 2074 6169 6c3b 203c 2f64 6976 3e0a 3c64 tail;
.\n+000ea630: 2020 2020 2020 2020 2a74 6169 6c2b 2b20 *tail++ \n+000ea640: 3d20 7661 6c3b 203c 2f64 6976 3e0a 3c64 = val;
.\n+000ea660: 2020 2020 2020 7d20 3c2f 6469 763e 0a3c }
.<\n+000ea670: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000ea680: 3e20 2020 2020 203c 7370 616e 2063 6c61 > return p\n+000ea6b0: 6f73 3b20 3c2f 6469 763e 0a3c 6469 7620 os;
.
\n+000ea6d0: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
.
\n+000ea6f0: 7369 6d70 6c65 5f76 6563 746f 7226 616d simple_vector&am\n+000ea700: 703b 206f 7065 7261 746f 723d 283c 7370 p; operator=(const \n+000ea730: 7369 6d70 6c65 5f76 6563 746f 7226 616d simple_vector&am\n+000ea740: 703b 2076 2920 3c2f 6469 763e 0a3c 6469 p; v)
. \n+000ea760: 2020 207b 3c2f 6469 763e 0a3c 6469 7620 {
.
\n+000ea780: 2020 2068 6561 6420 3d20 7461 696c 203d head = tail =\n+000ea790: 204e 554c 4c3b 203c 2f64 6976 3e0a 3c64 NULL;
.\n+000ea7b0: 2020 2020 2020 6361 7061 6369 7479 203d capacity =\n+000ea7c0: 2076 2e63 6170 6163 6974 793b 203c 2f64 v.capacity; .
if \n+000ea810: 2876 2e68 6561 6429 203c 2f64 6976 3e0a (v.head)
.\n+000ea820: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{
.\n+000ea840: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
head =\n+000ea860: 2074 6169 6c20 3d20 3c73 7061 6e20 636c tail = ne\n+000ea880: 773c 2f73 7061 6e3e 2076 616c 7565 5f74 w value_t\n+000ea890: 7970 655b 6361 7061 6369 7479 5d3b 203c ype[capacity]; <\n+000ea8a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
\n+000ea8c0: 6974 6572 6174 6f72 2069 203d 2076 2e68 iterator i = v.h\n+000ea8d0: 6561 643b 203c 2f64 6976 3e0a 3c64 6976 ead;
. \n+000ea8f0: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n+000ea910: 7768 696c 653c 2f73 7061 6e3e 2028 6920 while (i \n+000ea920: 213d 2076 2e74 6169 6c29 203c 2f64 6976 != v.tail) .
*t\n+000ea950: 6169 6c2b 2b20 3d20 2a69 2b2b 3b20 3c2f ail++ = *i++; .
} <\n+000ea980: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
return *thi\n+000ea9e0: 733c 2f73 7061 6e3e 3b20 3c2f 6469 763e s;
\n+000ea9f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
}
.\n+000eaa10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
};
.

The conta\n+000eabe0: 696e 6572 2063 6c61 7373 2069 7473 656c iner class itsel\n+000eabf0: 6620 7368 6f75 6c64 206e 6f74 2062 6520 f should not be \n+000eac00: 6465 6669 6e65 6420 696e 2074 6865 2069 defined in the i\n+000eac10: 6e74 6572 6661 6365 2068 6561 6465 7220 nterface header \n+000eac20: 6669 6c65 2c20 6f6e 6c79 2074 6865 2074 file, only the t\n+000eac30: 656d 706c 6174 6520 6465 636c 6172 6174 emplate declarat\n+000eac40: 696f 6e20 7375 6666 6963 6573 2066 6f72 ion suffices for\n+000eac50: 2073 6f61 7063 7070 3220 746f 2067 656e soapcpp2 to gen\n+000eac60: 6572 6174 6520 7365 7269 616c 697a 6572 erate serializer\n+000eac70: 732e 2052 6563 616c 6c20 7468 6174 2074 s. Recall that t\n+000eac80: 6865 203c 636f 6465 3e23 696e 636c 7564 he #includ\n+000eac90: 653c 2f63 6f64 653e 2064 6972 6563 7469 e directi\n+000eaca0: 7665 7320 6172 6520 6e6f 7420 6578 6563 ves are not exec\n+000eacb0: 7574 6564 2062 7920 736f 6170 6370 7032 uted by soapcpp2\n+000eacc0: 2062 7574 2073 696d 706c 7920 7061 7373 but simply pass\n+000eacd0: 6564 206f 6e20 746f 2074 6865 2067 656e ed on to the gen\n+000eace0: 6572 6174 6564 2073 6f75 7263 6520 636f erated source co\n+000eacf0: 6465 2e20 5468 6973 2069 6e63 6c75 6465 de. This include\n+000ead00: 2073 7065 6369 6669 6573 2069 6e20 7468 specifies in th\n+000ead10: 6520 6765 6e65 7261 7465 6420 736f 7572 e generated sour\n+000ead20: 6365 2063 6f64 6520 7768 6572 6520 7468 ce code where th\n+000ead30: 6520 636f 6e74 6169 6e65 7220 6973 2061 e container is a\n+000ead40: 6374 7561 6c6c 7920 6465 6669 6e65 642e ctually defined.\n+000ead50: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

.

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

.

<\n+000ead90: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+000eada0: 2069 643d 2270 6f6c 796d 6f72 7068 6963 id=\"polymorphic\n+000eadb0: 6172 7261 7973 223e 3c2f 613e 0a50 6f6c arrays\">.Pol\n+000eadc0: 796d 6f72 7068 6963 2064 796e 616d 6963 ymorphic dynamic\n+000eadd0: 2061 7272 6179 7320 616e 6420 6c69 7374 arrays and list\n+000eade0: 733c 2f68 333e 0a3c 703e 506f 6c79 6d6f s

.

Polymo\n+000eadf0: 7270 6869 6320 6172 7261 7973 2c20 7468 rphic arrays, th\n+000eae00: 6174 2069 732c 2061 7272 6179 7320 6f66 at is, arrays of\n+000eae10: 2076 616c 7565 7320 6f66 2061 6e79 2074 values of any t\n+000eae20: 7970 652c 2063 616e 2062 6520 7365 7269 ype, can be seri\n+000eae30: 616c 697a 6564 2069 6e20 584d 4c20 7768 alized in XML wh\n+000eae40: 656e 2064 6563 6c61 7265 6420 6173 2061 en declared as a\n+000eae50: 6e20 6172 7261 7920 6f66 2070 6f69 6e74 n array of point\n+000eae60: 6572 7320 746f 2061 2062 6173 6520 636c ers to a base cl\n+000eae70: 6173 732e 2046 6f72 2065 7861 6d70 6c65 ass. For example\n+000eae80: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
class ns__Object .
{ pub\n+000eaf10: 6c69 633c 2f73 7061 6e3e 3a20 3c2f 6469 lic: .
... // members of\n+000eaf60: 206e 735f 5f4f 626a 6563 743c 2f73 7061 ns__Object
.
}; .
cla\n+000eafc0: 7373 203c 2f73 7061 6e3e 6e73 5f5f 4461 ss ns__Da\n+000eafd0: 7461 203a 203c 7370 616e 2063 6c61 7373 ta : publi\n+000eaff0: 633c 2f73 7061 6e3e 206e 735f 5f4f 626a c ns__Obj\n+000eb000: 6563 7420 3c2f 6469 763e 0a3c 6469 7620 ect
.
{ <\n+000eb020: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000eb030: 6f72 6422 3e70 7562 6c69 633c 2f73 7061 ord\">public:
.
\n+000eb060: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // me\n+000eb080: 6d62 6572 7320 6f66 206e 735f 5f44 6174 mbers of ns__Dat\n+000eb090: 613c 2f73 7061 6e3e 3c2f 6469 763e 0a3c a
.<\n+000eb0a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000eb0b0: 3e7d 3b20 3c2f 6469 763e 0a3c 6469 7620 >};
.
class \n+000eb0f0: 4172 7261 794f 664f 626a 6563 7420 3c2f ArrayOfObject .
{ p\n+000eb130: 7562 6c69 633c 2f73 7061 6e3e 3a20 3c2f ublic: .
ns__O\n+000eb160: 626a 6563 7420 2a2a 5f5f 7074 723b 203c bject **__ptr; <\n+000eb170: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000eb180: 656e 7422 3e2f 2f20 706f 696e 7465 7220 ent\">// pointer \n+000eb190: 746f 2061 7272 6179 206f 6620 706f 696e to array of poin\n+000eb1a0: 7465 7273 2074 6f20 6261 7365 206f 7220 ters to base or \n+000eb1b0: 6465 7269 7665 6420 6f62 6a65 6374 7320 derived objects \n+000eb1c0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n+000eb1e0: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n+000eb200: 743c 2f73 7061 6e3e 205f 5f73 697a 653b t __size;\n+000eb210: 2020 2020 2020 2020 203c 7370 616e 2063 /\n+000eb230: 2f20 7369 7a65 206f 6620 7468 6520 6172 / size of the ar\n+000eb240: 7261 793c 2f73 7061 6e3e 3c2f 6469 763e ray
\n+000eb250: 0a3c 6469 7620 636c 6173 733d 226c 696e .
};
.<\n+000eb280: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000eb290: 6f72 6422 3e63 6c61 7373 203c 2f73 7061 ord\">class ns__Objects .
{ p\n+000eb2e0: 7562 6c69 633c 2f73 7061 6e3e 3a20 3c2f ublic: .
std::\n+000eb310: 7665 6374 6f72 266c 743b 6e73 5f5f 4f62 vector<ns__Ob\n+000eb320: 6a65 6374 2667 743b 206f 626a 6563 7473 ject> objects\n+000eb330: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // vecto\n+000eb350: 7220 6f66 2062 6173 6520 6f72 2064 6572 r of base or der\n+000eb360: 6976 6564 206f 626a 6563 7473 203c 2f73 ived objects
.
};<\n+000eb390: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

\n+000eb3b0: 5468 6520 706f 696e 7465 7273 2069 6e20 The pointers in \n+000eb3c0: 7468 6520 6172 7261 7920 6361 6e20 706f the array can po\n+000eb3d0: 696e 7420 746f 2074 6865 203c 636f 6465 int to the ns__Object base instance\n+000eb400: 7320 6f72 203c 636f 6465 3e6e 735f 5f44 s or ns__D\n+000eb410: 6174 613c 2f63 6f64 653e 2064 6572 6976 ata deriv\n+000eb420: 6564 2069 6e73 7461 6e63 6573 2c20 7768 ed instances, wh\n+000eb430: 6963 6820 7769 6c6c 2062 6520 7365 7269 ich will be seri\n+000eb440: 616c 697a 6564 2061 6363 6f72 6469 6e67 alized according\n+000eb450: 6c79 2069 6e20 584d 4c2e 2044 6572 6976 ly in XML. Deriv\n+000eb460: 6564 2069 6e73 7461 6e63 6573 2061 7265 ed instances are\n+000eb470: 2069 6e64 6963 6174 6564 2062 7920 3c65 indicated by xsi:type\n+000eb490: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 7474 att\n+000eb4a0: 7269 6275 7465 2069 6e20 584d 4c20 7769 ribute in XML wi\n+000eb4b0: 7468 2074 6865 2071 7561 6c69 6669 6564 th the qualified\n+000eb4c0: 206e 616d 6520 6f66 2074 6865 2063 6c61 name of the cla\n+000eb4d0: 7373 2c20 746f 2064 6973 7469 6e67 7569 ss, to distingui\n+000eb4e0: 7368 2064 6572 6976 6564 2069 6e73 7461 sh derived insta\n+000eb4f0: 6e63 6573 2066 726f 6d20 7468 6520 6261 nces from the ba\n+000eb500: 7365 2069 6e73 7461 6e63 6573 2e20 5769 se instances. Wi\n+000eb510: 7468 6f75 7420 7468 6973 2061 7474 7269 thout this attri\n+000eb520: 6275 7465 2074 6865 2064 6573 6572 6961 bute the deseria\n+000eb530: 6c69 7a65 7220 7769 6c6c 206e 6f74 2069 lizer will not i\n+000eb540: 6e73 7461 6e74 6961 7465 2074 6865 2064 nstantiate the d\n+000eb550: 6572 6976 6564 2069 6e73 7461 6e63 6520 erived instance \n+000eb560: 6275 7420 6120 6261 7365 2069 6e73 7461 but a base insta\n+000eb570: 6e63 6520 7369 6e63 6520 7468 6572 6520 nce since there \n+000eb580: 6973 206e 6f20 6964 656e 7469 6679 696e is no identifyin\n+000eb590: 6720 696e 666f 726d 6174 696f 6e20 746f g information to\n+000eb5a0: 2064 6973 7469 6e67 7569 7368 2074 6865 distinguish the\n+000eb5b0: 2058 4d4c 2066 6f72 6d73 2065 7863 6570 XML forms excep\n+000eb5c0: 7420 666f 7220 7468 6520 3c65 6d3e 3c63 t for the xsi:type attribu\n+000eb5f0: 7465 2e3c 2f70 3e0a 3c70 3e53 696e 6365 te.

.

Since\n+000eb600: 2077 6520 6361 6e6e 6f74 2075 7365 2064 we cannot use d\n+000eb610: 796e 616d 6963 2062 696e 6469 6e67 2074 ynamic binding t\n+000eb620: 6f20 7375 7070 6f72 7420 706f 6c79 6d6f o support polymo\n+000eb630: 7270 6869 736d 2069 6e20 432c 2061 6e6f rphism in C, ano\n+000eb640: 7468 6572 206d 6563 6861 6e69 736d 2077 ther mechanism w\n+000eb650: 6520 6361 6e20 7573 6520 6973 2076 6f69 e can use is voi\n+000eb660: 6420 706f 696e 7465 7273 202e 2048 6572 d pointers . Her\n+000eb670: 6520 6973 2061 6e20 6578 616d 706c 6520 e is an example \n+000eb680: 6f66 2061 2070 6f6c 796d 6f72 7068 6963 of a polymorphic\n+000eb690: 2053 4f41 502d 656e 636f 6465 6420 6172 SOAP-encoded ar\n+000eb6a0: 7261 7920 3c63 6f64 653e 4172 7261 794f ray ArrayO\n+000eb6b0: 664f 626a 6563 743c 2f63 6f64 653e 2061 fObject a\n+000eb6c0: 6e64 2061 206e 6f6e 2d53 4f41 5020 6479 nd a non-SOAP dy\n+000eb6d0: 6e61 6d69 6320 6172 7261 7920 3c63 6f64 namic array ns__Objects that hold v\n+000eb700: 616c 7565 7320 6f66 2061 6e79 2073 6572 alues of any ser\n+000eb710: 6961 6c69 7a61 626c 6520 7479 7065 3a3c ializable type:<\n+000eb720: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

struct \n+000eb770: 5f5f 7772 6170 7065 7220 3c2f 6469 763e __wrapper
\n+000eb780: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{
.
\n+000eb7b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int __type; \n+000eb7e0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // identif\n+000eb800: 7920 7468 6520 7479 7065 2062 656c 6f77 y the type below\n+000eb810: 2062 7920 534f 4150 5f54 5950 455f 5420 by SOAP_TYPE_T \n+000eb820: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n+000eb840: 2020 2020 3c73 7061 6e20 636c 6173 733d vo\n+000eb860: 6964 3c2f 7370 616e 3e20 2a5f 5f69 7465 id *__ite\n+000eb870: 6d3b 203c 7370 616e 2063 6c61 7373 3d22 m; // poin\n+000eb890: 7465 7220 746f 2064 6174 6120 6f66 2074 ter to data of t\n+000eb8a0: 7970 6520 5420 3c2f 7370 616e 3e3c 2f64 ype T .
};
.\n+000eb8d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
struct <\n+000eb900: 2f73 7061 6e3e 4172 7261 794f 664f 626a /span>ArrayOfObj\n+000eb910: 6563 7420 3c2f 6469 763e 0a3c 6469 7620 ect
.
{.
struct _\n+000eb970: 5f77 7261 7070 6572 202a 5f5f 7074 723b _wrapper *__ptr;\n+000eb980: 203c 7370 616e 2063 6c61 7373 3d22 636f // pointe\n+000eb9a0: 7220 746f 2061 7272 6179 3c2f 7370 616e r to array
.
int __size; \n+000eba00: 2020 2020 2020 2020 3c73 7061 6e20 636c //\n+000eba20: 2073 697a 6520 6f66 2074 6865 2061 7272 size of the arr\n+000eba30: 6179 3c2f 7370 616e 3e3c 2f64 6976 3e0a ay
.\n+000eba40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
};
.struct ns__Objects .
{
.<\n+000ebac0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000ebad0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n+000ebaf0: 6e74 3c2f 7370 616e 3e20 5f5f 7369 7a65 nt __size\n+000ebb00: 3b20 2020 2020 2020 2020 2020 2020 2020 ; \n+000ebb10: 203c 7370 616e 2063 6c61 7373 3d22 636f // size o\n+000ebb30: 6620 7468 6520 6172 7261 793c 2f73 7061 f the array
.
<\n+000ebb60: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000ebb70: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct __wrapper *ob\n+000ebb90: 6a65 6374 733b 203c 7370 616e 2063 6c61 jects; // \n+000ebbb0: 706f 696e 7465 7220 746f 2061 7272 6179 pointer to array\n+000ebbc0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n+000ebbe0: 7d3b 3c2f 6469 763e 0a3c 2f64 6976 3e3c };
.
<\n+000ebbf0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+000ebc00: 3c70 3e54 6869 7320 6578 616d 706c 6520

This example \n+000ebc10: 7573 6573 2061 6e20 2269 6e76 6973 6962 uses an \"invisib\n+000ebc20: 6c65 2220 7479 7065 203c 636f 6465 3e5f le\" type _\n+000ebc30: 5f77 7261 7070 6572 3c2f 636f 6465 3e20 _wrapper \n+000ebc40: 616e 6420 6d65 6d62 6572 203c 636f 6465 and member __array,\n+000ebc60: 2077 6869 6368 2073 7461 7274 2077 6974 which start wit\n+000ebc70: 6820 6120 646f 7562 6c65 2075 6e64 6572 h a double under\n+000ebc80: 7363 6f72 652e 2054 6865 7365 206e 616d score. These nam\n+000ebc90: 6573 2061 7265 206e 6576 6572 2076 6973 es are never vis\n+000ebca0: 6962 6c65 2069 6e20 7365 7269 616c 697a ible in serializ\n+000ebcb0: 6564 2058 4d4c 2e20 5468 6520 3c63 6f64 ed XML. The __type \n+000ebcd0: 6d65 6d62 6572 206f 6620 3c63 6f64 653e member of \n+000ebce0: 5f5f 7772 6170 7065 723c 2f63 6f64 653e __wrapper\n+000ebcf0: 2069 7320 6120 3c63 6f64 653e 534f 4150 is a SOAP\n+000ebd00: 5f54 5950 455f 543c 2f63 6f64 653e 2076 _TYPE_T v\n+000ebd10: 616c 7565 2074 6861 7420 6964 656e 7469 alue that identi\n+000ebd20: 6669 6573 2074 6865 2074 7970 6520 3c63 fies the type T tha\n+000ebd40: 7420 3c63 6f64 653e 5f5f 6974 656d 3c2f t __item points to,\n+000ebd60: 2073 6565 2053 6563 7469 6f6e 203c 6120 see Section Void pointer s\n+000ebda0: 6572 6961 6c69 7a61 7469 6f6e 3c2f 613e erialization\n+000ebdb0: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

.

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

.

\n+000ebdf0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .How to ch\n+000ebe20: 616e 6765 2074 6865 2074 6167 206e 616d ange the tag nam\n+000ebe30: 6573 206f 6620 6172 7261 7920 6974 656d es of array item\n+000ebe40: 2065 6c65 6d65 6e74 733c 2f68 333e 0a3c elements

.<\n+000ebe50: 703e 5468 6520 6465 6661 756c 7420 584d p>The default XM\n+000ebe60: 4c20 656c 656d 656e 7420 7461 6720 6e61 L element tag na\n+000ebe70: 6d65 2066 6f72 2061 7272 6179 2065 6c65 me for array ele\n+000ebe80: 6d65 6e74 7320 6973 203c 656d 3e3c 636f ments is item
, which can b\n+000ebeb0: 6520 6368 616e 6765 642e 2054 6865 203c e changed. The <\n+000ebec0: 636f 6465 3e5f 5f70 7472 3c2f 636f 6465 code>__ptr member in a st\n+000ebee0: 7275 6374 206f 7220 636c 6173 7320 6f66 ruct or class of\n+000ebef0: 2061 2064 796e 616d 6963 2061 7272 6179 a dynamic array\n+000ebf00: 206d 6179 2068 6176 6520 616e 206f 7074 may have an opt\n+000ebf10: 696f 6e61 6c20 7375 6666 6978 2070 6172 ional suffix par\n+000ebf20: 7420 7468 6174 2073 7065 6369 6669 6573 t that specifies\n+000ebf30: 2074 6865 206e 616d 6520 6f66 2074 6865 the name of the\n+000ebf40: 2065 6c65 6d65 6e74 2074 6167 2069 6e20 element tag in \n+000ebf50: 584d 4c2e 2054 6861 7420 6973 2c20 7468 XML. That is, th\n+000ebf60: 6520 7375 6666 6978 2069 7320 7061 7274 e suffix is part\n+000ebf70: 206f 6620 7468 6520 3c63 6f64 653e 5f5f of the __\n+000ebf80: 7074 723c 2f63 6f64 653e 206d 656d 6265 ptr membe\n+000ebf90: 7220 6e61 6d65 3a3c 2f70 3e0a 3c64 6976 r name:

.
Type *__ptra\n+000ebfd0: 7272 6179 5f65 6c74 5f6e 616d 653c 2f64 rray_elt_name.

Co\n+000ec000: 6e73 6964 6572 2066 6f72 2065 7861 6d70 nsider for examp\n+000ec010: 6c65 3a3c 2f70 3e0a 3c64 6976 2063 6c61 le:

.
\n+000ec040: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct ArrayOfstrin\n+000ec070: 6720 3c2f 6469 763e 0a3c 6469 7620 636c g
.
{.
char* \n+000ec0d0: 2a5f 5f70 7472 7374 7269 6e67 3b3c 2f64 *__ptrstring;.
int _\n+000ec120: 5f73 697a 653b 3c2f 6469 763e 0a3c 6469 _size;
.}\n+000ec140: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.
<\n+000ec160: 703e 5468 6520 6172 7261 7920 6973 2073 p>The array is s\n+000ec170: 6572 6961 6c69 7a65 6420 6173 3a3c 2f70 erialized as:.
<\n+000ec1c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 SOAP-E\n+000ec1e0: 4e43 3a41 7272 6179 3c2f 7370 616e 3e20 NC:Array \n+000ec1f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 SOAP-ENC:a\n+000ec210: 7272 6179 5479 7065 3c2f 7370 616e 3e3d rrayType=\n+000ec220: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+000ec240: 743b 7873 643a 7374 7269 6e67 5b32 5d26 t;xsd:string[2]&\n+000ec250: 7175 6f74 3b3c 2f73 7061 6e3e 2667 743b quot;>\n+000ec260: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
<\n+000ec280: 3c73 7061 6e20 636c 6173 733d 226b 6579 string\n+000ec2a0: 3c2f 7370 616e 3e26 6774 3b3c 7370 616e >Hello<\n+000ec2d0: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/stri\n+000ec2f0: 6e67 3c2f 7370 616e 3e26 6774 3b20 3c2f ng> .
<string>Wo\n+000ec360: 726c 643c 2f73 7061 6e3e 266c 743b 2f3c rld</<\n+000ec370: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000ec380: 6f72 6474 7970 6522 3e73 7472 696e 673c ordtype\">string<\n+000ec390: 2f73 7061 6e3e 2667 743b 203c 2f64 6976 /span>> .
</SOAP-ENC:Arra\n+000ec3e0: 793c 2f73 7061 6e3e 2667 743b 3c2f 6469 y>.

SOAP 1.1/1.2\n+000ec420: 2064 6f65 7320 6e6f 7420 6d61 6e64 6174 does not mandat\n+000ec430: 6520 6120 7370 6563 6966 6963 2074 6167 e a specific tag\n+000ec440: 206e 616d 6520 666f 7220 534f 4150 2d65 name for SOAP-e\n+000ec450: 6e63 6f64 6564 2061 7272 6179 2065 6c65 ncoded array ele\n+000ec460: 6d65 6e74 7320 616e 6420 7468 6520 736f ments and the so\n+000ec470: 6170 6370 7032 2d67 656e 6572 6174 6564 apcpp2-generated\n+000ec480: 2073 6572 6961 6c69 7a65 7273 2077 696c serializers wil\n+000ec490: 6c20 6967 6e6f 7265 2074 6865 206e 616d l ignore the nam\n+000ec4a0: 6520 7573 6564 2074 6f20 6974 656d 697a e used to itemiz\n+000ec4b0: 6520 534f 4150 2d65 6e63 6f64 6564 2061 e SOAP-encoded a\n+000ec4c0: 7272 6179 2076 616c 7565 732e 3c2f 703e rray values.

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

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

.

<\n+000ec530: 2f61 3e0a 6261 7365 3634 4269 6e61 7279 /a>.base64Binary\n+000ec540: 2073 6572 6961 6c69 7a61 7469 6f6e 3c2f serialization.

The <\n+000ec560: 636f 6465 3e62 6173 6536 3442 696e 6172 code>base64Binar\n+000ec570: 793c 2f63 6f64 653e 3c2f 656d 3e20 5853 y XS\n+000ec580: 4420 7479 7065 2069 7320 696e 7472 6f64 D type is introd\n+000ec590: 7563 6564 2069 6e20 616e 2069 6e74 6572 uced in an inter\n+000ec5a0: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file\n+000ec5b0: 2066 6f72 2073 6f61 7063 7070 3220 7573 for soapcpp2 us\n+000ec5c0: 696e 6720 6120 7374 7275 6374 206f 7220 ing a struct or \n+000ec5d0: 636c 6173 7320 7468 6174 2063 6f6e 7461 class that conta\n+000ec5e0: 696e 7320 616e 2061 7272 6179 206f 6620 ins an array of \n+000ec5f0: 3c63 6f64 653e 756e 7369 676e 6564 2063 unsigned c\n+000ec600: 6861 723c 2f63 6f64 653e 2076 616c 7565 har value\n+000ec610: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

.
.
{
\n+000ec6d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
unsigned\n+000ec710: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+000ec730: 2f73 7061 6e3e 202a 3c61 2063 6c61 7373 /span> *__ptr; .
int __size;
.
};.

T\n+000ec880: 6865 2061 6476 616e 7461 6765 206f 6620 he advantage of \n+000ec890: 7468 6973 2073 7472 7563 7420 6f72 2063 this struct or c\n+000ec8a0: 6c61 7373 2069 7320 7468 6520 6162 696c lass is the abil\n+000ec8b0: 6974 7920 746f 2073 6572 6961 6c69 7a65 ity to serialize\n+000ec8c0: 7220 7261 7720 6269 6e61 7279 2064 6174 r raw binary dat\n+000ec8d0: 6120 6672 6f6d 206d 656d 6f72 792c 2073 a from memory, s\n+000ec8e0: 696e 6365 2074 6865 2073 6f61 7063 7070 ince the soapcpp\n+000ec8f0: 322d 6765 6e65 7261 7465 6420 7365 7269 2-generated seri\n+000ec900: 616c 697a 6572 2063 6f6e 7665 7274 7320 alizer converts \n+000ec910: 7468 6520 6269 6e61 7279 2064 6174 6120 the binary data \n+000ec920: 746f 2f66 726f 6d20 6261 7365 3634 2069 to/from base64 i\n+000ec930: 6e20 584d 4c2e 3c2f 703e 0a3c 703e 546f n XML.

.

To\n+000ec940: 2069 6e74 726f 6475 6365 2061 206e 6577 introduce a new\n+000ec950: 2058 4d4c 2073 6368 656d 6120 7479 7065 XML schema type\n+000ec960: 2064 6572 6976 6564 2066 726f 6d20 3c65 derived from base64Bi\n+000ec980: 6e61 7279 3c2f 636f 6465 3e3c 2f65 6d3e nary\n+000ec990: 2075 7365 2074 6865 2073 616d 6520 7374 use the same st\n+000ec9a0: 7275 6374 206f 7220 636c 6173 7320 7374 ruct or class st\n+000ec9b0: 7275 6374 7572 652c 2062 7574 2077 6974 ructure, but wit\n+000ec9c0: 6820 616e 6f74 6865 7220 6e61 6d65 2e20 h another name. \n+000ec9d0: 466f 7220 6578 616d 706c 653a 3c2f 703e For example:

\n+000ec9e0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
s\n+000eca20: 7472 7563 7420 3c2f 7370 616e 3e6e 735f truct ns_\n+000eca30: 5f62 696e 6172 793c 2f64 6976 3e0a 3c64 _binary
.\n+000eca50: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
.
unsigned\n+000eca90: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *_\n+000ecac0: 5f70 7472 3b20 3c2f 6469 763e 0a3c 6469 _ptr;
. \n+000ecae0: 2020 203c 7370 616e 2063 6c61 7373 3d22 int\n+000ecb00: 3c2f 7370 616e 3e20 5f5f 7369 7a65 3b20 __size; \n+000ecb10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
};.

The \n+000ecb50: 7265 7375 6c74 696e 6720 584d 4c20 7363 resulting XML sc\n+000ecb60: 6865 6d61 2074 7970 6520 6973 3a3c 2f70 hema type is:.

<\n+000ecbb0: 3c73 7061 6e20 636c 6173 733d 226b 6579 simple\n+000ecbd0: 5479 7065 3c2f 7370 616e 3e20 3c73 7061 Type name="\n+000ecc20: 6269 6e61 7279 2671 756f 743b 3c2f 7370 binary">
.\n+000ecc50: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n+000ecc70: 7265 7374 7269 6374 696f 6e3c 2f73 7061 restriction base="xsd:base6\n+000eccd0: 3442 696e 6172 7926 7175 6f74 3b3c 2f73 4Binary">
.<\n+000eccf0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000ecd00: 3e20 2026 6c74 3b2f 3c73 7061 6e20 636c > </restriction>
.<\n+000ecd40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000ecd50: 3e26 6c74 3b2f 3c73 7061 6e20 636c 6173 ></\n+000ecd70: 7369 6d70 6c65 5479 7065 3c2f 7370 616e simpleType>

.

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

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

.hexBin\n+000ece10: 6172 7920 7365 7269 616c 697a 6174 696f ary serializatio\n+000ece20: 6e3c 2f68 323e 0a3c 703e 5468 6520 3c65 n

.

The base64Bi\n+000ece40: 6e61 7279 3c2f 636f 6465 3e3c 2f65 6d3e nary\n+000ece50: 2058 5344 2074 7970 6520 6973 2069 6e74 XSD type is int\n+000ece60: 726f 6475 6365 6420 696e 2061 6e20 696e roduced in an in\n+000ece70: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f\n+000ece80: 696c 6520 666f 7220 736f 6170 6370 7032 ile for soapcpp2\n+000ece90: 2075 7369 6e67 2061 2073 7472 7563 7420 using a struct \n+000ecea0: 6f72 2063 6c61 7373 2074 6861 7420 636f or class that co\n+000eceb0: 6e74 6169 6e73 2061 6e20 6172 7261 7920 ntains an array \n+000ecec0: 6f66 203c 636f 6465 3e75 6e73 6967 6e65 of unsigne\n+000eced0: 6420 6368 6172 3c2f 636f 6465 3e20 7661 d char va\n+000ecee0: 6c75 6573 3a3c 2f70 3e0a 3c64 6976 2063 lues:

.
\n+000ecf00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
struct <\n+000ecf30: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>xsd__h\n+000ecf70: 6578 4269 6e61 7279 3c2f 613e 203c 2f64 exBinary .
{
.\n+000ecfb0: 2020 2020 3c73 7061 6e20 636c 6173 733d un\n+000ecfd0: 7369 676e 6564 3c2f 7370 616e 3e20 3c73 signed char *__ptr\n+000ed060: 3c2f 613e 3b20 3c2f 6469 763e 0a3c 6469 ;
. \n+000ed080: 2020 203c 7370 616e 2063 6c61 7373 3d22 int\n+000ed0a0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 __\n+000ed100: 7369 7a65 3c2f 613e 3b20 3c2f 6469 763e size;
\n+000ed110: 0a3c 6469 7620 636c 6173 733d 226c 696e .
};
.

The advant\n+000ed150: 6167 6520 6f66 2074 6869 7320 7374 7275 age of this stru\n+000ed160: 6374 206f 7220 636c 6173 7320 6973 2074 ct or class is t\n+000ed170: 6865 2061 6269 6c69 7479 2074 6f20 7365 he ability to se\n+000ed180: 7269 616c 697a 6572 2072 6177 2062 696e rializer raw bin\n+000ed190: 6172 7920 6461 7461 2066 726f 6d20 6d65 ary data from me\n+000ed1a0: 6d6f 7279 2c20 7369 6e63 6520 7468 6520 mory, since the \n+000ed1b0: 736f 6170 6370 7032 2d67 656e 6572 6174 soapcpp2-generat\n+000ed1c0: 6564 2073 6572 6961 6c69 7a65 7220 636f ed serializer co\n+000ed1d0: 6e76 6572 7473 2074 6865 2062 696e 6172 nverts the binar\n+000ed1e0: 7920 6461 7461 2074 6f2f 6672 6f6d 2068 y data to/from h\n+000ed1f0: 6578 6164 6563 696d 616c 2069 6e20 584d exadecimal in XM\n+000ed200: 4c2e 3c2f 703e 0a3c 703e 4966 2061 2062 L.

.

If a b\n+000ed210: 696e 6172 7920 7479 7065 2073 7563 6820 inary type such \n+000ed220: 6173 203c 636f 6465 3e3c 6120 636c 6173 as xsd__base\n+000ed2a0: 3634 4269 6e61 7279 3c2f 613e 3c2f 636f 64Binary is already d\n+000ed2c0: 6566 696e 6564 2c20 7468 656e 2077 6520 efined, then we \n+000ed2d0: 6361 6e20 7369 6d70 6c79 2075 7365 2061 can simply use a\n+000ed2e0: 203c 636f 6465 3e74 7970 6564 6566 3c2f typedef to introdu\n+000ed300: 6365 2074 6865 2068 6578 2076 6172 6961 ce the hex varia\n+000ed310: 6e74 3a3c 2f70 3e0a 3c64 6976 2063 6c61 nt:

.
\n+000ed340: 3c73 7061 6e20 636c 6173 733d 226b 6579 class xsd__b\n+000ed3a0: 6173 6536 3442 696e 6172 793c 2f61 3e3c ase64Binary<\n+000ed3b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{ \n+000ed3e0: 7075 626c 6963 3c2f 7370 616e 3e3a 203c public: <\n+000ed3f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
unsigned \n+000ed450: 6368 6172 3c2f 7370 616e 3e20 2a3c 6120 char *__ptr;\n+000ed4c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
..<\n+000ed570: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000ed580: 3e7d 3b20 3c2f 6469 763e 0a3c 6469 7620 >};
.
typedef xsd__ba\n+000ed600: 7365 3634 4269 6e61 7279 3c2f 613e 203c se64Binary <\n+000ed610: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+000ed620: 7265 663d 2273 7472 7563 7478 7364 5f5f ref=\"structxsd__\n+000ed630: 5f5f 6865 785f 6269 6e61 7279 2e68 746d __hex_binary.htm\n+000ed640: 6c22 3e78 7364 5f5f 6865 7842 696e 6172 l\">xsd__hexBinar\n+000ed650: 793c 2f61 3e3b 203c 7370 616e 2063 6c61 y; // \n+000ed670: 7365 7269 616c 697a 6573 2069 6e74 6f20 serializes into \n+000ed680: 6865 7820 636f 6e74 656e 743c 2f73 7061 hex content
.
<\n+000ed6a0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+000ed6b0: 3c70 3e54 6869 7320 6c65 7473 2073 6f61

This lets soa\n+000ed6c0: 7063 7070 3220 6765 6e65 7261 7465 203c pcpp2 generate <\n+000ed6d0: 656d 3e3c 636f 6465 3e78 7364 3a62 6173 em>xsd:bas\n+000ed6e0: 6536 3442 696e 6172 793c 2f63 6f64 653e e64Binary\n+000ed6f0: 3c2f 656d 3e20 616e 6420 3c65 6d3e 3c63 and xsd:hexBinar\n+000ed710: 793c 2f63 6f64 653e 3c2f 656d 3e20 7365 y se\n+000ed720: 7269 616c 697a 6572 732e 3c2f 703e 0a3c rializers.

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

.

.SOA\n+000ed790: 5020 5250 4320 656e 636f 6465 6420 7665 P RPC encoded ve\n+000ed7a0: 7273 7573 2064 6f63 756d 656e 742f 6c69 rsus document/li\n+000ed7b0: 7465 7261 6c20 7374 796c 653c 2f68 323e teral style

\n+000ed7c0: 0a3c 703e 534f 4150 2068 6173 2073 6576 .

SOAP has sev\n+000ed7d0: 6572 616c 2073 7479 6c65 733a 3c2f 703e eral styles:

\n+000ed7e0: 0a3c 756c 3e0a 3c6c 693e 534f 4150 2052 .

\n+000f26a0: 0a3c 703e 5369 6d69 6c61 7220 746f 2064 .

Similar to d\n+000f26b0: 6174 6120 6c65 6e67 7468 2063 6f6e 7374 ata length const\n+000f26c0: 7261 696e 7473 2066 6f72 2073 7472 696e raints for strin\n+000f26d0: 672d 6261 7365 6420 6461 7461 2c20 696e g-based data, in\n+000f26e0: 7465 6765 7220 616e 6420 666c 6f61 7469 teger and floati\n+000f26f0: 6e67 2070 6f69 6e74 2076 616c 7565 2072 ng point value r\n+000f2700: 616e 6765 2063 6f6e 7374 7261 696e 7473 ange constraints\n+000f2710: 206f 6e20 6e75 6d65 7269 6320 7369 6d70 on numeric simp\n+000f2720: 6c65 5479 7065 7320 616e 6420 636f 6d70 leTypes and comp\n+000f2730: 6c65 7854 7970 6573 2077 6974 6820 7369 lexTypes with si\n+000f2740: 6d70 6c65 436f 6e74 656e 7420 6172 6520 mpleContent are \n+000f2750: 6465 636c 6172 6564 2077 6974 6820 3c63 declared with low : high, where low an\n+000f2790: 6420 3c63 6f64 653e 6869 6768 3c2f 636f d high are optional\n+000f27b0: 2e3c 2f70 3e0a 3c70 3e41 7320 6f66 2067 .

.

As of g\n+000f27c0: 534f 4150 2032 2e38 2e32 362c 2066 6c6f SOAP 2.8.26, flo\n+000f27d0: 6174 696e 6720 706f 696e 7420 7661 6c75 ating point valu\n+000f27e0: 6520 7261 6e67 6573 2061 6e64 2069 6e74 e ranges and int\n+000f27f0: 6567 6572 2072 616e 6765 7320 6361 6e20 eger ranges can \n+000f2800: 6265 2065 7863 6c75 7369 7665 2062 7920 be exclusive by \n+000f2810: 6164 6469 6e67 203c 636f 6465 3e26 6c74 adding <\n+000f2820: 3b3c 2f63 6f64 653e 206f 6e20 6569 7468 ; on eith\n+000f2830: 6572 2073 6964 6520 6f66 2074 6865 203c er side of the <\n+000f2840: 636f 6465 3e3a 3c2f 636f 6465 3e20 7261 code>: ra\n+000f2850: 6e67 6520 6f70 6572 6174 6f72 3a3c 2f70 nge operator:..\n+000f2880: 3c74 7220 636c 6173 733d 226d 6172 6b64 .<\n+000f28a0: 7468 2063 6c61 7373 3d22 6d61 726b 646f th class=\"markdo\n+000f28b0: 776e 5461 626c 6548 6561 644e 6f6e 6522 wnTableHeadNone\"\n+000f28c0: 3e72 616e 6765 2020 203c 2f74 683e 3c74 >range \n+000f28f0: 7661 6c69 6461 7469 6f6e 2063 6865 636b validation check\n+000f2900: 2020 2020 3c2f 7468 3e3c 2f74 723e 0a3c .<\n+000f2910: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+000f2920: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+000f2930: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n+000f2a20: 3120 266c 743b 3d20 7820 2020 203c 2f74 1 <= x ...<\n+000f2ad0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+000f2ae0: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+000f2af0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .\n+000f2b50: 3120 266c 743b 3d20 7820 266c 743b 3d20 1 <= x <= \n+000f2b60: 3130 2020 2020 3c2f 7464 3e3c 2f74 723e 10 \n+000f2b70: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ......\n+000f2d00: 3c63 6f64 653e 3120 3a20 266c 743b 2031 1 : < 1\n+000f2d10: 303c 2f63 6f64 653e 2020 203c 2f74 643e 0 \n+000f2d20: 3c74 6420 636c 6173 733d 226d 6172 6b64 ....<\n+000f2e20: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+000f2e30: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+000f2e40: 3e3c 636f 6465 3e26 6c74 3b20 3130 3c2f >< 10 x\n+000f2e80: 2026 6c74 3b20 3130 2020 2020 3c2f 7464 < 10 ..\n+000f2f30: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..<\n+000f2f90: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+000f2fa0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+000f2fb0: 3e31 2026 6c74 3b20 7820 2020 203c 2f74 >1 < x ....

For exa\n+000f3080: 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 2063 mple:

.
\n+000f30a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
typedef<\n+000f30d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> int ns__\n+000f3100: 696e 7431 3020 303a 3130 3b20 3c73 7061 int10 0:10; // simpleType \n+000f3130: 7265 7374 7269 6374 696f 6e20 6f66 2069 restriction of i\n+000f3140: 6e74 2030 2e2e 3130 203c 2f73 7061 6e3e nt 0..10 \n+000f3150: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
t\n+000f3180: 7970 6564 6566 3c2f 7370 616e 3e20 3c61 ypedef \n+000f31e0: 4c4f 4e47 3634 3c2f 613e 206e 735f 5f6c LONG64 ns__l\n+000f31f0: 6f6e 6720 2d31 3030 3030 3030 3a31 3030 ong -1000000:100\n+000f3200: 3030 3030 3b20 3c73 7061 6e20 636c 6173 0000; // s\n+000f3220: 696d 706c 6554 7970 6520 7265 7374 7269 impleType restri\n+000f3230: 6374 696f 6e20 6f66 206c 6f6e 6736 3420 ction of long64 \n+000f3240: 2d31 3030 3030 3030 2e2e 3130 3030 3030 -1000000..100000\n+000f3250: 3020 3c2f 7370 616e 3e3c 2f64 6976 3e0a 0
.\n+000f3260: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
typedef<\n+000f3290: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> float ns\n+000f32c0: 5f5f 666c 6f61 7420 2d31 2e30 2026 6c74 __float -1.0 <\n+000f32d0: 3b3a 266c 743b 2031 302e 353b 203c 7370 ;:< 10.5; // simpleType\n+000f3300: 2072 6573 7472 6963 7469 6f6e 206f 6620 restriction of \n+000f3310: 666c 6f61 7420 696e 2028 2d31 2c31 302e float in (-1,10.\n+000f3320: 3529 203c 2f73 7061 6e3e 3c2f 6469 763e 5)
\n+000f3330: 0a3c 6469 7620 636c 6173 733d 226c 696e .
struct \n+000f3360: 3c2f 7370 616e 3e6e 735f 5f64 6174 6120 ns__data \n+000f3370: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // simpleC\n+000f3390: 6f6e 7465 6e74 2077 7261 7070 6572 203c ontent wrapper <\n+000f33a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.{\n+000f33c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
int __item 0:10; <\n+000f3410: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000f3420: 656e 7422 3e2f 2f20 7369 6d70 6c65 436f ent\">// simpleCo\n+000f3430: 6e74 656e 7420 7261 6e67 6520 302e 2e31 ntent range 0..1\n+000f3440: 3020 3c2f 7370 616e 3e3c 2f64 6976 3e0a 0
.\n+000f3450: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
@ \n+000f3480: 6368 6172 3c2f 7370 616e 3e20 2a6e 616d char *nam\n+000f3490: 6520 313b 2020 2020 3c73 7061 6e20 636c e 1; //\n+000f34b0: 2072 6571 7569 7265 6420 6e61 6d65 2061 required name a\n+000f34c0: 7474 7269 6275 7465 203c 2f73 7061 6e3e ttribute \n+000f34d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
};.

Set \n+000f3510: 7468 6520 3c63 6f64 653e 2353 4f41 505f the #SOAP_\n+000f3520: 584d 4c5f 5354 5249 4354 3c2f 636f 6465 XML_STRICT mode flag to e\n+000f3540: 6e61 626c 6520 7468 6520 7661 6c69 6461 nable the valida\n+000f3550: 7469 6f6e 206f 6620 7661 6c75 6520 7261 tion of value ra\n+000f3560: 6e67 6520 636f 6e73 7472 6169 6e74 732e nge constraints.\n+000f3570: 3c2f 703e 0a3c 703e 5365 6520 616c 736f

.

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

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

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

.

.Patter\n+000f3660: 6e20 7265 7374 7269 6374 696f 6e73 3c2f n restrictions.

Patterns \n+000f3680: 6361 6e20 6265 2064 6566 696e 6564 2066 can be defined f\n+000f3690: 6f72 2073 696d 706c 6554 7970 6520 636f or simpleType co\n+000f36a0: 6e74 656e 742e 2048 6f77 6576 6572 2c20 ntent. However, \n+000f36b0: 7061 7474 6572 6e20 7661 6c69 6461 7469 pattern validati\n+000f36c0: 6f6e 2069 7320 6e6f 7420 656e 666f 7263 on is not enforc\n+000f36d0: 6564 2075 6e6c 6573 7320 7468 6520 3c63 ed unless the soap::\n+000f3780: 6673 7661 6c69 6461 7465 3c2f 613e 3c2f fsvalidate and \n+000f37a0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap:\n+000f3840: 3a66 7776 616c 6964 6174 653c 2f61 3e3c :fwvalidate<\n+000f3850: 2f63 6f64 653e 2063 616c 6c62 6163 6b73 /code> callbacks\n+000f3860: 2061 7265 2073 6574 2074 6f20 6120 7265 are set to a re\n+000f3870: 6765 7820 6d61 7463 6865 722e 3c2f 703e gex matcher.

\n+000f3880: 0a3c 703e 546f 2061 7373 6f63 6961 7465 .

To associate\n+000f3890: 2061 2070 6174 7465 726e 2077 6974 6820 a pattern with \n+000f38a0: 6120 7369 6d70 6c65 5479 7065 2c20 796f a simpleType, yo\n+000f38b0: 7520 6361 6e20 6465 6669 6e65 2061 2073 u can define a s\n+000f38c0: 696d 706c 6554 7970 6520 7769 7468 2061 impleType with a\n+000f38d0: 203c 636f 6465 3e74 7970 6564 6566 3c2f typedef and a patt\n+000f38f0: 6572 6e20 7374 7269 6e67 3a3c 2f70 3e0a ern string:

.\n+000f3900: 3c64 6976 2063 6c61 7373 3d22 6672 6167
ty\n+000f3940: 7065 6465 663c 2f73 7061 6e3e 203c 7370 pedef int time__second <\n+000f3980: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000f3990: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000f39a0: 3b5b 312d 355d 3f5b 302d 395d 7c36 3026 ;[1-5]?[0-9]|60&\n+000f39b0: 7175 6f74 3b3c 2f73 7061 6e3e 3b3c 2f64 quot;;.

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

.
<simpleType name\n+000f3ab0: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="second\n+000f3ae0: 2671 756f 743b 3c2f 7370 616e 3e26 6774 ">\n+000f3af0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n+000f3b10: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;restr\n+000f3b30: 6963 7469 6f6e 3c2f 7370 616e 3e20 3c73 iction base=\n+000f3b60: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+000f3b80: 743b 7873 643a 696e 7426 7175 6f74 3b3c t;xsd:int"<\n+000f3b90: 2f73 7061 6e3e 2667 743b 203c 2f64 6976 /span>> .
<pattern value\n+000f3c00: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="[1-5]?\n+000f3c30: 5b30 2d39 5d7c 3630 2671 756f 743b 3c2f [0-9]|60"/> .
</restriction\n+000f3c90: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
</simpleType>
.\n+000f3cf0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

The patt\n+000f3d30: 6572 6e20 7374 7269 6e67 206d 7573 7420 ern string must \n+000f3d40: 636f 6e74 6169 6e20 6120 7661 6c69 6420 contain a valid \n+000f3d50: 7265 6775 6c61 7220 6578 7072 6573 7369 regular expressi\n+000f3d60: 6f6e 2e3c 2f70 3e0a 3c70 3e41 2073 7065 on.

.

A spe\n+000f3d70: 6369 616c 2063 6173 6520 666f 7220 4320 cial case for C \n+000f3d80: 666f 726d 6174 2073 7472 696e 6720 7061 format string pa\n+000f3d90: 7474 6572 6e73 2069 7320 696e 7472 6f64 tterns is introd\n+000f3da0: 7563 6564 2069 6e20 6753 4f41 5020 322e uced in gSOAP 2.\n+000f3db0: 382e 3138 2e20 5768 656e 203c 656d 3e3c 8.18. When <\n+000f3dc0: 636f 6465 3e78 7364 3a74 6f74 616c 4469 code>xsd:totalDi\n+000f3dd0: 6769 7473 3c2f 636f 6465 3e3c 2f65 6d3e gits\n+000f3de0: 2061 6e64 203c 656d 3e3c 636f 6465 3e78 and x\n+000f3df0: 7364 3a66 7261 6374 696f 6e44 6967 6974 sd:fractionDigit\n+000f3e00: 733c 2f63 6f64 653e 3c2f 656d 3e20 6172 s ar\n+000f3e10: 6520 6769 7665 6e20 696e 2061 2058 5344 e given in a XSD\n+000f3e20: 2066 696c 652c 2074 6865 6e20 6120 4320 file, then a C \n+000f3e30: 666f 726d 6174 2073 7472 696e 6720 6973 format string is\n+000f3e40: 2070 726f 6475 6365 6420 746f 206f 7574 produced to out\n+000f3e50: 7075 7420 666c 6f61 7469 6e67 2070 6f69 put floating poi\n+000f3e60: 6e74 2076 616c 7565 7320 7769 7468 2074 nt values with t\n+000f3e70: 6865 2070 726f 7065 7220 7072 6563 6973 he proper precis\n+000f3e80: 696f 6e20 616e 6420 7363 616c 652e 2046 ion and scale. F\n+000f3e90: 6f72 2065 7861 6d70 6c65 3a3c 2f70 3e0a or example:

.\n+000f3ea0: 3c64 6976 2063 6c61 7373 3d22 616c 7422
<simpleTy\n+000f3f00: 7065 3c2f 7370 616e 3e20 3c73 7061 6e20 pe \n+000f3f20: 6e61 6d65 3c2f 7370 616e 3e3d 3c73 7061 name="ra\n+000f3f50: 7469 6f26 7175 6f74 3b3c 2f73 7061 6e3e tio"\n+000f3f60: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
. \n+000f3f80: 266c 743b 3c73 7061 6e20 636c 6173 733d <re\n+000f3fa0: 7374 7269 6374 696f 6e3c 2f73 7061 6e3e striction\n+000f3fb0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 base=&\n+000f3ff0: 7175 6f74 3b78 7364 3a66 6c6f 6174 2671 quot;xsd:float&q\n+000f4000: 756f 743b 3c2f 7370 616e 3e26 6774 3b20 uot;> \n+000f4010: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<\n+000f4030: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;total\n+000f4050: 4469 6769 7473 3c2f 7370 616e 3e20 3c73 Digits value\n+000f4080: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n+000f40a0: 6f74 3b35 2671 756f 743b 3c2f 7370 616e ot;5"/>
.\n+000f40d0: 2020 2020 266c 743b 3c73 7061 6e20 636c <fractionDigits\n+000f4100: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c va\n+000f4120: 6c75 653c 2f73 7061 6e3e 3d3c 7370 616e lue="2&q\n+000f4150: 756f 743b 3c2f 7370 616e 3e2f 2667 743b uot;/>\n+000f4160: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
<\n+000f4180: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /restr\n+000f41a0: 6963 7469 6f6e 3c2f 7370 616e 3e26 6774 iction>\n+000f41b0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
</\n+000f41d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 simple\n+000f41f0: 5479 7065 3c2f 7370 616e 3e26 6774 3b3c Type><\n+000f4200: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

produces:\n+000f4230: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

.
typedef floa\n+000f42a0: 743c 2f73 7061 6e3e 2074 696d 655f 5f72 t time__r\n+000f42b0: 6174 696f 203c 7370 616e 2063 6c61 7373 atio "%5.2f&quo\n+000f42e0: 743b 3c2f 7370 616e 3e3b 3c2f 6469 763e t;;
\n+000f42f0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

The f\n+000f4310: 6f72 6d61 7420 7374 7269 6e67 2069 7320 ormat string is \n+000f4320: 7573 6564 2074 6f20 666f 726d 6174 2074 used to format t\n+000f4330: 6865 206f 7574 7075 7420 7468 6520 666c he output the fl\n+000f4340: 6f61 7469 6e67 2070 6f69 6e74 2076 616c oating point val\n+000f4350: 7565 2069 6e20 584d 4c2e 3c2f 703e 0a3c ue in XML.

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

.

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

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

.Eleme\n+000f4440: 6e74 2061 6e64 2061 7474 7269 6275 7465 nt and attribute\n+000f4450: 2071 7561 6c69 6669 6564 2f75 6e71 7561 qualified/unqua\n+000f4460: 6c69 6669 6564 2066 6f72 6d73 3c2f 6832 lified forms.

Struct, cla\n+000f4480: 7373 2c20 616e 6420 756e 696f 6e20 6d65 ss, and union me\n+000f4490: 6d62 6572 7320 7265 7072 6573 656e 7420 mbers represent \n+000f44a0: 656c 656d 656e 7473 2061 6e64 2061 7474 elements and att\n+000f44b0: 7269 6275 7465 7320 7468 6174 2061 7265 ributes that are\n+000f44c0: 2061 7574 6f6d 6174 6963 616c 6c79 2071 automatically q\n+000f44d0: 7561 6c69 6669 6564 206f 7220 756e 7175 ualified or unqu\n+000f44e0: 616c 6966 6965 6420 6465 7065 6e64 696e alified dependin\n+000f44f0: 6720 6f6e 2074 6865 2073 6368 656d 6120 g on the schema \n+000f4500: 656c 656d 656e 7420 616e 6420 6174 7472 element and attr\n+000f4510: 6962 7574 6520 6465 6661 756c 7420 666f ibute default fo\n+000f4520: 726d 7320 7370 6563 6966 6965 642e 2054 rms specified. T\n+000f4530: 6865 2065 6e67 696e 6520 616c 7761 7973 he engine always\n+000f4540: 2076 616c 6964 6174 6573 2074 6865 2070 validates the p\n+000f4550: 7265 6669 7865 7320 6f66 2065 6c65 6d65 refixes of eleme\n+000f4560: 6e74 7320 616e 6420 6174 7472 6962 7574 nts and attribut\n+000f4570: 6573 2e20 5768 656e 2061 206e 616d 6573 es. When a names\n+000f4580: 7061 6365 206d 6973 6d61 7463 6820 6f63 pace mismatch oc\n+000f4590: 6375 7273 2c20 7468 6520 656c 656d 656e curs, the elemen\n+000f45a0: 7420 6f72 2061 7474 7269 6275 7465 2069 t or attribute i\n+000f45b0: 7320 6e6f 7420 636f 6e73 756d 6564 2077 s not consumed w\n+000f45c0: 6869 6368 2063 616e 206c 6561 6420 746f hich can lead to\n+000f45d0: 2061 2076 616c 6964 6174 696f 6e20 6572 a validation er\n+000f45e0: 726f 7220 2875 6e6c 6573 7320 7468 6520 ror (unless the \n+000f45f0: 636f 6d70 6c65 7854 7970 6520 6973 2065 complexType is e\n+000f4600: 7874 656e 7369 626c 6520 6f72 2077 6865 xtensible or whe\n+000f4610: 6e20 3c63 6f64 653e 2353 4f41 505f 584d n #SOAP_XM\n+000f4620: 4c5f 5354 5249 4354 3c2f 636f 6465 3e20 L_STRICT \n+000f4630: 6973 2074 7572 6e65 6420 6f66 6629 2e3c is turned off).<\n+000f4640: 2f70 3e0a 3c70 3e43 6f6e 7369 6465 7220 /p>.

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

\n+000f4660: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
/\n+000f46a0: 2f67 736f 6170 206e 7320 7363 6865 6d61 /gsoap ns schema\n+000f46b0: 2065 6c65 6d65 6e74 466f 726d 3a20 7175 elementForm: qu\n+000f46c0: 616c 6966 6965 6420 3c2f 7370 616e 3e3c alified <\n+000f46d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
//\n+000f4700: 6773 6f61 7020 6e73 2073 6368 656d 6120 gsoap ns schema \n+000f4710: 6174 7472 6962 7574 6546 6f72 6d3a 2075 attributeForm: u\n+000f4720: 6e71 7561 6c69 6669 6564 203c 2f73 7061 nqualified
.
struct n\n+000f4770: 735f 5f72 6563 6f72 6420 3c2f 6469 763e s__record
\n+000f4780: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{
.
@\n+000f47b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+000f47d0: 2f73 7061 6e3e 202a 2074 7970 653b 203c /span> * type; <\n+000f47e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
char * name;
\n+000f4830: 0a3c 6469 7620 636c 6173 733d 226c 696e .
};
.

Here, the \n+000f4870: 3c63 6f64 653e 6e73 5f5f 7265 636f 7264 ns__record\n+000f4880: 3c2f 636f 6465 3e20 7374 7275 6374 2069 struct i\n+000f4890: 7320 7365 7269 616c 697a 6564 2077 6974 s serialized wit\n+000f48a0: 6820 7175 616c 6966 6965 6420 656c 656d h qualified elem\n+000f48b0: 656e 7420 3c63 6f64 653e 6e61 6d65 3c2f ent name and unqual\n+000f48d0: 6966 6965 6420 6174 7472 6962 7574 6520 ified attribute \n+000f48e0: 3c63 6f64 653e 7479 7065 3c2f 636f 6465 type:

.
<\n+000f4920: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f4930: 3e26 6c74 3b3c 7370 616e 2063 6c61 7373 ><n\n+000f4950: 733a 7265 636f 7264 3c2f 7370 616e 3e20 s:record \n+000f4960: 3c73 7061 6e20 636c 6173 733d 226b 6579 type=&q\n+000f49a0: 756f 743b 2e2e 2e26 7175 6f74 3b3c 2f73 uot;...">
.\n+000f49c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
<ns:name\n+000f4a00: 2667 743b 2e2e 2e26 6c74 3b2f 3c73 7061 >...</ns:name>
.\n+000f4a40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
</ns:record>
.

The\n+000f4ab0: 2022 636f 6c6f 6e20 6e6f 7461 7469 6f6e \"colon notation\n+000f4ac0: 2220 666f 7220 7374 7275 6374 2f63 6c61 \" for struct/cla\n+000f4ad0: 7373 2f75 6e69 6f6e 206d 656d 6265 7220 ss/union member \n+000f4ae0: 6e61 6d65 7320 6973 2075 7365 6420 746f names is used to\n+000f4af0: 206f 7665 7272 6964 6520 656c 656d 656e override elemen\n+000f4b00: 7420 616e 6420 6174 7472 6962 7574 6520 t and attribute \n+000f4b10: 7175 616c 6966 6965 6420 6f72 2075 6e71 qualified or unq\n+000f4b20: 7561 6c69 6669 6564 2066 6f72 6d73 2e20 ualified forms. \n+000f4b30: 546f 206f 7665 7272 6964 6520 7468 6520 To override the \n+000f4b40: 666f 726d 2066 6f72 2069 6e64 6976 6964 form for individ\n+000f4b50: 7561 6c20 6d65 6d62 6572 7320 7468 6174 ual members that\n+000f4b60: 2072 6570 7265 7365 6e74 2065 6c65 6d65 represent eleme\n+000f4b70: 6e74 7320 616e 6420 6174 7472 6962 7574 nts and attribut\n+000f4b80: 6573 2c20 7573 6520 6120 6e61 6d65 7370 es, use a namesp\n+000f4b90: 6163 6520 7072 6566 6978 2061 6e64 2063 ace prefix and c\n+000f4ba0: 6f6c 6f6e 2077 6974 6820 7468 6520 6d65 olon with the me\n+000f4bb0: 6d62 6572 206e 616d 653a 3c2f 703e 0a3c mber name:

.<\n+000f4bc0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+000f4bd0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
//g\n+000f4c00: 736f 6170 206e 7320 7363 6865 6d61 2065 soap ns schema e\n+000f4c10: 6c65 6d65 6e74 466f 726d 3a20 7175 616c lementForm: qual\n+000f4c20: 6966 6965 6420 3c2f 7370 616e 3e3c 2f64 ified .
//gs\n+000f4c60: 6f61 7020 6e73 2073 6368 656d 6120 6174 oap ns schema at\n+000f4c70: 7472 6962 7574 6546 6f72 6d3a 2075 6e71 tributeForm: unq\n+000f4c80: 7561 6c69 6669 6564 203c 2f73 7061 6e3e ualified \n+000f4c90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
s\n+000f4cc0: 7472 7563 7420 3c2f 7370 616e 3e6e 735f truct ns_\n+000f4cd0: 5f72 6563 6f72 6420 3c2f 6469 763e 0a3c _record
.<\n+000f4ce0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f4cf0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
.
@ <\n+000f4d10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f4d20: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char * ns:type; \n+000f4d40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
char * :name; .
};
.

where name \n+000f4de0: 6973 2075 6e71 7561 6c69 6669 6564 2061 is unqualified a\n+000f4df0: 6e64 203c 636f 6465 3e74 7970 653c 2f63 nd type is qualifie\n+000f4e10: 643a 3c2f 703e 0a3c 6469 7620 636c 6173 d:

.
<\n+000f4e40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f4e50: 3e26 6c74 3b3c 7370 616e 2063 6c61 7373 ><n\n+000f4e70: 733a 7265 636f 7264 3c2f 7370 616e 3e20 s:record \n+000f4e80: 3c73 7061 6e20 636c 6173 733d 226b 6579 ns:type="..."\n+000f4ed0: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
<name\n+000f4f20: 2667 743b 2e2e 2e26 6c74 3b2f 3c73 7061 >...</name>
.&\n+000f4f70: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/ns\n+000f4f90: 3a72 6563 6f72 643c 2f73 7061 6e3e 2667 :record&g\n+000f4fa0: 743b 3c2f 6469 763e 0a3c 2f64 6976 3e3c t;
.
<\n+000f4fb0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+000f4fc0: 203c 2f64 6976 3e3c 703e 5468 6520 636f

The co\n+000f4fd0: 6c6f 6e20 6e6f 7461 7469 6f6e 2069 7320 lon notation is \n+000f4fe0: 6120 7379 6e74 6163 7469 6320 6e6f 7461 a syntactic nota\n+000f4ff0: 7469 6f6e 2075 7365 6420 6f6e 6c79 2069 tion used only i\n+000f5000: 6e20 7468 6520 696e 7465 7266 6163 6520 n the interface \n+000f5010: 6865 6164 6572 2066 696c 6520 7379 6e74 header file synt\n+000f5020: 6178 2c20 6974 2069 7320 6e6f 7420 7472 ax, it is not tr\n+000f5030: 616e 736c 6174 6564 2074 6f20 7468 6520 anslated to the \n+000f5040: 432f 432b 2b20 6f75 7470 7574 2e3c 2f70 C/C++ output..

The colon n\n+000f5060: 6f74 6174 696f 6e20 646f 6573 206e 6f74 otation does not\n+000f5070: 2061 766f 6964 206e 616d 6520 636c 6173 avoid name clas\n+000f5080: 6865 7320 6265 7477 6565 6e20 6d65 6d62 hes between memb\n+000f5090: 6572 732e 2046 6f72 2065 7861 6d70 6c65 ers. For example\n+000f50a0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
struct x__record .
{
. \n+000f5130: 2040 203c 7370 616e 2063 6c61 7373 3d22 @ cha\n+000f5150: 723c 2f73 7061 6e3e 202a 206e 616d 653b r * name;\n+000f5160: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
char * x:name; .
};
.\n+000f51d0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

result\n+000f51f0: 7320 696e 2061 2072 6564 6566 696e 6974 s in a redefinit\n+000f5200: 696f 6e20 6572 726f 722c 2073 696e 6365 ion error, since\n+000f5210: 2062 6f74 6820 6d65 6d62 6572 7320 6861 both members ha\n+000f5220: 7665 2074 6865 2073 616d 6520 6e61 6d65 ve the same name\n+000f5230: 2e20 546f 2061 766f 6964 206e 616d 6520 . To avoid name \n+000f5240: 636c 6173 6865 732c 2075 7365 2061 2075 clashes, use a u\n+000f5250: 6e64 6572 7363 6f72 6520 7375 6666 6978 nderscore suffix\n+000f5260: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
struct x__record .
{
. \n+000f52f0: 2040 203c 7370 616e 2063 6c61 7373 3d22 @ cha\n+000f5310: 723c 2f73 7061 6e3e 202a 206e 616d 653b r * name;\n+000f5320: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
char * x:name_; <\n+000f5370: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
};
\n+000f5390: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

Not t\n+000f53b0: 6861 7420 7468 6520 6e61 6d65 7370 6163 hat the namespac\n+000f53c0: 6520 7072 6566 6978 2063 6f6e 7665 6e74 e prefix convent\n+000f53d0: 696f 6e20 6361 6e20 6265 2075 7365 6420 ion can be used \n+000f53e0: 696e 7374 6561 643a 3c2f 703e 0a3c 6469 instead:

.
struc\n+000f5430: 7420 3c2f 7370 616e 3e78 5f5f 7265 636f t x__reco\n+000f5440: 7264 203c 2f64 6976 3e0a 3c64 6976 2063 rd
.
{.
@ char \n+000f54a0: 2a20 6e61 6d65 3b20 3c2f 6469 763e 0a3c * name;
.<\n+000f54b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f54c0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > c\n+000f54e0: 6861 723c 2f73 7061 6e3e 202a 2078 5f5f har * x__\n+000f54f0: 6e61 6d65 3b20 3c2f 6469 763e 0a3c 6469 name;
.}\n+000f5510: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.
<\n+000f5530: 703e 7768 6963 6820 6176 6f69 6473 2074 p>which avoids t\n+000f5540: 6865 206e 616d 6520 636c 6173 682e 2048 he name clash. H\n+000f5550: 6f77 6576 6572 2c20 7468 6520 7265 7375 owever, the resu\n+000f5560: 6c74 696e 6720 7363 6865 6d61 2069 7320 lting schema is \n+000f5570: 6469 6666 6572 656e 7420 7369 6e63 6520 different since \n+000f5580: 7468 6520 6c61 7374 2065 7861 6d70 6c65 the last example\n+000f5590: 2067 656e 6572 6174 6573 2061 2067 6c6f generates a glo\n+000f55a0: 6261 6c20 3c63 6f64 653e 6e61 6d65 3c2f bal name element de\n+000f55c0: 6669 6e69 7469 6f6e 2074 6861 7420 6973 finition that is\n+000f55d0: 2072 6566 6572 656e 6365 6420 6279 2074 referenced by t\n+000f55e0: 6865 206c 6f63 616c 2065 6c65 6d65 6e74 he local element\n+000f55f0: 2e3c 2f70 3e0a 3c70 3e4d 6f72 6520 7370 .

.

More sp\n+000f5600: 6563 6966 6963 616c 6c79 2c20 7468 6520 ecifically, the \n+000f5610: 6469 6666 6572 656e 6365 2062 6574 7765 difference betwe\n+000f5620: 656e 2074 6865 206e 616d 6573 7061 6365 en the namespace\n+000f5630: 2070 7265 6669 7820 636f 6e76 656e 7469 prefix conventi\n+000f5640: 6f6e 2077 6974 6820 646f 7562 6c65 2075 on with double u\n+000f5650: 6e64 6572 7363 6f72 6573 2061 6e64 2063 nderscores and c\n+000f5660: 6f6c 6f6e 206e 6f74 6174 696f 6e20 6973 olon notation is\n+000f5670: 2074 6861 7420 7468 6520 6e61 6d65 7370 that the namesp\n+000f5680: 6163 6520 7072 6566 6978 2063 6f6e 7665 ace prefix conve\n+000f5690: 6e74 696f 6e20 6765 6e65 7261 7465 7320 ntion generates \n+000f56a0: 7363 6865 6d61 2065 6c65 6d65 6e74 2f61 schema element/a\n+000f56b0: 7474 7269 6275 7465 2072 6566 6572 656e ttribute referen\n+000f56c0: 6365 7320 746f 2065 6c65 6d65 6e74 732f ces to elements/\n+000f56d0: 6174 7472 6962 7574 6573 2061 7420 7468 attributes at th\n+000f56e0: 6520 746f 7020 6c65 7665 6c2c 2077 6869 e top level, whi\n+000f56f0: 6c65 2074 6865 2063 6f6c 6f6e 206e 6f74 le the colon not\n+000f5700: 6174 696f 6e20 6f6e 6c79 2061 6666 6563 ation only affec\n+000f5710: 7473 2074 6865 206c 6f63 616c 2065 6c65 ts the local ele\n+000f5720: 6d65 6e74 2f61 7474 7269 6275 7465 206e ment/attribute n\n+000f5730: 616d 6573 7061 6365 2071 7561 6c69 6669 amespace qualifi\n+000f5740: 6361 7469 6f6e 2062 7920 666f 726d 206f cation by form o\n+000f5750: 7665 7272 6964 696e 672e 2054 6869 7320 verriding. This \n+000f5760: 6973 2062 6573 7420 696c 6c75 7374 7261 is best illustra\n+000f5770: 7465 6420 6279 2061 6e20 6578 616d 706c ted by an exampl\n+000f5780: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

.
<\n+000f57b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f57c0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct x__record .
{
.\n+000f5810: 2020 2020 3c73 7061 6e20 636c 6173 733d ch\n+000f5830: 6172 3c2f 7370 616e 3e20 2a20 3a6e 616d ar * :nam\n+000f5840: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
.
\n+000f5860: 3c73 7061 6e20 636c 6173 733d 226b 6579 char * x:phone;\n+000f5890: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
char * x__fax; .
char\n+000f5920: 202a 2079 5f5f 7a69 703b 203c 2f64 6976 * y__zip; .
};
.

which gen\n+000f5970: 6572 6174 6573 2074 6865 2066 6f6c 6c6f erates the follo\n+000f5980: 7769 6e67 203c 656d 3e3c 636f 6465 3e78 wing x\n+000f5990: 2e78 7364 3c2f 636f 6465 3e3c 2f65 6d3e .xsd\n+000f59a0: 7363 6865 6d61 3a3c 2f70 3e0a 3c64 6976 schema:

.
<complexType<\n+000f5a10: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> nam\n+000f5a30: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="recor\n+000f5a60: 6426 7175 6f74 3b3c 2f73 7061 6e3e 2667 d"&g\n+000f5a70: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
&l\n+000f5a90: 743b 3c73 7061 6e20 636c 6173 733d 226b t;sequ\n+000f5ab0: 656e 6365 3c2f 7370 616e 3e26 6774 3b20 ence> \n+000f5ac0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<\n+000f5ae0: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;eleme\n+000f5b00: 6e74 3c2f 7370 616e 3e20 3c73 7061 6e20 nt \n+000f5b20: 6e61 6d65 3c2f 7370 616e 3e3d 3c73 7061 name="na\n+000f5b50: 6d65 2671 756f 743b 3c2f 7370 616e 3e20 me" \n+000f5b60: 3c73 7061 6e20 636c 6173 733d 226b 6579 type=&q\n+000f5ba0: 756f 743b 7873 643a 7374 7269 6e67 2671 uot;xsd:string&q\n+000f5bb0: 756f 743b 3c2f 7370 616e 3e20 3c73 7061 uot; minOccurs=&\n+000f5c00: 7175 6f74 3b30 2671 756f 743b 3c2f 7370 quot;0" maxOcc\n+000f5c30: 7572 733c 2f73 7061 6e3e 3d3c 7370 616e urs="1&q\n+000f5c60: 756f 743b 3c2f 7370 616e 3e20 3c73 7061 uot; nillable=&q\n+000f5cb0: 756f 743b 7472 7565 2671 756f 743b 3c2f uot;true" form\n+000f5ce0: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="unqual\n+000f5d10: 6966 6965 6426 7175 6f74 3b3c 2f73 7061 ified"/>
.<\n+000f5d30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f5d40: 3e20 2020 2026 6c74 3b3c 7370 616e 2063 > <element name=\n+000f5db0: 2671 756f 743b 7068 6f6e 6526 7175 6f74 "phone"\n+000f5dc0: 3b3c 2f73 7061 6e3e 203c 7370 616e 2063 ; t\n+000f5de0: 7970 653c 2f73 7061 6e3e 3d3c 7370 616e ype="xsd\n+000f5e10: 3a73 7472 696e 6726 7175 6f74 3b3c 2f73 :string" minOc\n+000f5e40: 6375 7273 3c2f 7370 616e 3e3d 3c73 7061 curs="0&\n+000f5e70: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; maxOccurs=\n+000f5ec0: 2671 756f 743b 3126 7175 6f74 3b3c 2f73 "1" nilla\n+000f5ef0: 626c 653c 2f73 7061 6e3e 3d3c 7370 616e ble="tru\n+000f5f20: 6526 7175 6f74 3b3c 2f73 7061 6e3e 203c e" <\n+000f5f30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f5f40: 6f72 6422 3e66 6f72 6d3c 2f73 7061 6e3e ord\">form\n+000f5f50: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n+000f5f70: 6f74 3b71 7561 6c69 6669 6564 2671 756f ot;qualified&quo\n+000f5f80: 743b 3c2f 7370 616e 3e2f 2667 743b 203c t;/> <\n+000f5f90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
<\n+000f5fb0: 3c73 7061 6e20 636c 6173 733d 226b 6579 elemen\n+000f5fd0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t r\n+000f5ff0: 6566 3c2f 7370 616e 3e3d 3c73 7061 6e20 ef="x:fa\n+000f6020: 7826 7175 6f74 3b3c 2f73 7061 6e3e 203c x" <\n+000f6030: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000f6040: 6f72 6422 3e6d 696e 4f63 6375 7273 3c2f ord\">minOccurs="0"<\n+000f6080: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> max\n+000f60a0: 4f63 6375 7273 3c2f 7370 616e 3e3d 3c73 Occurs="\n+000f60d0: 3126 7175 6f74 3b3c 2f73 7061 6e3e 2f26 1"/&\n+000f60e0: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
\n+000f6100: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <e\n+000f6120: 6c65 6d65 6e74 3c2f 7370 616e 3e20 3c73 lement ref=<\n+000f6150: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000f6160: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000f6170: 3b79 3a7a 6970 2671 756f 743b 3c2f 7370 ;y:zip" minOcc\n+000f61a0: 7572 733c 2f73 7061 6e3e 3d3c 7370 616e urs="0&q\n+000f61d0: 756f 743b 3c2f 7370 616e 3e20 3c73 7061 uot; maxOccurs=&\n+000f6220: 7175 6f74 3b31 2671 756f 743b 3c2f 7370 quot;1"/>
.\n+000f6240: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
</sequence>
.\n+000f62a0: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </c\n+000f62c0: 6f6d 706c 6578 5479 7065 3c2f 7370 616e omplexType>
.&\n+000f62f0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;ele\n+000f6310: 6d65 6e74 3c2f 7370 616e 3e20 3c73 7061 ment name="\n+000f6360: 6661 7826 7175 6f74 3b3c 2f73 7061 6e3e fax"\n+000f6370: 203c 7370 616e 2063 6c61 7373 3d22 6b65 type=&\n+000f63b0: 7175 6f74 3b78 7364 3a73 7472 696e 6726 quot;xsd:string&\n+000f63c0: 7175 6f74 3b3c 2f73 7061 6e3e 2f26 6774 quot;/>\n+000f63d0: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.
\n+000f63f0: 3c2f 6469 763e 3c70 3e61 6e64 2074 6865

and the\n+000f6400: 203c 656d 3e3c 636f 6465 3e79 2e78 7364 y.xsd\n+000f6410: 3c2f 636f 6465 3e3c 2f65 6d3e 2073 6368 sch\n+000f6420: 656d 6120 6465 6669 6e65 7320 636f 6e74 ema defines cont\n+000f6430: 6169 6e73 3a3c 2f70 3e0a 3c64 6976 2063 ains:

.
<element\n+000f64a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 name=&\n+000f64e0: 7175 6f74 3b7a 6970 2671 756f 743b 3c2f quot;zip" type\n+000f6510: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="xsd:st\n+000f6540: 7269 6e67 2671 756f 743b 3c2f 7370 616e ring"/>
.

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

.

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

.\n+000f6650: 3c2f 613e 0a58 4d4c 206e 616d 6573 7061 .XML namespa\n+000f6660: 6365 7320 616e 6420 7468 6520 6e61 6d65 ces and the name\n+000f6670: 7370 6163 6520 6d61 7070 696e 6720 7461 space mapping ta\n+000f6680: 626c 653c 2f68 313e 0a3c 703e 4120 6e61 ble

.

A na\n+000f6690: 6d65 7370 6163 6520 6d61 7070 696e 6720 mespace mapping \n+000f66a0: 7461 626c 6520 7368 6f75 6c64 2062 6520 table should be \n+000f66b0: 696e 636c 7564 6564 2069 6e20 7468 6520 included in the \n+000f66c0: 736f 7572 6365 2063 6f64 6520 6f66 2063 source code of c\n+000f66d0: 6c69 656e 7420 616e 6420 7365 7276 6963 lient and servic\n+000f66e0: 6520 6170 706c 6963 6174 696f 6e73 2e20 e applications. \n+000f66f0: 5468 6520 6d61 7070 696e 6720 7461 626c The mapping tabl\n+000f6700: 6520 6973 2075 7365 6420 6279 2074 6865 e is used by the\n+000f6710: 2073 6572 6961 6c69 7a65 7273 2061 6e64 serializers and\n+000f6720: 2064 6573 6572 6961 6c69 7a65 7273 206f deserializers o\n+000f6730: 6620 7468 6520 7374 7562 2061 6e64 2073 f the stub and s\n+000f6740: 6b65 6c65 746f 6e20 6675 6e63 7469 6f6e keleton function\n+000f6750: 7320 746f 2070 726f 6475 6365 2076 616c s to produce val\n+000f6760: 6964 2058 4d4c 206d 6573 7361 6765 7320 id XML messages \n+000f6770: 616e 6420 746f 2070 6172 7365 2061 6e64 and to parse and\n+000f6780: 2076 616c 6964 6174 6520 584d 4c20 6d65 validate XML me\n+000f6790: 7373 6167 6573 2e20 4120 7479 7069 6361 ssages. A typica\n+000f67a0: 6c20 6d61 7070 696e 6720 7461 626c 6520 l mapping table \n+000f67b0: 6973 2073 686f 776e 2062 656c 6f77 3a3c is shown below:<\n+000f67c0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

struct \n+000f6810: 3c61 2063 6c61 7373 3d22 636f 6465 2220 Nam\n+000f6840: 6573 7061 6365 3c2f 613e 203c 6120 636c espace namespaces\n+000f68b0: 5b5d 203d 203c 2f64 6976 3e0a 3c64 6976 [] =
.{<\n+000f68d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
\n+000f6900: 2f2f 207b 2026 7175 6f74 3b70 7265 6669 // { "prefi\n+000f6910: 7826 7175 6f74 3b2c 2026 7175 6f74 3b55 x", "U\n+000f6920: 5249 2671 756f 743b 2c20 2671 756f 743b RI", "\n+000f6930: 5552 492d 7061 7474 6572 6e26 7175 6f74 URI-pattern"\n+000f6940: 3b20 286f 7074 696f 6e61 6c29 207d 203c ; (optional) } <\n+000f6950: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
. \n+000f6970: 207b 203c 7370 616e 2063 6c61 7373 3d22 { &\n+000f6990: 7175 6f74 3b53 4f41 502d 454e 5626 7175 quot;SOAP-ENV&qu\n+000f69a0: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "ht\n+000f69d0: 7470 3a2f 2f73 6368 656d 6173 2e78 6d6c tp://schemas.xml\n+000f69e0: 736f 6170 2e6f 7267 2f73 6f61 702f 656e soap.org/soap/en\n+000f69f0: 7665 6c6f 7065 2f26 7175 6f74 3b3c 2f73 velope/" }, //\n+000f6a20: 206d 7573 7420 6265 2066 6972 7374 203c must be first <\n+000f6a30: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
. \n+000f6a50: 207b 203c 7370 616e 2063 6c61 7373 3d22 { &\n+000f6a70: 7175 6f74 3b53 4f41 502d 454e 4326 7175 quot;SOAP-ENC&qu\n+000f6a80: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "ht\n+000f6ab0: 7470 3a2f 2f73 6368 656d 6173 2e78 6d6c tp://schemas.xml\n+000f6ac0: 736f 6170 2e6f 7267 2f73 6f61 702f 656e soap.org/soap/en\n+000f6ad0: 636f 6469 6e67 2f26 7175 6f74 3b3c 2f73 coding/" }, //\n+000f6b00: 206d 7573 7420 6265 2073 6563 6f6e 6420 must be second \n+000f6b10: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64 .\n+000f6b30: 2020 7b20 3c73 7061 6e20 636c 6173 733d { \n+000f6b50: 2671 756f 743b 7873 6926 7175 6f74 3b3c "xsi"<\n+000f6b60: 2f73 7061 6e3e 2c20 2020 2020 203c 7370 /span>, "h\n+000f6b90: 7474 703a 2f2f 7777 772e 7733 2e6f 7267 ttp://www.w3.org\n+000f6ba0: 2f32 3030 312f 584d 4c53 6368 656d 612d /2001/XMLSchema-\n+000f6bb0: 696e 7374 616e 6365 2671 756f 743b 3c2f instance" }, /\n+000f6be0: 2f20 6d75 7374 2062 6520 7468 6972 6420 / must be third \n+000f6bf0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64 .\n+000f6c10: 2020 7b20 3c73 7061 6e20 636c 6173 733d { \n+000f6c30: 2671 756f 743b 7873 6426 7175 6f74 3b3c "xsd"<\n+000f6c40: 2f73 7061 6e3e 2c20 2020 2020 203c 7370 /span>, "h\n+000f6c70: 7474 703a 2f2f 7777 772e 7733 2e6f 7267 ttp://www.w3.org\n+000f6c80: 2f32 3030 312f 584d 4c53 6368 656d 6126 /2001/XMLSchema&\n+000f6c90: 7175 6f74 3b3c 2f73 7061 6e3e 207d 2c20 quot; }, \n+000f6ca0: 2020 2020 2020 2020 203c 7370 616e 2063 /\n+000f6cc0: 2f20 6d75 7374 2062 6520 666f 7572 7468 / must be fourth\n+000f6cd0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64 .\n+000f6cf0: 2020 7b20 3c73 7061 6e20 636c 6173 733d { \n+000f6d10: 2671 756f 743b 6e73 2671 756f 743b 3c2f "ns", "u\n+000f6d50: 726e 3a6d 792d 7365 7276 6963 652d 5552 rn:my-service-UR\n+000f6d60: 4926 7175 6f74 3b3c 2f73 7061 6e3e 207d I" }\n+000f6d70: 2c20 3c73 7061 6e20 636c 6173 733d 2263 , // binds\n+000f6d90: 2026 7175 6f74 3b6e 7326 7175 6f74 3b20 "ns" \n+000f6da0: 6e61 6d65 7370 6163 6520 7072 6566 6978 namespace prefix\n+000f6db0: 2074 6f20 7363 6865 6d61 2055 5249 3c2f to schema URI. \n+000f6de0: 7b20 4e55 4c4c 2c20 4e55 4c4c 207d 203c { NULL, NULL } <\n+000f6df0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000f6e00: 656e 7422 3e2f 2f20 656e 6420 6f66 2074 ent\">// end of t\n+000f6e10: 6162 6c65 203c 2f73 7061 6e3e 3c2f 6469 able .
};
.<\n+000f6e40: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

Each na\n+000f6e60: 6d65 7370 6163 6520 7072 6566 6978 2075 mespace prefix u\n+000f6e70: 7365 6420 6279 2061 2069 6465 6e74 6966 sed by a identif\n+000f6e80: 6965 7220 6e61 6d65 2069 6e20 7468 6520 ier name in the \n+000f6e90: 6865 6164 6572 2066 696c 6520 7370 6563 header file spec\n+000f6ea0: 6966 6963 6174 696f 6e2c 2073 6565 2053 ification, see S\n+000f6eb0: 6563 7469 6f6e 203c 6120 636c 6173 733d ection C\n+000f6ee0: 2f43 2b2b 2069 6465 6e74 6966 6965 7220 /C++ identifier \n+000f6ef0: 6e61 6d65 2074 6f20 584d 4c20 7461 6720 name to XML tag \n+000f6f00: 6e61 6d65 2074 7261 6e73 6c61 7469 6f6e name translation\n+000f6f10: 3c2f 613e 2c20 6d75 7374 2068 6176 6520 , must have \n+000f6f20: 6120 6269 6e64 696e 6720 746f 2061 206e a binding to a n\n+000f6f30: 616d 6573 7061 6365 2055 5249 2069 6e20 amespace URI in \n+000f6f40: 7468 6520 6d61 7070 696e 6720 7461 626c the mapping tabl\n+000f6f50: 652e 2054 6865 2065 6e64 206f 6620 7468 e. The end of th\n+000f6f60: 6520 6e61 6d65 7370 6163 6520 6d61 7070 e namespace mapp\n+000f6f70: 696e 6720 7461 626c 6520 6d75 7374 2062 ing table must b\n+000f6f80: 6520 696e 6469 6361 7465 6420 6279 2074 e indicated by t\n+000f6f90: 6865 204e 554c 4c20 7061 6972 2e20 5468 he NULL pair. Th\n+000f6fa0: 6520 6e61 6d65 7370 6163 6520 5552 4920 e namespace URI \n+000f6fb0: 6d61 7463 6869 6e67 2069 7320 6361 7365 matching is case\n+000f6fc0: 2069 6e73 656e 7369 7469 7665 2e20 4120 insensitive. A \n+000f6fd0: 6e61 6d65 7370 6163 6520 7072 6566 6978 namespace prefix\n+000f6fe0: 2069 7320 6469 7374 696e 6775 6973 6865 is distinguishe\n+000f6ff0: 6420 6279 2074 6865 206f 6363 7572 7265 d by the occurre\n+000f7000: 6e63 6520 6f66 2061 2070 6169 7220 6f66 nce of a pair of\n+000f7010: 2075 6e64 6572 7363 6f72 6573 2028 3c63 underscores (__) i\n+000f7030: 6e20 616e 2069 6465 6e74 6966 6965 7220 n an identifier \n+000f7040: 6f72 2062 7920 7573 696e 6720 636f 6c6f or by using colo\n+000f7050: 6e20 6e6f 7461 7469 6f6e 2c20 7365 6520 n notation, see \n+000f7060: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section \n+000f7090: 432f 432b 2b20 6964 656e 7469 6669 6572 C/C++ identifier\n+000f70a0: 206e 616d 6520 746f 2058 4d4c 2074 6167 name to XML tag\n+000f70b0: 206e 616d 6520 7472 616e 736c 6174 696f name translatio\n+000f70c0: 6e3c 2f61 3e2e 3c2f 703e 0a3c 703e 416e n.

.

An\n+000f70d0: 206f 7074 696f 6e61 6c20 7468 6972 6420 optional third \n+000f70e0: 636f 6c75 6d6e 2069 6e20 7468 6520 6e61 column in the na\n+000f70f0: 6d65 7370 6163 6520 6d61 7070 696e 6720 mespace mapping \n+000f7100: 7461 626c 6520 6d61 7920 6265 2073 7065 table may be spe\n+000f7110: 6369 6669 6564 2074 6861 7420 636f 6e74 cified that cont\n+000f7120: 6169 6e73 2061 206e 616d 6573 7061 6365 ains a namespace\n+000f7130: 2055 5249 2070 6174 7465 726e 2e20 5468 URI pattern. Th\n+000f7140: 6520 7061 7474 6572 6e73 2070 726f 7669 e patterns provi\n+000f7150: 6465 2061 6e20 616c 7465 726e 6174 6976 de an alternativ\n+000f7160: 6520 6e61 6d65 7370 6163 6520 666f 7220 e namespace for \n+000f7170: 7468 6520 7661 6c69 6461 7469 6f6e 206f the validation o\n+000f7180: 6620 7061 7273 6564 2058 4d4c 206d 6573 f parsed XML mes\n+000f7190: 7361 6765 732e 2049 6e20 7468 6973 2070 sages. In this p\n+000f71a0: 6174 7465 726e 2c20 6461 7368 6573 2028 attern, dashes (\n+000f71b0: 3c63 6f64 653e 2d3c 2f63 6f64 653e 2920 -) \n+000f71c0: 6172 6520 7369 6e67 6c65 2d63 6861 7261 are single-chara\n+000f71d0: 6374 6572 2077 696c 6463 6172 6473 2061 cter wildcards a\n+000f71e0: 6e64 2061 7374 6572 6973 6b73 2028 3c63 nd asterisks (*) ar\n+000f7200: 6520 6d75 6c74 692d 6368 6172 6163 7465 e multi-characte\n+000f7210: 7220 7769 6c64 6361 7264 732e 2046 6f72 r wildcards. For\n+000f7220: 2065 7861 6d70 6c65 2c20 746f 2061 6363 example, to acc\n+000f7230: 6570 7420 616c 7465 726e 6174 6976 6520 ept alternative \n+000f7240: 7665 7273 696f 6e73 206f 6620 584d 4c20 versions of XML \n+000f7250: 7363 6865 6d61 7320 7769 7468 2064 6966 schemas with dif\n+000f7260: 6665 7265 6e74 2061 7574 686f 7269 6e67 ferent authoring\n+000f7270: 2064 6174 6573 2c20 666f 7572 2064 6173 dates, four das\n+000f7280: 6865 7320 6361 6e20 6265 2075 7365 6420 hes can be used \n+000f7290: 696e 2070 6c61 6365 206f 6620 7468 6520 in place of the \n+000f72a0: 7370 6563 6966 6963 2064 6174 6573 2069 specific dates i\n+000f72b0: 6e20 7468 6520 6e61 6d65 7370 6163 6520 n the namespace \n+000f72c0: 6d61 7070 696e 6720 7461 626c 6520 7061 mapping table pa\n+000f72d0: 7474 6572 6e3a 3c2f 703e 0a3c 6469 7620 ttern:

.
struct \n+000f7320: 3c2f 7370 616e 3e3c 6120 636c 6173 733d Namespace namespa\n+000f73c0: 6365 733c 2f61 3e5b 5d20 3d20 3c2f 6469 ces[] = .
{
. \n+000f7400: 203c 7370 616e 2063 6c61 7373 3d22 636f // { &quo\n+000f7420: 743b 7072 6566 6978 2671 756f 743b 2c20 t;prefix", \n+000f7430: 2671 756f 743b 5552 4926 7175 6f74 3b2c "URI",\n+000f7440: 2026 7175 6f74 3b55 5249 2d70 6174 7465 "URI-patte\n+000f7450: 726e 2671 756f 743b 2028 6f70 7469 6f6e rn" (option\n+000f7460: 616c 2920 7d20 3c2f 7370 616e 3e3c 2f64 al) } .
{ "SOAP\n+000f74b0: 2d45 4e56 2671 756f 743b 3c2f 7370 616e -ENV", &\n+000f74e0: 7175 6f74 3b68 7474 703a 2f2f 7363 6865 quot;http://sche\n+000f74f0: 6d61 732e 786d 6c73 6f61 702e 6f72 672f mas.xmlsoap.org/\n+000f7500: 736f 6170 2f65 6e76 656c 6f70 652f 2671 soap/envelope/&q\n+000f7510: 756f 743b 3c2f 7370 616e 3e20 7d2c 203c uot; }, <\n+000f7520: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000f7530: 656e 7422 3e2f 2f20 6d75 7374 2062 6520 ent\">// must be \n+000f7540: 6669 7273 7420 3c2f 7370 616e 3e3c 2f64 first .
{ "SOAP\n+000f7590: 2d45 4e43 2671 756f 743b 3c2f 7370 616e -ENC", &\n+000f75c0: 7175 6f74 3b68 7474 703a 2f2f 7363 6865 quot;http://sche\n+000f75d0: 6d61 732e 786d 6c73 6f61 702e 6f72 672f mas.xmlsoap.org/\n+000f75e0: 736f 6170 2f65 6e63 6f64 696e 672f 2671 soap/encoding/&q\n+000f75f0: 756f 743b 3c2f 7370 616e 3e20 7d2c 203c uot; }, <\n+000f7600: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000f7610: 656e 7422 3e2f 2f20 6d75 7374 2062 6520 ent\">// must be \n+000f7620: 7365 636f 6e64 203c 2f73 7061 6e3e 3c2f second .
{ "xsi\n+000f7670: 2671 756f 743b 3c2f 7370 616e 3e2c 2020 ", \n+000f7680: 2020 2020 3c73 7061 6e20 636c 6173 733d \n+000f76a0: 2671 756f 743b 6874 7470 3a2f 2f77 7777 "http://www\n+000f76b0: 2e77 332e 6f72 672f 3230 3031 2f58 4d4c .w3.org/2001/XML\n+000f76c0: 5363 6865 6d61 2d69 6e73 7461 6e63 6526 Schema-instance&\n+000f76d0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 quot;, "\n+000f7700: 6874 7470 3a2f 2f77 7777 2e77 332e 6f72 http://www.w3.or\n+000f7710: 672f 2d2d 2d2d 2f58 4d4c 5363 6865 6d61 g/----/XMLSchema\n+000f7720: 2d69 6e73 7461 6e63 6526 7175 6f74 3b3c -instance"<\n+000f7730: 2f73 7061 6e3e 207d 2c20 3c2f 6469 763e /span> },
\n+000f7740: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{ "xsd&quo\n+000f7780: 743b 3c2f 7370 616e 3e2c 2020 2020 2020 t;, \n+000f7790: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+000f77b0: 743b 6874 7470 3a2f 2f77 7777 2e77 332e t;http://www.w3.\n+000f77c0: 6f72 672f 3230 3031 2f58 4d4c 5363 6865 org/2001/XMLSche\n+000f77d0: 6d61 2671 756f 743b 3c2f 7370 616e 3e2c ma",\n+000f77e0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+000f7800: 6f74 3b68 7474 703a 2f2f 7777 772e 7733 ot;http://www.w3\n+000f7810: 2e6f 7267 2f2d 2d2d 2d2f 584d 4c53 6368 .org/----/XMLSch\n+000f7820: 656d 6126 7175 6f74 3b3c 2f73 7061 6e3e ema"\n+000f7830: 207d 2c20 3c2f 6469 763e 0a3c 6469 7620 },
.
.\n+000f7850: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. //
.
{ N\n+000f7890: 554c 4c2c 204e 554c 4c20 7d20 3c73 7061 ULL, NULL } // end of tabl\n+000f78c0: 6520 3c2f 7370 616e 3e3c 2f64 6976 3e0a e
.\n+000f78d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
};
.\n+000f7f80: 3c70 3e41 206e 616d 6573 7061 6365 206d

A namespace m\n+000f7f90: 6170 7069 6e67 2074 6162 6c65 2069 7320 apping table is \n+000f7fa0: 6175 746f 6d61 7469 6361 6c6c 7920 6765 automatically ge\n+000f7fb0: 6e65 7261 7465 6420 7769 7468 2070 7265 nerated with pre\n+000f7fc0: 6669 7865 7320 616e 6420 5552 4973 2069 fixes and URIs i\n+000f7fd0: 6e20 7468 6520 7461 626c 6520 7468 6174 n the table that\n+000f7fe0: 2061 7265 2064 6563 6c61 7265 6420 7769 are declared wi\n+000f7ff0: 7468 203c 636f 6465 3e2f 2f67 736f 6170 th //gsoap\n+000f8000: 2026 6c74 3b70 7265 6669 7826 6774 3b20 <prefix> \n+000f8010: 7363 6865 6d61 206e 616d 6573 7061 6365 schema namespace\n+000f8020: 3a3c 2f63 6f64 653e 2064 6972 6563 7469 : directi\n+000f8030: 7665 7320 696e 2074 6865 2069 6e74 6572 ves in the inter\n+000f8040: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file\n+000f8050: 2c20 7365 6520 5365 6374 696f 6e20 3c61 , see Section Directi\n+000f8090: 7665 733c 2f61 3e2e 2049 6620 6469 7265 ves. If dire\n+000f80a0: 6374 6976 6573 2061 7265 206e 6f74 2070 ctives are not p\n+000f80b0: 726f 7669 6465 6420 696e 2074 6865 2068 rovided in the h\n+000f80c0: 6561 6465 7220 6669 6c65 2074 6865 6e20 eader file then \n+000f80d0: 6465 6661 756c 7420 5552 4973 206f 6620 default URIs of \n+000f80e0: 7468 6520 666f 726d 203c 656d 3e3c 636f the form http:\n+000f8120: 2f2f 7465 6d70 7572 692e 6f72 672f 7072 //tempuri.org/pr\n+000f8130: 6566 6978 2e78 7364 3c2f 613e 3c2f 636f efix.xsd for eac\n+000f8150: 6820 6e61 6d65 7370 6163 6520 3c65 6d3e h namespace \n+000f8160: 3c63 6f64 653e 7072 6566 6978 3c2f 636f prefix. The so\n+000f8180: 6170 6370 7032 2074 6f6f 6c20 616c 736f apcpp2 tool also\n+000f8190: 2067 656e 6572 6174 6573 2061 2057 5344 generates a WSD\n+000f81a0: 4c20 616e 6420 6f6e 6520 6f72 206d 6f72 L and one or mor\n+000f81b0: 6520 5853 4420 6669 6c65 732c 206f 6e65 e XSD files, one\n+000f81c0: 2066 6f72 2065 6163 6820 584d 4c20 6e61 for each XML na\n+000f81d0: 6d65 7370 6163 652e 3c2f 703e 0a3c 703e mespace.

.

\n+000f81e0: 5768 656e 2070 6172 7369 6e67 2058 4d4c When parsing XML\n+000f81f0: 2061 6e64 2064 6573 6572 6961 6c69 7a69 and deserializi\n+000f8200: 6e67 2064 6174 612c 206e 616d 6573 7061 ng data, namespa\n+000f8210: 6365 2055 5249 7320 696e 2074 6865 2058 ce URIs in the X\n+000f8220: 4d4c 206d 6573 7361 6765 7320 6172 6520 ML messages are \n+000f8230: 6d61 7463 6865 6420 6167 6169 6e73 7420 matched against \n+000f8240: 7468 6520 7365 636f 6e64 2061 6e64 2074 the second and t\n+000f8250: 6869 7264 2063 6f6c 756d 6e20 6f66 2074 hird column of t\n+000f8260: 6865 206e 616d 6573 7061 6365 206d 6170 he namespace map\n+000f8270: 7069 6e67 2074 6162 6c65 2c20 7365 6172 ping table, sear\n+000f8280: 6368 696e 6720 6672 6f6d 2074 6865 2074 ching from the t\n+000f8290: 6f70 2074 6f20 7468 6520 626f 7474 6f6d op to the bottom\n+000f82a0: 206f 6620 7468 6520 7461 626c 652e 2054 of the table. T\n+000f82b0: 6865 2061 6374 7561 6c20 7072 6566 6978 he actual prefix\n+000f82c0: 2075 7365 6420 696e 2074 6865 2058 4d4c used in the XML\n+000f82d0: 206d 6573 7361 6765 2069 7320 6972 7265 message is irre\n+000f82e0: 6c65 7661 6e74 2061 7320 7468 6520 5552 levant as the UR\n+000f82f0: 4920 6173 736f 6369 6174 6564 2077 6974 I associated wit\n+000f8300: 6820 7468 6520 7072 6566 6978 2069 7320 h the prefix is \n+000f8310: 7265 6c65 7661 6e74 2074 6f20 6465 6669 relevant to defi\n+000f8320: 6e65 2074 6865 2058 4d4c 206e 616d 6573 ne the XML names\n+000f8330: 7061 6365 2074 6f20 7768 6963 6820 6120 pace to which a \n+000f8340: 7175 616c 6966 6965 6420 656c 656d 656e qualified elemen\n+000f8350: 7420 6f72 2061 7474 7269 6275 7465 2062 t or attribute b\n+000f8360: 656c 6f6e 6773 2e20 5768 656e 2061 206d elongs. When a m\n+000f8370: 6174 6368 2069 7320 666f 756e 642c 2074 atch is found, t\n+000f8380: 6865 206e 616d 6573 7061 6365 2070 7265 he namespace pre\n+000f8390: 6669 7820 696e 2074 6865 2066 6972 7374 fix in the first\n+000f83a0: 2063 6f6c 756d 6e20 6f66 2074 6865 2074 column of the t\n+000f83b0: 6162 6c65 2069 7320 636f 6e73 6964 6572 able is consider\n+000f83c0: 6564 2073 656d 616e 7469 6361 6c6c 7920 ed semantically \n+000f83d0: 6964 656e 7469 6361 6c20 746f 2074 6865 identical to the\n+000f83e0: 206e 616d 6573 7061 6365 2070 7265 6669 namespace prefi\n+000f83f0: 7820 7573 6564 2062 7920 7468 6520 7175 x used by the qu\n+000f8400: 616c 6966 6965 6420 584d 4c20 656c 656d alified XML elem\n+000f8410: 656e 7420 616e 6420 6174 7472 6962 7574 ent and attribut\n+000f8420: 6520 7061 7273 6564 2c20 6576 656e 2077 e parsed, even w\n+000f8430: 6865 6e20 7468 6520 7072 6566 6978 206e hen the prefix n\n+000f8440: 616d 6573 2064 6966 6665 722e 2054 6869 ames differ. Thi\n+000f8450: 7320 6e6f 726d 616c 697a 6174 696f 6e20 s normalization \n+000f8460: 6f66 2070 7265 6669 7865 7320 6973 2069 of prefixes is i\n+000f8470: 6e76 6973 6962 6c65 2074 6f20 7468 6520 nvisible to the \n+000f8480: 7573 6572 206f 6620 6753 4f41 5020 616e user of gSOAP an\n+000f8490: 6420 6d61 6b65 7320 636f 6469 6e67 2077 d makes coding w\n+000f84a0: 6974 6820 584d 4c20 6561 7369 6572 2e20 ith XML easier. \n+000f84b0: 466f 7220 6578 616d 706c 652c 2077 6865 For example, whe\n+000f84c0: 6e20 5853 4420 514e 616d 6573 2061 7265 n XSD QNames are\n+000f84d0: 2070 6172 7365 6420 696e 746f 2073 7472 parsed into str\n+000f84e0: 696e 6773 2075 7369 6e67 2074 6865 2062 ings using the b\n+000f84f0: 7569 6c74 2d69 6e20 736f 6170 6370 7032 uilt-in soapcpp2\n+000f8500: 203c 636f 6465 3e5f 514e 616d 653c 2f63 _QName type or a Q\n+000f8520: 4e61 6d65 2064 6563 6c61 7265 6420 7769 Name declared wi\n+000f8530: 7468 203c 636f 6465 3e74 7970 6564 6566 th typedef\n+000f8540: 2073 7464 3a3a 7374 7269 6e67 2078 7364 std::string xsd\n+000f8550: 5f5f 514e 616d 653c 2f63 6f64 653e 2c20 __QName, \n+000f8560: 7468 656e 2074 6869 7320 514e 616d 6520 then this QName \n+000f8570: 7374 7269 6e67 2077 696c 6c20 616c 7761 string will alwa\n+000f8580: 7973 2063 6f6e 7461 696e 2071 7561 6c69 ys contain quali\n+000f8590: 6669 6564 206e 616d 6573 2077 6974 6820 fied names with \n+000f85a0: 6e6f 726d 616c 697a 6564 2070 7265 6669 normalized prefi\n+000f85b0: 7865 732c 2069 2e65 2e20 7072 6566 6978 xes, i.e. prefix\n+000f85c0: 6573 2064 6566 696e 6564 2069 6e20 7468 es defined in th\n+000f85d0: 6520 6e61 6d65 7370 6163 6520 6d61 7070 e namespace mapp\n+000f85e0: 696e 6720 7461 626c 652c 2075 6e6c 6573 ing table, unles\n+000f85f0: 7320 7468 6520 7461 626c 6520 6861 7320 s the table has \n+000f8600: 6e6f 2065 6e74 7279 2c20 7365 6520 5365 no entry, see Se\n+000f8610: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction How \n+000f8640: 746f 2075 7365 2051 4e61 6d65 2061 7474 to use QName att\n+000f8650: 7269 6275 7465 7320 616e 6420 656c 656d ributes and elem\n+000f8660: 656e 7473 3c2f 613e 2e3c 2f70 3e0a 3c70 ents.

.For example, le\n+000f8680: 7427 7320 7361 7920 7765 2068 6176 6520 t's say we have \n+000f8690: 7468 6520 666f 6c6c 6f77 696e 6720 7374 the following st\n+000f86a0: 7275 6374 733a 3c2f 703e 0a3c 6469 7620 ructs:

.
struct \n+000f86f0: 3c2f 7370 616e 3e61 5f5f 656c 7420 7b20 a__elt { \n+000f8700: 2e2e 2e20 7d3b 203c 2f64 6976 3e0a 3c64 ... };
.\n+000f8720: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct b__elt { ...\n+000f8750: 207d 3b20 3c2f 6469 763e 0a3c 6469 7620 };
.
struct k__elt { ... };\n+000f87a0: 203c 2f64 6976 3e0a 3c2f 6469 763e 3c21
.
<\n+000f87c0: 703e 5468 6520 6e61 6d65 7370 6163 6520 p>The namespace \n+000f87d0: 6d61 7070 696e 6720 7461 626c 6520 6765 mapping table ge\n+000f87e0: 6e65 7261 7465 6420 6279 2073 6f61 7063 nerated by soapc\n+000f87f0: 7070 3220 6861 7320 7468 6520 666f 6c6c pp2 has the foll\n+000f8800: 6f77 696e 6720 656e 7472 6965 733a 3c2f owing entries:.
struct <\n+000f8860: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+000f8870: 7265 663d 2273 7472 7563 745f 6e61 6d65 ref=\"struct_name\n+000f8880: 7370 6163 652e 6874 6d6c 223e 4e61 6d65 space.html\">Name\n+000f8890: 7370 6163 653c 2f61 3e20 3c61 2063 6c61 space namespaces[\n+000f8900: 5d20 3d20 3c2f 6469 763e 0a3c 6469 7620 ] =
.
{.
/\n+000f8950: 2f20 7b20 2671 756f 743b 7072 6566 6978 / { "prefix\n+000f8960: 2671 756f 743b 2c20 2671 756f 743b 5552 ", "UR\n+000f8970: 4926 7175 6f74 3b2c 2026 7175 6f74 3b55 I", "U\n+000f8980: 5249 2d70 6174 7465 726e 2671 756f 743b RI-pattern"\n+000f8990: 2028 6f70 7469 6f6e 616c 2920 7d20 3c2f (optional) }
. \n+000f89c0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // the\n+000f89e0: 2066 6f75 7220 534f 4150 2061 6e64 2058 four SOAP and X\n+000f89f0: 5344 206e 616d 6573 7061 6365 2062 696e SD namespace bin\n+000f8a00: 6469 6e67 733c 2f73 7061 6e3e 3c2f 6469 dings.
{ "a&quo\n+000f8a50: 743b 3c2f 7370 616e 3e2c 203c 7370 616e t;, "htt\n+000f8a80: 703a 2f2f 7465 6d70 7572 692e 6f72 672f p://tempuri.org/\n+000f8a90: 612e 7873 6426 7175 6f74 3b3c 2f73 7061 a.xsd" },
. \n+000f8ac0: 207b 203c 7370 616e 2063 6c61 7373 3d22 { &\n+000f8ae0: 7175 6f74 3b62 2671 756f 743b 3c2f 7370 quot;b", "http://te\n+000f8b20: 6d70 7572 692e 6f72 672f 622e 7873 6426 mpuri.org/b.xsd&\n+000f8b30: 7175 6f74 3b3c 2f73 7061 6e3e 207d 2c20 quot; }, \n+000f8b40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{ "c\n+000f8b80: 2671 756f 743b 3c2f 7370 616e 3e2c 203c ", <\n+000f8b90: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+000f8ba0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+000f8bb0: 3b68 7474 703a 2f2f 7465 6d70 7572 692e ;http://tempuri.\n+000f8bc0: 6f72 672f 632e 7873 6426 7175 6f74 3b3c org/c.xsd"<\n+000f8bd0: 2f73 7061 6e3e 207d 2c20 3c2f 6469 763e /span> },
\n+000f8be0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
... /\n+000f8c10: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
.<\n+000f8c20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000f8c30: 3e20 207b 204e 554c 4c2c 204e 554c 4c20 > { NULL, NULL \n+000f8c40: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
.
};.

The\n+000f8c80: 6e2c 2074 6865 2066 6f6c 6c6f 7769 6e67 n, the following\n+000f8c90: 2058 4d4c 2065 6c65 6d65 6e74 7320 7769 XML elements wi\n+000f8ca0: 6c6c 206d 6174 6368 2074 6865 7365 2073 ll match these s\n+000f8cb0: 7472 7563 7473 3a3c 2f70 3e0a 3c64 6976 tructs:

.
<x:elt\n+000f8d20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 xmlns:x="http://t\n+000f8d70: 656d 7075 7269 2e6f 7267 2f61 2e78 7364 empuri.org/a.xsd\n+000f8d80: 2671 756f 743b 3c2f 7370 616e 3e26 6774 ">\n+000f8d90: 3b2e 2e2e 266c 743b 2f3c 7370 616e 2063 ;...</x:elt&\n+000f8dc0: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
.
<\n+000f8de0: 3c73 7061 6e20 636c 6173 733d 226b 6579 elt xmlns\n+000f8e20: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="http:/\n+000f8e50: 2f74 656d 7075 7269 2e6f 7267 2f62 2e78 /tempuri.org/b.x\n+000f8e60: 7364 2671 756f 743b 3c2f 7370 616e 3e26 sd"&\n+000f8e70: 6774 3b2e 2e2e 266c 743b 2f3c 7370 616e gt;...</elt&\n+000f8ea0: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
.
<\n+000f8ec0: 3c73 7061 6e20 636c 6173 733d 226b 6579 zzz:el\n+000f8ee0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t x\n+000f8f00: 6d6c 6e73 3a7a 7a7a 3c2f 7370 616e 3e3d mlns:zzz=\n+000f8f10: 3c73 7061 6e20 636c 6173 733d 226b 6579 http://tempur\n+000f8f50: 692e 6f72 673c 2f73 7061 6e3e 2f3c 7370 i.org/c.xsd&\n+000f8f80: 7175 6f74 3b26 6774 3b2e 2e2e 266c 743b quot;>...<\n+000f8f90: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /zzz:e\n+000f8fb0: 6c74 3c2f 7370 616e 3e26 6774 3b3c 2f64 lt>.

Instead of \n+000f8ff0: 6f6e 6520 6269 6720 6e61 6d65 7370 6163 one big namespac\n+000f9000: 6520 7461 626c 6520 7468 6174 2063 6f6e e table that con\n+000f9010: 7461 696e 7320 616c 6c20 584d 4c20 6e61 tains all XML na\n+000f9020: 6d65 7370 6163 6520 7072 6566 6978 6573 mespace prefixes\n+000f9030: 2077 6974 6820 7468 6569 7220 5552 4973 with their URIs\n+000f9040: 2c20 7468 6572 6520 6172 6520 6361 7365 , there are case\n+000f9050: 7320 7768 656e 2069 7420 6973 2064 6573 s when it is des\n+000f9060: 6972 6162 6c65 2074 6f20 7573 6520 6d75 irable to use mu\n+000f9070: 6c74 6970 6c65 206e 616d 6573 7061 6365 ltiple namespace\n+000f9080: 2074 6162 6c65 732c 206f 6e65 2066 6f72 tables, one for\n+000f9090: 2065 6163 6820 7365 7276 6963 652e 2054 each service. T\n+000f90a0: 6869 7320 6176 6f69 6473 206c 6561 6b69 his avoids leaki\n+000f90b0: 6e67 206e 616d 6573 7061 6365 2070 7265 ng namespace pre\n+000f90c0: 6669 7865 7320 696e 2058 4d4c 206d 6573 fixes in XML mes\n+000f90d0: 7361 6765 7320 7468 6174 2068 6176 6520 sages that have \n+000f90e0: 6e6f 7468 696e 6720 746f 2064 6f20 7769 nothing to do wi\n+000f90f0: 7468 2074 6865 2073 6572 7669 6365 2069 th the service i\n+000f9100: 6e76 6f6b 6564 2e20 496e 2070 7269 6e63 nvoked. In princ\n+000f9110: 6970 6c65 2074 6865 7265 2069 7320 6e6f iple there is no\n+000f9120: 2068 6172 6d20 746f 206c 6561 6b20 7468 harm to leak th\n+000f9130: 6573 6520 6e61 6d65 7370 6163 6520 7072 ese namespace pr\n+000f9140: 6566 6978 6573 2c20 6275 7420 7468 6520 efixes, but the \n+000f9150: 6d65 7373 6167 6573 2061 7265 206c 6573 messages are les\n+000f9160: 7320 636f 6d70 6163 7420 616e 6420 6e6f s compact and no\n+000f9170: 7420 6173 2063 6c65 616e 2e20 546f 2075 t as clean. To u\n+000f9180: 7365 206d 756c 7469 706c 6520 6e61 6d65 se multiple name\n+000f9190: 7370 6163 6520 7461 626c 6573 2061 7420 space tables at \n+000f91a0: 7468 6520 636c 6965 6e74 2073 6964 6520 the client side \n+000f91b0: 6973 2064 6f6e 6520 6173 2066 6f6c 6c6f is done as follo\n+000f91c0: 7773 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ws:

.
\n+000f91f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct Namespace n\n+000f9250: 616d 6573 7061 6365 7354 6162 6c65 315b amespacesTable1[\n+000f9260: 5d20 3d20 7b20 2e2e 2e20 7d3b 203c 2f64 ] = { ... }; .
stru\n+000f92a0: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct Namespace\n+000f92e0: 3c2f 613e 206e 616d 6573 7061 6365 7354 namespacesT\n+000f92f0: 6162 6c65 325b 5d20 3d20 7b20 2e2e 2e20 able2[] = { ... \n+000f9300: 7d3b 203c 2f64 6976 3e0a 3c64 6976 2063 };
.
struct \n+000f9340: 3c61 2063 6c61 7373 3d22 636f 6465 2220 Nam\n+000f9370: 6573 7061 6365 3c2f 613e 206e 616d 6573 espace names\n+000f9380: 7061 6365 7354 6162 6c65 335b 5d20 3d20 pacesTable3[] = \n+000f9390: 7b20 2e2e 2e20 7d3b 203c 2f64 6976 3e0a { ... };
.\n+000f93a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
struct <\n+000f93d0: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>Namespace\n+000f9410: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *namespa\n+000f9470: 6365 733c 2f61 3e3b 203c 2f64 6976 3e0a ces;
.\n+000f9480: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
... //
.struct soap *soap = soap_n\n+000f95b0: 6577 3c2f 613e 2829 3b20 3c2f 6469 763e ew();
\n+000f95c0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..<\n+000f9810: 703e 4c69 6b65 7769 7365 2c20 6f6e 2074 p>Likewise, on t\n+000f9820: 6865 2073 6572 7665 7220 7369 6465 2063 he server side c\n+000f9830: 616c 6c20 3c63 6f64 653e 3c61 2063 6c61 all soap_s\n+000f9900: 6574 5f6e 616d 6573 7061 6365 733c 2f61 et_namespaces before \n+000f9920: 6361 6c6c 696e 6720 3c63 6f64 653e 3c61 calling soa\n+000f99a0: 705f 7365 7276 653c 2f61 3e3c 2f63 6f64 p_serve. Changing the\n+000f99c0: 206e 616d 6573 7061 6365 7320 7461 626c namespaces tabl\n+000f99d0: 6520 696e 2073 6572 7669 6365 206f 7065 e in service ope\n+000f99e0: 7261 7469 6f6e 7320 6861 7320 6e6f 2065 rations has no e\n+000f99f0: 6666 6563 742e 3c2f 703e 0a3c 703e 5468 ffect.

.

Th\n+000f9a00: 6520 584d 4c20 6d65 7373 6167 6573 2070 e XML messages p\n+000f9a10: 726f 6475 6365 6420 6279 2074 6865 2067 roduced by the g\n+000f9a20: 534f 4150 2065 6e67 696e 6520 696e 636c SOAP engine incl\n+000f9a30: 7564 6520 616c 6c20 3c65 6d3e 3c63 6f64 ude all xmlsn namespace bi\n+000f9a60: 6e64 696e 6773 2069 6e20 7468 6520 726f ndings in the ro\n+000f9a70: 6f74 2065 6c65 6d65 6e74 2c20 7768 6963 ot element, whic\n+000f9a80: 6820 6973 2067 656e 6572 616c 6c79 206d h is generally m\n+000f9a90: 6f72 6520 6566 6669 6369 656e 7420 666f ore efficient fo\n+000f9aa0: 7220 6c61 7267 6572 2058 4d4c 2064 6f63 r larger XML doc\n+000f9ab0: 756d 656e 7473 2069 6e20 7768 6963 6820 uments in which \n+000f9ac0: 6f74 6865 7277 6973 6520 7468 6520 3c65 otherwise the xmlsn namesp\n+000f9af0: 6163 6520 6269 6e64 696e 6773 2077 696c ace bindings wil\n+000f9b00: 6c20 6265 2073 7072 696e 6b6c 6564 2074 l be sprinkled t\n+000f9b10: 6872 6f75 6768 6f75 742e 2042 7920 636f hroughout. By co\n+000f9b20: 6e74 7261 7374 2c20 6361 6e6f 6e69 6361 ntrast, canonica\n+000f9b30: 6c20 584d 4c20 7265 7175 6972 6573 203c l XML requires <\n+000f9b40: 656d 3e3c 636f 6465 3e78 6d6c 736e 3c2f em>xmlsn names\n+000f9b60: 7061 6365 2062 696e 6469 6e67 7320 6f6e pace bindings on\n+000f9b70: 6c79 2074 6f20 6265 2069 6e63 6c75 6465 ly to be include\n+000f9b80: 6420 7768 656e 2075 7469 6c69 7a65 642e d when utilized.\n+000f9b90: 2054 6865 7265 666f 7265 2c20 7468 6520 Therefore, the \n+000f9ba0: 3c63 6f64 653e 2353 4f41 505f 584d 4c5f #SOAP_XML_\n+000f9bb0: 4341 4e4f 4e49 4341 4c3c 2f63 6f64 653e CANONICAL\n+000f9bc0: 2063 6f6e 7465 7874 2066 6c61 6720 7072 context flag pr\n+000f9bd0: 6f64 7563 6573 2043 3134 4e20 6578 636c oduces C14N excl\n+000f9be0: 7573 6976 6520 584d 4c20 6d65 7373 6167 usive XML messag\n+000f9bf0: 6573 2061 6e64 2064 6f63 756d 656e 7473 es and documents\n+000f9c00: 2c20 7768 6963 6820 656c 696d 696e 6174 , which eliminat\n+000f9c10: 6573 2075 6e75 7365 6420 3c65 6d3e 3c63 es unused xmlsn\n+000f9c30: 3c2f 656d 3e20 6e61 6d65 7370 6163 6520 namespace \n+000f9c40: 6269 6e64 696e 6773 2066 726f 6d20 584d bindings from XM\n+000f9c50: 4c2e 2055 6e66 6f72 7475 6e61 7465 6c79 L. Unfortunately\n+000f9c60: 2c20 7468 6520 6375 7272 656e 7420 4331 , the current C1\n+000f9c70: 344e 2073 7461 6e64 6172 6420 6973 2062 4N standard is b\n+000f9c80: 7567 6779 2077 6974 6820 7265 7370 6563 uggy with respec\n+000f9c90: 7420 746f 2058 5344 2051 4e61 6d65 2063 t to XSD QName c\n+000f9ca0: 6f6e 7465 6e74 2c20 6265 6361 7573 6520 ontent, because \n+000f9cb0: 7072 6566 6978 6573 2075 7365 6420 696e prefixes used in\n+000f9cc0: 2051 4e61 6d65 2063 6f6e 7465 6e74 2061 QName content a\n+000f9cd0: 7265 206e 6f74 2063 6f6e 7369 6465 7265 re not considere\n+000f9ce0: 6420 7574 696c 697a 6564 2e20 5468 6520 d utilized. The \n+000f9cf0: 6753 4f41 5020 656e 6769 6e65 2063 6f6e gSOAP engine con\n+000f9d00: 7369 6465 7273 2051 4e61 6d65 2063 6f6e siders QName con\n+000f9d10: 7465 6e74 2070 7265 6669 7865 7320 7574 tent prefixes ut\n+000f9d20: 696c 697a 6564 2061 6e64 2074 6865 7265 ilized and there\n+000f9d30: 666f 7265 2070 726f 6475 6365 7320 636f fore produces co\n+000f9d40: 7272 6563 7465 6420 6361 6e6f 6e69 6361 rrected canonica\n+000f9d50: 6c69 7a65 6420 584d 4c20 6f75 7470 7574 lized XML output\n+000f9d60: 2074 6861 7420 7072 6576 656e 7473 2074 that prevents t\n+000f9d70: 6865 206c 6f73 7320 6f66 206e 616d 6573 he loss of names\n+000f9d80: 7061 6365 2069 6e66 6f72 6d61 7469 6f6e pace information\n+000f9d90: 2066 6f72 2051 4e61 6d65 732e 3c2f 703e for QNames.

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

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

.

.SO\n+000f9e00: 4150 2048 6561 6465 7220 7072 6f63 6573 AP Header proces\n+000f9e10: 7369 6e67 3c2f 6831 3e0a 3c70 3e41 2062 sing

.

A b\n+000f9e20: 7569 6c74 2d69 6e20 534f 4150 2048 6561 uilt-in SOAP Hea\n+000f9e30: 6465 7220 6461 7461 2073 7472 7563 7475 der data structu\n+000f9e40: 7265 203c 636f 6465 3e3c 6120 636c 6173 re SOAP_ENV__He\n+000f9eb0: 6164 6572 3c2f 613e 3c2f 636f 6465 3e20 ader \n+000f9ec0: 6973 2067 656e 6572 6174 6564 2062 7920 is generated by \n+000f9ed0: 7468 6520 736f 6170 6370 7032 2074 6f6f the soapcpp2 too\n+000f9ee0: 6c20 666f 7220 6578 6368 616e 6769 6e67 l for exchanging\n+000f9ef0: 2053 4f41 5020 6865 6164 6572 7320 696e SOAP headers in\n+000f9f00: 2053 4f41 5020 6d65 7373 6167 6573 2e20 SOAP messages. \n+000f9f10: 5468 6973 2073 7472 7563 7475 7265 2069 This structure i\n+000f9f20: 7320 656d 7074 7920 756e 6c65 7373 2068 s empty unless h\n+000f9f30: 6561 6465 7273 2061 7265 2061 6464 6564 eaders are added\n+000f9f40: 2062 7920 706c 7567 696e 7320 616e 6420 by plugins and \n+000f9f50: 6865 6164 6572 7320 7370 6563 6966 6965 headers specifie\n+000f9f60: 6420 6279 2057 5344 4c20 7370 6563 6966 d by WSDL specif\n+000f9f70: 6963 6174 696f 6e73 2028 692e 652e 2077 ications (i.e. w\n+000f9f80: 7364 6c32 6820 6164 6473 2053 4f41 5020 sdl2h adds SOAP \n+000f9f90: 4865 6164 6572 7329 2e3c 2f70 3e0a 3c70 Headers).

.You can create \n+000f9fb0: 796f 7572 206f 776e 2053 4f41 5020 4865 your own SOAP He\n+000f9fc0: 6164 6572 2073 7472 7563 7420 7369 6d70 ader struct simp\n+000f9fd0: 6c79 2062 7920 6465 636c 6172 696e 6720 ly by declaring \n+000f9fe0: 6974 2069 6e20 616e 2069 6e74 6572 6661 it in an interfa\n+000f9ff0: 6365 2068 6561 6465 7220 6669 6c65 2066 ce header file f\n+000fa000: 6f72 2073 6f61 7063 7070 3220 616e 6420 or soapcpp2 and \n+000fa010: 6279 2061 6464 696e 6720 6d65 6d62 6572 by adding member\n+000fa020: 7320 7468 6174 206d 7573 7420 6265 2071 s that must be q\n+000fa030: 7561 6c69 6669 6564 2077 6974 6820 6e61 ualified with na\n+000fa040: 6d65 7370 6163 6520 7072 6566 6978 6573 mespace prefixes\n+000fa050: 2074 6f20 636f 6e66 6f72 6d20 746f 2074 to conform to t\n+000fa060: 6865 2053 4f41 5020 4865 6164 6572 2070 he SOAP Header p\n+000fa070: 726f 6365 7373 696e 6720 7265 7175 6972 rocessing requir\n+000fa080: 656d 656e 7473 2074 6861 7420 534f 4150 ements that SOAP\n+000fa090: 2048 6561 6465 7220 656c 656d 656e 7473 Header elements\n+000fa0a0: 206d 7573 7420 6265 206e 616d 6573 7061 must be namespa\n+000fa0b0: 6365 2071 7561 6c69 6669 6564 2e3c 2f70 ce qualified..

For example\n+000fa0d0: 2c20 6173 7375 6d65 2074 6861 7420 7472 , assume that tr\n+000fa0e0: 616e 7361 6374 696f 6e20 6461 7461 2073 ansaction data s\n+000fa0f0: 686f 756c 6420 6265 2070 6967 6779 2d62 hould be piggy-b\n+000fa100: 6163 6b65 6420 7769 7468 2053 4f41 5020 acked with SOAP \n+000fa110: 6d65 7373 6167 6573 2069 6e20 534f 4150 messages in SOAP\n+000fa120: 2048 6561 6465 723a 3c2f 703e 0a3c 6469 Header:

.
struc\n+000fa170: 7420 3c2f 7370 616e 3e74 5f5f 7472 616e t t__tran\n+000fa180: 7361 6374 696f 6e3c 2f64 6976 3e0a 3c64 saction
.\n+000fa1a0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
.
int number;
\n+000fa1f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
con\n+000fa220: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+000fa250: 2a64 7363 7269 7074 696f 6e3b 3c2f 6469 *dscription;.
};
.\n+000fa290: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct SOAP_ENV__Head\n+000fa300: 6572 3c2f 613e 203c 2f64 6976 3e0a 3c64 er
.\n+000fa320: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
.
mu\n+000fa340: 7374 556e 6465 7273 7461 6e64 203c 7370 stUnderstand struct t__transaction \n+000fa380: 2a74 5f5f 7472 616e 7361 6374 696f 6e3b *t__transaction;\n+000fa390: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
};.
//gso\n+000fa3e0: 6170 206e 7320 7365 7276 6963 6520 6d65 ap ns service me\n+000fa3f0: 7468 6f64 2d69 6e70 7574 2d68 6561 6465 thod-input-heade\n+000fa400: 722d 7061 7274 3a20 7765 626d 6574 686f r-part: webmetho\n+000fa410: 6420 745f 5f74 7261 6e73 6163 7469 6f6e d t__transaction\n+000fa420: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n+000fa440: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns__webmeth\n+000fa470: 6f64 282e 2e2e 293b 3c2f 6469 763e 0a3c od(...);
.<\n+000fa480: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

The mustUnderstan\n+000fa4b0: 643c 2f63 6f64 653e 2071 7561 6c69 6669 d qualifi\n+000fa4c0: 6572 2073 7065 6369 6669 6573 2074 6861 er specifies tha\n+000fa4d0: 7420 7468 6520 656c 656d 656e 7420 6d75 t the element mu\n+000fa4e0: 7374 2062 6520 7072 6f63 6573 7365 6420 st be processed \n+000fa4f0: 6279 2074 6865 2053 4f41 5020 7072 6f63 by the SOAP proc\n+000fa500: 6573 736f 7220 616e 6420 6361 6e6e 6f74 essor and cannot\n+000fa510: 2062 6520 6967 6e6f 7265 6420 6966 2074 be ignored if t\n+000fa520: 6865 2070 726f 6365 7373 6f72 2068 6173 he processor has\n+000fa530: 206e 6f20 6c6f 6769 6320 696e 2070 6c61 no logic in pla\n+000fa540: 6365 2066 6f72 2074 6869 7320 534f 4150 ce for this SOAP\n+000fa550: 2068 6561 6465 722c 2077 6869 6368 2069 header, which i\n+000fa560: 7320 646f 6e65 2062 7920 6164 6469 6e67 s done by adding\n+000fa570: 2061 203c 656d 3e3c 636f 6465 3e53 4f41 a SOA\n+000fa580: 502d 454e 563a 6d75 7374 556e 6465 7273 P-ENV:mustUnders\n+000fa590: 7461 6e64 3d22 7472 7565 223c 2f63 6f64 tand=\"true\" attribut\n+000fa5b0: 6520 746f 2074 6865 203c 656d 3e3c 636f e to the t:transaction\n+000fa5d0: 3c2f 636f 6465 3e3c 2f65 6d3e 2065 6c65 ele\n+000fa5e0: 6d65 6e74 2e20 5468 6520 736f 6170 6370 ment. The soapcp\n+000fa5f0: 7032 2d67 656e 6572 6174 6564 2073 6572 p2-generated ser\n+000fa600: 6961 6c69 7a65 7273 206f 6265 7920 7468 ializers obey th\n+000fa610: 6973 2073 6166 6574 7920 7072 696e 6369 is safety princi\n+000fa620: 706c 652e 3c2f 703e 0a3c 703e 5468 6973 ple.

.

This\n+000fa630: 2064 6563 6c61 7265 7320 6120 7365 7276 declares a serv\n+000fa640: 6963 6520 6f70 6572 6174 696f 6e20 7468 ice operation th\n+000fa650: 6174 2073 656e 6473 206d 6573 7361 6765 at sends message\n+000fa660: 7320 7769 7468 2061 6e20 696e 7075 7420 s with an input \n+000fa670: 534f 4150 2068 6561 6465 7220 3c63 6f64 SOAP header t__transaction\n+000fa690: 3c2f 636f 6465 3e2c 2061 7320 6361 6e20 , as can \n+000fa6a0: 6265 2073 6565 6e20 696e 2074 6865 2067 be seen in the g\n+000fa6b0: 656e 6572 6174 6564 2057 5344 4c20 6269 enerated WSDL bi\n+000fa6c0: 6e64 696e 673a 3c2f 703e 0a3c 6469 7620 nding:

.
<binding name=\n+000fa770: 2671 756f 743b 5365 7276 6963 6526 7175 "Service&qu\n+000fa780: 6f74 3b3c 2f73 7061 6e3e 203c 7370 616e ot; type="t\n+000fa7d0: 6e73 3a53 6572 7669 6365 506f 7274 5479 ns:ServicePortTy\n+000fa7e0: 7065 2671 756f 743b 3c2f 7370 616e 3e26 pe"&\n+000fa7f0: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
.
&l\n+000fa810: 743b 3c73 7061 6e20 636c 6173 733d 226b t;SOAP\n+000fa830: 3a62 696e 6469 6e67 3c2f 7370 616e 3e20 :binding \n+000fa840: 3c73 7061 6e20 636c 6173 733d 226b 6579 style=&\n+000fa880: 7175 6f74 3b64 6f63 756d 656e 7426 7175 quot;document&qu\n+000fa890: 6f74 3b3c 2f73 7061 6e3e 203c 7370 616e ot; transport=&q\n+000fa8e0: 756f 743b 6874 7470 3a2f 2f73 6368 656d uot;http://schem\n+000fa8f0: 6173 2e78 6d6c 736f 6170 2e6f 7267 2f73 as.xmlsoap.org/s\n+000fa900: 6f61 702f 6874 7470 2671 756f 743b 3c2f oap/http"/>
\n+000fa920: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<operation name="webmetho\n+000fa9b0: 6426 7175 6f74 3b3c 2f73 7061 6e3e 2667 d"&g\n+000fa9c0: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
.
&\n+000fa9e0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;SOA\n+000faa00: 503a 6f70 6572 6174 696f 6e3c 2f73 7061 P:operation soapAct\n+000faa30: 696f 6e3c 2f73 7061 6e3e 3d3c 7370 616e ion="&qu\n+000faa60: 6f74 3b3c 2f73 7061 6e3e 2f26 6774 3b3c ot;/><\n+000faa70: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
<\n+000faa90: 3c73 7061 6e20 636c 6173 733d 226b 6579 input<\n+000faab0: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
\n+000faac0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<\n+000faae0: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;SOAP:\n+000fab00: 626f 6479 3c2f 7370 616e 3e20 3c73 7061 body use="l\n+000fab50: 6974 6572 616c 2671 756f 743b 3c2f 7370 iteral" parts<\n+000fab80: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="Body&qu\n+000fabb0: 6f74 3b3c 2f73 7061 6e3e 2f26 6774 3b3c ot;/><\n+000fabc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
\n+000fabe0: 2020 266c 743b 3c73 7061 6e20 636c 6173 <\n+000fac00: 534f 4150 3a68 6561 6465 723c 2f73 7061 SOAP:header use=\n+000fac50: 2671 756f 743b 6c69 7465 7261 6c26 7175 "literal&qu\n+000fac60: 6f74 3b3c 2f73 7061 6e3e 203c 7370 616e ot; message=\n+000fac90: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+000facb0: 743b 746e 733a 5365 7276 6963 6548 6561 t;tns:ServiceHea\n+000facc0: 6465 7226 7175 6f74 3b3c 2f73 7061 6e3e der"\n+000facd0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 part=&\n+000fad10: 7175 6f74 3b74 7261 6e73 6163 7469 6f6e quot;transaction\n+000fad20: 2671 756f 743b 3c2f 7370 616e 3e2f 2667 "/&g\n+000fad30: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
.
&\n+000fad50: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/in\n+000fad70: 7075 743c 2f73 7061 6e3e 2667 743b 3c2f put>.
<<\n+000fada0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000fadb0: 6f72 6474 7970 6522 3e6f 7574 7075 743c ordtype\">output<\n+000fadc0: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
\n+000fadd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<\n+000fadf0: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;SOAP:\n+000fae10: 626f 6479 3c2f 7370 616e 3e20 3c73 7061 body use="l\n+000fae60: 6974 6572 616c 2671 756f 743b 3c2f 7370 iteral" parts<\n+000fae90: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="Body&qu\n+000faec0: 6f74 3b3c 2f73 7061 6e3e 2f26 6774 3b3c ot;/><\n+000faed0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
<\n+000faef0: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /outpu\n+000faf10: 743c 2f73 7061 6e3e 2667 743b 3c2f 6469 t>.
</operation<\n+000faf60: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
\n+000faf70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
</binding\n+000fafb0: 2667 743b 3c2f 6469 763e 0a3c 2f64 6976 >
.

The \n+000fba60: 534f 4150 2057 6562 2073 6572 7669 6365 SOAP Web service\n+000fba70: 2072 6571 7565 7374 2069 6e63 6c75 6465 request include\n+000fba80: 7320 7468 6520 534f 4150 2048 6561 6465 s the SOAP Heade\n+000fba90: 7220 7769 7468 2074 6865 2074 7261 6e73 r with the trans\n+000fbaa0: 6163 7469 6f6e 2064 6174 613a 3c2f 703e action data:

\n+000fbab0: 0a3c 6469 7620 636c 6173 733d 2261 6c74 .
<<\n+000fbaf0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000fbb00: 6f72 6474 7970 6522 3e53 4f41 502d 454e ordtype\">SOAP-EN\n+000fbb10: 563a 456e 7665 6c6f 7065 3c2f 7370 616e V:Envelope ...>
\n+000fbb30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<SOAP-ENV:Head\n+000fbb70: 6572 3c2f 7370 616e 3e26 6774 3b20 3c2f er> .
<<\n+000fbba0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000fbbb0: 6f72 6474 7970 6522 3e74 3a74 7261 6e73 ordtype\">t:trans\n+000fbbc0: 6163 7469 6f6e 3c2f 7370 616e 3e20 3c73 action SOAP-ENV:mus\n+000fbbf0: 7455 6e64 6572 7374 616e 643c 2f73 7061 tUnderstand=&\n+000fbc20: 7175 6f74 3b74 7275 6526 7175 6f74 3b3c quot;true"<\n+000fbc30: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
\n+000fbc40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<number>12345<\n+000fbc90: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/numb\n+000fbcb0: 6572 3c2f 7370 616e 3e26 6774 3b3c 2f64 er>.
<\n+000fbce0: 3c73 7061 6e20 636c 6173 733d 226b 6579 descri\n+000fbd00: 7074 696f 6e3c 2f73 7061 6e3e 2667 743b ption>\n+000fbd10: 3c73 7061 6e20 636c 6173 733d 226b 6579 Transactio\n+000fbd30: 6e61 6c3c 2f73 7061 6e3e 203c 7370 616e nal data<\n+000fbd60: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /descr\n+000fbd80: 6970 7469 6f6e 3c2f 7370 616e 3e26 6774 iption>\n+000fbd90: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
&l\n+000fbdb0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/t:t\n+000fbdd0: 7261 6e73 6163 7469 6f6e 3c2f 7370 616e ransaction>
. \n+000fbe00: 2026 6c74 3b2f 3c73 7061 6e20 636c 6173 </\n+000fbe20: 534f 4150 2d45 4e56 3a48 6561 6465 723c SOAP-ENV:Header<\n+000fbe30: 2f73 7061 6e3e 2667 743b 203c 2f64 6976 /span>> .
<SOAP-ENV:Bod\n+000fbe80: 793c 2f73 7061 6e3e 2667 743b 203c 2f64 y> .
<ns:webme\n+000fbed0: 7468 6f64 3c2f 7370 616e 3e26 6774 3b3c thod><\n+000fbee0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
..\n+000fbf00: 2e3c 2f64 6976 3e0a 3c64 6976 2063 6c61 .
.
&l\n+000fbf20: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/ns:\n+000fbf40: 7765 626d 6574 686f 643c 2f73 7061 6e3e webmethod\n+000fbf50: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
.
&\n+000fbf70: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/SO\n+000fbf90: 4150 2d45 4e56 3a42 6f64 793c 2f73 7061 AP-ENV:Body>
.\n+000fbfc0: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </S\n+000fbfe0: 4f41 502d 454e 563a 456e 7665 6c6f 7065 OAP-ENV:Envelope\n+000fbff0: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
\n+000fc020: 3c70 3e41 7420 7468 6520 7265 6365 6976

At the receiv\n+000fc030: 696e 6720 7369 6465 2c20 6120 534f 4150 ing side, a SOAP\n+000fc040: 2048 6561 6465 7220 6361 6e20 6265 2069 Header can be i\n+000fc050: 6e73 7065 6374 6564 2062 7920 6368 6563 nspected by chec\n+000fc060: 6b69 6e67 2066 6f72 2061 206e 6f6e 2d4e king for a non-N\n+000fc070: 554c 4c20 3c63 6f64 653e 3c61 2063 6c61 ULL soap::header.

.<\n+000fc150: 646c 2063 6c61 7373 3d22 7365 6374 696f dl class=\"sectio\n+000fc160: 6e20 7761 726e 696e 6722 3e3c 6474 3e57 n warning\">
W\n+000fc170: 6172 6e69 6e67 3c2f 6474 3e3c 6464 3e57 arning
W\n+000fc180: 6865 6e20 534f 4150 2048 6561 6465 7273 hen SOAP Headers\n+000fc190: 2061 7265 2075 7365 642c 2079 6f75 206d are used, you m\n+000fc1a0: 7573 7420 6d61 6b65 2073 7572 6520 746f ust make sure to\n+000fc1b0: 2073 6574 203c 636f 6465 3e3c 6120 636c set soap::header<\n+000fc280: 2f61 3e3c 2f63 6f64 653e 2074 6f20 4e55 /a> to NU\n+000fc290: 4c4c 2077 6865 6e20 6e6f 2053 4f41 5020 LL when no SOAP \n+000fc2a0: 4865 6164 6572 2073 686f 756c 6420 6265 Header should be\n+000fc2b0: 2073 656e 742c 206f 7468 6572 7769 7365 sent, otherwise\n+000fc2c0: 2061 6e79 2053 4f41 5020 4865 6164 6572 any SOAP Header\n+000fc2d0: 7320 6375 7272 656e 746c 7920 7072 6573 s currently pres\n+000fc2e0: 656e 7420 696e 2074 6865 203c 636f 6465 ent in the SOAP\n+000fc350: 5f45 4e56 5f5f 4865 6164 6572 3c2f 613e _ENV__Header\n+000fc360: 3c2f 636f 6465 3e20 7374 7275 6374 2070 struct p\n+000fc370: 6f69 6e74 6564 2074 6f20 6279 203c 636f ointed to by soap:\n+000fc440: 3a68 6561 6465 723c 2f61 3e3c 2f63 6f64 :header will be inclu\n+000fc460: 6465 6420 696e 2074 6865 206d 6573 7361 ded in the messa\n+000fc470: 6765 2e3c 2f64 643e 3c2f 646c 3e0a 3c70 ge.
.At the client s\n+000fc490: 6964 652c 2074 6865 203c 636f 6465 3e3c ide, the <\n+000fc4a0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+000fc4b0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+000fc4c0: 6d6c 2361 6264 6134 6363 6430 6436 3466 ml#abda4ccd0d64f\n+000fc4d0: 3736 6562 3537 3134 3563 6334 3839 3063 76eb57145cc4890c\n+000fc4e0: 3837 6232 2220 7469 746c 653d 2255 7365 87b2\" title=\"Use\n+000fc4f0: 722d 6465 6669 6e61 626c 6520 534f 4150 r-definable SOAP\n+000fc500: 2d45 4e56 3a61 6374 6f72 2028 534f 4150 -ENV:actor (SOAP\n+000fc510: 2031 2e31 2920 6f72 2053 4f41 502d 454e 1.1) or SOAP-EN\n+000fc520: 563a 726f 6c65 2028 534f 4150 2031 2e32 V:role (SOAP 1.2\n+000fc530: 2920 6174 7472 6962 7574 6520 7661 6c75 ) attribute valu\n+000fc540: 6520 6f66 2061 6c6c 2053 4f41 502d 454e e of all SOAP-EN\n+000fc550: 563a 2e2e 2e22 3e73 6f61 703a 3a61 6374 V:...\">soap::act\n+000fc560: 6f72 3c2f 613e 3c2f 636f 6465 3e20 7374 or st\n+000fc570: 7269 6e67 2076 6172 6961 626c 6520 6361 ring variable ca\n+000fc580: 6e20 6265 2073 6574 2074 6f20 7365 7420 n be set to set \n+000fc590: 7468 6520 534f 4150 203c 656d 3e3c 636f the SOAP SOAP-ENV:acto\n+000fc5b0: 723c 2f63 6f64 653e 3c2f 656d 3e20 6174 r at\n+000fc5c0: 7472 6962 7574 652e 2054 6865 203c 656d tribute. The SOAP-ENV:\n+000fc5e0: 6d75 7374 556e 6465 7273 7461 6e64 3d22 mustUnderstand=\"\n+000fc5f0: 7472 7565 223c 2f63 6f64 653e 3c2f 656d true\" attribute then\n+000fc610: 2069 6e64 6963 6174 6573 2074 6865 2072 indicates the r\n+000fc620: 6571 7569 7265 6d65 6e74 2074 6861 7420 equirement that \n+000fc630: 7468 6520 7265 6369 7069 656e 7420 636f the recipient co\n+000fc640: 7272 6573 706f 6e64 696e 6720 746f 2074 rresponding to t\n+000fc650: 6865 203c 656d 3e3c 636f 6465 3e53 4f41 he SOA\n+000fc660: 502d 454e 563a 6163 746f 723c 2f63 6f64 P-ENV:actor attribut\n+000fc680: 6520 7661 6c75 6520 6973 2072 6573 706f e value is respo\n+000fc690: 6e73 6962 6c65 2074 6f20 7072 6f63 6573 nsible to proces\n+000fc6a0: 7320 7468 6520 534f 4150 2048 6561 6465 s the SOAP Heade\n+000fc6b0: 7220 656c 656d 656e 742e 2054 6865 2064 r element. The d\n+000fc6c0: 6574 6169 6c73 206f 6620 7768 6963 6820 etails of which \n+000fc6d0: 6361 6e20 6265 2066 6f75 6e64 2069 6e20 can be found in \n+000fc6e0: 7468 6520 534f 4150 2031 2e31 2f31 2e32 the SOAP 1.1/1.2\n+000fc6f0: 2073 7065 6369 6669 6361 7469 6f6e 7320 specifications \n+000fc700: 7468 6174 2074 6865 2067 534f 4150 2074 that the gSOAP t\n+000fc710: 6f6f 6c73 2063 6f6e 666f 726d 2074 6f2e ools conform to.\n+000fc720: 3c2f 703e 0a3c 703e 5468 6520 534f 4150

.

The SOAP\n+000fc730: 2048 6561 6465 7220 7374 7275 6374 7572 Header structur\n+000fc740: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e SOAP_ENV__Hea\n+000fc7b0: 6465 723c 2f61 3e3c 2f63 6f64 653e 2069 der i\n+000fc7c0: 7320 6465 636c 6172 6564 203c 636f 6465 s declared mutable,\n+000fc7e0: 2077 6869 6368 206d 6561 6e73 2074 6861 which means tha\n+000fc7f0: 7420 7265 2d64 6563 6c61 7261 7469 6f6e t re-declaration\n+000fc800: 7320 6f66 2074 6865 2073 7472 7563 7475 s of the structu\n+000fc810: 7265 7320 6172 6520 7065 726d 6974 7465 res are permitte\n+000fc820: 6420 616e 6420 6164 6469 7469 6f6e 616c d and additional\n+000fc830: 206d 656d 6265 7273 2061 7265 2063 6f6c members are col\n+000fc840: 6c65 6374 6564 2069 6e74 6f20 6f6e 6520 lected into one \n+000fc850: 6669 6e61 6c20 7374 7275 6374 7572 6520 final structure \n+000fc860: 6279 2074 6865 2073 6f61 7063 7070 3220 by the soapcpp2 \n+000fc870: 746f 6f6c 2e3c 2f70 3e0a 3c70 3e46 6f72 tool.

.

For\n+000fc880: 2061 6e6f 7468 6572 2065 7861 6d70 6c65 another example\n+000fc890: 2c20 636f 6e73 6964 6572 3a3c 2f70 3e0a , consider:

.\n+000fc8a0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
st\n+000fc8e0: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct SOAP_E\n+000fc930: 4e56 5f5f 4865 6164 6572 3c2f 613e 203c NV__Header <\n+000fc940: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{
.\n+000fc960: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\n+000fc990: 6368 6172 3c2f 7370 616e 3e20 2a68 5f5f char *h__\n+000fc9a0: 7472 616e 7361 6374 696f 6e3b 203c 2f64 transaction; .
\n+000fc9e0: 7374 7275 6374 203c 2f73 7061 6e3e 5573 struct Us\n+000fc9f0: 6572 4175 7468 202a 685f 5f61 7574 6865 erAuth *h__authe\n+000fca00: 6e74 6963 6174 696f 6e3b 203c 2f64 6976 ntication; .
};
.

Suppose m\n+000fca50: 6574 686f 6420 3c63 6f64 653e 6e73 5f5f ethod ns__\n+000fca60: 6c6f 6769 6e3c 2f63 6f64 653e 2075 7365 login use\n+000fca70: 7320 626f 7468 2068 6561 6465 7220 7061 s both header pa\n+000fca80: 7274 7320 2861 7420 6d6f 7374 292c 2074 rts (at most), t\n+000fca90: 6865 6e20 7468 6973 2069 7320 6465 636c hen this is decl\n+000fcaa0: 6172 6564 2061 733a 3c2f 703e 0a3c 6469 ared as:

.
//gso\n+000fcaf0: 6170 206e 7320 7365 7276 6963 6520 6d65 ap ns service me\n+000fcb00: 7468 6f64 2d68 6561 6465 722d 7061 7274 thod-header-part\n+000fcb10: 3a20 6c6f 6769 6e20 685f 5f74 7261 6e73 : login h__trans\n+000fcb20: 6163 7469 6f6e 203c 2f73 7061 6e3e 3c2f action .
//g\n+000fcb60: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n+000fcb70: 6d65 7468 6f64 2d68 6561 6465 722d 7061 method-header-pa\n+000fcb80: 7274 3a20 6c6f 6769 6e20 685f 5f61 7574 rt: login h__aut\n+000fcb90: 6865 6e74 6963 6174 696f 6e20 3c2f 7370 hentication
.
int\n+000fcbe0: 206e 735f 5f6c 6f67 696e 282e 2e2e 293b ns__login(...);\n+000fcbf0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.
Suppose method \n+000fcc20: 3c63 6f64 653e 6e73 5f5f 7365 6172 6368 ns__search\n+000fcc30: 3c2f 636f 6465 3e20 7573 6573 206f 6e6c uses onl\n+000fcc40: 7920 7468 6520 6669 7273 7420 6865 6164 y the first head\n+000fcc50: 6572 2070 6172 742c 2074 6865 6e20 7468 er part, then th\n+000fcc60: 6973 2069 7320 6465 636c 6172 6564 2061 is is declared a\n+000fcc70: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

.
<\n+000fcca0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000fccb0: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n+000fccc0: 7365 7276 6963 6520 6d65 7468 6f64 2d68 service method-h\n+000fccd0: 6561 6465 722d 7061 7274 3a20 7365 6172 eader-part: sear\n+000fcce0: 6368 2068 5f5f 7472 616e 7361 6374 696f ch h__transactio\n+000fccf0: 6e20 3c2f 7370 616e 3e3c 2f64 6976 3e0a n
.\n+000fcd00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
int<\n+000fcd30: 2f73 7061 6e3e 206e 735f 5f73 6561 7263 /span> ns__searc\n+000fcd40: 6828 2e2e 2e29 3b3c 2f64 6976 3e0a 3c2f h(...);
.

Note tha\n+000fcd70: 7420 7468 6520 6d65 7468 6f64 206e 616d t the method nam\n+000fcd80: 6520 616e 6420 6865 6164 6572 2070 6172 e and header par\n+000fcd90: 7420 6e61 6d65 7320 6d75 7374 2062 6520 t names must be \n+000fcda0: 6e61 6d65 7370 6163 6520 7175 616c 6966 namespace qualif\n+000fcdb0: 6965 642e 2054 6865 2068 6561 6465 7273 ied. The headers\n+000fcdc0: 206d 7573 7420 6265 2070 7265 7365 6e74 must be present\n+000fcdd0: 2069 6e20 616c 6c20 6f70 6572 6174 696f in all operatio\n+000fcde0: 6e73 2074 6861 7420 6465 636c 6172 6564 ns that declared\n+000fcdf0: 2074 6865 2068 6561 6465 7220 7061 7274 the header part\n+000fce00: 732e 3c2f 703e 0a3c 703e 546f 2073 7065 s.

.

To spe\n+000fce10: 6369 6679 2074 6865 2068 6561 6465 7220 cify the header \n+000fce20: 7061 7274 7320 666f 7220 7468 6520 6d65 parts for the me\n+000fce30: 7468 6f64 2069 6e70 7574 2028 6d65 7468 thod input (meth\n+000fce40: 6f64 2072 6571 7565 7374 206d 6573 7361 od request messa\n+000fce50: 6765 292c 2075 7365 3a3c 2f70 3e0a 3c64 ge), use:

.
//gs\n+000fcea0: 6f61 7020 6e61 6d65 7370 6163 652d 7072 oap namespace-pr\n+000fceb0: 6566 6978 2073 6572 7669 6365 206d 6574 efix service met\n+000fcec0: 686f 642d 696e 7075 742d 6865 6164 6572 hod-input-header\n+000fced0: 2d70 6172 743a 206d 6574 686f 642d 6e61 -part: method-na\n+000fcee0: 6d65 2068 6561 6465 722d 7061 7274 3c2f me header-part
.

Similarly,\n+000fcf20: 2074 6f20 7370 6563 6966 7920 7468 6520 to specify the \n+000fcf30: 6865 6164 6572 2070 6172 7473 2066 6f72 header parts for\n+000fcf40: 2074 6865 206d 6574 686f 6420 6f75 7470 the method outp\n+000fcf50: 7574 2028 6d65 7468 6f64 2072 6573 706f ut (method respo\n+000fcf60: 6e73 6520 6d65 7373 6167 6529 2c20 7573 nse message), us\n+000fcf70: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

.
<\n+000fcfa0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+000fcfb0: 656e 7422 3e2f 2f67 736f 6170 206e 616d ent\">//gsoap nam\n+000fcfc0: 6573 7061 6365 2d70 7265 6669 7820 7365 espace-prefix se\n+000fcfd0: 7276 6963 6520 6d65 7468 6f64 2d6f 7574 rvice method-out\n+000fcfe0: 7075 742d 6865 6164 6572 2d70 6172 743a put-header-part:\n+000fcff0: 206d 6574 686f 642d 6e61 6d65 2068 6561 method-name hea\n+000fd000: 6465 722d 7061 7274 3c2f 7370 616e 3e3c der-part<\n+000fd010: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

\n+000fd030: 5468 6520 6465 636c 6172 6174 696f 6e73 The declarations\n+000fd040: 206f 6e6c 7920 6166 6665 6374 2074 6865 only affect the\n+000fd050: 2057 5344 4c2e 2046 6f72 2065 7861 6d70 WSDL. For examp\n+000fd060: 6c65 3a3c 2f70 3e0a 3c64 6976 2063 6c61 le:

.
\n+000fd090: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct SOAP_ENV__Head\n+000fd100: 6572 3c2f 613e 203c 2f64 6976 3e0a 3c64 er
.\n+000fd120: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
.
char *h__transact\n+000fd170: 696f 6e3b 203c 2f64 6976 3e0a 3c64 6976 ion;
. \n+000fd190: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n+000fd1b0: 2f73 7061 6e3e 5573 6572 4175 7468 202a /span>UserAuth *\n+000fd1c0: 685f 5f61 7574 6865 6e74 6963 6174 696f h__authenticatio\n+000fd1d0: 6e3b 203c 2f64 6976 3e0a 3c64 6976 2063 n;
.
}; <\n+000fd1f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
//\n+000fd220: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n+000fd230: 206d 6574 686f 642d 696e 7075 742d 6865 method-input-he\n+000fd240: 6164 6572 2d70 6172 743a 206c 6f67 696e ader-part: login\n+000fd250: 2068 5f5f 6175 7468 656e 7469 6361 7469 h__authenticati\n+000fd260: 6f6e 203c 2f73 7061 6e3e 3c2f 6469 763e on
\n+000fd270: 0a3c 6469 7620 636c 6173 733d 226c 696e .
//gsoap\n+000fd2a0: 206e 7320 7365 7276 6963 6520 6d65 7468 ns service meth\n+000fd2b0: 6f64 2d69 6e70 7574 2d68 6561 6465 722d od-input-header-\n+000fd2c0: 7061 7274 3a20 6c6f 6769 6e20 685f 5f74 part: login h__t\n+000fd2d0: 7261 6e73 6163 7469 6f6e 203c 2f73 7061 ransaction
.
//gsoap ns serv\n+000fd320: 6963 6520 6d65 7468 6f64 2d6f 7574 7075 ice method-outpu\n+000fd330: 742d 6865 6164 6572 2d70 6172 743a 206c t-header-part: l\n+000fd340: 6f67 696e 2068 5f5f 7472 616e 7361 6374 ogin h__transact\n+000fd350: 696f 6e20 3c2f 7370 616e 3e3c 2f64 6976 ion .
in\n+000fd390: 743c 2f73 7061 6e3e 206e 735f 5f6c 6f67 t ns__log\n+000fd3a0: 696e 282e 2e2e 293b 3c2f 6469 763e 0a3c in(...);
.<\n+000fd3b0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

The hea\n+000fd3d0: 6465 7273 206d 7573 7420 6265 2070 7265 ders must be pre\n+000fd3e0: 7365 6e74 2069 6e20 616c 6c20 6f70 6572 sent in all oper\n+000fd3f0: 6174 696f 6e73 2074 6861 7420 6465 636c ations that decl\n+000fd400: 6172 6564 2074 6865 2068 6561 6465 7220 ared the header \n+000fd410: 7061 7274 732e 3c2f 703e 0a3c 703e 5365 parts.

.

Se\n+000fd420: 6520 616c 736f 2041 5049 2064 6f63 756d e also API docum\n+000fd430: 656e 7461 7469 6f6e 204d 6f64 756c 6520 entation Module \n+000fd440: 3c61 2063 6c61 7373 3d22 656c 2220 6872 H\n+000fd470: 6561 6465 7220 7374 7275 6374 7572 6520 eader structure \n+000fd480: 616e 6420 6675 6e63 7469 6f6e 733c 2f61 and functions.

.

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

..SOAP Fault pr\n+000fd500: 6f63 6573 7369 6e67 3c2f 6831 3e0a 3c70 ocessing.A built-in SOAP\n+000fd520: 2046 6175 6c74 2064 6174 6120 7374 7275 Fault data stru\n+000fd530: 6374 7572 6520 3c63 6f64 653e 3c61 2063 cture SOAP_ENV__F\n+000fd5a0: 6175 6c74 3c2f 613e 3c2f 636f 6465 3e20 ault \n+000fd5b0: 6973 2067 656e 6572 6174 6564 2062 7920 is generated by \n+000fd5c0: 7468 6520 736f 6170 6370 7032 2074 6f6f the soapcpp2 too\n+000fd5d0: 6c20 666f 7220 6578 6368 616e 6769 6e67 l for exchanging\n+000fd5e0: 2065 7863 6570 7469 6f6e 206d 6573 7361 exception messa\n+000fd5f0: 6765 732e 2054 6869 7320 7374 7275 6374 ges. This struct\n+000fd600: 7572 6520 6861 7320 7468 6520 6765 6e65 ure has the gene\n+000fd610: 7261 6c20 666f 726d 3a3c 2f70 3e0a 3c64 ral form:

.
stru\n+000fd660: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct SOAP_ENV_\n+000fd6b0: 5f46 6175 6c74 3c2f 613e 203c 2f64 6976 _Fault .
{
. \n+000fd6f0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 _QName \n+000fd750: 3c61 2063 6c61 7373 3d22 636f 6465 2220 f\n+000fd7b0: 6175 6c74 636f 6465 3c2f 613e 3b20 3c73 aultcode; // _QName is\n+000fd7e0: 2062 7569 6c74 2d69 6e20 3c2f 7370 616e built-in
.. \n+000fd8c0: 2020 3c73 7061 6e20 636c 6173 733d 226b char\n+000fd8e0: 3c2f 7370 616e 3e20 2a3c 6120 636c 6173 *faultact\n+000fd950: 6f72 3c2f 613e 3b20 3c2f 6469 763e 0a3c or;
.<\n+000fd960: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000fd970: 3e20 2020 203c 7370 616e 2063 6c61 7373 > struc\n+000fd990: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t SOAP_ENV_\n+000fd9e0: 5f44 6574 6169 6c3c 2f61 3e20 2a3c 6120 _Detail *deta\n+000fda50: 696c 3c2f 613e 3b20 3c2f 6469 763e 0a3c il;
.<\n+000fda60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000fda70: 3e20 2020 203c 7370 616e 2063 6c61 7373 > struc\n+000fda90: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t SOAP_ENV__C\n+000fdae0: 6f64 653c 2f61 3e20 2a3c 6120 636c 6173 ode *SOAP_ENV\n+000fdb50: 5f5f 436f 6465 3c2f 613e 3b20 3c73 7061 __Code; // must be a S\n+000fdb80: 4f41 505f 454e 565f 5f43 6f64 6520 7374 OAP_ENV__Code st\n+000fdb90: 7275 6374 2064 6566 696e 6564 2062 656c ruct defined bel\n+000fdba0: 6f77 203c 2f73 7061 6e3e 3c2f 6469 763e ow
\n+000fdbb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
char *SOA\n+000fdc50: 505f 454e 565f 5f52 6561 736f 6e3c 2f61 P_ENV__Reason;
.
\n+000fdc80: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *SOAP_ENV__\n+000fdd10: 4e6f 6465 3c2f 613e 3b20 3c2f 6469 763e Node;
\n+000fdd20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
char *SOA\n+000fddc0: 505f 454e 565f 5f52 6f6c 653c 2f61 3e3b P_ENV__Role;\n+000fddd0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
..
}; .
str\n+000fdf60: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct SOAP_ENV_\n+000fdfb0: 5f43 6f64 653c 2f61 3e20 3c2f 6469 763e _Code
\n+000fdfc0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{
.
\n+000fdff0: 203c 6120 636c 6173 733d 2263 6f64 6522 _QName <\n+000fe050: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+000fe060: 7265 663d 2273 7472 7563 745f 735f 6f5f ref=\"struct_s_o_\n+000fe070: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____\n+000fe080: 636f 6465 2e68 746d 6c23 6136 3238 3562 code.html#a6285b\n+000fe090: 3165 6438 6232 6361 6463 3331 3864 3733 1ed8b2cadc318d73\n+000fe0a0: 3066 3937 3135 6232 3935 3822 3e53 4f41 0f9715b2958\">SOA\n+000fe0b0: 505f 454e 565f 5f56 616c 7565 3c2f 613e P_ENV__Value\n+000fe0c0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n+000fe0e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+000fe0f0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct S\n+000fe140: 4f41 505f 454e 565f 5f43 6f64 653c 2f61 OAP_ENV__Code *SOAP_ENV__Subco\n+000fe1c0: 6465 3c2f 613e 3b20 3c2f 6469 763e 0a3c de;
.<\n+000fe1d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+000fe1e0: 3e7d 3b20 3c2f 6469 763e 0a3c 6469 7620 >};
..
{.
int \n+000fe2d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n+000fe330: 5f5f 7479 7065 3c2f 613e 3b20 203c 7370 __type; // The SOAP_T\n+000fe360: 5950 455f 206f 6620 7468 6520 6f62 6a65 YPE_ of the obje\n+000fe370: 6374 2073 6572 6961 6c69 7a65 6420 6173 ct serialized as\n+000fe380: 2046 6175 6c74 2064 6574 6169 6c20 3c2f Fault detail
. \n+000fe3b0: 2020 3c73 7061 6e20 636c 6173 733d 226b void\n+000fe3d0: 3c2f 7370 616e 3e20 2a3c 6120 636c 6173 *fault; // poi\n+000fe460: 6e74 6572 2074 6f20 7468 6520 6661 756c nter to the faul\n+000fe470: 7420 6f62 6a65 6374 2c20 6f72 204e 554c t object, or NUL\n+000fe480: 4c20 3c2f 7370 616e 3e3c 2f64 6976 3e0a L
.\n+000fe490: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
_XML __any; // any other\n+000fe590: 2064 6574 6169 6c20 656c 656d 656e 7420 detail element \n+000fe5a0: 636f 6e74 656e 7420 2873 746f 7265 6420 content (stored \n+000fe5b0: 696e 2058 4d4c 2066 6f72 6d61 7429 203c in XML format) <\n+000fe5c0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.}\n+000fe5e0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
<\n+000fe680: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+000fe690: 223e 534f 4150 2046 6175 6c74 2043 6f64 \">SOAP Fault Cod\n+000fe6a0: 6520 7374 7275 6374 7572 652e 3c2f 6469 e structure.
Definiti\n+000fe6d0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+000fe6e0: 2e68 3a39 3437 313c 2f64 6976 3e3c 2f64 .h:9471
.
SOAP_ENV_\n+000fe7c0: 5f43 6f64 653a 3a53 4f41 505f 454e 565f _Code::SOAP_ENV_\n+000fe7d0: 5f53 7562 636f 6465 3c2f 613e 3c2f 6469 _Subcode
struct SOA\n+000fe800: 505f 454e 565f 5f43 6f64 6520 2a20 534f P_ENV__Code * SO\n+000fe810: 4150 5f45 4e56 5f5f 5375 6263 6f64 653c AP_ENV__Subcode<\n+000fe820: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
Optional\n+000fe840: 2065 6c65 6d65 6e74 2053 4f41 502d 454e element SOAP-EN\n+000fe850: 563a 5375 6263 6f64 6520 6f66 2058 5344 V:Subcode of XSD\n+000fe860: 2074 7970 6520 534f 4150 2d45 4e56 3a43 type SOAP-ENV:C\n+000fe870: 6f64 653c 2f64 6976 3e3c 6469 7620 636c ode
D\n+000fe890: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n+000fe8a0: 7464 736f 6170 322e 683a 3934 3735 3c2f tdsoap2.h:9475
.
.
SOAP_E\n+000feaf0: 4e56 5f5f 4465 7461 696c 3c2f 613e 3c2f NV__Detail
SOAP Faul\n+000feb20: 7420 4465 7461 696c 2073 7472 7563 7475 t Detail structu\n+000feb30: 7265 2e3c 2f64 6976 3e3c 6469 7620 636c re.
D\n+000feb50: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n+000feb60: 7464 736f 6170 322e 683a 3934 3832 3c2f tdsoap2.h:9482
.
<\n+000febf0: 6120 6872 6566 3d22 7374 7275 6374 5f73 a href=\"struct_s\n+000fec00: 5f6f 5f61 5f70 5f5f 5f65 5f6e 5f76 5f5f _o_a_p___e_n_v__\n+000fec10: 5f5f 5f64 6574 6169 6c2e 6874 6d6c 2361 ___detail.html#a\n+000fec20: 3135 3964 3334 3437 3539 6330 3666 3832 159d344759c06f82\n+000fec30: 6561 6531 3934 3961 6561 3130 6131 6366 eae1949aea10a1cf\n+000fec40: 223e 534f 4150 5f45 4e56 5f5f 4465 7461 \">SOAP_ENV__Deta\n+000fec50: 696c 3a3a 6661 756c 743c 2f61 3e3c 2f64 il::fault
void * fa\n+000fec80: 756c 743c 2f64 6976 3e3c 6469 7620 636c ult
Any \n+000feca0: 6461 7461 206f 6620 736f 6d65 2074 7970 data of some typ\n+000fecb0: 6520 5420 7365 7269 616c 697a 6564 2061 e T serialized a\n+000fecc0: 7320 6661 756c 7420 656c 656d 656e 7420 s fault element \n+000fecd0: 7768 656e 2069 7473 2053 4f41 505f 5459 when its SOAP_TY\n+000fece0: 5045 5f54 2069 7320 6173 7369 676e 6564 PE_T is assigned\n+000fecf0: 2074 6f20 5f5f 7479 7065 3c2f 6469 763e to __type
\n+000fed00: 3c64 6976 2063 6c61 7373 3d22 7474 6465
Definition\n+000fed20: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n+000fed30: 3a39 3438 363c 2f64 6976 3e3c 2f64 6976 :9486
.
_X\n+000fee40: 4d4c 205f 5f61 6e79 3c2f 6469 763e 3c64 ML __any
Any XML content\n+000fee70: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
Def\n+000fee90: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n+000feea0: 736f 6170 322e 683a 3934 3838 3c2f 6469 soap2.h:9488
.
\n+000fef80: 534f 4150 5f45 4e56 5f5f 4465 7461 696c SOAP_ENV__Detail\n+000fef90: 3a3a 5f5f 7479 7065 3c2f 613e 3c2f 6469 ::__type
int __type\n+000fefc0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
Any dat\n+000fefe0: 6120 6f66 2073 6f6d 6520 7479 7065 2054 a of some type T\n+000feff0: 2073 6572 6961 6c69 7a65 6420 6173 2066 serialized as f\n+000ff000: 6175 6c74 2065 6c65 6d65 6e74 2077 6865 ault element whe\n+000ff010: 6e20 6974 7320 534f 4150 5f54 5950 455f n its SOAP_TYPE_\n+000ff020: 5420 6973 2061 7373 6967 6e65 6420 746f T is assigned to\n+000ff030: 205f 5f74 7970 653c 2f64 6976 3e3c 6469 __type
\n+000ff050: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:94\n+000ff070: 3834 3c2f 6469 763e 3c2f 6469 763e 0a3c 84
.<\n+000ff080: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+000ff090: 6964 3d22 6173 7472 7563 745f 735f 6f5f id=\"astruct_s_o_\n+000ff0a0: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____\n+000ff0b0: 6661 756c 745f 6874 6d6c 5f61 3037 6535 fault_html_a07e5\n+000ff0c0: 3038 6235 3230 6538 6131 6532 6338 6261 08b520e8a1e2c8ba\n+000ff0d0: 3230 6163 6631 6332 6464 6439 223e 3c64 20acf1c2ddd9\">SOAP_ENV__Fa\n+000ff150: 756c 743a 3a53 4f41 505f 454e 565f 5f4e ult::SOAP_ENV__N\n+000ff160: 6f64 653c 2f61 3e3c 2f64 6976 3e3c 6469 ode
char * SOAP_ENV\n+000ff190: 5f5f 4e6f 6465 3c2f 6469 763e 3c64 6976 __Node
O\n+000ff1b0: 7074 696f 6e61 6c20 656c 656d 656e 7420 ptional element \n+000ff1c0: 534f 4150 2d45 4e56 3a4e 6f64 6520 6f66 SOAP-ENV:Node of\n+000ff1d0: 2058 5344 2074 7970 6520 7873 643a 7374 XSD type xsd:st\n+000ff1e0: 7269 6e67 3c2f 6469 763e 3c64 6976 2063 ring
\n+000ff200: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+000ff210: 7374 6473 6f61 7032 2e68 3a39 3436 303c stdsoap2.h:9460<\n+000ff220: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
.
<\n+000ff2a0: 6120 6872 6566 3d22 7374 7275 6374 5f73 a href=\"struct_s\n+000ff2b0: 5f6f 5f61 5f70 5f5f 5f65 5f6e 5f76 5f5f _o_a_p___e_n_v__\n+000ff2c0: 5f5f 5f66 6175 6c74 2e68 746d 6c23 6135 ___fault.html#a5\n+000ff2d0: 3630 6536 6664 3037 6136 6232 6635 3163 60e6fd07a6b2f51c\n+000ff2e0: 6566 3937 6161 3132 3238 3263 3837 3022 ef97aa12282c870\"\n+000ff2f0: 3e53 4f41 505f 454e 565f 5f46 6175 6c74 >SOAP_ENV__Fault\n+000ff300: 3a3a 534f 4150 5f45 4e56 5f5f 4465 7461 ::SOAP_ENV__Deta\n+000ff310: 696c 3c2f 613e 3c2f 6469 763e 3c64 6976 il
\n+000ff330: 7374 7275 6374 2053 4f41 505f 454e 565f struct SOAP_ENV_\n+000ff340: 5f44 6574 6169 6c20 2a20 534f 4150 5f45 _Detail * SOAP_E\n+000ff350: 4e56 5f5f 4465 7461 696c 3c2f 6469 763e NV__Detail
\n+000ff360: 3c64 6976 2063 6c61 7373 3d22 7474 646f
Optional elem\n+000ff380: 656e 7420 534f 4150 2d45 4e56 3a44 6574 ent SOAP-ENV:Det\n+000ff390: 6169 6c20 6f66 2058 5344 2074 7970 6520 ail of XSD type \n+000ff3a0: 534f 4150 2d45 4e56 3a44 6574 6169 6c3c SOAP-ENV:Detail<\n+000ff3b0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
Defin\n+000ff3d0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+000ff3e0: 6170 322e 683a 3934 3634 3c2f 6469 763e ap2.h:9464
\n+000ff3f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
SOAP\n+000ff4c0: 5f45 4e56 5f5f 4661 756c 743a 3a53 4f41 _ENV__Fault::SOA\n+000ff4d0: 505f 454e 565f 5f52 6f6c 653c 2f61 3e3c P_ENV__Role<\n+000ff4e0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
char * \n+000ff500: 534f 4150 5f45 4e56 5f5f 526f 6c65 3c2f SOAP_ENV__Role
Optional \n+000ff530: 656c 656d 656e 7420 534f 4150 2d45 4e56 element SOAP-ENV\n+000ff540: 3a52 6f6c 6520 6f66 2058 5344 2074 7970 :Role of XSD typ\n+000ff550: 6520 7873 643a 7374 7269 6e67 3c2f 6469 e xsd:string
Definiti\n+000ff580: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+000ff590: 2e68 3a39 3436 323c 2f64 6976 3e3c 2f64 .h:9462
.
SOAP_EN\n+000ff670: 565f 5f46 6175 6c74 3a3a 534f 4150 5f45 V__Fault::SOAP_E\n+000ff680: 4e56 5f5f 5265 6173 6f6e 3c2f 613e 3c2f NV__Reason
struct S\n+000ff6b0: 4f41 505f 454e 565f 5f52 6561 736f 6e20 OAP_ENV__Reason \n+000ff6c0: 2a20 534f 4150 5f45 4e56 5f5f 5265 6173 * SOAP_ENV__Reas\n+000ff6d0: 6f6e 3c2f 6469 763e 3c64 6976 2063 6c61 on
Optio\n+000ff6f0: 6e61 6c20 656c 656d 656e 7420 534f 4150 nal element SOAP\n+000ff700: 2d45 4e56 3a52 6561 736f 6e20 6f66 2058 -ENV:Reason of X\n+000ff710: 5344 2074 7970 6520 534f 4150 2d45 4e56 SD type SOAP-ENV\n+000ff720: 3a52 6561 736f 6e3c 2f64 6976 3e3c 6469 :Reason
\n+000ff740: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:94\n+000ff760: 3538 3c2f 6469 763e 3c2f 6469 763e 0a3c 58
.<\n+000ff770: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+000ff780: 6964 3d22 6173 7472 7563 745f 735f 6f5f id=\"astruct_s_o_\n+000ff790: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____\n+000ff7a0: 6661 756c 745f 6874 6d6c 5f61 6330 3862 fault_html_ac08b\n+000ff7b0: 3337 3235 6337 6336 6232 6539 6336 3336 3725c7c6b2e9c636\n+000ff7c0: 3939 3565 3832 3837 3661 3961 223e 3c64 995e82876a9a\">SOAP_ENV__Fa\n+000ff840: 756c 743a 3a66 6175 6c74 7374 7269 6e67 ult::faultstring\n+000ff850: 3c2f 613e 3c2f 6469 763e 3c64 6976 2063
ch\n+000ff870: 6172 202a 2066 6175 6c74 7374 7269 6e67 ar * faultstring\n+000ff880: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
Optiona\n+000ff8a0: 6c20 656c 656d 656e 7420 6661 756c 7473 l element faults\n+000ff8b0: 7472 696e 6720 6f66 2058 5344 2074 7970 tring of XSD typ\n+000ff8c0: 6520 7873 643a 7374 7269 6e67 3c2f 6469 e xsd:string
Definiti\n+000ff8f0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+000ff900: 2e68 3a39 3435 303c 2f64 6976 3e3c 2f64 .h:9450
.
SOAP_EN\n+000ff9e0: 565f 5f46 6175 6c74 3a3a 534f 4150 5f45 V__Fault::SOAP_E\n+000ff9f0: 4e56 5f5f 436f 6465 3c2f 613e 3c2f 6469 NV__Code
struct SOA\n+000ffa20: 505f 454e 565f 5f43 6f64 6520 2a20 534f P_ENV__Code * SO\n+000ffa30: 4150 5f45 4e56 5f5f 436f 6465 3c2f 6469 AP_ENV__Code
Optional el\n+000ffa60: 656d 656e 7420 534f 4150 2d45 4e56 3a43 ement SOAP-ENV:C\n+000ffa70: 6f64 6520 6f66 2058 5344 2074 7970 6520 ode of XSD type \n+000ffa80: 534f 4150 2d45 4e56 3a43 6f64 653c 2f64 SOAP-ENV:Code
Definit\n+000ffab0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+000ffac0: 322e 683a 3934 3536 3c2f 6469 763e 3c2f 2.h:9456
.
Optio\n+000ffc00: 6e61 6c20 656c 656d 656e 7420 6661 756c nal element faul\n+000ffc10: 7463 6f64 6520 6f66 2058 5344 2074 7970 tcode of XSD typ\n+000ffc20: 6520 7873 643a 514e 616d 653c 2f64 6976 e xsd:QName
Definitio\n+000ffc50: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+000ffc60: 683a 3934 3438 3c2f 6469 763e 3c2f 6469 h:9448
.
Optio\n+000ffda0: 6e61 6c20 656c 656d 656e 7420 6661 756c nal element faul\n+000ffdb0: 7461 6374 6f72 206f 6620 5853 4420 7479 tactor of XSD ty\n+000ffdc0: 7065 2078 7364 3a73 7472 696e 673c 2f64 pe xsd:string
Definit\n+000ffdf0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+000ffe00: 322e 683a 3934 3532 3c2f 6469 763e 3c2f 2.h:9452
.
s\n+000fff10: 7472 7563 7420 534f 4150 5f45 4e56 5f5f truct SOAP_ENV__\n+000fff20: 4465 7461 696c 202a 2064 6574 6169 6c3c Detail * detail<\n+000fff30: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
Optional\n+000fff50: 2065 6c65 6d65 6e74 2064 6574 6169 6c20 element detail \n+000fff60: 6f66 2058 5344 2074 7970 6520 534f 4150 of XSD type SOAP\n+000fff70: 2d45 4e56 3a44 6574 6169 6c3c 2f64 6976 -ENV:Detail
Definitio\n+000fffa0: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+000fffb0: 683a 3934 3534 3c2f 6469 763e 3c2f 6469 h:9454
.

The\n+000fffe0: 2066 6972 7374 2066 6f75 7220 6d65 6d62 first four memb\n+000ffff0: 6572 7320 696e 203c 636f 6465 3e3c 6120 ers in SOAP_ENV__\n+00100060: 4661 756c 743c 2f61 3e3c 2f63 6f64 653e Fault\n+00100070: 2061 7265 2053 4f41 5020 312e 3120 7370 are SOAP 1.1 sp\n+00100080: 6563 6966 6963 2e20 5468 6520 6c61 7374 ecific. The last\n+00100090: 2066 6976 6520 6d65 6d62 6572 7320 6172 five members ar\n+001000a0: 6520 534f 4150 2031 2e32 2073 7065 6369 e SOAP 1.2 speci\n+001000b0: 6669 632e 2059 6f75 2063 616e 2072 6564 fic. You can red\n+001000c0: 6566 696e 6520 7468 6573 6520 7374 7275 efine these stru\n+001000d0: 6374 7572 6573 2069 6e20 7468 6520 696e ctures in the in\n+001000e0: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f\n+001000f0: 696c 6520 666f 7220 736f 6170 6370 7032 ile for soapcpp2\n+00100100: 2e20 466f 7220 6578 616d 706c 652c 2079 . For example, y\n+00100110: 6f75 2063 616e 2075 7365 2061 203c 636f ou can use a class \n+00100130: 666f 7220 7468 6520 3c63 6f64 653e 3c61 for the SOAP_ENV_\n+001001a0: 5f46 6175 6c74 3c2f 613e 3c2f 636f 6465 _Fault and add method\n+001001c0: 7320 666f 7220 636f 6e76 656e 6965 6e63 s for convenienc\n+001001d0: 652e 3c2f 703e 0a3c 703e 5468 6520 3c63 e.

.

The SOAP_ENV__D\n+00100250: 6574 6169 6c3c 2f61 3e3c 2f63 6f64 653e etail\n+00100260: 2073 7472 7563 7475 7265 2063 616e 2062 structure can b\n+00100270: 6520 6368 616e 6765 6420 746f 2074 6865 e changed to the\n+00100280: 206e 6565 6473 206f 6620 5765 6220 7365 needs of Web se\n+00100290: 7276 6963 6520 6170 706c 6963 6174 696f rvice applicatio\n+001002a0: 6e20 746f 2063 6f6d 6d75 6e69 6361 7465 n to communicate\n+001002b0: 2073 7065 6369 6669 6320 6661 756c 7420 specific fault \n+001002c0: 6461 7461 2073 7472 7563 7475 7265 732c data structures,\n+001002d0: 2062 7574 2074 6869 7320 6973 2067 656e but this is gen\n+001002e0: 6572 616c 6c79 206e 6f74 206e 6563 6573 erally not neces\n+001002f0: 7361 7279 2062 6563 6175 7365 2074 6865 sary because the\n+00100300: 2061 7070 6c69 6361 7469 6f6e 2d73 7065 application-spe\n+00100310: 6369 6669 6320 534f 4150 2046 6175 6c74 cific SOAP Fault\n+00100320: 2064 6574 6169 6c73 2063 616e 2062 6520 details can be \n+00100330: 7365 7269 616c 697a 6564 2076 6961 2074 serialized via t\n+00100340: 6865 203c 636f 6465 3e5f 5f74 7970 653c he __type<\n+00100350: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and fault me\n+00100370: 6d62 6572 7320 696e 2074 6865 203c 636f mbers in the SOAP_ENV__De\n+001003f0: 7461 696c 3c2f 613e 3c2f 636f 6465 3e20 tail \n+00100400: 6d65 6d62 6572 2c20 7365 6520 5365 6374 member, see Sect\n+00100410: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion Void po\n+00100440: 696e 7465 7220 7365 7269 616c 697a 6174 inter serializat\n+00100450: 696f 6e3c 2f61 3e20 6f6e 2074 6865 2073 ion on the s\n+00100460: 6572 6961 6c69 7a61 7469 6f6e 206f 6620 erialization of \n+00100470: 6461 7461 2072 6566 6572 7265 6420 746f data referred to\n+00100480: 2062 7920 3c63 6f64 653e 5f5f 7479 7065 by __type\n+00100490: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and fault.<\n+001004b0: 2f70 3e0a 3c70 3e57 6865 6e20 6120 7573 /p>.

When a us\n+001004c0: 6572 2d64 6566 696e 6520 7365 7276 6963 er-define servic\n+001004d0: 6520 6f70 6572 6174 696f 6e20 6675 6e63 e operation func\n+001004e0: 7469 6f6e 2072 6574 7572 6e73 2061 6e20 tion returns an \n+001004f0: 6572 726f 7220 7769 7468 203c 636f 6465 error with s\n+001005a0: 6f61 705f 7365 6e64 6572 5f66 6175 6c74 oap_sender_fault\n+001005b0: 3c2f 613e 3c2f 636f 6465 3e20 6f72 203c or <\n+001005c0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_receiv\n+00100670: 6572 5f66 6175 6c74 3c2f 613e 3c2f 636f er_fault, then the SO\n+00100690: 4150 2046 6175 6c74 2073 7472 7563 7475 AP Fault structu\n+001006a0: 7265 2069 7320 706f 7075 6c61 7465 6420 re is populated \n+001006b0: 616e 6420 3c63 6f64 653e 3c61 2063 6c61 and soap::fault points \n+00100790: 746f 2074 6869 7320 534f 4150 2046 6175 to this SOAP Fau\n+001007a0: 6c74 2e20 5468 6520 534f 4150 2046 6175 lt. The SOAP Fau\n+001007b0: 6c74 2069 7320 7365 6e74 2074 6f20 7468 lt is sent to th\n+001007c0: 6520 636c 6965 6e74 2e20 5468 6520 636c e client. The cl\n+001007d0: 6965 6e74 2070 6f70 756c 6174 6573 2061 ient populates a\n+001007e0: 2053 4f41 5020 4661 756c 7420 7374 7275 SOAP Fault stru\n+001007f0: 6374 7572 6520 7468 6174 2063 6f6e 7461 cture that conta\n+00100800: 696e 7320 7468 6520 534f 4150 2046 6175 ins the SOAP Fau\n+00100810: 6c74 206d 6573 7361 6765 2077 6974 6820 lt message with \n+00100820: 6465 7461 696c 732e 3c2f 703e 0a3c 703e details.

.

\n+00100830: 5365 7276 6572 2d73 6964 6520 6661 756c Server-side faul\n+00100840: 7473 2061 7265 2072 6169 7365 6420 7769 ts are raised wi\n+00100850: 7468 203c 636f 6465 3e3c 6120 636c 6173 th soap_send\n+00100900: 6572 5f66 6175 6c74 3c2f 613e 3c2f 636f er_fault or soa\n+001009c0: 705f 7265 6365 6976 6572 5f66 6175 6c74 p_receiver_fault\n+001009d0: 3c2f 613e 3c2f 636f 6465 3e2e 2054 6865 . The\n+001009e0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_sender\n+00100a90: 5f66 6175 6c74 3c2f 613e 3c2f 636f 6465 _fault call should be\n+00100ab0: 2075 7365 6420 746f 2069 6e66 6f72 6d20 used to inform \n+00100ac0: 7468 6174 2074 6865 2073 656e 6465 7220 that the sender \n+00100ad0: 6973 2061 7420 6661 756c 7420 616e 6420 is at fault and \n+00100ae0: 7468 6520 7365 6e64 6572 2028 636c 6965 the sender (clie\n+00100af0: 6e74 2920 7368 6f75 6c64 206e 6f74 2072 nt) should not r\n+00100b00: 652d 7365 6e64 2074 6865 2072 6571 7565 e-send the reque\n+00100b10: 7374 2e20 5468 6520 3c63 6f64 653e 3c61 st. The so\n+00100bc0: 6170 5f72 6563 6569 7665 725f 6661 756c ap_receiver_faul\n+00100bd0: 743c 2f61 3e3c 2f63 6f64 653e 2063 616c t cal\n+00100be0: 6c20 7368 6f75 6c64 2062 6520 7573 6564 l should be used\n+00100bf0: 2074 6f20 696e 6469 6361 7465 2061 2074 to indicate a t\n+00100c00: 656d 706f 7261 7279 2073 6572 7665 722d emporary server-\n+00100c10: 7369 6465 2070 726f 626c 656d 2c20 736f side problem, so\n+00100c20: 2061 2073 656e 6465 7220 2863 6c69 656e a sender (clien\n+00100c30: 7429 2063 616e 2072 652d 7365 6e64 2074 t) can re-send t\n+00100c40: 6865 2072 6571 7565 7374 206c 6174 6572 he request later\n+00100c50: 2e20 466f 7220 6578 616d 706c 653a 3c2f . For example:.

int \n+00100cb0: 6e73 315f 5f6d 794d 6574 686f 6428 3c73 ns1__myMethod(struct soap *soap, ...)
.\n+00100d50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{
.
..\n+00100d80: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . //
.
return soap_rece\n+00100e40: 6976 6572 5f66 6175 6c74 3c2f 613e 283c iver_fault(<\n+00100e50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00100e60: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00100e70: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00100e80: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+00100ea0: 743b 5265 736f 7572 6365 2074 656d 706f t;Resource tempo\n+00100eb0: 7261 7269 6c79 2075 6e61 7661 696c 6162 rarily unavailab\n+00100ec0: 6c65 2671 756f 743b 3c2f 7370 616e 3e2c le",\n+00100ed0: 204e 554c 4c29 3b20 3c73 7061 6e20 636c NULL); //\n+00100ef0: 2072 6574 7572 6e20 6661 756c 7420 746f return fault to\n+00100f00: 2073 656e 6465 7220 3c2f 7370 616e 3e3c sender <\n+00100f10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
}
.\n+00100f30: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

In the\n+00100f50: 2065 7861 6d70 6c65 2c20 7468 6520 534f example, the SO\n+00100f60: 4150 2046 6175 6c74 2064 6574 6169 6c73 AP Fault details\n+00100f70: 2077 6572 6520 656d 7074 7920 284e 554c were empty (NUL\n+00100f80: 4c29 2e20 596f 7520 6d61 7920 7061 7373 L). You may pass\n+00100f90: 2061 6e20 584d 4c20 6672 6167 6d65 6e74 an XML fragment\n+00100fa0: 2c20 7768 6963 6820 7769 6c6c 2062 6520 , which will be \n+00100fb0: 6c69 7465 7261 6c6c 7920 696e 636c 7564 literally includ\n+00100fc0: 6564 2069 6e20 7468 6520 534f 4150 2046 ed in the SOAP F\n+00100fd0: 6175 6c74 206d 6573 7361 6765 2e20 466f ault message. Fo\n+00100fe0: 7220 5753 2d49 2042 6173 6963 2050 726f r WS-I Basic Pro\n+00100ff0: 6669 6c65 2063 6f6d 706c 6961 6e63 652c file compliance,\n+00101000: 2079 6f75 206d 7573 7420 7061 7373 2061 you must pass a\n+00101010: 6e20 584d 4c20 7374 7269 6e67 2077 6974 n XML string wit\n+00101020: 6820 6f6e 6520 6f72 206d 6f72 6520 6e61 h one or more na\n+00101030: 6d65 7370 6163 6520 7175 616c 6966 6965 mespace qualifie\n+00101040: 6420 656c 656d 656e 7473 2c20 7375 6368 d elements, such\n+00101050: 2061 733a 3c2f 703e 0a3c 6469 7620 636c as:

.
<\n+00101070: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00101080: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >retur\n+001010a0: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n soap\n+00101100: 5f72 6563 6569 7665 725f 6661 756c 743c _receiver_fault<\n+00101110: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+00101140: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, "Resource \n+00101170: 7465 6d70 6f72 6172 696c 7920 756e 6176 temporarily unav\n+00101180: 6169 6c61 626c 6526 7175 6f74 3b3c 2f73 ailable", "<erro\n+001011c0: 7263 6f64 6520 786d 6c6e 733d 2623 3339 rcode xmlns='\n+001011d0: 3b68 7474 703a 2f2f 7465 6d70 7572 692e ;http://tempuri.\n+001011e0: 6f72 6726 2333 393b 2667 743b 3132 3326 org'>123&\n+001011f0: 6c74 3b2f 6572 726f 7263 6f64 6526 6774 lt;/errorcode>\n+00101200: 3b26 6c74 3b65 7272 6f72 696e 666f 2078 ;<errorinfo x\n+00101210: 6d6c 6e73 3d26 2333 393b 6874 7470 3a2f mlns='http:/\n+00101220: 2f74 656d 7075 7269 2e6f 7267 2623 3339 /tempuri.org'\n+00101230: 3b26 6774 3b61 6263 266c 743b 2f65 7272 ;>abc</err\n+00101240: 6f72 696e 666f 2667 743b 2671 756f 743b orinfo>"\n+00101250: 3c2f 7370 616e 3e29 3b3c 2f64 6976 3e0a );
.\n+00101260: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

When a\n+00101280: 2073 6572 7669 6365 206f 7065 7261 7469 service operati\n+00101290: 6f6e 206e 6565 6473 2074 6f20 706f 7075 on needs to popu\n+001012a0: 6c61 7465 2053 4f41 5020 4661 756c 7420 late SOAP Fault \n+001012b0: 6465 7461 696c 7320 7769 7468 2061 2061 details with a a\n+001012c0: 7070 6c69 6361 7469 6f6e 2d73 7065 6369 pplication-speci\n+001012d0: 6669 6320 6461 7461 2c20 6974 2064 6f65 fic data, it doe\n+001012e0: 7320 736f 2062 7920 6173 7369 676e 696e s so by assignin\n+001012f0: 6720 7468 6520 3c63 6f64 653e 3c61 2063 g the soap::fault<\n+001013c0: 2f61 3e3c 2f63 6f64 653e 206d 656d 6265 /a> membe\n+001013d0: 7220 6f66 2074 6865 2063 7572 7265 6e74 r of the current\n+001013e0: 2072 6566 6572 656e 6365 2074 6f20 7468 reference to th\n+001013f0: 6520 636f 6e74 6578 7420 7769 7468 2061 e context with a\n+00101400: 7070 726f 7072 6961 7465 2064 6174 6120 ppropriate data \n+00101410: 6173 736f 6369 6174 6564 2077 6974 6820 associated with \n+00101420: 7468 6520 6578 6365 7074 696f 6e20 616e the exception an\n+00101430: 6420 6279 2072 6574 7572 6e69 6e67 2074 d by returning t\n+00101440: 6865 2065 7272 6f72 203c 636f 6465 3e23 he error #\n+00101450: 534f 4150 5f46 4155 4c54 3c2f 636f 6465 SOAP_FAULT. For example:<\n+00101470: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

s\n+001014f0: 6f61 705f 7265 6365 6976 6572 5f66 6175 oap_receiver_fau\n+00101500: 6c74 3c2f 613e 283c 6120 636c 6173 733d lt(so\n+00101530: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, "Error \n+00101560: 6d65 7373 6167 6526 7175 6f74 3b3c 2f73 message", NULL); .
\n+001015b0: 6966 3c2f 7370 616e 3e20 283c 6120 636c if (soap-><\n+001015f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00101600: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00101610: 6874 6d6c 2361 3339 6461 6131 3966 3033 html#a39daa19f03\n+00101620: 3961 6562 6337 3662 3863 3462 3662 6639 9aebc76b8c4b6bf9\n+00101630: 3333 3537 3061 223e 7665 7273 696f 6e3c 33570a\">version<\n+00101640: 2f61 3e20 3d3d 2032 2920 3c73 7061 6e20 /a> == 2) \n+00101660: 2f2f 2053 4f41 5020 312e 3220 6973 2075 // SOAP 1.2 is u\n+00101670: 7365 6420 3c2f 7370 616e 3e3c 2f64 6976 sed .
{
. \n+001016b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+001016e0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >fau\n+00101730: 6c74 3c2f 613e 2d26 6774 3b3c 6120 636c lt->SOAP_E\n+001017a0: 4e56 5f5f 4465 7461 696c 3c2f 613e 203d NV__Detail =\n+001017b0: 2073 6f61 705f 6e65 775f 534f 4150 5f45 soap_new_SOAP_E\n+001017c0: 4e56 5f5f 4465 7461 696c 283c 6120 636c NV__Detail(soap, -1);\n+00101800: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
soap-><\n+00101850: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00101860: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00101870: 6874 6d6c 2361 3932 3065 3238 3430 6162 html#a920e2840ab\n+00101880: 3263 3831 3633 3738 3035 3930 3232 6463 2c816378059022dc\n+00101890: 6664 3936 6530 223e 6661 756c 743c 2f61 fd96e0\">fault->SOAP_ENV__D\n+00101910: 6574 6169 6c3c 2f61 3e2d 2667 743b 3c61 etail->__\n+00101980: 7479 7065 3c2f 613e 203d 2053 4f41 505f type = SOAP_\n+00101990: 5459 5045 5f6e 7331 5f5f 6d79 5374 6163 TYPE_ns1__myStac\n+001019a0: 6b44 6174 6154 7970 653b 203c 7370 616e kDataType; // stack type <\n+001019d0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
. \n+001019f0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+00101a20: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->fa\n+00101a70: 756c 743c 2f61 3e2d 2667 743b 3c61 2063 ult->SOAP_\n+00101ae0: 454e 565f 5f44 6574 6169 6c3c 2f61 3e2d ENV__Detail-\n+00101af0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >fault = \n+00101b60: 7370 3b20 2020 2020 2020 2020 2020 2020 sp; \n 00101b70: 2020 2020 2020 2020 2020 2020 2020 2020 \n-00101b80: 2020 2020 2020 2020 3c73 7061 6e20 636c //\n-00101ba0: 2070 6f69 6e74 2074 6f20 7374 6163 6b20 point to stack \n-00101bb0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-00101bd0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->f\n-00101c50: 6175 6c74 3c2f 613e 2d26 6774 3b3c 6120 ault->SOAP\n-00101cc0: 5f45 4e56 5f5f 4465 7461 696c 3c2f 613e _ENV__Detail\n-00101cd0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->__any =\n-00101d40: 204e 554c 4c3b 2020 2020 2020 2020 2020 NULL; \n-00101d50: 2020 2020 2020 2020 2020 2020 2020 2020 \n-00101d60: 2020 3c73 7061 6e20 636c 6173 733d 2263 // no ot\n-00101d80: 6865 7220 584d 4c20 6461 7461 203c 2f73 her XML data
.
} <\n-00101db0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
else .
{
.<\n-00101e10: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00101e20: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap->\n-00101ea0: 6661 756c 743c 2f61 3e2d 2667 743b 3c61 fault->det\n-00101f10: 6169 6c3c 2f61 3e20 3d20 736f 6170 5f6e ail = soap_n\n-00101f20: 6577 5f53 4f41 505f 454e 565f 5f44 6574 ew_SOAP_ENV__Det\n-00101f30: 6169 6c28 3c61 2063 6c61 7373 3d22 636f ail(soap<\n-00101f60: 2f61 3e2c 202d 3129 3b20 3c2f 6469 763e /a>, -1);
\n-00101f70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
soap\n-00101fb0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->fault->\n-00102010: 3c61 2063 6c61 7373 3d22 636f 6465 2220 d\n-00102070: 6574 6169 6c3c 2f61 3e2d 2667 743b 3c61 etail->__\n-001020e0: 7479 7065 3c2f 613e 203d 2053 4f41 505f type = SOAP_\n-001020f0: 5459 5045 5f6e 7331 5f5f 6d79 5374 6163 TYPE_ns1__myStac\n-00102100: 6b44 6174 6154 7970 653b 203c 7370 616e kDataType; // stack type <\n-00102130: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
. \n-00102150: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-00102180: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->fa\n-001021d0: 756c 743c 2f61 3e2d 2667 743b 3c61 2063 ult->detai\n-00102240: 6c3c 2f61 3e2d 2667 743b 3c61 2063 6c61 l->fault<\n-001022b0: 2f61 3e20 3d20 7370 3b20 2020 2020 2020 /a> = sp; \n+00101b80: 203c 7370 616e 2063 6c61 7373 3d22 636f // point \n+00101ba0: 746f 2073 7461 636b 203c 2f73 7061 6e3e to stack \n+00101bb0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
soap-><\n+00101c00: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00101c10: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00101c20: 6874 6d6c 2361 3932 3065 3238 3430 6162 html#a920e2840ab\n+00101c30: 3263 3831 3633 3738 3035 3930 3232 6463 2c816378059022dc\n+00101c40: 6664 3936 6530 223e 6661 756c 743c 2f61 fd96e0\">fault->SOAP_ENV__D\n+00101cc0: 6574 6169 6c3c 2f61 3e2d 2667 743b 3c61 etail->__\n+00101d30: 616e 793c 2f61 3e20 3d20 4e55 4c4c 3b20 any = NULL; \n+00101d40: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00101d50: 2020 2020 2020 2020 2020 203c 7370 616e // no other XML\n+00101d80: 2064 6174 6120 3c2f 7370 616e 3e3c 2f64 data .
}
.<\n+00101db0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00101dc0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >else<\n+00101de0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
.\n+00101e00: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
.
soap->\n+00101e50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 fault->detail\n+00101f10: 203d 2073 6f61 705f 6e65 775f 534f 4150 = soap_new_SOAP\n+00101f20: 5f45 4e56 5f5f 4465 7461 696c 283c 6120 _ENV__Detail(soap, -1\n+00101f60: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
.
soap-&g\n+00101fb0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;fault\n+00102000: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->detail->__type = SOAP_TYPE_ns\n+001020f0: 315f 5f6d 7953 7461 636b 4461 7461 5479 1__myStackDataTy\n+00102100: 7065 3b20 3c73 7061 6e20 636c 6173 733d pe; // sta\n+00102120: 636b 2074 7970 6520 3c2f 7370 616e 3e3c ck type <\n+00102130: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
soap->fault\n+001021d0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->detail-&\n+00102240: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;fault = s\n+001022b0: 703b 2020 2020 2020 2020 2020 2020 2020 p; \n 001022c0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-001022d0: 2020 2020 2020 203c 7370 616e 2063 6c61 // \n-001022f0: 706f 696e 7420 746f 2073 7461 636b 203c point to stack <\n-00102300: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
. \n-00102320: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-00102350: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->fa\n-001023a0: 756c 743c 2f61 3e2d 2667 743b 3c61 2063 ult->detai\n-00102410: 6c3c 2f61 3e2d 2667 743b 3c61 2063 6c61 l->__any<\n-00102480: 2f61 3e20 3d20 4e55 4c4c 3b20 2020 2020 /a> = NULL; \n+001022d0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // point t\n+001022f0: 6f20 7374 6163 6b20 3c2f 7370 616e 3e3c o stack <\n+00102300: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
soap->fault\n+001023a0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->detail-&\n+00102410: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;__any = N\n+00102480: 554c 4c3b 2020 2020 2020 2020 2020 2020 ULL; \n 00102490: 2020 2020 2020 2020 2020 2020 2020 2020 \n-001024a0: 2020 2020 2020 203c 7370 616e 2063 6c61 // \n-001024c0: 6e6f 206f 7468 6572 2058 4d4c 2064 6174 no other XML dat\n-001024d0: 6120 3c2f 7370 616e 3e3c 2f64 6976 3e0a a
.\n-001024e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
}
.
return SOAP_FA\n-00102590: 554c 543c 2f61 3e3b 203c 7370 616e 2063 ULT; /\n-001025b0: 2f20 7265 7475 726e 2066 726f 6d20 7365 / return from se\n-001025c0: 7276 6963 6520 6f70 6572 6174 696f 6e20 rvice operation \n-001025d0: 6361 6c6c 2077 6974 6820 7468 6520 6661 call with the fa\n-001025e0: 756c 743c 2f73 7061 6e3e 3c2f 6469 763e ult
\n-001025f0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
soap::\n-00102690: 7665 7273 696f 6e3c 2f61 3e3c 2f64 6976 version
short versi\n-001026c0: 6f6e 3c2f 6469 763e 3c64 6976 2063 6c61 on
SOAP \n-001026e0: 7665 7273 696f 6e20 2830 203d 206e 6f20 version (0 = no \n-001026f0: 534f 4150 2c20 3120 3d20 534f 4150 2031 SOAP, 1 = SOAP 1\n-00102700: 2e31 2c20 3220 3d20 534f 4150 2031 2e32 .1, 2 = SOAP 1.2\n-00102710: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
Def\n-00102730: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n-00102740: 736f 6170 322e 683a 3238 3531 3c2f 6469 soap2.h:2851
.
<\n-00102760: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-00102770: 3c70 3e48 6572 652c 203c 636f 6465 3e3c

Here, <\n-00102780: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00102790: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-001027a0: 5f66 6175 6c74 2e68 746d 6c23 6761 3931 _fault.html#ga91\n-001027b0: 6463 3662 6363 3363 3566 3335 6530 3233 dc6bcc3c5f35e023\n-001027c0: 6237 3861 3666 3436 6137 3965 6436 2220 b78a6f46a79ed6\" \n-001027d0: 7469 746c 653d 2253 6574 2053 4f41 5020 title=\"Set SOAP \n-001027e0: 312e 3120 7365 7276 6572 2066 6175 6c74 1.1 server fault\n-001027f0: 202f 2053 4f41 5020 312e 3220 7265 6365 / SOAP 1.2 rece\n-00102800: 6976 6572 2066 6175 6c74 2073 7472 696e iver fault strin\n-00102810: 6720 616e 6420 6465 7461 696c 2e22 3e73 g and detail.\">s\n-00102820: 6f61 705f 7265 6365 6976 6572 5f66 6175 oap_receiver_fau\n-00102830: 6c74 3c2f 613e 3c2f 636f 6465 3e20 616c lt al\n-00102840: 6c6f 6361 7465 7320 6120 6661 756c 7420 locates a fault \n-00102850: 7374 7275 6374 2074 6865 6e20 7765 2073 struct then we s\n-00102860: 6574 2074 6865 2053 4f41 5020 4661 756c et the SOAP Faul\n-00102870: 7420 6465 7461 696c 7320 6173 2073 686f t details as sho\n-00102880: 776e 2e3c 2f70 3e0a 3c70 3e4e 6f74 6520 wn.

.

Note \n-00102890: 7468 6174 2053 4f41 5020 312e 3220 7375 that SOAP 1.2 su\n-001028a0: 7070 6f72 7473 206e 6573 7465 6420 6661 pports nested fa\n-001028b0: 756c 7420 7375 622d 636f 6465 732e 2054 ult sub-codes. T\n-001028c0: 6865 7365 2063 616e 2062 6520 7365 7420 hese can be set \n-001028d0: 6173 2066 6f6c 6c6f 7773 3a3c 2f70 3e0a as follows:

.\n-001028e0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
st\n-00102920: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct SOAP_ENV\n-00102970: 5f5f 436f 6465 3c2f 613e 202a 7375 6263 __Code *subc\n-00102980: 6f64 6531 203d 2073 6f61 705f 6e65 775f ode1 = soap_new_\n-00102990: 534f 4150 5f45 4e56 5f5f 436f 6465 283c SOAP_ENV__Code(<\n-001029a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001029b0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001029c0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n-001029d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
s\n-00102a00: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct SOAP_EN\n-00102a50: 565f 5f43 6f64 653c 2f61 3e20 2a73 7562 V__Code *sub\n-00102a60: 636f 6465 3220 3d20 736f 6170 5f6e 6577 code2 = soap_new\n-00102a70: 5f53 4f41 505f 454e 565f 5f43 6f64 6528 _SOAP_ENV__Code(\n-00102a80: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-00102ab0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
..
sub\n-00102bf0: 636f 6465 312d 2667 743b 3c61 2063 6c61 code1->SOAP_ENV\n-00102c60: 5f5f 5661 6c75 653c 2f61 3e20 3d20 283c __Value = (<\n-00102c70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00102c80: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char*)"ter:Inva\n-00102cc0: 6c69 6441 7267 7326 7175 6f74 3b3c 2f73 lidArgs"; // a\n-00102cf0: 2051 4e61 6d65 2076 616c 7565 3c2f 7370 QName value
.
subc\n-00102d20: 6f64 6531 2d26 6774 3b3c 6120 636c 6173 ode1->SOAP_ENV_\n-00102d90: 5f53 7562 636f 6465 3c2f 613e 203d 2073 _Subcode = s\n-00102da0: 7562 636f 6465 323b 3c2f 6469 763e 0a3c ubcode2;
.<\n-00102db0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00102dc0: 3e73 7562 636f 6465 322d 2667 743b 3c61 >subcode2->SOAP\n-00102e30: 5f45 4e56 5f5f 5661 6c75 653c 2f61 3e20 _ENV__Value \n-00102e40: 3d20 283c 7370 616e 2063 6c61 7373 3d22 = (cha\n-00102e60: 723c 2f73 7061 6e3e 2a29 3c73 7061 6e20 r*)"ter:\n-00102e90: 4e6f 5072 6f66 696c 6526 7175 6f74 3b3c NoProfile"<\n-00102ea0: 2f73 7061 6e3e 3b20 3c73 7061 6e20 636c /span>; //\n-00102ec0: 2061 2051 4e61 6d65 2076 616c 7565 3c2f a QName value
.su\n-00102ef0: 6263 6f64 6532 2d26 6774 3b3c 6120 636c bcode2->SOAP_EN\n-00102f60: 565f 5f53 7562 636f 6465 3c2f 613e 203d V__Subcode =\n-00102f70: 204e 554c 4c3b 3c2f 6469 763e 0a3c 6469 NULL;
.<\n-00102f90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00102fa0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00102fb0: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-00102fc0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;faul\n-00103010: 743c 2f61 3e2d 2667 743b 3c61 2063 6c61 t->SOAP_EN\n-00103080: 565f 5f43 6f64 653c 2f61 3e2d 2667 743b V__Code->\n-00103090: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SO\n-001030f0: 4150 5f45 4e56 5f5f 5375 6263 6f64 653c AP_ENV__Subcode<\n-00103100: 2f61 3e20 3d20 7375 6263 6f64 6531 3b3c /a> = subcode1;<\n-00103110: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
\n-001031c0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d <\n-001039a0: 2f64 6976 3e3c 703e 5365 7276 6963 6520 /div>

Service \n-001039b0: 6f70 6572 6174 696f 6e73 2069 6d70 6c65 operations imple\n-001039c0: 6d65 6e74 6174 696f 6e20 696e 2061 2057 mentation in a W\n-001039d0: 6562 2073 6572 7669 6365 2061 7070 6c69 eb service appli\n-001039e0: 6361 7469 6f6e 2063 616e 2072 6574 7572 cation can retur\n-001039f0: 6e20 7661 7269 6f75 7320 534f 4150 2046 n various SOAP F\n-00103a00: 6175 6c74 7320 6375 7374 6f6d 697a 6564 aults customized\n-00103a10: 2069 6e20 7468 6973 2077 6179 2e3c 2f70 in this way..

SOAP Fault \n-00103a30: 7374 7275 6374 7572 6573 2061 7265 2064 structures are d\n-00103a40: 6563 6c61 7265 6420 3c63 6f64 653e 6d75 eclared mu\n-00103a50: 7461 626c 653c 2f63 6f64 653e 2c20 7768 table, wh\n-00103a60: 6963 6820 6d65 616e 7320 7468 6174 2072 ich means that r\n-00103a70: 652d 6465 636c 6172 6174 696f 6e73 206f e-declarations o\n-00103a80: 6620 7468 6520 7374 7275 6374 7572 6573 f the structures\n-00103a90: 2061 7265 2070 6572 6d69 7474 6564 2061 are permitted a\n-00103aa0: 6e64 2061 6464 6974 696f 6e61 6c20 6d65 nd additional me\n-00103ab0: 6d62 6572 7320 6172 6520 636f 6c6c 6563 mbers are collec\n-00103ac0: 7465 6420 696e 746f 206f 6e65 2066 696e ted into one fin\n-00103ad0: 616c 2073 7472 7563 7475 7265 2062 7920 al structure by \n-00103ae0: 7468 6520 736f 6170 6370 7032 2074 6f6f the soapcpp2 too\n-00103af0: 6c2e 3c2f 703e 0a3c 703e 466f 7220 616e l.

.

For an\n-00103b00: 2065 7861 6d70 6c65 2074 6861 7420 7573 example that us\n-00103b10: 6564 2074 6865 2053 4f41 5020 4661 756c ed the SOAP Faul\n-00103b20: 7420 6465 7461 696c 2073 7472 7563 7475 t detail structu\n-00103b30: 7265 3a3c 2f70 3e0a 3c64 6976 2063 6c61 re:

.
.\n-00103bf0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
.
const\n-00103c30: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-00103c50: 2f73 7061 6e3e 202a 665f 5f69 6e76 616c /span> *f__inval\n-00103c60: 6964 3b3c 2f64 6976 3e0a 3c64 6976 2063 id;
.
\n-00103c80: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-00103cc0: 723c 2f73 7061 6e3e 202a 665f 5f75 6e61 r *f__una\n-00103cd0: 7661 696c 6162 6c65 3b3c 2f64 6976 3e0a vailable;
.\n-00103ce0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\n-00103d10: 696e 743c 2f73 7061 6e3e 203c 6120 636c int __typ\n-00103d80: 653c 2f61 3e3b 3c2f 6469 763e 0a3c 6469 e;
. \n-00103da0: 2020 203c 7370 616e 2063 6c61 7373 3d22 voi\n-00103dc0: 643c 2f73 7061 6e3e 202a 3c61 2063 6c61 d *fault<\n-00103e30: 2f61 3e3b 3c2f 6469 763e 0a3c 6469 7620 /a>;
..\n-00103f30: 7d3b 203c 2f64 6976 3e0a 3c64 6976 2063 };
.
//gsoap ns ser\n-00103f70: 7669 6365 206d 6574 686f 642d 6661 756c vice method-faul\n-00103f80: 743a 206c 6f67 696e 2066 5f5f 696e 7661 t: login f__inva\n-00103f90: 6c69 6420 3c2f 7370 616e 3e3c 2f64 6976 lid .
//gsoa\n-00103fd0: 7020 6e73 2073 6572 7669 6365 206d 6574 p ns service met\n-00103fe0: 686f 642d 6661 756c 743a 206c 6f67 696e hod-fault: login\n-00103ff0: 2066 5f5f 756e 6176 6169 6c61 626c 6520 f__unavailable \n-00104000: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-00104020: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns__login(.\n-00104050: 2e2e 293b 3c2f 6469 763e 0a3c 2f64 6976 ..);
.

T\n-00106f30: 6865 203c 636f 6465 3e63 6c61 696d 5f5f he claim__\n-00106f40: 666f 726d 3c2f 636f 6465 3e20 7374 7275 form stru\n-00106f50: 6374 2069 7320 6465 636c 6172 6564 2069 ct is declared i\n-00106f60: 6e20 7468 6520 696e 7465 7266 6163 6520 n the interface \n-00106f70: 6865 6164 6572 2066 696c 6520 6173 3a3c header file as:<\n-00106f80: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

struct \n-00106fd0: 636c 6169 6d5f 5f66 6f72 6d20 3c2f 6469 claim__form .
{
. \n-00107010: 2040 203c 7370 616e 2063 6c61 7373 3d22 @ cha\n-00107030: 723c 2f73 7061 6e3e 202a 6872 6566 3b20 r *href; \n-00107040: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
};.

The \n-00107080: 636c 6169 6d20 666f 726d 7320 696e 2074 claim forms in t\n-00107090: 6865 206d 6573 7361 6765 2063 6f6e 7369 he message consi\n-001070a0: 7374 206f 6620 3c65 6d3e 3c63 6f64 653e st of \n-001070b0: 6872 6566 3c2f 636f 6465 3e3c 2f65 6d3e href\n-001070c0: 7320 746f 2074 6865 2063 6c61 696d 2066 s to the claim f\n-001070d0: 6f72 6d73 2061 7474 6163 6865 642e 2054 orms attached. T\n-001070e0: 6865 2075 7365 206f 6620 3c65 6d3e 3c63 he use of href<\n-00107100: 2f65 6d3e 206f 7220 6f74 6865 7220 6174 /em> or other at\n-00107110: 7472 6962 7574 6573 2066 6f72 2072 6566 tributes for ref\n-00107120: 6572 7269 6e67 2074 6f20 7468 6520 4d49 erring to the MI\n-00107130: 4d45 2061 7474 6163 686d 656e 7473 2069 ME attachments i\n-00107140: 7320 6f70 7469 6f6e 616c 2061 6363 6f72 s optional accor\n-00107150: 6469 6e67 2074 6f20 7468 6520 5377 4120 ding to the SwA \n-00107160: 7374 616e 6461 7264 2e20 4d54 4f4d 206f standard. MTOM o\n-00107170: 6e20 7468 6520 6f74 6865 7220 6861 6e64 n the other hand\n-00107180: 206d 616e 6461 7465 7320 7468 6520 7573 mandates the us\n-00107190: 6520 6f66 203c 656d 3e3c 636f 6465 3e68 e of h\n-001071a0: 7265 663c 2f63 6f64 653e 3c2f 656d 3e20 ref \n-001071b0: 7769 7468 2058 4f50 2065 6c65 6d65 6e74 with XOP element\n-001071c0: 732e 3c2f 703e 0a3c 703e 546f 2061 7373 s.

.

To ass\n-001071d0: 6f63 6961 7465 204d 494d 4520 6174 7461 ociate MIME atta\n-001071e0: 6368 6d65 6e74 7320 7769 7468 2074 6865 chments with the\n-001071f0: 2072 6571 7565 7374 2061 6e64 2072 6573 request and res\n-00107200: 706f 6e73 6520 6f66 2061 2073 6572 7669 ponse of a servi\n-00107210: 6365 206f 7065 7261 7469 6f6e 2069 6e20 ce operation in \n-00107220: 7468 6520 6765 6e65 7261 7465 6420 5753 the generated WS\n-00107230: 444c 2c20 706c 6561 7365 2073 6565 2053 DL, please see S\n-00107240: 6563 7469 6f6e 203c 6120 636c 6173 733d ection \n-00107270: 4765 6e65 7261 7469 6e67 204d 756c 7469 Generating Multi\n-00107280: 7061 7274 5265 6c61 7465 6420 4d49 4d45 partRelated MIME\n-00107290: 2061 7474 6163 686d 656e 7420 6269 6e64 attachment bind\n-001072a0: 696e 6773 2069 6e20 5753 444c 3c2f 613e ings in WSDL\n-001072b0: 202e 3c2f 703e 0a3c 703e 5468 6520 7365 .

.

The se\n-001072c0: 7276 6572 2d73 6964 6520 636f 6465 2074 rver-side code t\n-001072d0: 6f20 7472 616e 736d 6974 204d 494d 4520 o transmit MIME \n-001072e0: 6174 7461 6368 6d65 6e74 7320 6261 636b attachments back\n-001072f0: 2074 6f20 6120 636c 6965 6e74 3a3c 2f70 to a client:.

int c\n-00107350: 6c61 696d 5f5f 696e 7375 7261 6e63 655f laim__insurance_\n-00107360: 636c 6169 6d5f 6175 746f 283c 7370 616e claim_auto(struct <\n-00107390: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001073a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001073b0: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-001073c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001073f0: 202e 2e2e 2920 3c2f 6469 763e 0a3c 6469 ...)
.{\n-00107410: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
const char *htmlDoc = .\n-00107480: 2e2e 3b20 3c73 7061 6e20 636c 6173 733d ..; // an \n-001074a0: 4854 4d4c 206d 6573 7361 6765 2074 6f20 HTML message to \n-001074b0: 7365 6e64 2061 7320 616e 2061 7474 6163 send as an attac\n-001074c0: 686d 656e 743c 2f73 7061 6e3e 3c2f 6469 hment.
soap_se\n-00107540: 745f 6d69 6d65 3c2f 613e 283c 6120 636c t_mime(soap, NULL\n-00107580: 2c20 4e55 4c4c 293b 203c 7370 616e 2063 , NULL); /\n-001075a0: 2f20 656e 6162 6c65 204d 494d 453c 2f73 / enable MIME
.
<\n-001075d0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001075e0: 656e 7422 3e2f 2f20 6164 6420 6120 4854 ent\">// add a HT\n-001075f0: 4d4c 2064 6f63 756d 656e 7420 2868 746d ML document (htm\n-00107600: 6c44 6f63 2070 6f69 6e74 7320 746f 2064 lDoc points to d\n-00107610: 6174 612c 2077 6865 7265 2074 6865 2048 ata, where the H\n-00107620: 544d 4c20 646f 6320 6973 2073 746f 7265 TML doc is store\n-00107630: 6420 696e 2063 6f6d 706c 6961 6e63 6520 d in compliance \n-00107640: 7769 7468 2037 6269 7420 656e 636f 6469 with 7bit encodi\n-00107650: 6e67 2052 4643 3230 3435 2920 3c2f 7370 ng RFC2045)
.. \n-001078a0: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
.
<\n-001078c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001078d0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001078e0: 705f 5f6d 696d 652e 6874 6d6c 2367 6138 p__mime.html#ga8\n-001078f0: 3163 6564 6232 3436 3730 6562 6461 3438 1cedb24670ebda48\n-00107900: 6137 3936 3739 6434 3638 3232 3131 6622 a79679d4682211f\"\n-00107910: 3e73 6f61 705f 636c 725f 6d69 6d65 3c2f >soap_clr_mime(soap); // do\n-00107970: 6e26 2333 393b 7420 7761 6e74 2066 6175 n't want fau\n-00107980: 6c74 2077 6974 6820 6174 7461 6368 6d65 lt with attachme\n-00107990: 6e74 7320 3c2f 7370 616e 3e3c 2f64 6976 nts ..<\n-00107a70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00107a80: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
. \n-00107aa0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-00107ac0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP\n-00107b20: 5f4f 4b3c 2f61 3e3b 203c 2f64 6976 3e0a _OK;
.\n-00107b30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
}
.
SOAP_MI\n-00107c40: 4d45 5f37 4249 543c 2f61 3e3c 2f64 6976 ME_7BIT
@ SOAP_MIME\n-00107c70: 5f37 4249 543c 2f64 6976 3e3c 6469 7620 _7BIT
7 \n-00107c90: 6269 7420 6461 7461 2063 6f6e 7465 6e74 bit data content\n-00107ca0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
Defi\n-00107cc0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-00107cd0: 6f61 7032 2e68 3a31 3032 3235 3c2f 6469 oap2.h:10225
.
<\n-00107cf0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-00107d00: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

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

.

.Retrieving a \n-00107d70: 636f 6c6c 6563 7469 6f6e 206f 6620 4d49 collection of MI\n-00107d80: 4d45 2f4d 544f 4d20 6174 7461 6368 6d65 ME/MTOM attachme\n-00107d90: 6e74 7320 2853 7741 293c 2f68 323e 0a3c nts (SwA)

.<\n-00107da0: 703e 4d49 4d45 2061 7474 6163 686d 656e p>MIME attachmen\n-00107db0: 7473 2061 7265 2061 7574 6f6d 6174 6963 ts are automatic\n-00107dc0: 616c 6c79 2070 6172 7365 6420 616e 6420 ally parsed and \n-00107dd0: 7374 6f72 6564 2069 6e20 6d65 6d6f 7279 stored in memory\n-00107de0: 206d 616e 6167 6564 2062 7920 7468 6520 managed by the \n-00107df0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context. After\n-00107e60: 2072 6563 6569 7669 6e67 2061 2073 6574 receiving a set\n-00107e70: 206f 6620 4d49 4d45 2f4d 544f 4d20 6174 of MIME/MTOM at\n-00107e80: 7461 6368 6d65 6e74 732c 2065 6974 6865 tachments, eithe\n-00107e90: 7220 6174 2074 6865 2063 6c69 656e 742d r at the client-\n-00107ea0: 7369 6465 206f 7220 7468 6520 7365 7276 side or the serv\n-00107eb0: 6572 2d73 6964 652c 2074 6865 206c 6973 er-side, the lis\n-00107ec0: 7420 6f66 204d 494d 452f 4d54 4f4d 2061 t of MIME/MTOM a\n-00107ed0: 7474 6163 686d 656e 7473 2063 616e 2062 ttachments can b\n-00107ee0: 6520 7472 6176 6572 7365 6420 746f 2065 e traversed to e\n-00107ef0: 7874 7261 6374 206d 6574 6120 6461 7461 xtract meta data\n-00107f00: 2061 6e64 2074 6865 2061 7474 6163 686d and the attachm\n-00107f10: 656e 7420 636f 6e74 656e 742e 2054 6865 ent content. The\n-00107f20: 2066 6972 7374 2061 7474 6163 686d 656e first attachmen\n-00107f30: 7420 696e 2074 6865 2063 6f6c 6c65 6374 t in the collect\n-00107f40: 696f 6e20 6f66 204d 494d 452f 4d54 4f4d ion of MIME/MTOM\n-00107f50: 2061 7474 6163 686d 656e 7473 2061 6c77 attachments alw\n-00107f60: 6179 7320 636f 6e74 6169 6e73 206d 6574 ays contains met\n-00107f70: 6120 6461 7461 2061 626f 7574 2074 6865 a data about the\n-00107f80: 2053 4f41 5020 6d65 7373 6167 6520 6974 SOAP message it\n-00107f90: 7365 6c66 2028 6265 6361 7573 6520 7468 self (because th\n-00107fa0: 6520 534f 4150 206d 6573 7361 6765 2077 e SOAP message w\n-00107fb0: 6173 2070 726f 6365 7373 6564 2074 6865 as processed the\n-00107fc0: 2061 7474 6163 686d 656e 7420 646f 6573 attachment does\n-00107fd0: 206e 6f74 2063 6f6e 7461 696e 2061 6e79 not contain any\n-00107fe0: 2075 7365 6675 6c20 6461 7461 292e 3c2f useful data)..

To travers\n-00108000: 6520 7468 6520 6c69 7374 206f 6620 4d49 e the list of MI\n-00108010: 4d45 2061 7474 6163 686d 656e 7473 2069 ME attachments i\n-00108020: 6e20 432c 2079 6f75 2075 7365 2061 206c n C, you use a l\n-00108030: 6f6f 7020 7369 6d69 6c61 7220 746f 3a3c oop similar to:<\n-00108040: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

int\n-00108090: 206e 203d 2030 3b3c 2f64 6976 3e0a 3c64 n = 0;
.\n-001080b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap_multi\n-00108110: 7061 7274 3c2f 613e 202a 6174 7461 6368 part *attach\n-00108120: 6d65 6e74 3b3c 2f64 6976 3e0a 3c64 6976 ment;
.for (attachment =\n-00108170: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-001081a0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->mi\n-001081f0: 6d65 3c2f 613e 2e3c 6120 636c 6173 733d me.list; \n-00108250: 6174 7461 6368 6d65 6e74 3b20 6174 7461 attachment; atta\n-00108260: 6368 6d65 6e74 203d 2061 7474 6163 686d chment = attachm\n-00108270: 656e 742d 2667 743b 3c61 2063 6c61 7373 ent->next\n-001082d0: 3c2f 613e 293c 2f64 6976 3e0a 3c64 6976 )
.{<\n-001082f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
++n;.
printf(\n-00108330: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00108350: 743b 5061 7274 2025 643a 5c6e 2671 756f t;Part %d:\\n&quo\n-00108360: 743b 3c2f 7370 616e 3e2c 206e 293b 3c2f t;, n);.
printf(\n-00108390: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-001083b0: 743b 7074 7220 2020 2020 2020 203d 2570 t;ptr =%p\n-001083c0: 5c6e 2671 756f 743b 3c2f 7370 616e 3e2c \\n",\n-001083d0: 2061 7474 6163 686d 656e 742d 2667 743b attachment->\n-001083e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 ptr);.
printf(<\n-00108460: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-00108470: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-00108480: 3b73 697a 6520 2020 2020 2020 3d25 756c ;size =%ul\n-00108490: 5c6e 2671 756f 743b 3c2f 7370 616e 3e2c \\n",\n-001084a0: 2061 7474 6163 686d 656e 742d 2667 743b attachment->\n-001084b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 size);.
printf(\n-00108530: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00108550: 743b 6964 2020 2020 2020 2020 203d 2573 t;id =%s\n-00108560: 5c6e 2671 756f 743b 3c2f 7370 616e 3e2c \\n",\n-00108570: 2061 7474 6163 686d 656e 742d 2667 743b attachment->\n-00108580: 3c61 2063 6c61 7373 3d22 636f 6465 2220 id ? att\n-001085e0: 6163 686d 656e 742d 2667 743b 3c61 2063 achment->\n-00108640: 6964 3c2f 613e 203a 203c 7370 616e 2063 id : ""\n-00108670: 3b3c 2f73 7061 6e3e 293b 3c2f 6469 763e ;);
\n-00108680: 0a3c 6469 7620 636c 6173 733d 226c 696e .
printf("ty\n-001086c0: 7065 2020 2020 2020 203d 2573 5c6e 2671 pe =%s\\n&q\n-001086d0: 756f 743b 3c2f 7370 616e 3e2c 2061 7474 uot;, att\n-001086e0: 6163 686d 656e 742d 2667 743b 3c61 2063 achment->\n-00108740: 7479 7065 3c2f 613e 203f 2061 7474 6163 type ? attac\n-00108750: 686d 656e 742d 2667 743b 3c61 2063 6c61 hment->ty\n-001087b0: 7065 3c2f 613e 203a 203c 7370 616e 2063 pe : ""\n-001087e0: 3b3c 2f73 7061 6e3e 293b 3c2f 6469 763e ;);
\n-001087f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
printf("lo\n-00108830: 6361 7469 6f6e 2020 203d 2573 5c6e 2671 cation =%s\\n&q\n-00108840: 756f 743b 3c2f 7370 616e 3e2c 2061 7474 uot;, att\n-00108850: 6163 686d 656e 742d 2667 743b 3c61 2063 achment->\n-001088b0: 6c6f 6361 7469 6f6e 3c2f 613e 203f 2061 location ? a\n-001088c0: 7474 6163 686d 656e 742d 2667 743b 3c61 ttachment->location :\n-00108930: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-00108950: 6f74 3b26 7175 6f74 3b3c 2f73 7061 6e3e ot;"\n-00108960: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
.
pri\n-00108980: 6e74 6628 3c73 7061 6e20 636c 6173 733d ntf(\n-001089a0: 2671 756f 743b 6465 7363 7269 7074 696f "descriptio\n-001089b0: 6e3d 2573 5c6e 2671 756f 743b 3c2f 7370 n=%s\\n", attachment-\n-001089d0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >descript\n-00108a30: 696f 6e3c 2f61 3e20 3f20 6174 7461 6368 ion ? attach\n-00108a40: 6d65 6e74 2d26 6774 3b3c 6120 636c 6173 ment->des\n-00108aa0: 6372 6970 7469 6f6e 3c2f 613e 203a 203c cription : <\n-00108ab0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-00108ac0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-00108ad0: 3b26 7175 6f74 3b3c 2f73 7061 6e3e 293b ;");\n-00108ae0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
}
\n-00108b00: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
\n-00108b50: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 <\n-00108bc0: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-00108bd0: 6922 3e73 7472 7563 7420 736f 6170 5f6d i\">struct soap_m\n-00108be0: 756c 7469 7061 7274 202a 206c 6973 743c ultipart * list<\n-00108bf0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
list of \n-00108c10: 4d49 4d45 2061 7474 6163 686d 656e 7473 MIME attachments\n-00108c20: 2072 6563 6569 7665 643c 2f64 6976 3e3c received
<\n-00108c30: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n-00108c40: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n-00108c50: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n-00108c60: 3130 3432 303c 2f64 6976 3e3c 2f64 6976 10420
.
soa\n-00108ce0: 705f 6d75 6c74 6970 6172 743c 2f61 3e3c p_multipart<\n-00108cf0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
DIME/MIM\n-00108d10: 452f 4d54 4f4d 2061 7474 6163 686d 656e E/MTOM attachmen\n-00108d20: 7420 6461 7461 2072 6563 6569 7665 6420 t data received \n-00108d30: 6279 2074 6865 2065 6e67 696e 652e 3c2f by the engine.
Defini\n-00108d60: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n-00108d70: 7032 2e68 3a31 3034 3330 3c2f 6469 763e p2.h:10430
\n-00108d80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<\n-00108df0: 6120 6872 6566 3d22 7374 7275 6374 736f a href=\"structso\n-00108e00: 6170 5f5f 6d75 6c74 6970 6172 742e 6874 ap__multipart.ht\n-00108e10: 6d6c 2361 3439 3563 3864 3230 6530 3333 ml#a495c8d20e033\n-00108e20: 3462 6531 6231 3334 3531 3933 6361 3266 4be1b1345193ca2f\n-00108e30: 6237 3634 223e 736f 6170 5f6d 756c 7469 b764\">soap_multi\n-00108e40: 7061 7274 3a3a 7479 7065 3c2f 613e 3c2f part::type
const ch\n-00108e70: 6172 202a 2074 7970 653c 2f64 6976 3e3c ar * type
<\n-00108e80: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-00108e90: 223e 4449 4d45 2f4d 494d 452f 4d54 4f4d \">DIME/MIME/MTOM\n-00108ea0: 2074 7970 6520 284d 494d 4520 7479 7065 type (MIME type\n-00108eb0: 2066 6f72 6d61 7429 3c2f 6469 763e 3c64 format)
Definition:<\n-00108ee0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a31 /b> stdsoap2.h:1\n-00108ef0: 3034 3335 3c2f 6469 763e 3c2f 6469 763e 0435
\n-00108f00: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
struct soap_mu\n-00108ff0: 6c74 6970 6172 7420 2a20 6e65 7874 3c2f ltipart * next
next atta\n-00109020: 6368 6d65 6e74 2069 6e20 7468 6520 6c69 chment in the li\n-00109030: 6e6b 6564 206c 6973 743c 2f64 6976 3e3c nked list
<\n-00109040: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n-00109050: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n-00109060: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n-00109070: 3130 3433 313c 2f64 6976 3e3c 2f64 6976 10431
.
const char * p\n-00109170: 7472 3c2f 6469 763e 3c64 6976 2063 6c61 tr
point\n-00109190: 7320 746f 2072 6177 2064 6174 6120 636f s to raw data co\n-001091a0: 6e74 656e 743c 2f64 6976 3e3c 6469 7620 ntent
Definition:\n-001091d0: 2073 7464 736f 6170 322e 683a 3130 3433 stdsoap2.h:1043\n-001091e0: 323c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 2
.
soa\n-001092a0: 705f 6d75 6c74 6970 6172 743a 3a64 6573 p_multipart::des\n-001092b0: 6372 6970 7469 6f6e 3c2f 613e 3c2f 6469 cription
const char\n-001092e0: 202a 2064 6573 6372 6970 7469 6f6e 3c2f * description
MIME Cont\n-00109310: 656e 742d 4465 7363 7269 7074 696f 6e20 ent-Description \n-00109320: 286f 7074 696f 6e61 6c29 3c2f 6469 763e (optional)
\n-00109330: 3c64 6976 2063 6c61 7373 3d22 7474 6465
Definition\n-00109350: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-00109360: 3a31 3034 3339 3c2f 6469 763e 3c2f 6469 :10439
.
const char * i\n-00109460: 643c 2f64 6976 3e3c 6469 7620 636c 6173 d
DIME/M\n-00109480: 494d 452f 4d54 4f4d 2063 6f6e 7465 6e74 IME/MTOM content\n-00109490: 2049 4420 6f72 2066 6f72 6d20 6461 7461 ID or form data\n-001094a0: 206e 616d 652e 3c2f 6469 763e 3c64 6976 name.
<\n-001094c0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:104\n-001094e0: 3334 3c2f 6469 763e 3c2f 6469 763e 0a3c 34
.<\n-001094f0: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-00109500: 6964 3d22 6173 7472 7563 7473 6f61 705f id=\"astructsoap_\n-00109510: 5f6d 756c 7469 7061 7274 5f68 746d 6c5f _multipart_html_\n-00109520: 6166 3131 6137 3065 6138 3066 3365 3139 af11a70ea80f3e19\n-00109530: 3334 6437 3262 3239 3265 3664 3933 3931 34d72b292e6d9391\n-00109540: 3022 3e3c 6469 7620 636c 6173 733d 2274 0\">\n-001095c0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
const char *\n-001095e0: 206c 6f63 6174 696f 6e3c 2f64 6976 3e3c location
<\n-001095f0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-00109600: 223e 4d49 4d45 2043 6f6e 7465 6e74 2d4c \">MIME Content-L\n-00109610: 6f63 6174 696f 6e20 286f 7074 696f 6e61 ocation (optiona\n-00109620: 6c29 3c2f 6469 763e 3c64 6976 2063 6c61 l)
De\n-00109640: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-00109650: 6473 6f61 7032 2e68 3a31 3034 3338 3c2f dsoap2.h:10438
.
<\n-001096c0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-001096d0: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">soap_m\n-00109720: 756c 7469 7061 7274 3a3a 7369 7a65 3c2f ultipart::size
\n-00109770: 7369 7a65 206f 6620 6461 7461 2063 6f6e size of data con\n-00109780: 7465 6e74 3c2f 6469 763e 3c64 6976 2063 tent
.
st\n-00109890: 7275 6374 2073 6f61 705f 6d69 6d65 206d ruct soap_mime m\n-001098a0: 696d 653c 2f64 6976 3e3c 6469 7620 636c ime
MIME\n-001098c0: 2061 7474 6163 686d 656e 7473 2072 6563 attachments rec\n-001098d0: 6569 7665 642e 3c2f 6469 763e 3c64 6976 eived.
<\n-001098f0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:418\n-00109910: 393c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 9
.

C++ prog\n-00109940: 7261 6d6d 6572 7320 6361 6e20 7573 6520 rammers can use \n-00109950: 616e 2069 7465 7261 746f 7220 696e 7374 an iterator inst\n-00109960: 6561 643a 3c2f 703e 0a3c 6469 7620 636c ead:

.
<\n-00109980: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00109990: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int n = 0;..
p\n-00109c90: 7269 6e74 6628 3c73 7061 6e20 636c 6173 rintf("Part %d:\n-00109cc0: 5c6e 2671 756f 743b 3c2f 7370 616e 3e2c \\n",\n-00109cd0: 206e 293b 3c2f 6469 763e 0a3c 6469 7620 n);
.
p\n-00109cf0: 7269 6e74 6628 3c73 7061 6e20 636c 6173 rintf("ptr \n-00109d20: 2020 203d 2570 5c6e 2671 756f 743b 3c2f =%p\\n", i->ptr\n-00109d40: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
.
...\n-00109d60: 203c 7370 616e 2063 6c61 7373 3d22 636f // etc
.
}.
soap_m\n-00109e50: 696d 653a 3a62 6567 696e 3c2f 613e 3c2f ime::begin
soap_mul\n-00109e80: 7469 7061 7274 3a3a 6974 6572 6174 6f72 tipart::iterator\n-00109e90: 2062 6567 696e 2829 3c2f 6469 763e 3c64 begin()
C++ only: an it\n-00109ec0: 6572 6174 6f72 206f 7665 7220 736f 6170 erator over soap\n-00109ed0: 5f6d 756c 7469 7061 7274 2061 7474 6163 _multipart attac\n-00109ee0: 686d 656e 7473 2e3c 2f64 6976 3e3c 2f64 hments.
.
soap_mi\n-00109fa0: 6d65 3a3a 656e 643c 2f61 3e3c 2f64 6976 me::end
soap_multip\n-00109fd0: 6172 743a 3a69 7465 7261 746f 7220 656e art::iterator en\n-00109fe0: 6428 293c 2f64 6976 3e3c 6469 7620 636c d()
C++ \n-0010a000: 6f6e 6c79 3a20 616e 2069 7465 7261 746f only: an iterato\n-0010a010: 7220 6f76 6572 2073 6f61 705f 6d75 6c74 r over soap_mult\n-0010a020: 6970 6172 7420 6174 7461 6368 6d65 6e74 ipart attachment\n-0010a030: 732e 3c2f 6469 763e 3c2f 6469 763e 0a3c s.
.<\n-0010a040: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-0010a050: 6964 3d22 6173 7472 7563 7473 6f61 705f id=\"astructsoap_\n-0010a060: 5f6d 756c 7469 7061 7274 5f68 746d 6c5f _multipart_html_\n-0010a070: 6164 3930 3030 6666 6538 6637 3266 6566 ad9000ffe8f72fef\n-0010a080: 3839 3033 3863 3437 3733 6566 6466 3537 89038c4773efdf57\n-0010a090: 3522 3e3c 6469 7620 636c 6173 733d 2274 5\">\n-0010a110: 3c64 6976 2063 6c61 7373 3d22 7474 6465
soap_multipa\n-0010a130: 7274 5f69 7465 7261 746f 7220 6974 6572 rt_iterator iter\n-0010a140: 6174 6f72 3c2f 6469 763e 3c64 6976 2063 ator
C++\n-0010a160: 206f 6e6c 793a 2061 6e20 6974 6572 6174 only: an iterat\n-0010a170: 6f72 206f 7665 7220 736f 6170 5f6d 756c or over soap_mul\n-0010a180: 7469 7061 7274 2061 7474 6163 686d 656e tipart attachmen\n-0010a190: 7473 2e3c 2f64 6976 3e3c 6469 7620 636c ts.
D\n-0010a1b0: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-0010a1c0: 7464 736f 6170 322e 683a 3130 3434 313c tdsoap2.h:10441<\n-0010a1d0: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
.

Note: keep\n-0010a200: 2069 6e20 6d69 6e64 2074 6861 7420 7468 in mind that th\n-0010a210: 6520 6669 7273 7420 6174 7461 6368 6d65 e first attachme\n-0010a220: 6e74 2069 7320 6173 736f 6369 6174 6564 nt is associated\n-0010a230: 2077 6974 6820 7468 6520 534f 4150 206d with the SOAP m\n-0010a240: 6573 7361 6765 2061 6e64 2079 6f75 206d essage and you m\n-0010a250: 6179 2077 616e 7420 746f 2069 676e 6f72 ay want to ignor\n-0010a260: 6520 6974 2e3c 2f70 3e0a 3c70 3e41 2063 e it.

.

A c\n-0010a270: 616c 6c20 746f 203c 636f 6465 3e3c 6120 all to soap_end removes all\n-0010a360: 206f 6620 7468 6520 7265 6365 6976 6564 of the received\n-0010a370: 204d 494d 4520 6461 7461 2e20 546f 2070 MIME data. To p\n-0010a380: 7265 7365 7276 6520 616e 2061 7474 6163 reserve an attac\n-0010a390: 686d 656e 7420 696e 206d 656d 6f72 792c hment in memory,\n-0010a3a0: 2075 7365 203c 636f 6465 3e3c 6120 636c use s\n-0010a470: 6f61 705f 756e 6c69 6e6b 3c2f 613e 3c2f oap_unlink on the ptr me\n-0010a4a0: 6d62 6572 206f 6620 7468 6520 3c63 6f64 mber of the soap_multipart<\n-0010a530: 2f61 3e3c 2f63 6f64 653e 2073 7472 7563 /a> struc\n-0010a540: 742e 2054 6865 203c 636f 6465 3e3c 6120 t. The soap_unlink\n-0010a620: 3c2f 636f 6465 3e20 6675 6e63 7469 6f6e function\n-0010a630: 2063 616e 2062 6520 7573 6564 2074 6f20 can be used to \n-0010a640: 7072 6576 656e 7420 6465 616c 6c6f 6361 prevent dealloca\n-0010a650: 7469 6f6e 206f 6620 6465 7365 7269 616c tion of deserial\n-0010a660: 697a 6564 2064 6174 612e 3c2f 703e 0a3c ized data.

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

.

.DIME a\n-0010a6d0: 7474 6163 686d 656e 7473 3c2f 6831 3e0a ttachments

.\n-0010a6e0: 3c70 3e41 7070 6c69 6361 7469 6f6e 7320

Applications \n-0010a6f0: 6465 7665 6c6f 7065 6420 7769 7468 2074 developed with t\n-0010a700: 6865 2067 534f 4150 2074 6f6f 6c73 2063 he gSOAP tools c\n-0010a710: 616e 2074 7261 6e73 6d69 7420 6269 6e61 an transmit bina\n-0010a720: 7279 2044 494d 4520 6174 7461 6368 6d65 ry DIME attachme\n-0010a730: 6e74 7320 7374 6f72 6564 2069 6e20 6d65 nts stored in me\n-0010a740: 6d6f 7279 206f 7220 696e 2073 7472 6561 mory or in strea\n-0010a750: 6d69 6e67 206d 6f64 6520 6279 2066 6574 ming mode by fet\n-0010a760: 6368 696e 6720 6461 7461 2066 726f 6d20 ching data from \n-0010a770: 6120 7265 736f 7572 6365 206f 7220 7365 a resource or se\n-0010a780: 6e64 696e 6720 6461 7461 2074 6f20 6120 nding data to a \n-0010a790: 7265 736f 7572 6365 2075 7369 6e67 2063 resource using c\n-0010a7a0: 616c 6c62 6163 6b20 6675 6e63 7469 6f6e allback function\n-0010a7b0: 732e 2054 6865 206d 6178 696d 756d 2044 s. The maximum D\n-0010a7c0: 494d 4520 6174 7461 6368 6d65 6e74 2073 IME attachment s\n-0010a7d0: 697a 6520 6973 206c 696d 6974 6564 2074 ize is limited t\n-0010a7e0: 6f20 3820 4d42 2062 7920 6465 6661 756c o 8 MB by defaul\n-0010a7f0: 7420 6173 2073 6574 2077 6974 6820 3c63 t as set with #SOAP_MAXDIM\n-0010a810: 4553 495a 453c 2f63 6f64 653e 2e20 5468 ESIZE. Th\n-0010a820: 6973 206c 696d 6974 2063 616e 2062 6520 is limit can be \n-0010a830: 6368 616e 6765 6420 6173 206e 6565 6465 changed as neede\n-0010a840: 642e 2057 6974 6820 7374 7265 616d 696e d. With streamin\n-0010a850: 6720 4449 4d45 2075 7369 6e67 2063 616c g DIME using cal\n-0010a860: 6c62 6163 6b20 6675 6e63 7469 6f6e 732c lback functions,\n-0010a870: 2064 6174 6120 6861 6e64 6c65 7273 2061 data handlers a\n-0010a880: 7265 2075 7365 6420 746f 2070 6173 7320 re used to pass \n-0010a890: 7468 6520 6461 7461 2074 6f20 616e 6420 the data to and \n-0010a8a0: 6672 6f6d 2061 2072 6573 6f75 7263 6520 from a resource \n-0010a8b0: 6672 6f6d 2077 6869 6368 2074 6f20 6665 from which to fe\n-0010a8c0: 7463 6820 7468 6520 6461 7461 2074 6f20 tch the data to \n-0010a8d0: 7365 6e64 206f 7220 6461 7461 2074 6f20 send or data to \n-0010a8e0: 7374 6f72 652c 2073 7563 6820 6173 2061 store, such as a\n-0010a8f0: 2066 696c 6520 6f72 2064 6576 6963 652e file or device.\n-0010a900: 2053 6565 2053 6563 7469 6f6e 203c 6120 See Section Strea\n-0010a940: 6d69 6e67 2044 494d 453c 2f61 3e20 2e3c ming DIME .<\n-0010a950: 2f70 3e0a 3c70 3e46 6f72 2064 6574 6169 /p>.

For detai\n-0010a960: 6c73 206f 6e20 4449 4d45 2061 7474 6163 ls on DIME attac\n-0010a970: 686d 656e 7473 2c20 7365 6520 3c61 2068 hments, see http://m\n-0010a9e0: 7364 6e2e 6d69 6372 6f73 6f66 742e 636f sdn.microsoft.co\n-0010a9f0: 6d2f 6c69 6272 6172 792f 656e 2d75 732f m/library/en-us/\n-0010aa00: 646e 676c 6f62 7370 6563 2f68 746d 6c2f dnglobspec/html/\n-0010aa10: 6472 6166 742d 6e69 656c 7365 6e2d 6469 draft-nielsen-di\n-0010aa20: 6d65 2d30 322e 7478 743c 2f61 3e3c 2f70 me-02.txt.

See also AP\n-0010aa40: 4920 646f 6375 6d65 6e74 6174 696f 6e20 I documentation \n-0010aa50: 4d6f 6475 6c65 203c 6120 636c 6173 733d Module DIME attachm\n-0010aa90: 656e 7420 6675 6e63 7469 6f6e 733c 2f61 ent functions.

.

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

..Sending\n-0010ab10: 2061 2063 6f6c 6c65 6374 696f 6e20 6f66 a collection of\n-0010ab20: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment\n-0010ab30: 733c 2f68 323e 0a3c 703e 5468 6520 666f s.

The fo\n-0010ab40: 6c6c 6f77 696e 6720 6675 6e63 7469 6f6e llowing function\n-0010ab50: 7320 6361 6e20 6265 2075 7365 6420 746f s can be used to\n-0010ab60: 2065 7870 6c69 6369 746c 7920 7365 7420 explicitly set \n-0010ab70: 7570 2061 2063 6f6c 6c65 6374 696f 6e20 up a collection \n-0010ab80: 6f66 2044 494d 4520 6174 7461 6368 6d65 of DIME attachme\n-0010ab90: 6e74 7320 666f 7220 7472 616e 736d 6973 nts for transmis\n-0010aba0: 7369 6f6e 2077 6974 6820 6120 6d65 7373 sion with a mess\n-0010abb0: 6167 652e 2054 6865 7365 2061 7474 6163 age. These attac\n-0010abc0: 686d 656e 7473 2063 616e 2062 6520 7374 hments can be st\n-0010abd0: 7265 616d 6564 2c20 6173 2064 6573 6372 reamed, as descr\n-0010abe0: 6962 6564 2069 6e20 5365 6374 696f 6e20 ibed in Section \n-0010abf0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 St\n-0010ac20: 7265 616d 696e 6720 4449 4d45 3c2f 613e reaming DIME\n-0010ac30: 202e 2057 6974 686f 7574 2073 7472 6561 . Without strea\n-0010ac40: 6d69 6e67 2c20 6561 6368 2061 7474 6163 ming, each attac\n-0010ac50: 686d 656e 7420 6d75 7374 2072 6566 6572 hment must refer\n-0010ac60: 2074 6f20 6120 626c 6f63 6b20 6f66 2064 to a block of d\n-0010ac70: 6174 6120 696e 206d 656d 6f72 792e 3c2f ata in memory..

    .
  • void soap_set\n-0010ad10: 5f64 696d 6528 7374 7275 6374 2073 6f61 _dime(struct soa\n-0010ad20: 7020 2a73 6f61 7029 3c2f 613e 3c2f 636f p *soap) This functio\n-0010ad40: 6e20 656e 6162 6c65 7320 7365 6e64 696e n enables sendin\n-0010ad50: 6720 4449 4d45 2061 7474 6163 686d 656e g DIME attachmen\n-0010ad60: 7473 2e20 5468 6973 2066 756e 6374 696f ts. This functio\n-0010ad70: 6e20 6973 2067 656e 6572 616c 6c79 206e n is generally n\n-0010ad80: 6f74 2072 6571 7569 7265 6420 6265 6361 ot required beca\n-0010ad90: 7573 6520 4449 4d45 2061 7474 6163 686d use DIME attachm\n-0010ada0: 656e 7473 2061 7265 2061 7574 6f6d 6174 ents are automat\n-0010adb0: 6963 616c 6c79 2064 6574 6563 7465 6420 ically detected \n-0010adc0: 6173 203c 636f 6465 3e3c 6120 636c 6173 as xsd__base\n-0010ae40: 3634 4269 6e61 7279 3c2f 613e 3c2f 636f 64Binary and _xop__Includ\n-0010aed0: 653c 2f61 3e3c 2f63 6f64 653e 2073 7472 e str\n-0010aee0: 7563 7475 7265 7320 696e 2074 6865 2064 uctures in the d\n-0010aef0: 6174 6120 746f 2073 6572 6961 6c69 7a65 ata to serialize\n-0010af00: 2061 7320 616e 2058 4d4c 206d 6573 7361 as an XML messa\n-0010af10: 6765 2077 6974 6820 7468 6520 6174 7461 ge with the atta\n-0010af20: 6368 6d65 6e74 7320 6175 746f 6d61 7469 chments automati\n-0010af30: 6361 6c6c 7920 6164 6465 6420 6f72 2044 cally added or D\n-0010af40: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments \n-0010af50: 6361 6e20 6265 2065 7870 6c69 6369 746c can be explicitl\n-0010af60: 7920 6164 6465 6420 7769 7468 203c 636f y added with soap_s\n-0010b000: 6574 5f64 696d 655f 6174 7461 6368 6d65 et_dime_attachme\n-0010b010: 6e74 3c2f 613e 3c2f 636f 6465 3e2e 3c2f nt..
  • in\n-0010b030: 7420 736f 6170 5f73 6574 5f64 696d 655f t soap_set_dime_\n-0010b040: 6174 7461 6368 6d65 6e74 2873 7472 7563 attachment(struc\n-0010b050: 7420 736f 6170 202a 736f 6170 2c20 6368 t soap *soap, ch\n-0010b060: 6172 202a 7074 722c 2073 697a 655f 7420 ar *ptr, size_t \n-0010b070: 7369 7a65 2c20 636f 6e73 7420 6368 6172 size, const char\n-0010b080: 202a 7479 7065 2c20 636f 6e73 7420 6368 *type, const ch\n-0010b090: 6172 202a 6964 2c20 756e 7369 676e 6564 ar *id, unsigned\n-0010b0a0: 2073 686f 7274 206f 7074 7970 652c 2063 short optype, c\n-0010b0b0: 6f6e 7374 2063 6861 7220 2a6f 7074 696f onst char *optio\n-0010b0c0: 6e29 3c2f 636f 6465 3e20 5468 6973 2066 n) This f\n-0010b0d0: 756e 6374 696f 6e20 6164 6473 2061 2044 unction adds a D\n-0010b0e0: 494d 4520 6174 7461 6368 6d65 6e74 2074 IME attachment t\n-0010b0f0: 6f20 7468 6520 584d 4c20 6d65 7373 6167 o the XML messag\n-0010b100: 6520 746f 2073 656e 642e 2054 6865 2073 e to send. The s\n-0010b110: 7065 6369 6669 6564 203c 636f 6465 3e70 pecified p\n-0010b120: 7472 3c2f 636f 6465 3e20 706f 696e 7473 tr points\n-0010b130: 2074 6f20 7468 6520 6461 7461 2074 6f20 to the data to \n-0010b140: 7365 6e64 206f 6620 6c65 6e67 7468 2073 send of length s\n-0010b150: 7065 6369 6669 6564 2062 7920 3c63 6f64 pecified by size. T\n-0010b170: 6865 203c 636f 6465 3e74 7970 653c 2f63 he type parameter i\n-0010b190: 6e64 6963 6174 6573 2074 6865 204d 494d ndicates the MIM\n-0010b1a0: 4520 7479 7065 206f 6620 7468 6520 6461 E type of the da\n-0010b1b0: 7461 206f 7220 6361 6e20 6265 204e 554c ta or can be NUL\n-0010b1c0: 4c2e 2054 6865 203c 636f 6465 3e69 643c L. The id<\n-0010b1d0: 2f63 6f64 653e 2070 6172 616d 6574 6572 /code> parameter\n-0010b1e0: 2075 6e69 7175 656c 7920 6964 656e 7469 uniquely identi\n-0010b1f0: 6669 6573 2074 6865 2061 7474 6163 686d fies the attachm\n-0010b200: 656e 7420 696e 2074 6865 206d 6573 7361 ent in the messa\n-0010b210: 6765 2c20 7768 6963 6820 6361 6e20 6265 ge, which can be\n-0010b220: 206f 6d69 7474 6564 2062 7920 7370 6563 omitted by spec\n-0010b230: 6966 7969 6e67 204e 554c 4c2e 2054 6865 ifying NULL. The\n-0010b240: 203c 636f 6465 3e6f 7074 696f 6e3c 2f63 option parameter i\n-0010b260: 7320 616e 206f 7074 696f 6e20 7375 6368 s an option such\n-0010b270: 2061 7320 6120 6465 7363 7269 7074 696f as a descriptio\n-0010b280: 6e20 6f66 2074 6865 2064 6174 6120 616e n of the data an\n-0010b290: 6420 3c63 6f64 653e 6f70 7479 7065 3c2f d optype is a user-\n-0010b2b0: 6465 6669 6e65 6420 6f70 7469 6f6e 2074 defined option t\n-0010b2c0: 7970 6520 2861 7320 7065 7220 4449 4d45 ype (as per DIME\n-0010b2d0: 206f 7074 696f 6e20 7370 6563 6966 6963 option specific\n-0010b2e0: 6174 696f 6e20 666f 726d 6174 292e 2054 ation format). T\n-0010b2f0: 6865 203c 636f 6465 3e70 7472 3c2f 636f he ptr parameter mu\n-0010b310: 7374 2062 6520 7065 7273 6973 7465 6e74 st be persistent\n-0010b320: 2e20 5468 6520 3c63 6f64 653e 7074 723c . The ptr<\n-0010b330: 2f63 6f64 653e 2070 6172 616d 6574 6572 /code> parameter\n-0010b340: 2070 6173 7365 6420 746f 2074 6869 7320 passed to this \n-0010b350: 6675 6e63 7469 6f6e 206d 7573 7420 6265 function must be\n-0010b360: 2070 6572 7369 7374 656e 7420 696e 206d persistent in m\n-0010b370: 656d 6f72 7920 756e 7469 6c20 7468 6520 emory until the \n-0010b380: 6174 7461 6368 6d65 6e74 2077 6173 2073 attachment was s\n-0010b390: 656e 742e 2052 6574 7572 6e73 203c 636f ent. Returns #SOAP_OK or a s\n-0010b470: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status error code\n-0010b490: 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f 6465 .
  • .
  • void soap_clr\n-0010b520: 5f64 696d 6528 7374 7275 6374 2073 6f61 _dime(struct soa\n-0010b530: 7020 2a73 6f61 7029 3c2f 613e 3c2f 636f p *soap) This functio\n-0010b550: 6e20 6469 7361 626c 6573 2044 494d 4520 n disables DIME \n-0010b560: 6174 7461 6368 6d65 6e74 732c 2075 6e6c attachments, unl\n-0010b570: 6573 7320 7468 6520 6461 7461 2074 6f20 ess the data to \n-0010b580: 7365 7269 616c 697a 6520 6173 2061 6e20 serialize as an \n-0010b590: 584d 4c20 6d65 7373 6167 6520 636f 6e74 XML message cont\n-0010b5a0: 6169 6e73 2061 7474 6163 686d 656e 7473 ains attachments\n-0010b5b0: 2064 6566 696e 6564 2062 7920 3c63 6f64 defined by \n-0010b630: 7873 645f 5f62 6173 6536 3442 696e 6172 xsd__base64Binar\n-0010b640: 793c 2f61 3e3c 2f63 6f64 653e 2061 6e64 y and\n-0010b650: 203c 636f 6465 3e3c 6120 636c 6173 733d _xo\n-0010b6c0: 705f 5f49 6e63 6c75 6465 3c2f 613e 3c2f p__Include structures\n-0010b6e0: 2e3c 2f6c 693e 0a3c 2f75 6c3e 0a3c 703e .
  • .
.

\n-0010b6f0: 5468 6573 6520 6675 6e63 7469 6f6e 7320 These functions \n-0010b700: 616c 6c6f 7720 4449 4d45 2061 7474 6163 allow DIME attac\n-0010b710: 686d 656e 7473 2074 6f20 6265 2061 6464 hments to be add\n-0010b720: 6564 2074 6f20 534f 4150 206d 6573 7361 ed to SOAP messa\n-0010b730: 6765 7320 7769 7468 6f75 7420 7265 7175 ges without requ\n-0010b740: 6972 696e 6720 6d65 7373 6167 6520 626f iring message bo\n-0010b750: 6479 2072 6566 6572 656e 6365 732e 2054 dy references. T\n-0010b760: 6869 7320 6973 2061 6c73 6f20 7265 6665 his is also refe\n-0010b770: 7272 6564 2074 6f20 6173 2074 6865 206f rred to as the o\n-0010b780: 7065 6e20 4449 4d45 2061 7474 6163 686d pen DIME attachm\n-0010b790: 656e 7420 7374 796c 652e 2054 6865 2063 ent style. The c\n-0010b7a0: 6c6f 7365 6420 6174 7461 6368 6d65 6e74 losed attachment\n-0010b7b0: 2073 7479 6c65 2072 6571 7569 7265 7320 style requires \n-0010b7c0: 616c 6c20 4449 4d45 2061 7474 6163 686d all DIME attachm\n-0010b7d0: 656e 7473 2074 6f20 6265 2072 6566 6572 ents to be refer\n-0010b7e0: 656e 6365 6420 6672 6f6d 2074 6865 2053 enced from the S\n-0010b7f0: 4f41 5020 6d65 7373 6167 6520 626f 6479 OAP message body\n-0010b800: 2077 6974 6820 3c65 6d3e 3c63 6f64 653e with \n-0010b810: 6872 6566 3c2f 636f 6465 3e3c 2f65 6d3e href\n-0010b820: 2028 6f72 2073 696d 696c 6172 2920 7265 (or similar) re\n-0010b830: 6665 7265 6e63 6573 2e20 466f 7220 7468 ferences. For th\n-0010b840: 6520 636c 6f73 6564 2073 7479 6c65 2c20 e closed style, \n-0010b850: 6753 4f41 5020 7375 7070 6f72 7473 2061 gSOAP supports a\n-0010b860: 6e20 6175 746f 6d61 7469 6320 6269 6e61 n automatic bina\n-0010b870: 7279 2064 6174 6120 7365 7269 616c 697a ry data serializ\n-0010b880: 6174 696f 6e20 6d65 7468 6f64 2c20 7365 ation method, se\n-0010b890: 6520 5365 6374 696f 6e20 3c61 2063 6c61 e Section Serializing\n-0010b8d0: 2062 696e 6172 7920 6461 7461 2077 6974 binary data wit\n-0010b8e0: 6820 4449 4d45 2061 7474 6163 686d 656e h DIME attachmen\n-0010b8f0: 7473 3c2f 613e 202e 3c2f 703e 0a3c 703e ts .

.

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

\n-0010b960: 0a52 6574 7269 6576 696e 6720 6120 636f .Retrieving a co\n-0010b970: 6c6c 6563 7469 6f6e 206f 6620 4449 4d45 llection of DIME\n-0010b980: 2061 7474 6163 686d 656e 7473 3c2f 6832 attachments.

DIME attach\n-0010b9a0: 6d65 6e74 7320 6172 6520 6175 746f 6d61 ments are automa\n-0010b9b0: 7469 6361 6c6c 7920 7061 7273 6564 2061 tically parsed a\n-0010b9c0: 6e64 2073 746f 7265 6420 696e 206d 656d nd stored in mem\n-0010b9d0: 6f72 7920 286f 7220 7061 7373 6564 2074 ory (or passed t\n-0010b9e0: 6f20 7468 6520 7374 7265 616d 696e 6720 o the streaming \n-0010b9f0: 6861 6e64 6c65 7273 2076 6961 2074 6865 handlers via the\n-0010ba00: 2044 494d 4520 6361 6c6c 6261 636b 2066 DIME callback f\n-0010ba10: 756e 6374 696f 6e73 2077 6865 6e20 6465 unctions when de\n-0010ba20: 6669 6e65 6429 2e20 4166 7465 7220 7265 fined). After re\n-0010ba30: 6365 6976 696e 6720 6120 7365 7420 6f66 ceiving a set of\n-0010ba40: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment\n-0010ba50: 732c 2065 6974 6865 7220 6174 2074 6865 s, either at the\n-0010ba60: 2063 6c69 656e 742d 7369 6465 206f 7220 client-side or \n-0010ba70: 7468 6520 7365 7276 6572 2d73 6964 652c the server-side,\n-0010ba80: 2074 6865 206c 6973 7420 6f66 2044 494d the list of DIM\n-0010ba90: 4520 6174 7461 6368 6d65 6e74 7320 6361 E attachments ca\n-0010baa0: 6e20 6265 2074 7261 7665 7273 6564 2074 n be traversed t\n-0010bab0: 6f20 6578 7472 6163 7420 6d65 7461 2064 o extract meta d\n-0010bac0: 6174 6120 616e 6420 7468 6520 6174 7461 ata and the atta\n-0010bad0: 6368 6d65 6e74 2063 6f6e 7465 6e74 2e3c chment content.<\n-0010bae0: 2f70 3e0a 3c70 3e54 6f20 7472 6176 6572 /p>.

To traver\n-0010baf0: 7365 2074 6865 206c 6973 7420 6f66 2044 se the list of D\n-0010bb00: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments \n-0010bb10: 696e 2043 2c20 796f 7520 7573 6520 6120 in C, you use a \n-0010bb20: 6c6f 6f70 2073 696d 696c 6172 2074 6f3a loop similar to:\n-0010bb30: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

.
int n = 0;
.<\n-0010bb90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0010bba0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct soap_mult\n-0010bc00: 6970 6172 743c 2f61 3e20 2a61 7474 6163 ipart *attac\n-0010bc10: 686d 656e 743b 3c2f 6469 763e 0a3c 6469 hment;
.<\n-0010bc30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0010bc40: 6f72 6466 6c6f 7722 3e66 6f72 3c2f 7370 ordflow\">for (attachment \n-0010bc60: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap->d\n-0010bce0: 696d 653c 2f61 3e2e 3c61 2063 6c61 7373 ime.list;\n-0010bd40: 2061 7474 6163 686d 656e 743b 2061 7474 attachment; att\n-0010bd50: 6163 686d 656e 7420 3d20 6174 7461 6368 achment = attach\n-0010bd60: 6d65 6e74 2d26 6774 3b3c 6120 636c 6173 ment->nex\n-0010bdc0: 743c 2f61 3e29 3c2f 6469 763e 0a3c 6469 t)

.{\n-0010bde0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
++n;<\n-0010be00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
printf\n-0010be20: 283c 7370 616e 2063 6c61 7373 3d22 7374 (&qu\n-0010be40: 6f74 3b50 6172 7420 2564 3a5c 6e26 7175 ot;Part %d:\\n&qu\n-0010be50: 6f74 3b3c 2f73 7061 6e3e 2c20 6e29 3b3c ot;, n);<\n-0010be60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
printf\n-0010be80: 283c 7370 616e 2063 6c61 7373 3d22 7374 (&qu\n-0010bea0: 6f74 3b70 7472 2020 2020 2020 2020 3d25 ot;ptr =%\n-0010beb0: 705c 6e26 7175 6f74 3b3c 2f73 7061 6e3e p\\n"\n-0010bec0: 2c20 6174 7461 6368 6d65 6e74 2d26 6774 , attachment->\n-0010bed0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;ptr);.
printf(\n-0010bf50: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-0010bf70: 743b 7369 7a65 2020 2020 2020 203d 2575 t;size =%u\n-0010bf80: 6c5c 6e26 7175 6f74 3b3c 2f73 7061 6e3e l\\n"\n-0010bf90: 2c20 6174 7461 6368 6d65 6e74 2d26 6774 , attachment->\n-0010bfa0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;size);<\n-0010c000: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
printf\n-0010c020: 283c 7370 616e 2063 6c61 7373 3d22 7374 (&qu\n-0010c040: 6f74 3b69 6420 2020 2020 2020 2020 3d25 ot;id =%\n-0010c050: 735c 6e26 7175 6f74 3b3c 2f73 7061 6e3e s\\n"\n-0010c060: 2c20 6174 7461 6368 6d65 6e74 2d26 6774 , attachment->\n-0010c070: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;id ? at\n-0010c0d0: 7461 6368 6d65 6e74 2d26 6774 3b3c 6120 tachment->id : "&quo\n-0010c160: 743b 3c2f 7370 616e 3e29 3b3c 2f64 6976 t;);.
printf("t\n-0010c1b0: 7970 6520 2020 2020 2020 3d25 735c 6e26 ype =%s\\n&\n-0010c1c0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 6174 quot;, at\n-0010c1d0: 7461 6368 6d65 6e74 2d26 6774 3b3c 6120 tachment->type ? atta\n-0010c240: 6368 6d65 6e74 2d26 6774 3b3c 6120 636c chment->t\n-0010c2a0: 7970 653c 2f61 3e20 3a20 3c73 7061 6e20 ype : "&quo\n-0010c2d0: 743b 3c2f 7370 616e 3e29 3b3c 2f64 6976 t;);.
}
.
<\n-0010c360: 6120 6872 6566 3d22 7374 7275 6374 736f a href=\"structso\n-0010c370: 6170 5f5f 6469 6d65 2e68 746d 6c23 6134 ap__dime.html#a4\n-0010c380: 3738 6132 3362 3339 3934 6133 3564 3163 78a23b3994a35d1c\n-0010c390: 3039 3435 3735 3131 3036 6362 3466 3622 0945751106cb4f6\"\n-0010c3a0: 3e73 6f61 705f 6469 6d65 3a3a 6c69 7374 >soap_dime::list\n-0010c3b0: 3c2f 613e 3c2f 6469 763e 3c64 6976 2063
st\n-0010c3d0: 7275 6374 2073 6f61 705f 6d75 6c74 6970 ruct soap_multip\n-0010c3e0: 6172 7420 2a20 6c69 7374 3c2f 6469 763e art * list
\n-0010c3f0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
list of DIME \n-0010c410: 6174 7461 6368 6d65 6e74 7320 7265 6365 attachments rece\n-0010c420: 6976 6564 3c2f 6469 763e 3c64 6976 2063 ived
\n-0010c440: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n-0010c450: 7374 6473 6f61 7032 2e68 3a39 3937 313c stdsoap2.h:9971<\n-0010c460: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
.
.

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

.
\n-0010c630: 3c73 7061 6e20 636c 6173 733d 226b 6579 int n = 0;.
fo\n-0010c690: 723c 2f73 7061 6e3e 2028 3c61 2063 6c61 r (so\n-0010c6f0: 6170 5f6d 756c 7469 7061 7274 3a3a 6974 ap_multipart::it\n-0010c700: 6572 6174 6f72 3c2f 613e 2069 203d 203c erator i = <\n-0010c710: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0010c720: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0010c730: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-0010c740: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;dime\n-0010c790: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .begin();\n-0010c7f0: 2069 2021 3d20 3c61 2063 6c61 7373 3d22 i != soa\n-0010c820: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->dime.end(); ++i)
\n-0010c8e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{
.
+\n-0010c910: 2b6e 3b3c 2f64 6976 3e0a 3c64 6976 2063 +n;
.
pr\n-0010c930: 696e 7466 283c 7370 616e 2063 6c61 7373 intf("Part %d:\\\n-0010c960: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", \n-0010c970: 6e29 3b3c 2f64 6976 3e0a 3c64 6976 2063 n);
.
pr\n-0010c990: 696e 7466 283c 7370 616e 2063 6c61 7373 intf("ptr \n-0010c9c0: 2020 3d25 705c 6e26 7175 6f74 3b3c 2f73 =%p\\n", i->ptr)\n-0010c9e0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
... \n-0010ca00: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // etc
.
}.
soap_di\n-0010caf0: 6d65 3a3a 6265 6769 6e3c 2f61 3e3c 2f64 me::begin
soap_mult\n-0010cb20: 6970 6172 743a 3a69 7465 7261 746f 7220 ipart::iterator \n-0010cb30: 6265 6769 6e28 293c 2f64 6976 3e3c 6469 begin()
\n-0010cb50: 432b 2b20 6f6e 6c79 3a20 616e 2069 7465 C++ only: an ite\n-0010cb60: 7261 746f 7220 6f76 6572 2073 6f61 705f rator over soap_\n-0010cb70: 6d75 6c74 6970 6172 7420 6174 7461 6368 multipart attach\n-0010cb80: 6d65 6e74 732e 3c2f 6469 763e 3c2f 6469 ments.
.
\n-0010cc50: 3c64 6976 2063 6c61 7373 3d22 7474 6465
soap_multipa\n-0010cc70: 7274 3a3a 6974 6572 6174 6f72 2065 6e64 rt::iterator end\n-0010cc80: 2829 3c2f 6469 763e 3c64 6976 2063 6c61 ()
C++ o\n-0010cca0: 6e6c 793a 2061 6e20 6974 6572 6174 6f72 nly: an iterator\n-0010ccb0: 206f 7665 7220 736f 6170 5f6d 756c 7469 over soap_multi\n-0010ccc0: 7061 7274 2061 7474 6163 686d 656e 7473 part attachments\n-0010ccd0: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f .
.

The options\n-0010cd10: 206d 656d 6265 7220 6973 2061 7661 696c member is avail\n-0010cd20: 6162 6c65 2061 7320 7765 6c6c 2c20 6275 able as well, bu\n-0010cd30: 7420 6e6f 7420 7368 6f77 6e20 696e 2074 t not shown in t\n-0010cd40: 6865 2063 6f64 6520 6162 6f76 652e 2054 he code above. T\n-0010cd50: 6865 203c 636f 6465 3e6f 7074 696f 6e73 he options\n-0010cd60: 3c2f 636f 6465 3e20 636f 6e74 656e 7420 content \n-0010cd70: 6973 2066 6f72 6d61 7474 6564 2061 6363 is formatted acc\n-0010cd80: 6f72 6469 6e67 2074 6f20 7468 6520 4449 ording to the DI\n-0010cd90: 4d45 2073 7065 6369 6669 6361 7469 6f6e ME specification\n-0010cda0: 3a20 7468 6520 6669 7273 7420 7477 6f20 : the first two \n-0010cdb0: 6279 7465 7320 6172 6520 7265 7365 7276 bytes are reserv\n-0010cdc0: 6564 2066 6f72 2074 6865 206f 7074 696f ed for the optio\n-0010cdd0: 6e20 7479 7065 2c20 7468 6520 6e65 7874 n type, the next\n-0010cde0: 2074 776f 2062 7974 6573 2073 746f 7265 two bytes store\n-0010cdf0: 2074 6865 2073 697a 6520 6f66 2074 6865 the size of the\n-0010ce00: 206f 7074 696f 6e20 6461 7461 2c20 666f option data, fo\n-0010ce10: 6c6c 6f77 6564 2062 7920 7468 6520 2862 llowed by the (b\n-0010ce20: 696e 6172 7929 206f 7074 696f 6e20 6461 inary) option da\n-0010ce30: 7461 2e3c 2f70 3e0a 3c70 3e41 2063 616c ta.

.

A cal\n-0010ce40: 6c20 746f 203c 636f 6465 3e3c 6120 636c l to s\n-0010cf10: 6f61 705f 656e 643c 2f61 3e3c 2f63 6f64 oap_end removes all o\n-0010cf30: 6620 7468 6520 7265 6365 6976 6564 2044 f the received D\n-0010cf40: 494d 4520 6461 7461 2e20 546f 2070 7265 IME data. To pre\n-0010cf50: 7365 7276 6520 616e 2061 7474 6163 686d serve an attachm\n-0010cf60: 656e 7420 696e 206d 656d 6f72 792c 2075 ent in memory, u\n-0010cf70: 7365 203c 636f 6465 3e3c 6120 636c 6173 se soa\n-0010d040: 705f 756e 6c69 6e6b 3c2f 613e 3c2f 636f p_unlink on the ptr memb\n-0010d070: 6572 206f 6620 7468 6520 3c63 6f64 653e er of the \n-0010d080: 3c61 2063 6c61 7373 3d22 656c 2220 6872 s\n-0010d0f0: 6f61 705f 6d75 6c74 6970 6172 743c 2f61 oap_multipart struct.\n-0010d110: 2054 6865 203c 636f 6465 3e3c 6120 636c The s\n-0010d1e0: 6f61 705f 756e 6c69 6e6b 3c2f 613e 3c2f oap_unlink function c\n-0010d200: 616e 2062 6520 7573 6564 2074 6f20 7072 an be used to pr\n-0010d210: 6576 656e 7420 6465 616c 6c6f 6361 7469 event deallocati\n-0010d220: 6f6e 206f 6620 6465 7365 7269 616c 697a on of deserializ\n-0010d230: 6564 2064 6174 612e 3c2f 703e 0a3c 703e ed data.

.

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

.Se\n-0010d2a0: 7269 616c 697a 696e 6720 6269 6e61 7279 rializing binary\n-0010d2b0: 2064 6174 6120 7769 7468 2044 494d 4520 data with DIME \n-0010d2c0: 6174 7461 6368 6d65 6e74 733c 2f68 323e attachments

\n-0010d2d0: 0a3c 703e 4269 6e61 7279 2064 6174 6120 .

Binary data \n-0010d2e0: 7374 6f72 6564 2069 6e20 6578 7465 6e64 stored in extend\n-0010d2f0: 6564 203c 636f 6465 3e3c 6120 636c 6173 ed xsd__base\n-0010d370: 3634 4269 6e61 7279 3c2f 613e 3c2f 636f 64Binary and xsd__hexBi\n-0010d400: 6e61 7279 3c2f 613e 3c2f 636f 6465 3e20 nary \n-0010d410: 7479 7065 7320 6361 6e20 6265 2073 6572 types can be ser\n-0010d420: 6961 6c69 7a65 6420 616e 6420 6465 7365 ialized and dese\n-0010d430: 7269 616c 697a 6564 2061 7320 4449 4d45 rialized as DIME\n-0010d440: 2061 7474 6163 686d 656e 7473 2077 6865 attachments whe\n-0010d450: 6e20 6f6e 6520 6f72 206d 6f72 6520 6f66 n one or more of\n-0010d460: 2074 6865 2065 7874 7261 206d 656d 6265 the extra membe\n-0010d470: 7273 203c 636f 6465 3e69 643c 2f63 6f64 rs id, type, and options \n-0010d4b0: 6172 6520 6e6f 6e2d 4e55 4c4c 2e20 5468 are non-NULL. Th\n-0010d4c0: 6573 6520 6174 7461 6368 6d65 6e74 7320 ese attachments \n-0010d4d0: 7769 6c6c 2062 6520 6175 746f 6d61 7469 will be automati\n-0010d4e0: 6361 6c6c 7920 7472 616e 736d 6974 7465 cally transmitte\n-0010d4f0: 6420 7072 696f 7220 746f 2074 6865 2073 d prior to the s\n-0010d500: 6571 7565 6e63 6520 6f66 2073 6563 6f6e equence of secon\n-0010d510: 6461 7279 2044 494d 4520 6174 7461 6368 dary DIME attach\n-0010d520: 6d65 6e74 7320 6465 6669 6e65 6420 6279 ments defined by\n-0010d530: 2074 6865 2075 7365 7220 7769 7468 203c the user with <\n-0010d540: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n-0010d5d0: 5f73 6574 5f64 696d 655f 6174 7461 6368 _set_dime_attach\n-0010d5e0: 6d65 6e74 3c2f 613e 3c2f 636f 6465 3e20 ment \n-0010d5f0: 6173 2065 7870 6c61 696e 6564 2069 6e20 as explained in \n-0010d600: 7468 6520 7072 6576 696f 7573 2073 6563 the previous sec\n-0010d610: 7469 6f6e 2e20 5468 6520 7365 7269 616c tion. The serial\n-0010d620: 697a 6174 696f 6e20 7072 6f63 6573 7320 ization process \n-0010d630: 6973 2061 7574 6f6d 6174 6564 2066 6f72 is automated for\n-0010d640: 2053 4f41 5020 656e 636f 6465 6420 6d65 SOAP encoded me\n-0010d650: 7373 6167 6573 2061 6e64 2044 494d 4520 ssages and DIME \n-0010d660: 6174 7461 6368 6d65 6e74 7320 7769 6c6c attachments will\n-0010d670: 2062 6520 7365 6e64 2065 7665 6e20 7768 be send even wh\n-0010d680: 656e 203c 636f 6465 3e3c 6120 636c 6173 en soap_s\n-0010d700: 6574 5f64 696d 653c 2f61 3e3c 2f63 6f64 et_dime or soap_set_dime\n-0010d7b0: 5f61 7474 6163 686d 656e 743c 2f61 3e3c _attachment<\n-0010d7c0: 2f63 6f64 653e 2061 7265 206e 6f74 2075 /code> are not u\n-0010d7d0: 7365 642e 2046 6f72 206e 6f6e 2d53 4f41 sed. For non-SOA\n-0010d7e0: 502d 656e 636f 6465 6420 6d65 7373 6167 P-encoded messag\n-0010d7f0: 6573 2073 7563 6820 6173 2064 6f63 756d es such as docum\n-0010d800: 656e 742f 6c69 7465 7261 6c20 6d65 7373 ent/literal mess\n-0010d810: 6167 6573 2079 6f75 206d 7573 7420 7374 ages you must st\n-0010d820: 696c 6c20 6361 6c6c 203c 636f 6465 3e3c ill call <\n-0010d830: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0010d840: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-0010d850: 5f64 696d 652e 6874 6d6c 2367 6134 3636 _dime.html#ga466\n-0010d860: 3530 3261 3332 6166 3036 3732 6435 3839 502a32af0672d589\n-0010d870: 6539 3139 6137 6338 3832 6135 3722 2074 e919a7c882a57\" t\n-0010d880: 6974 6c65 3d22 456e 6162 6c65 2044 494d itle=\"Enable DIM\n-0010d890: 4520 6174 7461 6368 6d65 6e74 732e 223e E attachments.\">\n-0010d8a0: 736f 6170 5f73 6574 5f64 696d 653c 2f61 soap_set_dime to enab\n-0010d8c0: 6c65 2073 656e 6469 6e67 206d 6573 7361 le sending messa\n-0010d8d0: 6765 7320 7769 7468 2061 7474 6163 686d ges with attachm\n-0010d8e0: 656e 7473 2e3c 2f70 3e0a 3c70 3e54 6f20 ents.

.

To \n-0010d8f0: 656e 6162 6c65 2073 6572 6961 6c69 7a61 enable serializa\n-0010d900: 7469 6f6e 206f 6620 7468 6520 6461 7461 tion of the data\n-0010d910: 2061 7320 4449 4d45 2061 7474 6163 686d as DIME attachm\n-0010d920: 656e 7473 2069 6e73 7465 6164 206f 6620 ents instead of \n-0010d930: 696e 6c69 6e65 2062 6173 6536 342c 2077 inline base64, w\n-0010d940: 6520 6578 7465 6e64 2074 6865 203c 636f e extend the xsd__base64Bina\n-0010d9d0: 7279 3c2f 613e 3c2f 636f 6465 3e20 7479 ry ty\n-0010d9e0: 7065 2077 6974 6820 7468 7265 6520 6164 pe with three ad\n-0010d9f0: 6469 7469 6f6e 616c 206d 656d 6265 7273 ditional members\n-0010da00: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
struct xsd__ba\n-0010da90: 7365 3634 4269 6e61 7279 3c2f 613e 203c se64Binary <\n-0010daa0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{
.\n-0010dac0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\n-0010daf0: 756e 7369 676e 6564 3c2f 7370 616e 3e20 unsigned \n-0010db00: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *\n-0010db80: 5f5f 7074 723c 2f61 3e3b 203c 2f64 6976 __ptr; .
int __size\n-0010dc30: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n-0010dc50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0010dc60: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *i\n-0010dcd0: 643c 2f61 3e3b 203c 2f64 6976 3e0a 3c64 d;
.\n-0010dcf0: 2020 2020 3c73 7061 6e20 636c 6173 733d ch\n-0010dd10: 6172 3c2f 7370 616e 3e20 2a3c 6120 636c ar *type; .
char\n-0010ddc0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *optio\n-0010de20: 6e73 3c2f 613e 3b20 3c2f 6469 763e 0a3c ns;
.<\n-0010de30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0010de40: 3e7d 3b3c 2f64 6976 3e0a 3c64 6976 2063 >};
.<\n-0010e0f0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-0010e100: 223e 6578 7472 6120 6d65 6d62 6572 3a20 \">extra member: \n-0010e110: 4e55 4c4c 2074 6f20 6765 6e65 7261 7465 NULL to generate\n-0010e120: 2061 6e20 6964 206f 7220 6173 7369 676e an id or assign\n-0010e130: 2074 6869 7320 6d65 6d62 6572 2076 6172 this member var\n-0010e140: 6961 626c 6520 6120 756e 6971 7565 2055 iable a unique U\n-0010e150: 5549 443c 2f64 6976 3e3c 6469 7620 636c UID
D\n-0010e170: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-0010e180: 7464 736f 6170 322e 683a 3938 3430 3c2f tdsoap2.h:9840
.
xsd__base64B\n-0010e260: 696e 6172 793a 3a74 7970 653c 2f61 3e3c inary::type<\n-0010e270: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
char * \n-0010e290: 7479 7065 3c2f 6469 763e 3c64 6976 2063 type
ext\n-0010e2b0: 7261 206d 656d 6265 723a 204d 494d 4520 ra member: MIME \n-0010e2c0: 7479 7065 206f 6620 7468 6520 6461 7461 type of the data\n-0010e2d0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
Defi\n-0010e2f0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-0010e300: 6f61 7032 2e68 3a39 3834 313c 2f64 6976 oap2.h:9841
.
<\n-0010e330: 703e 5468 6520 3c63 6f64 653e 6964 3c2f p>The id member is \n-0010e350: 666f 7220 6174 7461 6368 6d65 6e74 2072 for attachment r\n-0010e360: 6566 6572 656e 6369 6e67 2c20 7479 7069 eferencing, typi\n-0010e370: 6361 6c6c 7920 6120 636f 6e74 656e 7420 cally a content \n-0010e380: 6964 2028 4349 4429 206f 7220 6120 5555 id (CID) or a UU\n-0010e390: 4944 2077 6869 6368 2063 616e 2062 6520 ID which can be \n-0010e3a0: 6f62 7461 696e 6564 2077 6974 6820 3c63 obtained with soap_rand_u\n-0010e440: 7569 643c 2f61 3e3c 2f63 6f64 653e 2c20 uid, \n-0010e450: 6120 3c63 6f64 653e 7479 7065 3c2f 636f a type member is us\n-0010e470: 6564 2074 6f20 7370 6563 6966 7920 7468 ed to specify th\n-0010e480: 6520 4d49 4d45 2074 7970 6520 6f66 2074 e MIME type of t\n-0010e490: 6865 2064 6174 612c 2074 6865 203c 636f he data, the options member is used\n-0010e4c0: 2074 6f20 7069 6767 792d 6261 636b 2061 to piggy-back a\n-0010e4d0: 6464 6974 696f 6e61 6c20 696e 666f 726d dditional inform\n-0010e4e0: 6174 696f 6e20 7769 7468 2061 2044 494d ation with a DIM\n-0010e4f0: 4520 6174 7461 6368 6d65 6e74 2e20 5468 E attachment. Th\n-0010e500: 6520 6f72 6465 7220 6f66 2074 6865 2064 e order of the d\n-0010e510: 6563 6c61 7261 7469 6f6e 206f 6620 7468 eclaration of th\n-0010e520: 6520 6d65 6d62 6572 7320 6973 2073 6967 e members is sig\n-0010e530: 6e69 6669 6361 6e74 2e20 496e 2061 6464 nificant. In add\n-0010e540: 6974 696f 6e2c 206e 6f20 6f74 6865 7220 ition, no other \n-0010e550: 6d65 6d62 6572 7320 6f72 206d 6574 686f members or metho\n-0010e560: 6473 206d 6179 2062 6520 6465 636c 6172 ds may be declar\n-0010e570: 6564 2062 6566 6f72 6520 616e 7920 6f66 ed before any of\n-0010e580: 2074 6865 7365 206d 656d 6265 7273 2069 these members i\n-0010e590: 6e20 7468 6520 7374 7275 6374 2f63 6c61 n the struct/cla\n-0010e5a0: 7373 2c20 6275 7420 6164 6469 7469 6f6e ss, but addition\n-0010e5b0: 616c 206d 656d 6265 7273 2061 6e64 206d al members and m\n-0010e5c0: 6574 686f 6473 206d 6179 2061 7070 6561 ethods may appea\n-0010e5d0: 7220 6166 7465 7220 7468 6520 6d65 6d62 r after the memb\n-0010e5e0: 6572 2064 6563 6c61 7261 7469 6f6e 732e er declarations.\n-0010e5f0: 2054 6865 2065 7874 656e 6465 6420 3c63 The extended xsd_\n-0010e670: 5f68 6578 4269 6e61 7279 3c2f 613e 3c2f _hexBinary type is si\n-0010e690: 6d69 6c61 722e 3c2f 703e 0a3c 703e 5468 milar.

.

Th\n-0010e6a0: 6520 3c63 6f64 653e 6964 3c2f 636f 6465 e id and type\n-0010e6c0: 3c2f 636f 6465 3e20 6d65 6d62 6572 7320 members \n-0010e6d0: 636f 6e74 6169 6e20 7465 7874 2e20 5468 contain text. Th\n-0010e6e0: 6520 7365 7420 7468 6520 4449 4d45 2d73 e set the DIME-s\n-0010e6f0: 7065 6369 6669 6320 6f70 7469 6f6e 7320 pecific options \n-0010e700: 6d65 6d62 6572 2c20 796f 7520 6361 6e20 member, you can \n-0010e710: 7573 6520 7468 6520 3c63 6f64 653e 3c61 use the soa\n-0010e790: 705f 6469 6d65 5f6f 7074 696f 6e3c 2f61 p_dime_option functio\n-0010e7b0: 6e20 3c63 6f64 653e 6368 6172 202a 736f n char *so\n-0010e7c0: 6170 5f64 696d 655f 6f70 7469 6f6e 2873 ap_dime_option(s\n-0010e7d0: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-0010e7e0: 2c20 756e 7369 676e 6564 2073 686f 7274 , unsigned short\n-0010e7f0: 2074 7970 652c 2063 6f6e 7374 2063 6861 type, const cha\n-0010e800: 7220 2a6f 7074 696f 6e29 3c2f 636f 6465 r *option).

.

This f\n-0010e820: 756e 6374 696f 6e20 7265 7475 726e 7320 unction returns \n-0010e830: 6120 7374 7269 6e67 2077 6974 6820 7468 a string with th\n-0010e840: 6973 2065 6e63 6f64 696e 672e 2046 6f72 is encoding. For\n-0010e850: 2065 7861 6d70 6c65 3c2f 703e 0a3c 6469 example

.
struc\n-0010e8a0: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t \n-0010e8e0: 7873 645f 5f62 6173 6536 3442 696e 6172 xsd__base64Binar\n-0010e8f0: 793c 2f61 3e20 696d 6167 653b 203c 2f64 y image; .
image.__ptr =\n-0010e980: 202e 2e2e 3b20 3c2f 6469 763e 0a3c 6469 ...;
.i\n-0010e9a0: 6d61 6765 2e5f 5f73 697a 6520 3d20 2e2e mage.__size = ..\n-0010e9b0: 2e3b 203c 2f64 6976 3e0a 3c64 6976 2063 .;
.
imag\n-0010e9d0: 652e 6964 203d 203c 7370 616e 2063 6c61 e.id = "uuid:09\n-0010ea00: 3233 3335 3233 2d33 3435 622d 3433 3531 233523-345b-4351\n-0010ea10: 2d62 3632 332d 3564 7366 3335 7367 7335 -b623-5dsf35sgs5\n-0010ea20: 6436 2671 756f 743b 3c2f 7370 616e 3e3b d6";\n-0010ea30: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
image.\n-0010ea50: 7479 7065 203d 203c 7370 616e 2063 6c61 type = "image/j\n-0010ea80: 7065 6726 7175 6f74 3b3c 2f73 7061 6e3e peg"\n-0010ea90: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
..\n-0010eba0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
soap_\n-0010ec50: 6469 6d65 5f6f 7074 696f 6e3c 2f61 3e3c dime_option<\n-0010ec60: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
char * \n-0010ec80: 736f 6170 5f64 696d 655f 6f70 7469 6f6e soap_dime_option\n-0010ec90: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n-0010eca0: 6170 2c20 756e 7369 676e 6564 2073 686f ap, unsigned sho\n-0010ecb0: 7274 206f 7074 7970 652c 2063 6f6e 7374 rt optype, const\n-0010ecc0: 2063 6861 7220 2a6f 7074 696f 6e29 3c2f char *option)
Creates a\n-0010ecf0: 2044 494d 4520 6f70 7469 6f6e 2e3c 2f64 DIME option.
.
\n-0010ed10: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

C\n-0010f220: 2b2b 2070 726f 6772 616d 6d65 7273 2063 ++ programmers c\n-0010f230: 616e 2075 7365 2069 6e68 6572 6974 616e an use inheritan\n-0010f240: 6365 2069 6e73 7465 6164 206f 6620 7465 ce instead of te\n-0010f250: 7874 7561 6c20 6578 7465 6e73 696f 6e20 xtual extension \n-0010f260: 7265 7175 6972 6564 2069 6e20 433a 3c2f required in C:.

class xsd__base64\n-0010f300: 4269 6e61 7279 3c2f 613e 203c 2f64 6976 Binary .
{ publ\n-0010f340: 6963 3c2f 7370 616e 3e3a 3c2f 6469 763e ic:
\n-0010f350: 0a3c 6469 7620 636c 6173 733d 226c 696e .
unsigned\n-0010f390: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-0010f3b0: 2f73 7061 6e3e 202a 3c61 2063 6c61 7373 /span> *__ptr; .
int __size;
.
}; <\n-0010f4e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
cl\n-0010f510: 6173 7320 3c2f 7370 616e 3e6e 735f 5f6d ass ns__m\n-0010f520: 7942 696e 6172 7944 6174 6154 7970 6520 yBinaryDataType \n-0010f530: 3a20 3c73 7061 6e20 636c 6173 733d 226b : public xsd\n-0010f590: 5f5f 6261 7365 3634 4269 6e61 7279 3c2f __base64Binary
.
{ public:
.
<\n-0010f600: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0010f610: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *id;
\n-0010f630: 0a3c 6469 7620 636c 6173 733d 226c 696e .
char *ty\n-0010f670: 7065 3b20 3c2f 6469 763e 0a3c 6469 7620 pe;
.
\n-0010f690: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-0010f6b0: 2f73 7061 6e3e 202a 6f70 7469 6f6e 733b /span> *options;\n-0010f6c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
};.

Thi\n-0010f700: 7320 6465 6669 6e65 7320 616e 2065 7874 s defines an ext\n-0010f710: 656e 7369 6f6e 206f 6620 3c65 6d3e 3c63 ension of xsd:base64Bi\n-0010f730: 6e61 7279 3c2f 636f 6465 3e3c 2f65 6d3e nary\n-0010f740: 2c20 7375 6368 2074 6861 7420 7468 6520 , such that the \n-0010f750: 6461 7461 2063 616e 2062 6520 7365 7269 data can be seri\n-0010f760: 616c 697a 6564 2061 7320 4449 4d45 2061 alized as DIME a\n-0010f770: 7474 6163 686d 656e 7473 2075 7369 6e67 ttachments using\n-0010f780: 203c 656d 3e3c 636f 6465 3e68 7265 663c href<\n-0010f790: 2f63 6f64 653e 3c2f 656d 3e20 6174 7472 /code> attr\n-0010f7a0: 6962 7574 6573 2066 6f72 2072 6566 6572 ibutes for refer\n-0010f7b0: 656e 6369 6e67 2e20 5768 656e 2061 2064 encing. When a d\n-0010f7c0: 6966 6665 7265 6e74 2061 7474 7269 6275 ifferent attribu\n-0010f7d0: 7465 2069 7320 746f 2062 6520 7573 6564 te is to be used\n-0010f7e0: 2c20 7468 6973 206d 7573 7420 6265 2065 , this must be e\n-0010f7f0: 7870 6c69 6369 746c 7920 6465 6669 6e65 xplicitly define\n-0010f800: 643a 3c2f 703e 0a3c 6469 7620 636c 6173 d:

.
<\n-0010f830: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0010f840: 656e 7422 3e2f 2f67 736f 6170 2057 5372 ent\">//gsoap WSr\n-0010f850: 6566 2073 6368 656d 6120 696d 706f 7274 ef schema import\n-0010f860: 3a20 6874 7470 3a2f 2f73 6368 656d 6173 : http://schemas\n-0010f870: 2e78 6d6c 736f 6170 2e6f 7267 2f77 732f .xmlsoap.org/ws/\n-0010f880: 3230 3032 2f30 342f 7265 6665 7265 6e63 2002/04/referenc\n-0010f890: 652f 203c 2f73 7061 6e3e 3c2f 6469 763e e/
\n-0010f8a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
struct \n-0010f8d0: 3c2f 7370 616e 3e6e 735f 5f6d 7942 696e ns__myBin\n-0010f8e0: 6172 7944 6174 6154 7970 6520 3c2f 6469 aryDataType .
{
. \n-0010f920: 2020 203c 7370 616e 2063 6c61 7373 3d22 uns\n-0010f940: 6967 6e65 643c 2f73 7061 6e3e 203c 7370 igned char *__ptr; .
int __s\n-0010f9c0: 697a 653b 203c 2f64 6976 3e0a 3c64 6976 ize;
. \n-0010f9e0: 2020 3c73 7061 6e20 636c 6173 733d 226b char\n-0010fa00: 3c2f 7370 616e 3e20 2a69 643b 203c 2f64 *id; .
char \n-0010fa50: 2a74 7970 653b 203c 2f64 6976 3e0a 3c64 *type;
.\n-0010fa70: 2020 2020 3c73 7061 6e20 636c 6173 733d ch\n-0010fa90: 6172 3c2f 7370 616e 3e20 2a6f 7074 696f ar *optio\n-0010faa0: 6e73 3b20 3c2f 6469 763e 0a3c 6469 7620 ns;
.
@\n-0010fac0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-0010fae0: 2f73 7061 6e3e 202a 5753 7265 665f 5f6c /span> *WSref__l\n-0010faf0: 6f63 6174 696f 6e3b 203c 2f64 6976 3e0a ocation;
.\n-0010fb00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
};
.

The\n-00114e70: 2066 6f6c 6c6f 7769 6e67 2065 7861 6d70 following examp\n-00114e80: 6c65 2069 6c6c 7573 7472 6174 6573 2074 le illustrates t\n-00114e90: 6865 2073 7472 6561 6d69 6e67 206f 6620 he streaming of \n-00114ea0: 6120 4449 4d45 2061 7474 6163 686d 656e a DIME attachmen\n-00114eb0: 7420 696e 746f 2061 2066 696c 6520 6279 t into a file by\n-00114ec0: 2061 2063 6c69 656e 743a 3c2f 703e 0a3c a client:

.<\n-00114ed0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-00114ee0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
int main\n-00114f20: 2829 203c 2f64 6976 3e0a 3c64 6976 2063 ()
.
{.
st\n-00114f70: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap soap; .
soa\n-00115050: 705f 696e 6974 3c2f 613e 2826 616d 703b p_init(&\n-00115060: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-00115090: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
soap.fdimewriteop\n-00115140: 656e 3c2f 613e 203d 2064 696d 655f 7772 en = dime_wr\n-00115150: 6974 655f 6f70 656e 3b20 3c2f 6469 763e ite_open;
\n-00115160: 0a3c 6469 7620 636c 6173 733d 226c 696e .
soap\n-001151a0: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .fdim\n-00115200: 6577 7269 7465 636c 6f73 653c 2f61 3e20 ewriteclose \n-00115210: 3d20 6469 6d65 5f77 7269 7465 5f63 6c6f = dime_write_clo\n-00115220: 7365 3b20 3c2f 6469 763e 0a3c 6469 7620 se;
.
<\n-00115240: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00115250: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00115260: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n-00115270: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00115280: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00115290: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm\n-001152a0: 6c23 6761 3066 3332 3134 6361 6136 3037 l#ga0f3214caa607\n-001152b0: 6637 3435 3035 6631 3163 3736 6164 6538 f74505f11c76ade8\n-001152c0: 3563 6365 223e 6664 696d 6577 7269 7465 5cce\">fdimewrite\n-001152d0: 3c2f 613e 203d 2064 696d 655f 7772 6974 = dime_writ\n-001152e0: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
.
if (soap_call_ns_\n-00115330: 5f77 6562 6d65 7468 6f64 2826 616d 703b _webmethod(&\n-00115340: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-00115370: 202e 2e2e 2929 3c2f 6469 763e 0a3c 6469 ...))
. \n-00115390: 2020 202e 2e2e 203c 7370 616e 2063 6c61 ... // \n-001153b0: 6572 726f 723c 2f73 7061 6e3e 3c2f 6469 error.
else.
... // success
.
} <\n-00115460: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
.\n-00115480: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
void\n-001154b0: 3c2f 7370 616e 3e20 2a64 696d 655f 7772 *dime_wr\n-001154c0: 6974 655f 6f70 656e 283c 7370 616e 2063 ite_open(s\n-001154e0: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n-00115550: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00115560: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n-00115590: 3c2f 7370 616e 3e20 2a3c 7370 616e 2063 *id, const\n-001155e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-00115600: 2f73 7061 6e3e 202a 7479 7065 2c20 3c73 /span> *type, const\n-00115630: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-00115650: 2f73 7061 6e3e 202a 6f70 7469 6f6e 7329 /span> *options)\n-00115660: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
{.
FILE *hand\n-001156a0: 6c65 203d 203c 6120 636c 6173 733d 2263 le = fope\n-00115700: 6e3c 2f61 3e28 3c73 7061 6e20 636c 6173 n("somefile\n-00115730: 2671 756f 743b 3c2f 7370 616e 3e2c 203c ", <\n-00115740: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-00115750: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-00115760: 3b77 6226 7175 6f74 3b3c 2f73 7061 6e3e ;wb"\n-00115770: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
.
if (!handle) .
{
.<\n-001157e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001157f0: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap\n-00115820: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->error = SOAP_EOF; \n-001158e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
soap->\n-00115930: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;errnum\n-00115980: 3c2f 613e 203d 2065 7272 6e6f 3b20 3c73 = errno; // get reaso\n-001159b0: 6e20 3c2f 7370 616e 3e3c 2f64 6976 3e0a n
.\n-001159c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
}
. \n-001159f0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-00115a10: 6e3c 2f73 7061 6e3e 2028 3c73 7061 6e20 n (void*\n-00115a40: 2968 616e 646c 653b 203c 2f64 6976 3e0a )handle;
.\n-00115a50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
}
.
..
{.
f\n-00115c10: 636c 6f73 653c 2f61 3e28 2846 494c 452a close((FILE*\n-00115c20: 2968 616e 646c 6529 3b20 3c2f 6469 763e )handle);
\n-00115c30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
}
. <\n-00115c60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
int dim\n-00115ca0: 655f 7772 6974 6528 3c73 7061 6e20 636c e_write(st\n-00115cc0: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, void *handle, const \n-00115d80: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *\n-00115df0: 6275 663c 2f61 3e2c 203c 7370 616e 2063 buf, size_t\n-00115e20: 206c 656e 2920 3c2f 6469 763e 0a3c 6469 len)
.{\n-00115e40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
size_t nwritten; .
while (\n-00115ed0: 6c65 6e29 203c 2f64 6976 3e0a 3c64 6976 len)
. \n-00115ef0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
.
nw\n-00115f10: 7269 7474 656e 203d 2066 7772 6974 6528 ritten = fwrite(\n-00115f20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 buf\n-00115f70: 2c20 312c 206c 656e 2c20 2846 494c 452a , 1, len, (FILE*\n-00115f80: 2968 616e 646c 6529 3b20 3c2f 6469 763e )handle);
\n-00115f90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
if (!nwr\n-00115fd0: 6974 7465 6e29 203c 2f64 6976 3e0a 3c64 itten)
.\n-00115ff0: 2020 2020 7b3c 2f64 6976 3e0a 3c64 6976 {
. \n-00116010: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap<\n-00116040: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->errnum = er\n-001160a0: 726e 6f3b 203c 7370 616e 2063 6c61 7373 rno; // ge\n-001160c0: 7420 7265 6173 6f6e 203c 2f73 7061 6e3e t reason \n-001160d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<\n-001160f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00116100: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n-00116110: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> SOAP_\n-00116170: 454f 463c 2f61 3e3b 203c 2f64 6976 3e0a EOF;
.\n-00116180: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
}
.<\n-001161a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001161b0: 3e20 2020 206c 656e 202d 3d20 6e77 7269 > len -= nwri\n-001161c0: 7474 656e 3b20 3c2f 6469 763e 0a3c 6469 tten;
. \n-001161e0: 2020 203c 6120 636c 6173 733d 2263 6f64 buf<\n-00116230: 2f61 3e20 2b3d 206e 7772 6974 7465 6e3b /a> += nwritten;\n-00116240: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
} .
return\n-001162a0: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_OK\n-00116300: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
}.
soap::fd\n-001163e0: 696d 6577 7269 7465 3c2f 613e 3c2f 6469 imewrite
int(* fdim\n-00116410: 6577 7269 7465 2928 7374 7275 6374 2073 ewrite)(struct s\n-00116420: 6f61 7020 2a73 6f61 702c 2076 6f69 6420 oap *soap, void \n-00116430: 2a2c 2063 6f6e 7374 2063 6861 7220 2a2c *, const char *,\n-00116440: 2073 697a 655f 7429 3c2f 6469 763e 3c64 size_t)
Callback to wri\n-00116470: 7465 2064 6174 6120 696e 2061 2044 494d te data in a DIM\n-00116480: 4520 6174 7461 6368 6d65 6e74 2073 7472 E attachment str\n-00116490: 6561 6d2e 3c2f 6469 763e 3c64 6976 2063 eam.
\n-001164b0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n-001164c0: 7374 6473 6f61 7032 2e68 3a34 3832 323c stdsoap2.h:4822<\n-001164d0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
.\n-001165b0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
void(* fdime\n-001165d0: 7772 6974 6563 6c6f 7365 2928 7374 7275 writeclose)(stru\n-001165e0: 6374 2073 6f61 7020 2a73 6f61 702c 2076 ct soap *soap, v\n-001165f0: 6f69 6420 2a68 616e 646c 6529 3c2f 6469 oid *handle)
Callback to\n-00116620: 2063 6c6f 7365 2061 2044 494d 4520 6174 close a DIME at\n-00116630: 7461 6368 6d65 6e74 2073 7472 6561 6d20 tachment stream \n-00116640: 6166 7465 7220 7772 6974 696e 672e 3c2f after writing.
Defini\n-00116670: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n-00116680: 7032 2e68 3a34 3833 333c 2f64 6976 3e3c p2.h:4833
<\n-00116690: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
voi\n-00116780: 6420 2a28 2a20 6664 696d 6577 7269 7465 d *(* fdimewrite\n-00116790: 6f70 656e 2928 7374 7275 6374 2073 6f61 open)(struct soa\n-001167a0: 7020 2a73 6f61 702c 2063 6f6e 7374 2063 p *soap, const c\n-001167b0: 6861 7220 2a69 642c 2063 6f6e 7374 2063 har *id, const c\n-001167c0: 6861 7220 2a74 7970 652c 2063 6f6e 7374 har *type, const\n-001167d0: 2063 6861 7220 2a6f 7074 696f 6e73 293c char *options)<\n-001167e0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
Callback\n-00116800: 2074 6f20 6f70 656e 2061 2073 7472 6561 to open a strea\n-00116810: 6d69 6e67 2044 494d 4520 6174 7461 6368 ming DIME attach\n-00116820: 6d65 6e74 2066 6f72 2077 7269 7469 6e67 ment for writing\n-00116830: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
Def\n-00116850: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n-00116860: 736f 6170 322e 683a 3438 3130 3c2f 6469 soap2.h:4810
.
\n-001168d0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
so\n-00116930: 6170 3a3a 666f 7065 6e3c 2f61 3e3c 2f64 ap::fopen
SOAP_SOCK\n-00116960: 4554 282a 2066 6f70 656e 2928 7374 7275 ET(* fopen)(stru\n-00116970: 6374 2073 6f61 7020 2a73 6f61 702c 2063 ct soap *soap, c\n-00116980: 6f6e 7374 2063 6861 7220 2a65 6e64 706f onst char *endpo\n-00116990: 696e 742c 2063 6f6e 7374 2063 6861 7220 int, const char \n-001169a0: 2a68 6f73 742c 2069 6e74 2070 6f72 7429 *host, int port)\n-001169b0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
Callbac\n-001169d0: 6b20 7468 6174 206f 7065 6e73 2061 2073 k that opens a s\n-001169e0: 6f63 6b65 7420 636f 6e6e 6563 7469 6f6e ocket connection\n-001169f0: 2074 6f20 6120 7365 7276 6572 2065 6e64 to a server end\n-00116a00: 706f 696e 742e 3c2f 6469 763e 3c64 6976 point.
<\n-00116a20: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:449\n-00116a40: 353c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 5
.
\n-00116be0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
\n-00116c90: 534f 4150 5f45 4f46 3c2f 613e 3c2f 6469 SOAP_EOF
#define SO\n-00116cc0: 4150 5f45 4f46 3c2f 6469 763e 3c64 6976 AP_EOF
A\n-00116ce0: 2073 6f61 705f 7374 6174 7573 2065 7272 soap_status err\n-00116cf0: 6f72 2063 6f64 653a 2075 6e65 7870 6563 or code: unexpec\n-00116d00: 7465 6420 656e 6420 6f66 2066 696c 652c ted end of file,\n-00116d10: 206e 6f20 696e 7075 742c 2074 7261 6e73 no input, trans\n-00116d20: 6d69 7373 696f 6e20 696e 7465 7272 7570 mission interrup\n-00116d30: 7465 6420 6f72 2074 696d 6564 206f 7574 ted or timed out\n-00116d40: 2028 7361 2e2e 2e3c 2f64 6976 3e3c 6469 (sa...
\n-00116d60: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:23\n-00116d80: 3635 3c2f 6469 763e 3c2f 6469 763e 0a3c 65
.<\n-00116d90: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

Message\n-00116db0: 2063 6f6d 7072 6573 7369 6f6e 2077 6974 compression wit\n-00116dc0: 6820 3c63 6f64 653e 2353 4f41 505f 454e h #SOAP_EN\n-00116dd0: 435f 5a4c 4942 3c2f 636f 6465 3e20 6361 C_ZLIB ca\n-00116de0: 6e20 6265 2075 7365 6420 7769 7468 2044 n be used with D\n-00116df0: 494d 4520 746f 2063 6f6d 7072 6573 7320 IME to compress \n-00116e00: 7468 6520 656e 7469 7265 206d 6573 7361 the entire messa\n-00116e10: 6765 2e20 486f 7765 7665 722c 2063 6f6d ge. However, com\n-00116e20: 7072 6573 7369 6f6e 2072 6571 7569 7265 pression require\n-00116e30: 7320 6275 6666 6572 696e 6720 746f 2064 s buffering to d\n-00116e40: 6574 6572 6d69 6e65 2074 6865 2048 5454 etermine the HTT\n-00116e50: 5020 636f 6e74 656e 7420 6c65 6e67 7468 P content length\n-00116e60: 2068 6561 6465 722c 2077 6869 6368 2063 header, which c\n-00116e70: 616e 6365 6c73 2074 6865 2062 656e 6566 ancels the benef\n-00116e80: 6974 7320 6f66 2073 7472 6561 6d69 6e67 its of streaming\n-00116e90: 2044 494d 452e 2054 6f20 6176 6f69 6420 DIME. To avoid \n-00116ea0: 7468 6973 2c20 796f 7520 7368 6f75 6c64 this, you should\n-00116eb0: 2075 7365 2063 6875 6e6b 6564 2048 5454 use chunked HTT\n-00116ec0: 5020 2877 6974 6820 7468 6520 6f75 7470 P (with the outp\n-00116ed0: 7574 2d6d 6f64 6520 3c63 6f64 653e 2353 ut-mode #S\n-00116ee0: 4f41 505f 494f 5f43 4855 4e4b 3c2f 636f OAP_IO_CHUNK flag) with c\n-00116f00: 6f6d 7072 6573 7369 6f6e 2061 6e64 2073 ompression and s\n-00116f10: 7472 6561 6d69 6e67 2044 494d 452e 2041 treaming DIME. A\n-00116f20: 7420 7468 6520 7365 7276 6572 2073 6964 t the server sid\n-00116f30: 652c 2077 6865 6e20 796f 7520 7365 7420 e, when you set \n-00116f40: 3c63 6f64 653e 2353 4f41 505f 494f 5f43 #SOAP_IO_C\n-00116f50: 4855 4e4b 3c2f 636f 6465 3e20 6265 666f HUNK befo\n-00116f60: 7265 2063 616c 6c69 6e67 203c 636f 6465 re calling \n-00116fe0: 736f 6170 5f73 6572 7665 3c2f 613e 3c2f soap_serve, the engin\n-00117000: 6520 7769 6c6c 2061 7574 6f6d 6174 6963 e will automatic\n-00117010: 616c 6c79 2072 6576 6572 7420 746f 2062 ally revert to b\n-00117020: 7566 6665 7269 6e67 2028 3c63 6f64 653e uffering (\n-00117030: 2353 4f41 505f 494f 5f53 544f 5245 3c2f #SOAP_IO_STORE flag is se\n-00117050: 7429 2e20 596f 7520 6361 6e20 6368 6563 t). You can chec\n-00117060: 6b20 7468 6973 2066 6c61 6720 7769 7468 k this flag with\n-00117070: 203c 636f 6465 3e28 736f 6170 2d26 6774 (soap->\n-00117080: 3b6f 6d6f 6465 2026 616d 703b 2053 4f41 ;omode & SOA\n-00117090: 505f 494f 2920 3d3d 2053 4f41 505f 494f P_IO) == SOAP_IO\n-001170a0: 5f43 4855 4e4b 3c2f 636f 6465 3e20 746f _CHUNK to\n-001170b0: 2073 6565 2069 6620 7468 6520 636c 6965 see if the clie\n-001170c0: 6e74 2061 6363 6570 7473 2063 6875 6e6b nt accepts chunk\n-001170d0: 696e 672e 204d 6f72 6520 696e 666f 726d ing. More inform\n-001170e0: 6174 696f 6e20 6162 6f75 7420 7374 7265 ation about stre\n-001170f0: 616d 696e 6720 6368 756e 6b65 6420 4449 aming chunked DI\n-00117100: 4d45 2063 616e 2062 6520 666f 756e 6420 ME can be found \n-00117110: 696e 2053 6563 7469 6f6e 203c 6120 636c in Section Streamin\n-00117150: 6720 6368 756e 6b65 6420 4449 4d45 3c2f g chunked DIME .

.
Warning\n-00117190: 3c2f 6474 3e3c 6464 3e54 6865 203c 636f
The options member is a DI\n-001171c0: 4d45 2d73 7065 6369 6669 6320 6461 7461 ME-specific data\n-001171d0: 2073 7472 7563 7475 7265 2c20 636f 6e73 structure, cons\n-001171e0: 6973 7469 6e67 206f 6620 6120 3420 6279 isting of a 4 by\n-001171f0: 7465 2068 6561 6465 7220 636f 6e74 6169 te header contai\n-00117200: 6e69 6e67 2074 6865 206f 7074 696f 6e20 ning the option \n-00117210: 7479 7065 2069 6e66 6f20 2868 6920 6279 type info (hi by\n-00117220: 7465 2c20 6c6f 2062 7974 6529 2c20 6f70 te, lo byte), op\n-00117230: 7469 6f6e 2073 7472 696e 6720 6c65 6e67 tion string leng\n-00117240: 7468 2028 6869 2062 7974 652c 206c 6f20 th (hi byte, lo \n-00117250: 6279 7465 292c 2066 6f6c 6c6f 7765 6420 byte), followed \n-00117260: 6279 2061 206e 6f6e 2d27 5c30 2720 7465 by a non-'\\0' te\n-00117270: 726d 696e 6174 6564 2073 7472 696e 672e rminated string.\n-00117280: 2054 6865 2044 494d 4520 6861 6e64 6c65 The DIME handle\n-00117290: 7220 7265 636f 676e 697a 6573 206f 6e65 r recognizes one\n-001172a0: 206f 7074 696f 6e20 6174 206d 6f73 742e option at most.\n-001172b0: 3c2f 6464 3e3c 2f64 6c3e 0a3c 703e f09f
.

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

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

.St\n-00117320: 7265 616d 696e 6720 6368 756e 6b65 6420 reaming chunked \n-00117330: 4449 4d45 3c2f 6832 3e0a 3c70 3e54 6f20 DIME

.

To \n-00117340: 7365 6e64 2044 494d 4520 6174 7461 6368 send DIME attach\n-00117350: 6d65 6e74 732c 2074 6865 2061 7474 6163 ments, the attac\n-00117360: 686d 656e 7420 7369 7a65 7320 6d75 7374 hment sizes must\n-00117370: 2062 6520 6465 7465 726d 696e 6564 2069 be determined i\n-00117380: 6e20 6164 7661 6e63 6520 746f 2063 616c n advance to cal\n-00117390: 6375 6c61 7465 2048 5454 5020 6d65 7373 culate HTTP mess\n-001173a0: 6167 6520 6c65 6e67 7468 2072 6571 7569 age length requi\n-001173b0: 7265 6420 746f 2073 7472 6561 6d20 4449 red to stream DI\n-001173c0: 4d45 206f 7665 7220 4854 5450 2e20 486f ME over HTTP. Ho\n-001173d0: 7765 7665 722c 2063 6875 6e6b 6564 2044 wever, chunked D\n-001173e0: 494d 4520 746f 6765 7468 6572 2077 6974 IME together wit\n-001173f0: 6820 6368 756e 6b65 6420 4854 5450 2063 h chunked HTTP c\n-00117400: 616e 2062 6520 7573 6564 2074 6f20 6f6d an be used to om\n-00117410: 6974 2074 6869 7320 7374 6570 2e20 4669 it this step. Fi\n-00117420: 7273 7420 7365 7420 7468 6520 3c63 6f64 rst set the #SOAP_IO_CHUNK\n-00117440: 3c2f 636f 6465 3e20 666c 6167 2e20 5468 flag. Th\n-00117450: 656e 2c20 746f 2073 7472 6561 6d20 6368 en, to stream ch\n-00117460: 756e 6b65 6420 4449 4d45 2c20 7365 7420 unked DIME, set \n-00117470: 7468 6520 3c63 6f64 653e 5f5f 7369 7a65 the __size\n-00117480: 3c2f 636f 6465 3e20 6d65 6d62 6572 206f member o\n-00117490: 6620 616e 2061 7474 6163 686d 656e 7420 f an attachment \n-001174a0: 746f 207a 6572 6f20 616e 6420 656e 6162 to zero and enab\n-001174b0: 6c65 2044 494d 4520 6368 756e 6b69 6e67 le DIME chunking\n-001174c0: 2e20 5468 6520 4449 4d45 203c 636f 6465 . The DIME soap::fdimeread\n-00117570: 3c2f 613e 3c2f 636f 6465 3e20 6361 6c6c call\n-00117580: 6261 636b 2074 6865 6e20 6665 7463 6865 back then fetche\n-00117590: 7320 6461 7461 2069 6e20 6368 756e 6b73 s data in chunks\n-001175a0: 2061 6e64 2069 7420 6973 2069 6d70 6f72 and it is impor\n-001175b0: 7461 6e74 2074 6f20 6669 6c6c 2074 6865 tant to fill the\n-001175c0: 2065 6e74 6972 6520 6275 6666 6572 2075 entire buffer u\n-001175d0: 6e6c 6573 7320 7468 6520 656e 6420 6f66 nless the end of\n-001175e0: 2074 6865 2064 6174 6120 6861 7320 6265 the data has be\n-001175f0: 656e 2072 6561 6368 6564 2061 6e64 2074 en reached and t\n-00117600: 6865 206c 6173 7420 6368 756e 6b20 6973 he last chunk is\n-00117610: 2074 6f20 6265 2073 656e 642e 2054 6861 to be send. Tha\n-00117620: 7420 6973 2c20 3c63 6f64 653e 3c61 2063 t is, soap\n-001176c0: 3a3a 6664 696d 6572 6561 643c 2f61 3e3c ::fdimeread<\n-001176d0: 2f63 6f64 653e 2073 686f 756c 6420 7265 /code> should re\n-001176e0: 7475 726e 2074 6865 2076 616c 7565 206f turn the value o\n-001176f0: 6620 7468 6520 6c61 7374 203c 636f 6465 f the last len para\n-00117710: 6d65 7465 7220 616e 6420 6669 6c6c 2074 meter and fill t\n-00117720: 6865 2065 6e74 6972 6520 6275 6666 6572 he entire buffer\n-00117730: 203c 636f 6465 3e62 7566 3c2f 636f 6465 buf for all chunks\n-00117750: 2065 7863 6570 7420 7468 6520 6c61 7374 except the last\n-00117760: 2e20 466f 7220 7468 6520 6c61 7374 2069 . For the last i\n-00117770: 7420 7265 7475 726e 7320 302e 3c2f 703e t returns 0.

\n-00117780: 0a3c 703e 596f 7520 6361 6e20 616c 736f .

You can also\n-00117790: 2075 7365 2074 6865 203c 636f 6465 3e23 use the #\n-001177a0: 534f 4150 5f49 4f5f 5354 4f52 453c 2f63 SOAP_IO_STORE flag, but t\n-001177c0: 6861 7420 6361 6e63 656c 7320 7468 6520 hat cancels the \n-001177d0: 6265 6e65 6669 7473 206f 6620 7374 7265 benefits of stre\n-001177e0: 616d 696e 6720 4449 4d45 2e3c 2f70 3e0a aming DIME.

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

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

.

.W\n-00117850: 5344 4c20 6269 6e64 696e 6773 2066 6f72 SDL bindings for\n-00117860: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment\n-00117870: 733c 2f68 323e 0a3c 703e 5468 6520 7773 s

.

The ws\n-00117880: 646c 3268 2074 6f6f 6c20 7265 636f 676e dl2h tool recogn\n-00117890: 697a 6573 2044 494d 4520 6174 7461 6368 izes DIME attach\n-001178a0: 6d65 6e74 7320 616e 6420 7072 6f64 7563 ments and produc\n-001178b0: 6573 2061 6e20 616e 6e6f 7461 7465 6420 es an annotated \n-001178c0: 6865 6164 6572 2066 696c 652e 2042 6f74 header file. Bot\n-001178d0: 6820 6f70 656e 2061 6e64 2063 6c6f 7365 h open and close\n-001178e0: 6420 6c61 796f 7574 7320 6172 6520 7375 d layouts are su\n-001178f0: 7070 6f72 7465 6420 666f 7220 7472 616e pported for tran\n-00117900: 736d 6974 7469 6e67 2044 494d 4520 6174 smitting DIME at\n-00117910: 7461 6368 6d65 6e74 732e 2046 6f72 2063 tachments. For c\n-00117920: 6c6f 7365 6420 666f 726d 6174 732c 2061 losed formats, a\n-00117930: 6c6c 2044 494d 4520 6174 7461 6368 6d65 ll DIME attachme\n-00117940: 6e74 7320 6d75 7374 2062 6520 7265 6665 nts must be refe\n-00117950: 7265 6e63 6564 2066 726f 6d20 7468 6520 renced from the \n-00117960: 534f 4150 206d 6573 7361 6765 2c20 652e SOAP message, e.\n-00117970: 672e 2075 7369 6e67 2068 7265 6673 2077 g. using hrefs w\n-00117980: 6974 6820 534f 4150 2065 6e63 6f64 696e ith SOAP encodin\n-00117990: 6720 616e 6420 7573 696e 6720 7468 6520 g and using the \n-001179a0: 6170 706c 6963 6174 696f 6e2d 7370 6563 application-spec\n-001179b0: 6966 6963 2072 6566 6572 656e 6365 2061 ific reference a\n-001179c0: 7474 7269 6275 7465 2069 6e63 6c75 6465 ttribute include\n-001179d0: 6420 696e 2074 6865 203c 636f 6465 3e3c d in the <\n-001179e0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001179f0: 663d 2273 7472 7563 7478 7364 5f5f 5f5f f=\"structxsd____\n-00117a00: 6261 7365 3634 5f62 696e 6172 792e 6874 base64_binary.ht\n-00117a10: 6d6c 2220 7469 746c 653d 2258 5344 2062 ml\" title=\"XSD b\n-00117a20: 6173 6536 3442 696e 6172 7920 7374 7275 ase64Binary stru\n-00117a30: 6374 7572 6520 7769 7468 2061 7474 6163 cture with attac\n-00117a40: 686d 656e 7420 6461 7461 2e22 3e78 7364 hment data.\">xsd\n-00117a50: 5f5f 6261 7365 3634 4269 6e61 7279 3c2f __base64Binary struct\n-00117a70: 206f 7220 636c 6173 7320 666f 7220 646f or class for do\n-00117a80: 6375 6d65 6e74 2f6c 6974 6572 616c 206d cument/literal m\n-00117a90: 6573 7361 6769 6e67 2e3c 2f70 3e0a 3c70 essaging.

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

.

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

.MTOM att\n-00117ba0: 6163 686d 656e 7473 3c2f 6831 3e0a 3c70 achments

.MTOM (Message T\n-00117bc0: 7261 6e73 6d69 7373 696f 6e20 4f70 7469 ransmission Opti\n-00117bd0: 6d69 7a61 7469 6f6e 204d 6563 6861 6e69 mization Mechani\n-00117be0: 736d 2920 6973 2061 2072 656c 6174 6976 sm) is a relativ\n-00117bf0: 656c 7920 6e65 7720 666f 726d 6174 2066 ely new format f\n-00117c00: 6f72 2074 7261 6e73 6d69 7474 696e 6720 or transmitting \n-00117c10: 6174 7461 6368 6d65 6e74 7320 7769 7468 attachments with\n-00117c20: 2053 4f41 5020 6d65 7373 6167 6573 2028 SOAP messages (\n-00117c30: 7365 6520 3c61 2068 7265 663d 2268 7474 see h\n-00117c60: 7474 703a 2f2f 7777 772e 7733 2e6f 7267 ttp://www.w3.org\n-00117c70: 2f54 522f 736f 6170 3132 2d6d 746f 6d3c /TR/soap12-mtom<\n-00117c80: 2f61 3e29 2e20 4d54 4f4d 2061 7474 6163 /a>). MTOM attac\n-00117c90: 686d 656e 7473 2061 7265 2065 7373 656e hments are essen\n-00117ca0: 7469 616c 6c79 204d 494d 4520 6174 7461 tially MIME atta\n-00117cb0: 6368 6d65 6e74 7320 7769 7468 2073 7461 chments with sta\n-00117cc0: 6e64 6172 6469 7a65 6420 6d65 6368 616e ndardized mechan\n-00117cd0: 6973 6d73 2066 6f72 2063 726f 7373 2072 isms for cross r\n-00117ce0: 6566 6572 656e 6369 6e67 2061 7474 6163 eferencing attac\n-00117cf0: 686d 656e 7473 2066 726f 6d20 7468 6520 hments from the \n-00117d00: 534f 4150 2062 6f64 792c 2077 6869 6368 SOAP body, which\n-00117d10: 2069 7320 6162 7365 6e74 2069 6e20 2870 is absent in (p\n-00117d20: 6c61 696e 2920 4d49 4d45 2061 7474 6163 lain) MIME attac\n-00117d30: 686d 656e 7473 2061 6e64 206f 7074 696f hments and optio\n-00117d40: 6e61 6c20 7769 7468 2044 494d 4520 6174 nal with DIME at\n-00117d50: 7461 6368 6d65 6e74 732e 3c2f 703e 0a3c tachments.

.<\n-00117d60: 703e 556e 6c69 6b65 2074 6865 206e 616d p>Unlike the nam\n-00117d70: 6520 7375 6767 6573 7473 2c20 7468 6520 e suggests, the \n-00117d80: 7370 6565 6420 6279 2077 6869 6368 2061 speed by which a\n-00117d90: 7474 6163 6865 6420 6461 7461 2069 7320 ttached data is \n-00117da0: 7472 616e 736d 6974 7465 6420 6973 206e transmitted is n\n-00117db0: 6f74 2069 6e63 7265 6173 6564 2063 6f6d ot increased com\n-00117dc0: 7061 7265 6420 746f 204d 494d 452c 2044 pared to MIME, D\n-00117dd0: 494d 452c 206f 7220 6576 656e 2058 4d4c IME, or even XML\n-00117de0: 2065 6e63 6f64 6564 2062 6173 6536 3420 encoded base64 \n-00117df0: 6461 7461 2c20 6265 6361 7573 6520 7468 data, because th\n-00117e00: 6520 7065 7266 6f72 6d61 6e63 6520 6469 e performance di\n-00117e10: 6666 6572 656e 6365 7320 7768 656e 2075 fferences when u\n-00117e20: 7369 6e67 2067 534f 4150 2077 696c 6c20 sing gSOAP will \n-00117e30: 6265 2073 6d61 6c6c 2e20 5468 6520 6164 be small. The ad\n-00117e40: 7661 6e74 6167 6520 6f66 2074 6865 2066 vantage of the f\n-00117e50: 6f72 6d61 7420 6973 2074 6865 2073 7461 ormat is the sta\n-00117e60: 6e64 6172 6469 7a65 6420 6174 7461 6368 ndardized attach\n-00117e70: 6d65 6e74 2072 6566 6572 656e 6365 206d ment reference m\n-00117e80: 6563 6861 6e69 736d 2c20 7768 6963 6820 echanism, which \n-00117e90: 7368 6f75 6c64 2069 6d70 726f 7665 2069 should improve i\n-00117ea0: 6e74 6572 6f70 6572 6162 696c 6974 792e nteroperability.\n-00117eb0: 3c2f 703e 0a3c 703e 5468 6520 4d54 4f4d

.

The MTOM\n-00117ec0: 2073 7065 6369 6669 6361 7469 6f6e 206d specification m\n-00117ed0: 616e 6461 7465 7320 534f 4150 2031 2e32 andates SOAP 1.2\n-00117ee0: 2061 6e64 2074 6865 2075 7365 206f 6620 and the use of \n-00117ef0: 7468 6520 584f 5020 6e61 6d65 7370 6163 the XOP namespac\n-00117f00: 652e 2054 6865 2058 4f50 2049 6e63 6c75 e. The XOP Inclu\n-00117f10: 6465 2065 6c65 6d65 6e74 203c 656d 3e3c de element <\n-00117f20: 636f 6465 3e78 6f70 3a49 6e63 6c75 6465 code>xop:Include\n-00117f30: 3c2f 636f 6465 3e3c 2f65 6d3e 2069 7320 is \n-00117f40: 6465 6669 6e65 6420 696e 2074 6865 2069 defined in the i\n-00117f50: 6e74 6572 6661 6365 2068 6561 6465 7220 nterface header \n-00117f60: 6669 6c65 2061 7320 6120 3c63 6f64 653e file as a \n-00117f70: 3c61 2063 6c61 7373 3d22 656c 2220 6872 _xop__Incl\n-00117fe0: 7564 653c 2f61 3e3c 2f63 6f64 653e 2073 ude s\n-00117ff0: 7472 7563 7420 6f72 2063 6c61 7373 2c20 truct or class, \n-00118000: 7468 6174 2069 7320 7573 6564 2074 6f20 that is used to \n-00118010: 7265 6665 7265 6e63 6520 6174 7461 6368 reference attach\n-00118020: 6d65 6e74 2873 2920 6672 6f6d 2074 6865 ment(s) from the\n-00118030: 2053 4f41 5020 6d65 7373 6167 6520 626f SOAP message bo\n-00118040: 6479 2e3c 2f70 3e0a 3c70 3e42 6563 6175 dy.

.

Becau\n-00118050: 7365 2072 6566 6572 656e 6365 7320 6672 se references fr\n-00118060: 6f6d 2077 6974 6869 6e20 7468 6520 534f om within the SO\n-00118070: 4150 206d 6573 7361 6765 2062 6f64 7920 AP message body \n-00118080: 746f 2061 7474 6163 686d 656e 7473 2061 to attachments a\n-00118090: 7265 206d 616e 6461 746f 7279 2077 6974 re mandatory wit\n-001180a0: 6820 4d54 4f4d 2c20 7468 6520 696d 706c h MTOM, the impl\n-001180b0: 656d 656e 7461 7469 6f6e 206f 6620 7468 ementation of th\n-001180c0: 6520 7365 7269 616c 697a 6174 696f 6e20 e serialization \n-001180d0: 616e 6420 6465 7365 7269 616c 697a 6174 and deserializat\n-001180e0: 696f 6e20 6f66 204d 544f 4d20 4d49 4d45 ion of MTOM MIME\n-001180f0: 2061 7474 6163 686d 656e 7473 2075 7365 attachments use\n-00118100: 7320 7468 6520 6578 7465 6e64 6564 2062 s the extended b\n-00118110: 696e 6172 7920 7479 7065 2063 6f6d 7061 inary type compa\n-00118120: 7261 626c 6520 746f 2044 494d 4520 7375 rable to DIME su\n-00118130: 7070 6f72 742e 2054 6869 7320 6269 6e61 pport. This bina\n-00118140: 7279 2074 7970 6520 6973 2070 7265 6465 ry type is prede\n-00118150: 6669 6e65 6420 696e 2074 6865 203c 656d fined in the import/xo\n-00118170: 702e 683c 2f63 6f64 653e 3c2f 656d 3e20 p.h \n-00118180: 6669 6c65 3a3c 2f70 3e0a 3c64 6976 2063 file:

.
\n-001181a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
//gsoap \n-001181d0: 786f 7020 7363 6865 6d61 2069 6d70 6f72 xop schema impor\n-001181e0: 743a 2068 7474 703a 2f2f 7777 772e 7733 t: http://www.w3\n-001181f0: 2e6f 7267 2f32 3030 342f 3038 2f78 6f70 .org/2004/08/xop\n-00118200: 2f69 6e63 6c75 6465 203c 2f73 7061 6e3e /include \n-00118210: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
s\n-00118240: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct _xop__Include
.
{.
unsigned ch\n-00118310: 6172 3c2f 7370 616e 3e20 2a3c 6120 636c ar *__ptr; .
int __size; \n-00118420: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
char *id\n-001184c0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
<\n-001184e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001184f0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *type\n-00118560: 3c2f 613e 3b20 3c2f 6469 763e 0a3c 6469 ;
. \n-00118580: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha\n-001185a0: 723c 2f73 7061 6e3e 202a 3c61 2063 6c61 r *\n-00118600: 6f70 7469 6f6e 733c 2f61 3e3b 203c 2f64 options; .
};
.\n-00118630: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
typedef<\n-00118660: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> str\n-00118680: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct _\n-001186c0: 786f 705f 5f49 6e63 6c75 6465 3c2f 613e xop__Include\n-001186d0: 203c 6120 636c 6173 733d 2263 6f64 6522 _xop__Inclu\n-00118710: 6465 3c2f 613e 3b3c 2f64 6976 3e0a 3c64 de;
.
_xo\n-00118790: 705f 5f49 6e63 6c75 6465 3c2f 613e 3c2f p__Include
XOP inclu\n-001187c0: 6465 2073 7472 7563 7475 7265 2077 6974 de structure wit\n-001187d0: 6820 6174 7461 6368 6d65 6e74 2064 6174 h attachment dat\n-001187e0: 612e 3c2f 6469 763e 3c64 6976 2063 6c61 a.
De\n-00118800: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-00118810: 6473 6f61 7032 2e68 3a39 3838 333c 2f64 dsoap2.h:9883
.
\n-00118880: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
ch\n-00118910: 6172 202a 2074 7970 653c 2f64 6976 3e3c ar * type
<\n-00118920: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-00118930: 223e 4d49 4d45 2074 7970 6520 6f66 2074 \">MIME type of t\n-00118940: 6865 2064 6174 612e 3c2f 6469 763e 3c64 he data.
Definition:<\n-00118970: 2f62 3e20 7374 6473 6f61 7032 2e68 3a39 /b> stdsoap2.h:9\n-00118980: 3838 373c 2f64 6976 3e3c 2f64 6976 3e0a 887
.\n-00118990: 3c64 6976 2063 6c61 7373 3d22 7474 6322
char * id
NULL to gene\n-00118aa0: 7261 7465 2061 6e20 6964 206f 7220 6173 rate an id or as\n-00118ab0: 7369 676e 2074 6869 7320 6d65 6d62 6572 sign this member\n-00118ac0: 2076 6172 6961 626c 6520 6120 756e 6971 variable a uniq\n-00118ad0: 7565 2055 5549 442e 3c2f 6469 763e 3c64 ue UUID.
Definition:<\n-00118b00: 2f62 3e20 7374 6473 6f61 7032 2e68 3a39 /b> stdsoap2.h:9\n-00118b10: 3838 363c 2f64 6976 3e3c 2f64 6976 3e0a 886
.\n-00118b20: 3c64 6976 2063 6c61 7373 3d22 7474 6322
_xop__Include\n-00118be0: 3a3a 6f70 7469 6f6e 733c 2f61 3e3c 2f64 ::options
char * op\n-00118c10: 7469 6f6e 733c 2f64 6976 3e3c 6469 7620 tions
de\n-00118c30: 7363 7269 7074 696f 6e20 6f66 2074 6865 scription of the\n-00118c40: 204d 494d 452f 4d54 4f4d 2061 7474 6163 MIME/MTOM attac\n-00118c50: 686d 656e 7420 6f72 204e 554c 4c3c 2f64 hment or NULL
Definit\n-00118c80: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n-00118c90: 322e 683a 3938 3838 3c2f 6469 763e 3c2f 2.h:9888
.
<\n-00118d10: 6120 6872 6566 3d22 7374 7275 6374 5f5f a href=\"struct__\n-00118d20: 786f 705f 5f5f 5f5f 696e 636c 7564 652e xop_____include.\n-00118d30: 6874 6d6c 2361 3932 6265 3761 3435 6361 html#a92be7a45ca\n-00118d40: 3238 3266 6565 6533 6135 3366 6564 6635 282feee3a53fedf5\n-00118d50: 6333 6134 3035 223e 5f78 6f70 5f5f 496e c3a405\">_xop__In\n-00118d60: 636c 7564 653a 3a5f 5f73 697a 653c 2f61 clude::__size
int _\n-00118d90: 5f73 697a 653c 2f64 6976 3e3c 6469 7620 _size
si\n-00118db0: 7a65 206f 6620 7468 6520 6269 6e61 7279 ze of the binary\n-00118dc0: 2064 6174 613c 2f64 6976 3e3c 6469 7620 data
Definition:\n-00118df0: 2073 7464 736f 6170 322e 683a 3938 3835 stdsoap2.h:9885\n-00118e00: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
.unsigned char \n-00118f00: 2a20 5f5f 7074 723c 2f64 6976 3e3c 6469 * __ptr
\n-00118f20: 706f 696e 7465 7220 746f 2062 696e 6172 pointer to binar\n-00118f30: 7920 6461 7461 3c2f 6469 763e 3c64 6976 y data
<\n-00118f50: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:988\n-00118f70: 343c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 4
.

The addi\n-00118fa0: 7469 6f6e 616c 203c 636f 6465 3e69 643c tional id<\n-00118fb0: 2f63 6f64 653e 2c20 3c63 6f64 653e 7479 /code>, ty\n-00118fc0: 7065 3c2f 636f 6465 3e2c 2061 6e64 203c pe, and <\n-00118fd0: 636f 6465 3e6f 7074 696f 6e3c 2f63 6f64 code>option members enabl\n-00118ff0: 6520 4d54 4f4d 2061 7474 6163 686d 656e e MTOM attachmen\n-00119000: 7473 2066 6f72 2074 6865 2064 6174 6120 ts for the data \n-00119010: 706f 696e 7465 6420 746f 2062 7920 3c63 pointed to by __ptr\n-00119030: 206f 6620 7369 7a65 203c 636f 6465 3e5f of size _\n-00119040: 5f73 697a 653c 2f63 6f64 653e 2e20 5468 _size. Th\n-00119050: 6520 7072 6f63 6573 7320 666f 7220 7365 e process for se\n-00119060: 6e64 696e 6720 616e 6420 7265 6365 6976 nding and receiv\n-00119070: 696e 6720 4d54 4f4d 2058 4f50 2061 7474 ing MTOM XOP att\n-00119080: 6163 686d 656e 7473 2069 7320 6675 6c6c achments is full\n-00119090: 7920 6175 746f 6d61 7465 642e 2054 6865 y automated. The\n-001190a0: 203c 636f 6465 3e69 643c 2f63 6f64 653e id\n-001190b0: 206d 656d 6265 7220 7265 6665 7265 6e63 member referenc\n-001190c0: 6573 2074 6865 2061 7474 6163 686d 656e es the attachmen\n-001190d0: 742c 2074 7970 6963 616c 6c79 2061 2063 t, typically a c\n-001190e0: 6f6e 7465 6e74 2069 6420 4349 4420 6f72 ontent id CID or\n-001190f0: 2055 5549 4420 7768 6963 6820 6361 6e20 UUID which can \n-00119100: 6265 206f 6274 6169 6e65 6420 7769 7468 be obtained with\n-00119110: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_ran\n-001191a0: 645f 7575 6964 3c2f 613e 3c2f 636f 6465 d_uuid. When set to N\n-001191c0: 554c 4c2c 2061 2075 6e69 7175 6520 4349 ULL, a unique CI\n-001191d0: 4420 6973 2061 7574 6f6d 6174 6963 616c D is automatical\n-001191e0: 6c79 2075 7365 642e 2054 6865 203c 636f ly used. The type f\n-00119200: 6965 6c64 2073 7065 6369 6669 6573 2074 ield specifies t\n-00119210: 6865 2072 6571 7569 7265 6420 4d49 4d45 he required MIME\n-00119220: 2074 7970 6520 6f66 2074 6865 2062 696e type of the bin\n-00119230: 6172 7920 6461 7461 2c20 616e 6420 7468 ary data, and th\n-00119240: 6520 6f70 7469 6f6e 616c 203c 636f 6465 e optional options \n-00119260: 6d65 6d62 6572 2063 616e 2062 6520 7573 member can be us\n-00119270: 6564 2074 6f20 7069 6767 792d 6261 636b ed to piggy-back\n-00119280: 2064 6573 6372 6970 7469 7665 2074 6578 descriptive tex\n-00119290: 7420 7769 7468 2061 6e20 6174 7461 6368 t with an attach\n-001192a0: 6d65 6e74 2e20 5468 6520 6f72 6465 7220 ment. The order \n-001192b0: 6f66 2074 6865 2064 6563 6c61 7261 7469 of the declarati\n-001192c0: 6f6e 206f 6620 7468 6520 6d65 6d62 6572 on of the member\n-001192d0: 7320 6973 2073 6967 6e69 6669 6361 6e74 s is significant\n-001192e0: 2e3c 2f70 3e0a 3c70 3e59 6f75 2063 616e .

.

You can\n-001192f0: 2069 6d70 6f72 7420 3c65 6d3e 3c63 6f64 import xop.h in your inte\n-00119320: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil\n-00119330: 6520 746f 2075 7365 2074 6865 204d 544f e to use the MTO\n-00119340: 4d20 6174 7461 6368 6d65 6e74 732c 2066 M attachments, f\n-00119350: 6f72 2065 7861 6d70 6c65 3a3c 2f70 3e0a or example:

.\n-00119360: 3c64 6976 2063 6c61 7373 3d22 6672 6167
#import "\n-001193b0: 3b69 6d70 6f72 742f 786f 702e 6826 7175 ;import/xop.h&qu\n-001193c0: 6f74 3b3c 2f73 7061 6e3e 203c 2f64 6976 ot; .
#\n-00119400: 696d 706f 7274 2026 7175 6f74 3b69 6d70 import "imp\n-00119410: 6f72 742f 786d 696d 6535 2e68 2671 756f ort/xmime5.h&quo\n-00119420: 743b 3c2f 7370 616e 3e20 3c2f 6469 763e t;
\n-00119430: 0a3c 6469 7620 636c 6173 733d 226c 696e .
#i\n-00119460: 6d70 6f72 7420 2671 756f 743b 696d 706f mport "impo\n-00119470: 7274 2f73 6f61 7031 322e 6826 7175 6f74 rt/soap12.h"\n-00119480: 3b3c 2f73 7061 6e3e 203c 2f64 6976 3e0a ;
.\n-00119490: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
/* alter\n-001194c0: 6e61 7469 7665 6c79 2c20 7769 7468 6f75 natively, withou\n-001194d0: 7420 7468 6520 696d 706f 7274 2061 626f t the import abo\n-001194e0: 7665 2c20 7573 653a 203c 2f73 7061 6e3e ve, use: \n-001194f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
/\n-00119520: 2f67 736f 6170 2053 4f41 502d 454e 5620 /gsoap SOAP-ENV \n-00119530: 7363 6865 6d61 206e 616d 6573 7061 6365 schema namespace\n-00119540: 3a20 6874 7470 3a2f 2f77 7777 2e77 332e : http://www.w3.\n-00119550: 6f72 672f 3230 3033 2f30 352f 736f 6170 org/2003/05/soap\n-00119560: 2d65 6e76 656c 6f70 6520 3c2f 7370 616e -envelope
.
\n-001195a0: 2f2f 6773 6f61 7020 534f 4150 2d45 4e43 //gsoap SOAP-ENC\n-001195b0: 2073 6368 656d 6120 6e61 6d65 7370 6163 schema namespac\n-001195c0: 653a 2068 7474 703a 2f2f 7777 772e 7733 e: http://www.w3\n-001195d0: 2e6f 7267 2f32 3030 332f 3035 2f73 6f61 .org/2003/05/soa\n-001195e0: 702d 656e 636f 6469 6e67 203c 2f73 7061 p-encoding
.
*/ .
.//gsoap x sc\n-00119680: 6865 6d61 206e 616d 6573 7061 6365 3a20 hema namespace: \n-00119690: 6874 7470 3a2f 2f6d 792e 6669 7273 742e http://my.first.\n-001196a0: 6d74 6f6d 2e6e 6574 203c 2f73 7061 6e3e mtom.net \n-001196b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
s\n-001196e0: 7472 7563 7420 3c2f 7370 616e 3e78 5f5f truct x__\n-001196f0: 6d79 4461 7461 203c 2f64 6976 3e0a 3c64 myData
.\n-00119710: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
.
_xop__Include<\n-00119770: 2f61 3e20 786f 705f 5f49 6e63 6c75 6465 /a> xop__Include\n-00119780: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // attac\n-001197a0: 686d 656e 7420 3c2f 7370 616e 3e3c 2f64 hment .
@ char \n-001197f0: 2a78 6d69 6d65 355f 5f63 6f6e 7465 6e74 *xmime5__content\n-00119800: 5479 7065 3b20 203c 7370 616e 2063 6c61 Type; // \n-00119820: 616e 6420 6974 7320 636f 6e74 656e 7454 and its contentT\n-00119830: 7970 6520 3c2f 7370 616e 3e3c 2f64 6976 ype .
};
.\n-00119870: 3c73 7061 6e20 636c 6173 733d 226b 6579 int x__myMTOMte\n-001198a0: 7374 283c 7370 616e 2063 6c61 7373 3d22 st(struct<\n-001198c0: 2f73 7061 6e3e 2078 5f5f 6d79 4461 7461 /span> x__myData\n-001198d0: 202a 696e 2c20 3c73 7061 6e20 636c 6173 *in, stru\n-001198f0: 6374 3c2f 7370 616e 3e20 785f 5f6d 7944 ct x__myD\n-00119900: 6174 6120 2a6f 7574 293b 3c2f 6469 763e ata *out);
\n-00119910: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

When \n-00119930: 616e 2069 6e73 7461 6e63 6520 6f66 203c an instance of <\n-00119940: 636f 6465 3e78 5f5f 6d79 4461 7461 5479 code>x__myDataTy\n-00119950: 7065 3c2f 636f 6465 3e20 6973 2073 6572 pe is ser\n-00119960: 6961 6c69 7a65 6420 616e 6420 6569 7468 ialized and eith\n-00119970: 6572 206f 7220 626f 7468 2074 6865 203c er or both the <\n-00119980: 636f 6465 3e69 643c 2f63 6f64 653e 2061 code>id a\n-00119990: 6e64 203c 636f 6465 3e74 7970 653c 2f63 nd type members are\n-001199b0: 206e 6f6e 2d4e 554c 4c2c 2074 6865 2064 non-NULL, the d\n-001199c0: 6174 6120 6973 2074 7261 6e73 6d69 7474 ata is transmitt\n-001199d0: 6564 2061 7320 4d54 4f4d 204d 494d 4520 ed as MTOM MIME \n-001199e0: 6174 7461 6368 6d65 6e74 2069 6620 7468 attachment if th\n-001199f0: 6520 3c63 6f64 653e 2353 4f41 505f 454e e #SOAP_EN\n-00119a00: 435f 4d54 4f4d 3c2f 636f 6465 3e20 666c C_MTOM fl\n-00119a10: 6167 2069 7320 7365 7420 696e 2074 6865 ag is set in the\n-00119a20: 2067 534f 4150 2773 2073 6f61 7020 7374 gSOAP's soap st\n-00119a30: 7275 6374 2063 6f6e 7465 7874 3a3c 2f70 ruct context:.

\n-00119a80: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap *<\n-00119ac0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00119ad0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00119ae0: 6874 6d6c 223e 736f 6170 3c2f 613e 203d html\">soap =\n-00119af0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_new1<\n-00119b50: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(SOAP_ENC_\n-00119bb0: 4d54 4f4d 3c2f 613e 293b 3c2f 6469 763e MTOM);
\n-00119bc0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
SO\n-00119c70: 4150 5f45 4e43 5f4d 544f 4d3c 2f61 3e3c AP_ENC_MTOM<\n-00119c80: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
#define\n-00119ca0: 2053 4f41 505f 454e 435f 4d54 4f4d 3c2f SOAP_ENC_MTOM
soap_mode\n-00119cd0: 2045 4e43 206f 7574 7075 7420 666c 6167 ENC output flag\n-00119ce0: 2076 616c 7565 2074 6f20 656e 6162 6c65 value to enable\n-00119cf0: 204d 544f 4d20 584f 5020 6174 7461 6368 MTOM XOP attach\n-00119d00: 6d65 6e74 7320 696e 206d 6573 7361 6765 ments in message\n-00119d10: 7320 746f 2062 6520 7365 6e74 2c2e 2e2e s to be sent,...\n-00119d20: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
Defi\n-00119d40: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-00119d50: 6f61 7032 2e68 3a31 3737 363c 2f64 6976 oap2.h:1776
.
<\n-00119d80: 703e 5769 7468 6f75 7420 7468 6973 2066 p>Without this f\n-00119d90: 6c61 672c 2074 6865 2061 7474 6163 686d lag, the attachm\n-00119da0: 656e 7473 2077 696c 6c20 6265 2074 7261 ents will be tra\n-00119db0: 6e73 6d69 7474 6564 2069 6e20 4449 4d45 nsmitted in DIME\n-00119dc0: 2066 6f72 6d61 742c 2077 6869 6368 2069 format, which i\n-00119dd0: 7320 6e6f 7420 7768 6174 2077 6520 7761 s not what we wa\n-00119de0: 6e74 2e20 4966 2079 6f75 7220 6375 7272 nt. If your curr\n-00119df0: 656e 7420 636c 6965 6e74 7320 616e 6420 ent clients and \n-00119e00: 7365 7276 6963 6573 2061 7265 2062 6173 services are bas\n-00119e10: 6564 206f 6e20 6e6f 6e2d 7374 7265 616d ed on non-stream\n-00119e20: 696e 6720 4449 4d45 2061 7474 6163 686d ing DIME attachm\n-00119e30: 656e 7473 2075 7369 6e67 2074 6865 2053 ents using the S\n-00119e40: 4f41 5020 626f 6479 2072 6566 6572 656e OAP body referen\n-00119e50: 6365 206d 6563 6861 6e69 736d 2028 7468 ce mechanism (th\n-00119e60: 7573 2c20 7769 7468 6f75 7420 7573 696e us, without usin\n-00119e70: 6720 7468 6520 3c63 6f64 653e 3c61 2063 g the soap_set_dime\n-00119f10: 5f61 7474 6163 686d 656e 743c 2f61 3e3c _attachment<\n-00119f20: 2f63 6f64 653e 2066 756e 6374 696f 6e29 /code> function)\n-00119f30: 206f 7220 706c 6169 6e20 6261 7365 3634 or plain base64\n-00119f40: 2062 696e 6172 7920 584d 4c20 6461 7461 binary XML data\n-00119f50: 2065 6c65 6d65 6e74 732c 2069 7420 6973 elements, it is\n-00119f60: 2076 6572 7920 6561 7379 2074 6f20 6164 very easy to ad\n-00119f70: 6f70 7420 4d54 4f4d 2062 7920 7265 6e61 opt MTOM by rena\n-00119f80: 6d69 6e67 2074 6865 2062 696e 6172 7920 ming the binary \n-00119f90: 7479 7065 7320 746f 203c 636f 6465 3e78 types to x\n-00119fa0: 6f70 5f5f 496e 636c 7564 653c 2f63 6f64 op__Include and using the\n-00119fc0: 203c 636f 6465 3e23 534f 4150 5f45 4e43 #SOAP_ENC\n-00119fd0: 5f4d 544f 4d3c 2f63 6f64 653e 2066 6c61 _MTOM fla\n-00119fe0: 6720 7769 7468 2074 6865 2053 4f41 5020 g with the SOAP \n-00119ff0: 312e 3220 6e61 6d65 7370 6163 652e 3c2f 1.2 namespace..

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

.

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

..Generatin\n-0011a0e0: 6720 4d75 6c74 6970 6172 7452 656c 6174 g MultipartRelat\n-0011a0f0: 6564 204d 494d 4520 6174 7461 6368 6d65 ed MIME attachme\n-0011a100: 6e74 2062 696e 6469 6e67 7320 696e 2057 nt bindings in W\n-0011a110: 5344 4c3c 2f68 323e 0a3c 703e 546f 2067 SDL.

To g\n-0011a120: 656e 6572 6174 6520 6d75 6c74 6970 6172 enerate multipar\n-0011a130: 7452 656c 6174 6564 2062 696e 6469 6e67 tRelated binding\n-0011a140: 7320 696e 2074 6865 2057 5344 4c20 6669 s in the WSDL fi\n-0011a150: 6c65 2069 6e64 6963 6174 696e 6720 7468 le indicating th\n-0011a160: 6520 7573 6520 6f66 204d 494d 4520 6174 e use of MIME at\n-0011a170: 7461 6368 6d65 6e74 732c 2075 7365 3a3c tachments, use:<\n-0011a180: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

//gsoap <pr\n-0011a1d0: 6566 6978 2667 743b 2073 6572 7669 6365 efix> service\n-0011a1e0: 206d 6574 686f 642d 6d69 6d65 2d74 7970 method-mime-typ\n-0011a1f0: 653a 202e 2e2e 3c2f 7370 616e 3e3c 2f64 e: ....

Th\n-0011a220: 6973 2064 6972 6563 7469 7665 2064 6972 is directive dir\n-0011a230: 6563 7469 7665 2063 616e 2062 6520 7265 ective can be re\n-0011a240: 7065 6174 6564 2066 6f72 2065 6163 6820 peated for each \n-0011a250: 6174 7461 6368 6d65 6e74 2079 6f75 2077 attachment you w\n-0011a260: 616e 7420 746f 2061 7373 6f63 6961 7465 ant to associate\n-0011a270: 2077 6974 6820 6120 6d65 7468 6f64 2773 with a method's\n-0011a280: 2072 6571 7565 7374 2061 6e64 2072 6573 request and res\n-0011a290: 706f 6e73 6520 6d65 7373 6167 652e 2073 ponse message. s\n-0011a2a0: 6565 2061 6c73 6f20 5365 6374 696f 6e20 ee also Section \n-0011a2b0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 Direc\n-0011a2e0: 7469 7665 733c 2f61 3e20 2e3c 2f70 3e0a tives .

.\n-0011a2f0: 3c70 3e46 6f72 2065 7861 6d70 6c65 3a3c

For example:<\n-0011a300: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

#import &\n-0011a350: 7175 6f74 3b69 6d70 6f72 742f 786f 702e quot;import/xop.\n-0011a360: 6826 7175 6f74 3b3c 2f73 7061 6e3e 203c h" <\n-0011a370: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
#import "\n-0011a3b0: 3b69 6d70 6f72 742f 786d 696d 6535 2e68 ;import/xmime5.h\n-0011a3c0: 2671 756f 743b 3c2f 7370 616e 3e20 3c2f " .
#import "\n-0011a410: 696d 706f 7274 2f73 6f61 7031 322e 6826 import/soap12.h&\n-0011a420: 7175 6f74 3b3c 2f73 7061 6e3e 203c 2f64 quot; .
.\n-0011a460: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap x \n-0011a480: 7363 6865 6d61 206e 616d 6573 7061 6365 schema namespace\n-0011a490: 3a20 6874 7470 3a2f 2f6d 792e 6669 7273 : http://my.firs\n-0011a4a0: 742e 6d74 6f6d 2e6e 6574 203c 2f73 7061 t.mtom.net
.
struct x\n-0011a4f0: 5f5f 6d79 4461 7461 203c 2f64 6976 3e0a __myData
.\n-0011a500: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{
.
\n-0011a530: 3c61 2063 6c61 7373 3d22 636f 6465 2220 _xop__Includ\n-0011a570: 653c 2f61 3e20 786f 705f 5f49 6e63 6c75 e xop__Inclu\n-0011a580: 6465 3b20 3c73 7061 6e20 636c 6173 733d de; // att\n-0011a5a0: 6163 686d 656e 7420 3c2f 7370 616e 3e3c achment <\n-0011a5b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
@ char *xmime5__conte\n-0011a600: 6e74 5479 7065 3b20 203c 7370 616e 2063 ntType; /\n-0011a620: 2f20 616e 6420 6974 7320 636f 6e74 656e / and its conten\n-0011a630: 7454 7970 6520 3c2f 7370 616e 3e3c 2f64 tType .
};
.\n-0011a660: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
//gsoap \n-0011a690: 7820 7365 7276 6963 6520 6d65 7468 6f64 x service method\n-0011a6a0: 2d6d 696d 652d 7479 7065 3a20 6d79 4d54 -mime-type: myMT\n-0011a6b0: 4f4d 7465 7374 2074 6578 742f 786d 6c20 OMtest text/xml \n-0011a6c0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-0011a6e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int x__myMTOMte\n-0011a710: 7374 283c 7370 616e 2063 6c61 7373 3d22 st(struct<\n-0011a730: 2f73 7061 6e3e 2078 5f5f 6d79 4461 7461 /span> x__myData\n-0011a740: 202a 696e 2c20 3c73 7061 6e20 636c 6173 *in, stru\n-0011a760: 6374 3c2f 7370 616e 3e20 785f 5f6d 7944 ct x__myD\n-0011a770: 6174 6120 2a6f 7574 293b 3c2f 6469 763e ata *out);
\n-0011a780: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

The <\n-0011a7a0: 636f 6465 3e2f 2f67 736f 6170 2078 2073 code>//gsoap x s\n-0011a7b0: 6572 7669 6365 206d 6574 686f 642d 6d69 ervice method-mi\n-0011a7c0: 6d65 2d74 7970 653a 3c2f 636f 6465 3e20 me-type: \n-0011a7d0: 6469 7265 6374 6976 6520 696e 6469 6361 directive indica\n-0011a7e0: 7465 7320 7468 6174 2074 6869 7320 6f70 tes that this op\n-0011a7f0: 6572 6174 696f 6e20 6163 6365 7074 7320 eration accepts \n-0011a800: 3c65 6d3e 3c63 6f64 653e 7465 7874 2f78 text/x\n-0011a810: 6d6c 3c2f 636f 6465 3e3c 2f65 6d3e 204d ml M\n-0011a820: 494d 4520 6174 7461 6368 6d65 6e74 732e IME attachments.\n-0011a830: 2053 6565 2074 6865 2053 4f41 502d 7769 See the SOAP-wi\n-0011a840: 7468 2d41 7474 6163 686d 656e 7420 7370 th-Attachment sp\n-0011a850: 6563 6966 6963 6174 696f 6e20 666f 7220 ecification for \n-0011a860: 7468 6520 4d49 4d45 2074 7970 6573 2074 the MIME types t\n-0011a870: 6f20 7573 6520 2866 6f72 2065 7861 6d70 o use (for examp\n-0011a880: 6c65 2c20 3c63 6f64 653e 2a2f 2a3c 2f63 le, */* is a wildca\n-0011a8a0: 7264 292e 2049 6620 7468 6520 6f70 6572 rd). If the oper\n-0011a8b0: 6174 696f 6e20 6861 7320 6d6f 7265 2074 ation has more t\n-0011a8c0: 6861 6e20 6f6e 6520 6174 7461 6368 6d65 han one attachme\n-0011a8d0: 6e74 2c20 6a75 7374 2072 6570 6561 7420 nt, just repeat \n-0011a8e0: 7468 6973 2064 6972 6563 7469 7665 2066 this directive f\n-0011a8f0: 6f72 2065 6163 6820 6174 7461 6368 6d65 or each attachme\n-0011a900: 6e74 2079 6f75 2077 616e 7420 746f 2062 nt you want to b\n-0011a910: 696e 6420 746f 2074 6865 206f 7065 7261 ind to the opera\n-0011a920: 7469 6f6e 2e3c 2f70 3e0a 3c70 3e54 6f20 tion.

.

To \n-0011a930: 6269 6e64 2061 7474 6163 686d 656e 7473 bind attachments\n-0011a940: 206f 6e6c 7920 746f 2074 6865 2072 6571 only to the req\n-0011a950: 7565 7374 206d 6573 7361 6765 206f 6620 uest message of \n-0011a960: 616e 206f 7065 7261 7469 6f6e 2c20 7573 an operation, us\n-0011a970: 653c 2f70 3e0a 3c64 6976 2063 6c61 7373 e

.
//gsoap <\n-0011a9c0: 7072 6566 6978 2667 743b 2073 6572 7669 prefix> servi\n-0011a9d0: 6365 206d 6574 686f 642d 696e 7075 742d ce method-input-\n-0011a9e0: 6d69 6d65 2d74 7970 653a 202e 2e2e 3c2f mime-type: ...
.

Similarly,\n-0011aa20: 2074 6f20 6269 6e64 2061 7474 6163 686d to bind attachm\n-0011aa30: 656e 7473 206f 6e6c 7920 746f 2074 6865 ents only to the\n-0011aa40: 2072 6573 706f 6e73 6520 6d65 7373 6167 response messag\n-0011aa50: 6520 6f66 2061 6e20 6f70 6572 6174 696f e of an operatio\n-0011aa60: 6e2c 2075 7365 3a3c 2f70 3e0a 3c64 6976 n, use:

.
//gsoa\n-0011aab0: 7020 266c 743b 7072 6566 6978 2667 743b p <prefix>\n-0011aac0: 2073 6572 7669 6365 206d 6574 686f 642d service method-\n-0011aad0: 6f75 7470 7574 2d6d 696d 652d 7479 7065 output-mime-type\n-0011aae0: 3a20 2e2e 2e3c 2f73 7061 6e3e 3c2f 6469 : ....

The\n-0011ab10: 2077 7364 6c32 6820 746f 6f6c 2072 6563 wsdl2h tool rec\n-0011ab20: 6f67 6e69 7a65 7320 4d49 4d45 2061 7474 ognizes MIME att\n-0011ab30: 6163 686d 656e 7473 2061 6e64 2070 726f achments and pro\n-0011ab40: 6475 6365 7320 616e 2061 6e6e 6f74 6174 duces an annotat\n-0011ab50: 6564 2068 6561 6465 7220 6669 6c65 2e3c ed header file.<\n-0011ab60: 2f70 3e0a 3c70 3e59 6f75 2063 616e 2072 /p>.

You can r\n-0011ab70: 6570 6561 7420 7468 6573 6520 6469 7265 epeat these dire\n-0011ab80: 6374 6976 6573 2066 6f72 2061 6c6c 206d ctives for all m\n-0011ab90: 756c 7469 7061 7274 5265 6c61 7465 6420 ultipartRelated \n-0011aba0: 4d49 4d45 2061 7474 6163 686d 656e 7473 MIME attachments\n-0011abb0: 2079 6f75 2077 616e 7420 746f 2061 7373 you want to ass\n-0011abc0: 6f63 6961 7465 2077 6974 6820 7468 6520 ociate with the \n-0011abd0: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio\n-0011abe0: 6e20 696e 7075 7420 616e 6420 6f75 7470 n input and outp\n-0011abf0: 7574 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 ut.

.

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

..Sending and r\n-0011ac70: 6563 6569 7669 6e67 204d 544f 4d20 6174 eceiving MTOM at\n-0011ac80: 7461 6368 6d65 6e74 733c 2f68 323e 0a3c tachments.<\n-0011ac90: 703e 4120 7265 6365 6976 6572 206d 7573 p>A receiver mus\n-0011aca0: 7420 6265 2069 6e66 6f72 6d65 6420 746f t be informed to\n-0011acb0: 2072 6563 6f67 6e69 7a65 204d 544f 4d20 recognize MTOM \n-0011acc0: 6174 7461 6368 6d65 6e74 7320 6279 2073 attachments by s\n-0011acd0: 6574 7469 6e67 2074 6865 203c 636f 6465 etting the #SOAP_ENC_MTOM<\n-0011acf0: 2f63 6f64 653e 2066 6c61 6720 6f66 2074 /code> flag of t\n-0011ad00: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap context. Ot\n-0011ad70: 6865 7277 6973 652c 2074 6865 2072 6567 herwise, the reg\n-0011ad80: 756c 6172 204d 494d 4520 6174 7461 6368 ular MIME attach\n-0011ad90: 6d65 6e74 206d 6563 6861 6e69 736d 2028 ment mechanism (\n-0011ada0: 5377 4129 2077 696c 6c20 6265 2075 7365 SwA) will be use\n-0011adb0: 6420 746f 2073 746f 7265 2061 7474 6163 d to store attac\n-0011adc0: 686d 656e 7473 2e3c 2f70 3e0a 3c70 3e57 hments.

.

W\n-0011add0: 6865 6e20 7573 696e 6720 7773 646c 3268 hen using wsdl2h\n-0011ade0: 2074 6f20 6275 696c 6420 636c 6965 6e74 to build client\n-0011adf0: 7320 616e 642f 6f72 2073 6572 7669 6365 s and/or service\n-0011ae00: 732c 2079 6f75 2073 686f 756c 6420 7573 s, you should us\n-0011ae10: 6520 7468 6520 3c65 6d3e 3c63 6f64 653e e the \n-0011ae20: 7479 7065 6d61 702e 6461 743c 2f63 6f64 typemap.dat file inc\n-0011ae40: 6c75 6465 6420 696e 2074 6865 2067 534f luded in the gSO\n-0011ae50: 4150 2073 6f75 7263 6520 636f 6465 2070 AP source code p\n-0011ae60: 6163 6b61 6765 2e20 5468 6520 3c65 6d3e ackage. The \n-0011ae70: 3c63 6f64 653e 7479 7065 6d61 702e 6461 typemap.da\n-0011ae80: 743c 2f63 6f64 653e 3c2f 656d 3e20 6669 t fi\n-0011ae90: 6c65 2064 6566 696e 6573 2074 6865 2058 le defines the X\n-0011aea0: 4f50 206e 616d 6573 7061 6365 2061 6e64 OP namespace and\n-0011aeb0: 2058 4d4c 204d 494d 4520 6e61 6d65 7370 XML MIME namesp\n-0011aec0: 6163 6573 2061 7320 696d 706f 7274 6564 aces as imported\n-0011aed0: 206e 616d 6573 7061 6365 733a 203c 2f70 namespaces:

xop    = \n-0011af00: 266c 743b 6874 7470 3a2f 2f77 7777 2e77  <http://www.w\n-0011af10: 332e 6f72 672f 3230 3034 2f30 382f 786f  3.org/2004/08/xo\n-0011af20: 702f 696e 636c 7564 6526 6774 3b20 0a78  p/include> .x\n-0011af30: 6d69 6d65 3520 3d20 266c 743b 6874 7470  mime5 = <http\n-0011af40: 3a2f 2f77 7777 2e77 332e 6f72 672f 3230  ://www.w3.org/20\n-0011af50: 3035 2f30 352f 786d 6c6d 696d 6526 6774  05/05/xmlmime>\n-0011af60: 3b20 0a78 6d69 6d65 3420 3d20 266c 743b  ; .xmime4 = <\n-0011af70: 6874 7470 3a2f 2f77 7777 2e77 332e 6f72  http://www.w3.or\n-0011af80: 672f 3230 3034 2f31 312f 786d 6c6d 696d  g/2004/11/xmlmim\n-0011af90: 6526 6774 3b0a 3c2f 7072 653e 3c70 3e20  e>.

\n-0011afa0: 5468 6520 7773 646c 3268 2074 6f6f 6c20 The wsdl2h tool \n-0011afb0: 7573 6573 2074 6865 203c 656d 3e3c 636f uses the typemap.dat file \n-0011afe0: 746f 2063 6f6e 7665 7274 2057 5344 4c20 to convert WSDL \n-0011aff0: 696e 746f 2061 6e20 696e 7465 7266 6163 into an interfac\n-0011b000: 6520 6865 6164 6572 2066 696c 652e 2049 e header file. I\n-0011b010: 6e20 7468 6973 2063 6173 6520 7765 2064 n this case we d\n-0011b020: 6f6e 2774 2077 616e 7420 7468 6520 7773 on't want the ws\n-0011b030: 646c 3268 2074 6f6f 6c20 746f 2072 6561 dl2h tool to rea\n-0011b040: 6420 7468 6520 584f 5020 7363 6865 6d61 d the XOP schema\n-0011b050: 2061 6e64 2074 7261 6e73 6c61 7465 2069 and translate i\n-0011b060: 742c 2073 696e 6365 2077 6520 6861 7665 t, since we have\n-0011b070: 2061 2070 7265 2d64 6566 696e 6564 203c a pre-defined <\n-0011b080: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>_xop_\n-0011b0f0: 5f49 6e63 6c75 6465 3c2f 613e 3c2f 636f _Include element to h\n-0011b110: 616e 646c 6520 584f 5020 666f 7220 4d54 andle XOP for MT\n-0011b120: 4f4d 2e20 5468 6973 203c 636f 6465 3e3c OM. This <\n-0011b130: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0011b140: 663d 2273 7472 7563 745f 5f78 6f70 5f5f f=\"struct__xop__\n-0011b150: 5f5f 5f69 6e63 6c75 6465 2e68 746d 6c22 ___include.html\"\n-0011b160: 2074 6974 6c65 3d22 584f 5020 696e 636c title=\"XOP incl\n-0011b170: 7564 6520 7374 7275 6374 7572 6520 7769 ude structure wi\n-0011b180: 7468 2061 7474 6163 686d 656e 7420 6461 th attachment da\n-0011b190: 7461 2e22 3e5f 786f 705f 5f49 6e63 6c75 ta.\">_xop__Inclu\n-0011b1a0: 6465 3c2f 613e 3c2f 636f 6465 3e20 656c de el\n-0011b1b0: 656d 656e 7420 6973 2064 6566 696e 6564 ement is defined\n-0011b1c0: 2069 6e20 3c65 6d3e 3c63 6f64 653e 786f in xo\n-0011b1d0: 702e 683c 2f63 6f64 653e 3c2f 656d 3e2e p.h.\n-0011b1e0: 2054 6865 7265 666f 7265 2c20 7468 6520 Therefore, the \n-0011b1f0: 6269 6e64 696e 6773 2073 686f 776e 2061 bindings shown a\n-0011b200: 626f 7665 2077 696c 6c20 6e6f 7420 7472 bove will not tr\n-0011b210: 616e 736c 6174 6520 7468 6520 584f 5020 anslate the XOP \n-0011b220: 616e 6420 584d 4c20 4d49 4d45 2073 6368 and XML MIME sch\n-0011b230: 656d 6173 2074 6f20 636f 6465 2c20 6275 emas to code, bu\n-0011b240: 7420 6765 6e65 7261 7465 7320 3c63 6f64 t generates #import\n-0011b260: 2073 7461 7465 6d65 6e74 7320 696e 7374 statements inst\n-0011b270: 6561 6420 696e 2074 6865 2067 656e 6572 ead in the gener\n-0011b280: 6174 6564 2069 6e74 6572 6661 6365 2068 ated interface h\n-0011b290: 6561 6465 7220 6669 6c65 3a3c 2f70 3e0a eader file:

.\n-0011b2a0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
#import "\n-0011b2f0: 3b78 6f70 2e68 2671 756f 743b 3c2f 7370 ;xop.h"
.
#import \n-0011b340: 2671 756f 743b 786d 696d 6535 2e68 2671 "xmime5.h&q\n-0011b350: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;.

The \n-0011b380: 3c63 6f64 653e 2369 6d70 6f72 743c 2f63 #import statements \n-0011b3a0: 6172 6520 6f6e 6c79 2061 6464 6564 2066 are only added f\n-0011b3b0: 6f72 2074 686f 7365 206e 616d 6573 7061 or those namespa\n-0011b3c0: 6365 7320 7468 6174 2061 7265 2061 6374 ces that are act\n-0011b3d0: 7561 6c6c 7920 7573 6564 2e3c 2f70 3e0a ually used.

.\n-0011b3e0: 3c70 3e4c 6574 2773 2074 616b 6520 6120

Let's take a \n-0011b3f0: 6c6f 6f6b 2061 7420 616e 2065 7861 6d70 look at an examp\n-0011b400: 6c65 2e20 5468 6520 7773 646c 3268 2069 le. The wsdl2h i\n-0011b410: 6d70 6f72 7465 7220 6765 6e65 7261 7465 mporter generate\n-0011b420: 7320 6120 6865 6164 6572 2066 696c 6520 s a header file \n-0011b430: 7769 7468 203c 636f 6465 3e23 696d 706f with #impo\n-0011b440: 7274 2022 786f 702e 6822 3c2f 636f 6465 rt \"xop.h\" from a WSDL th\n-0011b460: 6174 2072 6566 6572 656e 6365 7320 584f at references XO\n-0011b470: 502c 2066 6f72 2065 7861 6d70 6c65 3a3c P, for example:<\n-0011b480: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

#import &\n-0011b4d0: 7175 6f74 3b78 6f70 2e68 2671 756f 743b quot;xop.h"\n-0011b4e0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
.<\n-0011b4f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0011b500: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#imp\n-0011b520: 6f72 7420 2671 756f 743b 786d 696d 6535 ort "xmime5\n-0011b530: 2e68 2671 756f 743b 3c2f 7370 616e 3e20 .h" \n-0011b540: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
s\n-0011b570: 7472 7563 7420 3c2f 7370 616e 3e6e 735f truct ns_\n-0011b580: 5f44 6174 6120 3c2f 6469 763e 0a3c 6469 _Data
.{\n-0011b5a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
..
@ char *xmime5__con\n-0011b660: 7465 6e74 5479 7065 3b20 203c 2f64 6976 tentType; .
};
.

Suppose t\n-0011b6b0: 6865 2057 5344 4c20 6465 6669 6e65 7320 he WSDL defines \n-0011b6c0: 616e 206f 7065 7261 7469 6f6e 3a3c 2f70 an operation:.

int n\n-0011b720: 735f 5f65 6368 6f44 6174 6128 3c73 7061 s__echoData(struct \n-0011b750: 6e73 5f5f 4461 7461 202a 696e 2c20 3c73 ns__Data *in, struct ns__Data *out)\n-0011b790: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.
<\n-0011b7b0: 703e 4166 7465 7220 6765 6e65 7261 7469 p>After generati\n-0011b7c0: 6e67 2074 6865 2073 7475 6220 6675 6e63 ng the stub func\n-0011b7d0: 7469 6f6e 7320 7769 7468 2074 6865 2073 tions with the s\n-0011b7e0: 6f61 7063 7070 3220 746f 6f6c 2c20 7765 oapcpp2 tool, we\n-0011b7f0: 2063 616e 2069 6e76 6f6b 6520 7468 6520 can invoke the \n-0011b800: 7374 7562 2061 7420 7468 6520 636c 6965 stub at the clie\n-0011b810: 6e74 2073 6964 6520 7769 7468 3a3c 2f70 nt side with:.
\n-0011b860: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap *<\n-0011b8a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0011b8b0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0011b8c0: 6874 6d6c 223e 736f 6170 3c2f 613e 203d html\">soap =\n-0011b8d0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_new1<\n-0011b930: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(SOAP_ENC_\n-0011b990: 4d54 4f4d 3c2f 613e 293b 203c 2f64 6976 MTOM); .
struct\n-0011b9d0: 203c 2f73 7061 6e3e 6e73 5f5f 4461 7461 ns__Data\n-0011b9e0: 2064 6174 613b 203c 2f64 6976 3e0a 3c64 data;
.\n-0011ba00: 6461 7461 2e78 6f70 5f5f 496e 636c 7564 data.xop__Includ\n-0011ba10: 652e 5f5f 7074 7220 3d20 283c 7370 616e e.__ptr = (unsigned c\n-0011ba60: 6861 723c 2f73 7061 6e3e 2a29 3c73 7061 har*)"&l\n-0011ba90: 743b 6226 6774 3b48 656c 6c6f 2077 6f72 t;b>Hello wor\n-0011baa0: 6c64 2126 6c74 3b2f 6226 6774 3b26 7175 ld!</b>&qu\n-0011bab0: 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 ot;; .
data.xop__I\n-0011bae0: 6e63 6c75 6465 2e5f 5f73 697a 6520 3d20 nclude.__size = \n-0011baf0: 3230 3b20 3c2f 6469 763e 0a3c 6469 7620 20;
.
dat\n-0011bb10: 612e 786f 705f 5f49 6e63 6c75 6465 2e69 a.xop__Include.i\n-0011bb20: 6420 3d20 4e55 4c4c 3b20 2020 2020 2020 d = NULL; \n-0011bb30: 2020 2020 203c 7370 616e 2063 6c61 7373 // CI\n-0011bb50: 4420 6175 746f 6d61 7469 6361 6c6c 7920 D automatically \n-0011bb60: 6765 6e65 7261 7465 6420 6279 2065 6e67 generated by eng\n-0011bb70: 696e 6520 3c2f 7370 616e 3e3c 2f64 6976 ine .
data.xop__In\n-0011bba0: 636c 7564 652e 7479 7065 203d 203c 7370 clude.type = "t\n-0011bbd0: 6578 742f 6874 6d6c 2671 756f 743b 3c2f ext/html"; /\n-0011bc00: 2f20 4d49 4d45 2074 7970 6520 3c2f 7370 / MIME type
.
data\n-0011bc30: 2e78 6f70 5f5f 496e 636c 7564 652e 6f70 .xop__Include.op\n-0011bc40: 7469 6f6e 7320 3d20 4e55 4c4c 3b20 2020 tions = NULL; \n-0011bc50: 2020 2020 3c73 7061 6e20 636c 6173 733d // no \n-0011bc70: 6465 7363 7269 7074 6976 6520 696e 666f descriptive info\n-0011bc80: 2061 6464 6564 203c 2f73 7061 6e3e 3c2f added .
data.xmim\n-0011bcb0: 6535 5f5f 636f 6e74 656e 7454 7970 6520 e5__contentType \n-0011bcc0: 3d20 3c73 7061 6e20 636c 6173 733d 2273 = &q\n-0011bce0: 756f 743b 7465 7874 2f68 746d 6c26 7175 uot;text/html&qu\n-0011bcf0: 6f74 3b3c 2f73 7061 6e3e 3b20 3c73 7061 ot;; // MIME type <\n-0011bd20: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.<\n-0011bd40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0011bd50: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_call_ns\n-0011bd70: 5f5f 6563 686f 4461 7461 283c 6120 636c __echoData(soap, endp\n-0011bdb0: 6f69 6e74 2c20 6163 7469 6f6e 2c20 2661 oint, action, &a\n-0011bdc0: 6d70 3b64 6174 612c 2026 616d 703b 6461 mp;data, &da\n-0011bdd0: 7461 2929 3c2f 6469 763e 0a3c 6469 7620 ta))
.
<\n-0011bdf0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0011be00: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-0011be10: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga\n-0011be20: 3933 3161 3461 6236 6466 3235 3533 6234 931a4ab6df2553b4\n-0011be30: 3861 3063 3237 3066 3861 3061 3838 6166 8a0c270f8a0a88af\n-0011be40: 223e 736f 6170 5f70 7269 6e74 5f66 6175 \">soap_print_fau\n-0011be50: 6c74 3c2f 613e 283c 6120 636c 6173 733d lt(so\n-0011be80: 6170 3c2f 613e 2c20 7374 6465 7272 293b ap, stderr);\n-0011be90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
else <\n-0011bed0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
printf\n-0011bef0: 283c 7370 616e 2063 6c61 7373 3d22 7374 (&qu\n-0011bf10: 6f74 3b47 6f74 2064 6174 615c 6e26 7175 ot;Got data\\n&qu\n-0011bf20: 6f74 3b3c 2f73 7061 6e3e 293b 203c 2f64 ot;); .
soap_\n-0011bfa0: 6465 7374 726f 793c 2f61 3e28 3c61 2063 destroy(soap);..\n-0011c090: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .

Note that\n-0011c160: 2074 6865 203c 636f 6465 3e78 6f70 5f5f the xop__\n-0011c170: 496e 636c 7564 652e 7479 7065 3c2f 636f Include.type member must \n-0011c190: 6265 2073 6574 2074 6f20 7472 616e 736d be set to transm\n-0011c1a0: 6974 204d 544f 4d20 6174 7461 6368 6d65 it MTOM attachme\n-0011c1b0: 6e74 732c 206f 7468 6572 7769 7365 2069 nts, otherwise i\n-0011c1c0: 6e6c 696e 6520 6261 7365 3634 2058 4d4c nline base64 XML\n-0011c1d0: 2077 696c 6c20 6265 2073 656e 742e 3c2f will be sent..

At the ser\n-0011c1f0: 7665 7220 7369 6465 2c20 7765 2073 686f ver side, we sho\n-0011c200: 7720 616e 2065 7861 6d70 6c65 206f 6620 w an example of \n-0011c210: 616e 206f 7065 7261 7469 6f6e 2068 616e an operation han\n-0011c220: 646c 6572 2074 6861 7420 6a75 7374 2063 dler that just c\n-0011c230: 6f70 6965 7320 7468 6520 696e 7075 7420 opies the input \n-0011c240: 6461 7461 2074 6f20 6f75 7470 7574 3a3c data to output:<\n-0011c250: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

.\n-0011c3a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{
.
*o\n-0011c3d0: 7574 203d 202a 696e 3b20 3c2f 6469 763e ut = *in;
\n-0011c3e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
r\n-0011c410: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_OK; .
}
.<\n-0011c4a0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

The ser\n-0011c4c0: 7665 7220 6d75 7374 2075 7365 2074 6865 ver must use the\n-0011c4d0: 203c 636f 6465 3e23 534f 4150 5f45 4e43 #SOAP_ENC\n-0011c4e0: 5f4d 544f 4d3c 2f63 6f64 653e 2066 6c61 _MTOM fla\n-0011c4f0: 6720 746f 2069 6e69 7469 616c 697a 6520 g to initialize \n-0011c500: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap context to\n-0011c570: 2072 6563 6569 7665 2061 6e64 2073 656e receive and sen\n-0011c580: 6420 4d54 4f4d 2061 7474 6163 686d 656e d MTOM attachmen\n-0011c590: 7473 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 ts.

.

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

..Stre\n-0011c600: 616d 696e 6720 4d49 4d45 2f4d 544f 4d3c aming MIME/MTOM<\n-0011c610: 2f68 323e 0a3c 703e 5374 7265 616d 696e /h2>.

Streamin\n-0011c620: 6720 4d49 4d45 2f4d 544f 4d20 6973 2061 g MIME/MTOM is a\n-0011c630: 6368 6965 7665 6420 7769 7468 2063 616c chieved with cal\n-0011c640: 6c62 6163 6b20 6675 6e63 7469 6f6e 7320 lback functions \n-0011c650: 746f 2066 6574 6368 2061 6e64 2073 746f to fetch and sto\n-0011c660: 7265 2064 6174 6120 6475 7269 6e67 2074 re data during t\n-0011c670: 7261 6e73 6d69 7373 696f 6e2e 2054 6872 ransmission. Thr\n-0011c680: 6565 2066 756e 6374 696f 6e20 6361 6c6c ee function call\n-0011c690: 6261 636b 7320 666f 7220 7374 7265 616d backs for stream\n-0011c6a0: 696e 6720 4d49 4d45 2f4d 544f 4d20 6f75 ing MIME/MTOM ou\n-0011c6b0: 7470 7574 2061 6e64 2074 6872 6565 2063 tput and three c\n-0011c6c0: 616c 6c62 6163 6b73 2066 6f72 2073 7472 allbacks for str\n-0011c6d0: 6561 6d69 6e67 204d 494d 452f 4d54 4f4d eaming MIME/MTOM\n-0011c6e0: 2069 6e70 7574 2061 7265 2061 7661 696c input are avail\n-0011c6f0: 6162 6c65 2e3c 2f70 3e0a 3c75 6c3e 0a3c able.

.
.

\n-00125250: 4578 616d 706c 6520 636c 6965 6e74 2069 Example client i\n-00125260: 6e20 433a 3c2f 703e 0a3c 6469 7620 636c n C:

.
<\n-00125280: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00125290: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct soap\n-001252e0: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n-00125310: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa\n-00125370: 705f 6e65 7731 3c2f 613e 283c 6120 636c p_new1(SO\n-001253d0: 4150 5f45 4e43 5f4d 544f 4d3c 2f61 3e29 AP_ENC_MTOM)\n-001253e0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
...
{
\n-00125550: 0a3c 6469 7620 636c 6173 733d 226c 696e .
soap_pri\n-001255c0: 6e74 5f66 6175 6c74 3c2f 613e 283c 6120 nt_fault(soap, st\n-00125600: 6465 7272 293b 203c 7370 616e 2063 6c61 derr); // \n-00125620: 616e 2065 7272 6f72 206f 6363 7572 7265 an error occurre\n-00125630: 6420 3c2f 7370 616e 3e3c 2f64 6976 3e0a d
.\n-00125640: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
}
.
else
.
{.
if (so\n-00125740: 6170 5f63 6865 636b 5f6d 696d 655f 6174 ap_check_mime_at\n-00125750: 7461 6368 6d65 6e74 733c 2f61 3e28 3c61 tachments(soap))<\n-00125790: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{.
//\n-001257e0: 2061 7474 6163 686d 656e 7473 2061 7265 attachments are\n-001257f0: 2070 7265 7365 6e74 2c20 6368 616e 6e65 present, channe\n-00125800: 6c20 6973 2073 7469 6c6c 206f 7065 6e20 l is still open \n-00125810: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-00125830: 2020 2020 3c73 7061 6e20 636c 6173 733d do\n-00125850: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-00125870: 2020 2020 7b3c 2f64 6976 3e0a 3c64 6976 {
. \n-00125890: 2020 2020 2e2e 2e20 3c73 7061 6e20 636c ... //\n-001258b0: 2067 6574 2064 6174 6120 2623 3339 3b68 get data 'h\n-001258c0: 616e 646c 6526 2333 393b 2066 726f 6d20 andle' from \n-001258d0: 534f 4150 2072 6573 706f 6e73 6520 616e SOAP response an\n-001258e0: 6420 7061 7373 2074 6f20 6361 6c6c 6261 d pass to callba\n-001258f0: 636b 7320 3c2f 7370 616e 3e3c 2f64 6976 cks .
... // set the f\n-00125940: 6d69 6d65 2063 616c 6c62 6163 6b73 2c20 mime callbacks, \n-00125950: 6966 206e 6565 6465 6420 3c2f 7370 616e if needed
.. \n-00125ae0: 2020 2020 2070 7269 6e74 6628 3c73 7061 printf("Re\n-00125b10: 6365 6976 6564 2061 7474 6163 686d 656e ceived attachmen\n-00125b20: 7420 7769 7468 2069 643d 2573 2061 6e64 t with id=%s and\n-00125b30: 2074 7970 653d 2573 5c6e 2671 756f 743b type=%s\\n"\n-00125b40: 3c2f 7370 616e 3e2c 2063 6f6e 7465 6e74 , content\n-00125b50: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->id?\n-00125bb0: 636f 6e74 656e 742d 2667 743b 3c61 2063 content->\n-00125c10: 6964 3c2f 613e 3a3c 7370 616e 2063 6c61 id:""<\n-00125c40: 2f73 7061 6e3e 2c20 636f 6e74 656e 742d /span>, content-\n-00125c50: 2667 743b 3c61 2063 6c61 7373 3d22 636f >type\n-00125cb0: 3f63 6f6e 7465 6e74 2d26 6774 3b3c 6120 ?content->type:"&quo\n-00125d40: 743b 3c2f 7370 616e 3e29 3b20 3c2f 6469 t;); .
} while (content); .
if (<\n-00125de0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00125df0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00125e00: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-00125e10: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;erro\n-00125e60: 723c 2f61 3e29 203c 2f64 6976 3e0a 3c64 r)
.\n-00125e80: 2020 2020 2020 3c61 2063 6c61 7373 3d22 soap_pr\n-00125ee0: 696e 745f 6661 756c 743c 2f61 3e28 3c61 int_fault(soap, s\n-00125f20: 7464 6572 7229 3b20 3c2f 6469 763e 0a3c tderr);
.<\n-00125f30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00125f40: 3e20 207d 3c2f 6469 763e 0a3c 6469 7620 > }
.
} <\n-00125f60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
soa\n-00125fd0: 705f 6465 7374 726f 793c 2f61 3e28 3c61 p_destroy(soap); \n-00126010: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
so\n-00126080: 6170 5f65 6e64 3c2f 613e 283c 6120 636c ap_end(soap); .\n-00126170: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
<\n-00126240: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-00126250: 6922 3e73 7472 7563 7420 736f 6170 5f6d i\">struct soap_m\n-00126260: 756c 7469 7061 7274 202a 2073 6f61 705f ultipart * soap_\n-00126270: 7265 6376 5f6d 696d 655f 6174 7461 6368 recv_mime_attach\n-00126280: 6d65 6e74 2873 7472 7563 7420 736f 6170 ment(struct soap\n-00126290: 202a 736f 6170 2c20 766f 6964 202a 6861 *soap, void *ha\n-001262a0: 6e64 6c65 293c 2f64 6976 3e3c 6469 7620 ndle)
Ge\n-001262c0: 7420 6120 4d49 4d45 2f4d 544f 4d20 6174 t a MIME/MTOM at\n-001262d0: 7461 6368 6d65 6e74 2e3c 2f64 6976 3e3c tachment.
<\n-001262e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
i\n-001263d0: 6e74 2073 6f61 705f 706f 7374 5f63 6865 nt soap_post_che\n-001263e0: 636b 5f6d 696d 655f 6174 7461 6368 6d65 ck_mime_attachme\n-001263f0: 6e74 7328 7374 7275 6374 2073 6f61 7020 nts(struct soap \n-00126400: 2a73 6f61 7029 3c2f 6469 763e 3c64 6976 *soap)
E\n-00126420: 6e61 626c 6520 706f 7374 2d70 726f 6365 nable post-proce\n-00126430: 7373 696e 6720 6f66 204d 494d 452f 4d54 ssing of MIME/MT\n-00126440: 4f4d 2061 7474 6163 686d 656e 7473 2e3c OM attachments.<\n-00126450: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
.soap_chec\n-00126510: 6b5f 6d69 6d65 5f61 7474 6163 686d 656e k_mime_attachmen\n-00126520: 7473 3c2f 613e 3c2f 6469 763e 3c64 6976 ts
\n-00126540: 696e 7420 736f 6170 5f63 6865 636b 5f6d int soap_check_m\n-00126550: 696d 655f 6174 7461 6368 6d65 6e74 7328 ime_attachments(\n-00126560: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n-00126570: 7029 3c2f 6469 763e 3c64 6976 2063 6c61 p)
Check\n-00126590: 2066 6f72 2061 204d 494d 452f 4d54 4f4d for a MIME/MTOM\n-001265a0: 2061 7474 6163 686d 656e 742e 3c2f 6469 attachment.
.
<\n-001265c0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-001265d0: 3c70 3e54 6865 2073 6572 7665 722d 7369

The server-si\n-001265e0: 6465 2073 6572 7669 6365 206f 7065 7261 de service opera\n-001265f0: 7469 6f6e 7320 6172 6520 696d 706c 656d tions are implem\n-00126600: 656e 7465 6420 6173 2075 7375 616c 2c20 ented as usual, \n-00126610: 6275 7420 7769 7468 2061 6464 6974 696f but with additio\n-00126620: 6e61 6c20 6368 6563 6b73 2066 6f72 204d nal checks for M\n-00126630: 494d 452f 4d54 4f4d 2061 7474 6163 686d IME/MTOM attachm\n-00126640: 656e 7473 3a3c 2f70 3e0a 3c64 6976 2063 ents:

.
\n-00126660: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
int<\n-00126690: 2f73 7061 6e3e 206d 6169 6e28 293c 2f64 /span> main().
{
.\n-001266d0: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n-001266f0: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n-00126720: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n-00126750: 6170 3c2f 613e 203d 203c 6120 636c 6173 ap = so\n-001267b0: 6170 5f6e 6577 313c 2f61 3e28 3c61 2063 ap_new1(S\n-00126810: 4f41 505f 454e 435f 4d54 4f4d 3c2f 613e OAP_ENC_MTOM\n-00126820: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
.
\n-00126890: 736f 6170 5f70 6f73 745f 6368 6563 6b5f soap_post_check_\n-001268a0: 6d69 6d65 5f61 7474 6163 686d 656e 7473 mime_attachments\n-001268b0: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n-001268e0: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
.\n-00126900: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_serve\n-00126960: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-00126990: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
.
}.
.\n-001269e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns__myMetho\n-00126a10: 6428 3c73 7061 6e20 636c 6173 733d 226b d(struct soa\n-00126a60: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n-00126a90: 6170 3c2f 613e 2c20 2e2e 2e29 203c 2f64 ap, ...) .
{
.\n-00126ad0: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // s\n-00126af0: 6572 7665 722d 7369 6465 2070 726f 6365 erver-side proce\n-00126b00: 7373 696e 6720 6c6f 6769 6320 3c2f 7370 ssing logic
.. \n-00126c10: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
.
<\n-00126c30: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00126c40: 656e 7422 3e2f 2f20 6174 7461 6368 6d65 ent\">// attachme\n-00126c50: 6e74 7320 6172 6520 7072 6573 656e 742c nts are present,\n-00126c60: 2063 6861 6e6e 656c 2069 7320 7374 696c channel is stil\n-00126c70: 6c20 6f70 656e 203c 2f73 7061 6e3e 3c2f l open .
do <\n-00126cc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{.
... \n-00126d00: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // get dat\n-00126d20: 6120 2623 3339 3b68 616e 646c 6526 2333 a 'handle\n-00126d30: 393b 2066 726f 6d20 534f 4150 2072 6571 9; from SOAP req\n-00126d40: 7565 7374 2061 6e64 2070 6173 7320 746f uest and pass to\n-00126d50: 2063 616c 6c62 6163 6b73 203c 2f73 7061 callbacks
.
\n-00126d80: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // se\n-00126da0: 7420 7468 6520 666d 696d 6520 6361 6c6c t the fmime call\n-00126db0: 6261 636b 732c 2069 6620 6e65 6564 6564 backs, if needed\n-00126dc0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
.<\n-00126dd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00126de0: 3e20 2020 2020 203c 7370 616e 2063 6c61 > str\n-00126e00: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soa\n-00126e40: 705f 6d75 6c74 6970 6172 743c 2f61 3e20 p_multipart \n-00126e50: 2a63 6f6e 7465 6e74 203d 203c 6120 636c *content = soa\n-00126eb0: 705f 7265 6376 5f6d 696d 655f 6174 7461 p_recv_mime_atta\n-00126ec0: 6368 6d65 6e74 3c2f 613e 283c 6120 636c chment(soap, (void*)handle); .
prin\n-00126f50: 7466 283c 7370 616e 2063 6c61 7373 3d22 tf(&\n-00126f70: 7175 6f74 3b52 6563 6569 7665 6420 6174 quot;Received at\n-00126f80: 7461 6368 6d65 6e74 2077 6974 6820 6964 tachment with id\n-00126f90: 3d25 7320 616e 6420 7479 7065 3d25 735c =%s and type=%s\\\n-00126fa0: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", \n-00126fb0: 636f 6e74 656e 742d 2667 743b 3c61 2063 content->\n-00127010: 6964 3c2f 613e 3f63 6f6e 7465 6e74 2d26 id?content-&\n-00127020: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;id:"\n-001270a0: 2671 756f 743b 3c2f 7370 616e 3e2c 2063 ", c\n-001270b0: 6f6e 7465 6e74 2d26 6774 3b3c 6120 636c ontent->t\n-00127110: 7970 653c 2f61 3e3f 636f 6e74 656e 742d ype?content-\n-00127120: 2667 743b 3c61 2063 6c61 7373 3d22 636f >type\n-00127180: 3a3c 7370 616e 2063 6c61 7373 3d22 7374 :&qu\n-001271a0: 6f74 3b26 7175 6f74 3b3c 2f73 7061 6e3e ot;"\n-001271b0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
.
\n-001271d0: 7d20 3c73 7061 6e20 636c 6173 733d 226b } whil\n-001271f0: 653c 2f73 7061 6e3e 2028 636f 6e74 656e e (conten\n-00127200: 7429 3b20 3c2f 6469 763e 0a3c 6469 7620 t);
.
\n-00127220: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soa\n-00127270: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->error) .
return soap\n-00127340: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->error; .
}
\n-001273c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
... /\n-001273f0: 2f20 7365 7276 6572 2d73 6964 6520 7072 / server-side pr\n-00127400: 6f63 6573 7369 6e67 206c 6f67 6963 203c ocessing logic <\n-00127410: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
. \n-00127430: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-00127450: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA\n-001274b0: 505f 4f4b 3c2f 613e 3b20 3c2f 6469 763e P_OK;
\n-001274c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
}
.

We a\n-00128a10: 6c73 6f20 696e 636c 7564 6564 2061 203c lso included a <\n-00128a20: 636f 6465 3e2f 2f67 736f 6170 2077 7361 code>//gsoap wsa\n-00128a30: 2073 6368 656d 6120 696d 706f 7274 3a3c schema import:<\n-00128a40: 2f63 6f64 653e 2064 6972 6563 7469 7665 /code> directive\n-00128a50: 2069 6e20 7468 6520 3c65 6d3e 3c63 6f64 in the wsa.h file to enab\n-00128a80: 6c65 2074 6865 2067 656e 6572 6174 696f le the generatio\n-00128a90: 6e20 6f66 2057 5344 4c20 7370 6563 6966 n of WSDL specif\n-00128aa0: 6963 6174 696f 6e73 2074 6861 7420 696d ications that im\n-00128ab0: 706f 7274 2028 696e 7374 6561 6420 6f66 port (instead of\n-00128ac0: 2069 6e63 6c75 6465 7329 2074 6865 2057 includes) the W\n-00128ad0: 532d 4164 6472 6573 7369 6e67 2065 6c65 S-Addressing ele\n-00128ae0: 6d65 6e74 732e 204e 6f74 6520 7468 6174 ments. Note that\n-00128af0: 2074 6865 203c 636f 6465 3e2f 2f67 736f the //gso\n-00128b00: 6170 6f70 7420 773c 2f63 6f64 653e 2064 apopt w d\n-00128b10: 6972 6563 7469 7665 2028 7768 6963 6820 irective (which \n-00128b20: 6164 6473 206f 7074 696f 6e20 3c62 3e3c adds option <\n-00128b30: 636f 6465 3e2d 773c 2f63 6f64 653e 3c2f code>-w to run soapcpp2 -w) must \n-00128b70: 6e6f 7420 6265 2070 7265 7365 6e74 2069 not be present i\n-00128b80: 6e20 796f 7572 2068 6561 6465 7220 6669 n your header fi\n-00128b90: 6c65 2074 6f20 656e 6162 6c65 2057 5344 le to enable WSD\n-00128ba0: 4c20 6765 6e65 7261 7469 6f6e 2e3c 2f70 L generation..

One-way SOA\n-00128bc0: 502d 6f76 6572 2d55 4450 206d 6573 7361 P-over-UDP messa\n-00128bd0: 6765 7320 2873 6565 2053 6563 7469 6f6e ges (see Section\n-00128be0: 203c 6120 636c 6173 733d 2265 6c22 2068 Asynchr\n-00128c10: 6f6e 6f75 7320 6f6e 652d 7761 7920 6d65 onous one-way me\n-00128c20: 7373 6167 6520 7061 7373 696e 673c 2f61 ssage passing ) should be de\n-00128c40: 636c 6172 6564 2074 6f20 696e 636c 7564 clared to includ\n-00128c50: 6520 7468 6520 3c65 6d3e 3c63 6f64 653e e the \n-00128c60: 7773 613a 4d65 7373 6167 6549 443c 2f63 wsa:MessageID, <\n-00128c80: 636f 6465 3e77 7361 3a54 6f3c 2f63 6f64 code>wsa:To, and wsa:Actio\n-00128cb0: 6e3c 2f63 6f64 653e 3c2f 656d 3e20 656c n el\n-00128cc0: 656d 656e 7473 2069 6e20 7468 6520 534f ements in the SO\n-00128cd0: 4150 2048 6561 6465 7220 6f66 2074 6865 AP Header of the\n-00128ce0: 2072 6571 7565 7374 206d 6573 7361 6765 request message\n-00128cf0: 2061 7320 666f 6c6c 6f77 733a 3c2f 703e as follows:

\n-00128d00: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
/\n-00128d40: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n-00128d50: 6520 6d65 7468 6f64 2d68 6561 6465 722d e method-header-\n-00128d60: 7061 7274 3a20 2020 2020 2020 2020 2073 part: s\n-00128d70: 656e 6453 7472 696e 6720 7773 615f 5f4d endString wsa__M\n-00128d80: 6573 7361 6765 4944 203c 2f73 7061 6e3e essageID \n-00128d90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
/\n-00128dc0: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n-00128dd0: 6520 6d65 7468 6f64 2d68 6561 6465 722d e method-header-\n-00128de0: 7061 7274 3a20 2020 2020 2020 2020 2073 part: s\n-00128df0: 656e 6453 7472 696e 6720 7773 615f 5f54 endString wsa__T\n-00128e00: 6f20 3c2f 7370 616e 3e3c 2f64 6976 3e0a o
.\n-00128e10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
//gsoap \n-00128e40: 6e73 2073 6572 7669 6365 206d 6574 686f ns service metho\n-00128e50: 642d 6865 6164 6572 2d70 6172 743a 2020 d-header-part: \n-00128e60: 2020 2020 2020 2020 7365 6e64 5374 7269 sendStri\n-00128e70: 6e67 2077 7361 5f5f 4163 7469 6f6e 203c ng wsa__Action <\n-00128e80: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.<\n-00128ea0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00128eb0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int ns__sendStri\n-00128ed0: 6e67 283c 7370 616e 2063 6c61 7373 3d22 ng(cha\n-00128ef0: 723c 2f73 7061 6e3e 202a 7374 722c 203c r *str, <\n-00128f00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00128f10: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void);
.

Request-r\n-00128f50: 6573 706f 6e73 6520 534f 4150 2d6f 7665 esponse SOAP-ove\n-00128f60: 722d 5544 5020 6d65 7373 6167 6573 2073 r-UDP messages s\n-00128f70: 686f 756c 6420 6265 2064 6563 6c61 7265 hould be declare\n-00128f80: 6420 746f 2069 6e63 6c75 6465 2074 6865 d to include the\n-00128f90: 203c 656d 3e3c 636f 6465 3e77 7361 3a4d wsa:M\n-00128fa0: 6573 7361 6765 4944 3c2f 636f 6465 3e3c essageID<\n-00128fb0: 2f65 6d3e 2c20 3c65 6d3e 3c63 6f64 653e /em>, \n-00128fc0: 7773 613a 546f 3c2f 636f 6465 3e3c 2f65 wsa:To, ws\n-00128fe0: 613a 4163 7469 6f6e 3c2f 636f 6465 3e3c a:Action<\n-00128ff0: 2f65 6d3e 2c20 616e 6420 3c65 6d3e 3c63 /em>, and wsa:ReplyTo<\n-00129010: 2f63 6f64 653e 3c2f 656d 3e20 656c 656d /code> elem\n-00129020: 656e 7473 2069 6e20 7468 6520 534f 4150 ents in the SOAP\n-00129030: 2048 6561 6465 7220 6f66 2074 6865 2072 Header of the r\n-00129040: 6571 7565 7374 206d 6573 7361 6765 2c20 equest message, \n-00129050: 616e 6420 7468 6520 7468 6520 3c65 6d3e and the the \n-00129060: 3c63 6f64 653e 7773 613a 4d65 7373 6167 wsa:Messag\n-00129070: 6549 443c 2f63 6f64 653e 3c2f 656d 3e2c eID,\n-00129080: 203c 656d 3e3c 636f 6465 3e77 7361 3a54 wsa:T\n-00129090: 6f3c 2f63 6f64 653e 3c2f 656d 3e2c 203c o, <\n-001290a0: 656d 3e3c 636f 6465 3e77 7361 3a41 6374 em>wsa:Act\n-001290b0: 696f 6e3c 2f63 6f64 653e 3c2f 656d 3e2c ion,\n-001290c0: 2061 6e64 203c 656d 3e3c 636f 6465 3e77 and w\n-001290d0: 7361 3a52 656c 6174 6573 546f 3c2f 636f sa:RelatesTo element\n-001290f0: 7320 696e 2074 6865 2053 4f41 5020 4865 s in the SOAP He\n-00129100: 6164 6572 206f 6620 7468 6520 7265 7370 ader of the resp\n-00129110: 6f6e 7365 206d 6573 7361 6765 3a3c 2f70 onse message:.

\n-00129160: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n-00129170: 6365 206d 6574 686f 642d 6865 6164 6572 ce method-header\n-00129180: 2d70 6172 743a 2020 2020 2020 2020 2020 -part: \n-00129190: 6563 686f 5374 7269 6e67 2077 7361 5f5f echoString wsa__\n-001291a0: 4d65 7373 6167 6549 4420 3c2f 7370 616e MessageID
.
\n-001291e0: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n-001291f0: 6365 206d 6574 686f 642d 6865 6164 6572 ce method-header\n-00129200: 2d70 6172 743a 2020 2020 2020 2020 2020 -part: \n-00129210: 6563 686f 5374 7269 6e67 2077 7361 5f5f echoString wsa__\n-00129220: 546f 203c 2f73 7061 6e3e 3c2f 6469 763e To
\n-00129230: 0a3c 6469 7620 636c 6173 733d 226c 696e .
//gsoap\n-00129260: 206e 7320 7365 7276 6963 6520 6d65 7468 ns service meth\n-00129270: 6f64 2d68 6561 6465 722d 7061 7274 3a20 od-header-part: \n-00129280: 2020 2020 2020 2020 2065 6368 6f53 7472 echoStr\n-00129290: 696e 6720 7773 615f 5f41 6374 696f 6e20 ing wsa__Action \n-001292a0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-001292c0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n-001292e0: 2073 6572 7669 6365 206d 6574 686f 642d service method-\n-001292f0: 696e 7075 742d 6865 6164 6572 2d70 6172 input-header-par\n-00129300: 743a 2020 2020 6563 686f 5374 7269 6e67 t: echoString\n-00129310: 2077 7361 5f5f 5265 706c 7954 6f20 3c2f wsa__ReplyTo
.//gsoap ns s\n-00129360: 6572 7669 6365 206d 6574 686f 642d 6f75 ervice method-ou\n-00129370: 7470 7574 2d68 6561 6465 722d 7061 7274 tput-header-part\n-00129380: 3a20 2020 6563 686f 5374 7269 6e67 2077 : echoString w\n-00129390: 7361 5f5f 5265 6c61 7465 7354 6f20 3c2f sa__RelatesTo
.int ns__echoStrin\n-001293f0: 6728 3c73 7061 6e20 636c 6173 733d 226b g(char\n-00129410: 3c2f 7370 616e 3e20 2a73 7472 2c20 3c73 *str, char **res);.

For \n-00129470: 7468 6520 636f 6e74 656e 7420 7265 7175 the content requ\n-00129480: 6972 656d 656e 7473 206f 6620 7468 6573 irements of thes\n-00129490: 6520 656c 656d 656e 7473 2c20 706c 6561 e elements, plea\n-001294a0: 7365 2063 6f6e 7375 6c74 2074 6865 2053 se consult the S\n-001294b0: 4f41 502d 6f76 6572 2d55 4450 2073 7065 OAP-over-UDP spe\n-001294c0: 6369 6669 6361 7469 6f6e 2061 6e64 2f6f cification and/o\n-001294d0: 7220 7265 6164 2074 6865 206e 6578 7420 r read the next \n-001294e0: 7365 6374 696f 6e73 2065 7870 6c61 696e sections explain\n-001294f0: 696e 6720 534f 4150 2d6f 7665 722d 5544 ing SOAP-over-UD\n-00129500: 5020 756e 6963 6173 742c 206d 756c 7469 P unicast, multi\n-00129510: 6361 7374 2c20 6f6e 652d 7761 792c 2061 cast, one-way, a\n-00129520: 6e64 2072 6571 7565 7374 2d72 6573 706f nd request-respo\n-00129530: 6e73 6520 636c 6965 6e74 2061 6e64 2073 nse client and s\n-00129540: 6572 7665 7220 6170 706c 6963 6174 696f erver applicatio\n-00129550: 6e73 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 ns.

.

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

..Client-sid\n-001295c0: 6520 6f6e 652d 7761 7920 5544 5020 756e e one-way UDP un\n-001295d0: 6963 6173 743c 2f68 333e 0a3c 703e 5468 icast.

Th\n-001295e0: 6973 2065 7861 6d70 6c65 2061 7373 756d is example assum\n-001295f0: 6573 2074 6861 7420 7468 6520 696e 7465 es that the inte\n-00129600: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil\n-00129610: 6520 696e 636c 7564 6573 2074 6865 2053 e includes the S\n-00129620: 4f41 5020 4865 6164 6572 2077 6974 6820 OAP Header with \n-00129630: 5753 2d41 6464 7265 7373 696e 6720 656c WS-Addressing el\n-00129640: 656d 656e 7473 2c20 7365 6520 3c61 2063 ements, see The WS-Add\n-00129680: 7265 7373 696e 6720 706c 7567 696e 3c2f ressing plugin, and the ns__sendString\n-001296b0: 3c2f 636f 6465 3e20 6675 6e63 7469 6f6e function\n-001296c0: 2064 6973 6375 7373 6564 2069 6e20 5365 discussed in Se\n-001296d0: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction Usi\n-00129700: 6e67 2057 532d 4164 6472 6573 7369 6e67 ng WS-Addressing\n-00129710: 2077 6974 6820 534f 4150 2d6f 7665 722d with SOAP-over-\n-00129720: 5544 503c 2f61 3e2e 3c2f 703e 0a3c 6469 UDP.

.
\n-00129770: 2369 6e63 6c75 6465 2026 7175 6f74 3b70 #include "p\n-00129780: 6c75 6769 6e2f 7773 6161 7069 2e68 2671 lugin/wsaapi.h&q\n-00129790: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;.
.struct soap soap;
.
soap_init(&\n-001298d0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n-00129900: 2f61 3e29 3b20 3c2f 6469 763e 0a3c 6469 /a>);
.<\n-00129920: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00129930: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00129940: 705f 5f70 6c75 6769 6e2e 6874 6d6c 2367 p__plugin.html#g\n-00129950: 6164 3634 3565 3561 3538 6564 3434 3266 ad645e5a58ed442f\n-00129960: 6534 3735 3364 6363 3233 3338 6338 6264 e4753dcc2338c8bd\n-00129970: 6222 3e73 6f61 705f 7265 6769 7374 6572 b\">soap_register\n-00129980: 5f70 6c75 6769 6e3c 2f61 3e28 2661 6d70 _plugin(&\n-00129990: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-001299c0: 2c20 736f 6170 5f77 7361 293b 3c2f 6469 , soap_wsa);.
soap\n-00129a10: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .se\n-00129a60: 6e64 5f74 696d 656f 7574 3c2f 613e 203d nd_timeout =\n-00129a70: 2035 3b20 3c73 7061 6e20 636c 6173 733d 5; // 5 s\n-00129a90: 6563 6f6e 6473 206d 6178 2073 6f63 6b65 econds max socke\n-00129aa0: 7420 6465 6c61 7920 3c2f 7370 616e 3e3c t delay <\n-00129ab0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
//\n-00129ae0: 2073 6574 2075 7020 5753 2d41 6464 7265 set up WS-Addre\n-00129af0: 7373 696e 6720 6865 6164 6572 3c2f 7370 ssing header
..
// Send the me\n-00129c50: 7373 6167 6520 6f76 6572 2055 4450 3a20 ssage over UDP: \n-00129c60: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-00129c80: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_send_n\n-00129cb0: 735f 5f65 6368 6f53 7472 696e 6728 2661 s__echoString(&a\n-00129cc0: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;
soap, \n-00129d10: 2671 756f 743b 736f 6170 2e75 6470 3a2f "soap.udp:/\n-00129d20: 2f65 6e64 706f 696e 7426 7175 6f74 3b3c /endpoint"<\n-00129d30: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, "SOAP a\n-00129d60: 6374 696f 6e26 7175 6f74 3b3c 2f73 7061 ction", \n-00129d90: 2671 756f 743b 6865 6c6c 6f20 776f 726c "hello worl\n-00129da0: 6421 2671 756f 743b 3c2f 7370 616e 3e29 d!")\n-00129db0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
.
\n-00129e20: 736f 6170 5f70 7269 6e74 5f66 6175 6c74 soap_print_fault\n-00129e30: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap, stder\n-00129e70: 7229 3b20 3c73 7061 6e20 636c 6173 733d r); // err\n-00129e90: 6f72 203c 2f73 7061 6e3e 3c2f 6469 763e or
\n-00129ea0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
soap_des\n-00129f10: 7472 6f79 3c2f 613e 2826 616d 703b 3c61 troy(&soap);<\n-00129f50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
soa\n-00129fc0: 705f 656e 643c 2f61 3e28 2661 6d70 3b3c p_end(&<\n-00129fd0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00129fe0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00129ff0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n-0012a000: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
so\n-0012a070: 6170 5f64 6f6e 653c 2f61 3e28 2661 6d70 ap_done(&\n-0012a080: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-0012a0b0: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
.
soap_reg\n-0012a170: 6973 7465 725f 706c 7567 696e 3c2f 613e ister_plugin\n-0012a180: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
int so\n-0012a1a0: 6170 5f72 6567 6973 7465 725f 706c 7567 ap_register_plug\n-0012a1b0: 696e 2873 7472 7563 7420 736f 6170 202a in(struct soap *\n-0012a1c0: 736f 6170 2c20 696e 7428 2a66 6372 6561 soap, int(*fcrea\n-0012a1d0: 7465 2928 7374 7275 6374 2073 6f61 7020 te)(struct soap \n-0012a1e0: 2a2c 2073 7472 7563 7420 736f 6170 5f70 *, struct soap_p\n-0012a1f0: 6c75 6769 6e20 2a2c 2076 6f69 6420 2a29 lugin *, void *)\n-0012a200: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
Regist\n-0012a220: 6572 2061 2070 6c75 6769 6e2e 3c2f 6469 er a plugin.
.
<\n-0012a240: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-0012a250: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

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

.

.\n-0012a2b0: 436c 6965 6e74 2d73 6964 6520 6f6e 652d Client-side one-\n-0012a2c0: 7761 7920 5544 5020 6d75 6c74 6963 6173 way UDP multicas\n-0012a2d0: 743c 2f68 333e 0a3c 703e 5468 6973 2065 t

.

This e\n-0012a2e0: 7861 6d70 6c65 2069 7320 7369 6d69 6c61 xample is simila\n-0012a2f0: 7220 746f 2074 6865 206f 6e65 2d77 6179 r to the one-way\n-0012a300: 2075 6e69 6361 7374 2065 7861 6d70 6c65 unicast example\n-0012a310: 2064 6973 6375 7373 6564 2061 626f 7665 discussed above\n-0012a320: 2c20 6275 7420 7573 6573 2061 2062 726f , but uses a bro\n-0012a330: 6164 6361 7374 2061 6464 7265 7373 2061 adcast address a\n-0012a340: 6e64 2074 6865 203c 636f 6465 3e53 4f5f nd the SO_\n-0012a350: 4252 4f41 4443 4153 543c 2f63 6f64 653e BROADCAST\n-0012a360: 2073 6f63 6b65 7420 6f70 7469 6f6e 3a3c socket option:<\n-0012a370: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

#include \n-0012a3c0: 2671 756f 743b 706c 7567 696e 2f77 7361 "plugin/wsa\n-0012a3d0: 6170 692e 6826 7175 6f74 3b3c 2f73 7061 api.h"
.
.\n-0012a4a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
in_addr_t add\n-0012a4c0: 7220 3d20 696e 6574 5f61 6464 7228 3c73 r = inet_addr("\n-0012a4f0: 312e 322e 332e 3426 7175 6f74 3b3c 2f73 1.2.3.4"); // \n-0012a520: 6f70 7469 6f6e 616c 203c 2f73 7061 6e3e optional \n-0012a530: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
so\n-0012a5a0: 6170 5f69 6e69 743c 2f61 3e28 2661 6d70 ap_init(&\n-0012a5b0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-0012a5e0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
..\n-0012a6b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
soap.send_\n-0012a740: 7469 6d65 6f75 743c 2f61 3e20 3d20 353b timeout = 5;\n-0012a750: 203c 7370 616e 2063 6c61 7373 3d22 636f // 5 seco\n-0012a770: 6e64 7320 6d61 7820 736f 636b 6574 2064 nds max socket d\n-0012a780: 656c 6179 3c2f 7370 616e 3e3c 2f64 6976 elay.
soap<\n-0012a7d0: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.con\n-0012a820: 6e65 6374 5f66 6c61 6773 3c2f 613e 203d nect_flags =\n-0012a830: 2053 4f5f 4252 4f41 4443 4153 543b 203c SO_BROADCAST; <\n-0012a840: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0012a850: 656e 7422 3e2f 2f20 7265 7175 6972 6564 ent\">// required\n-0012a860: 2066 6f72 2062 726f 6164 6361 7374 203c for broadcast <\n-0012a870: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.<\n-0012a890: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012a8a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0012a8b0: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n-0012a8c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012a8d0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0012a8e0: 6874 6d6c 2361 6363 6234 3361 3537 3136 html#accb43a5716\n-0012a8f0: 3030 3562 3437 3366 6131 6435 3638 3839 005b473fa1d56889\n-0012a900: 3637 6133 6233 223e 6970 7634 5f6d 756c 67a3b3\">ipv4_mul\n-0012a910: 7469 6361 7374 5f69 663c 2f61 3e20 3d20 ticast_if = \n-0012a920: 2661 6d70 3b61 6464 723b 203c 7370 616e &addr; // optional for\n-0012a950: 2049 5076 343a 2073 6565 2073 6574 736f IPv4: see setso\n-0012a960: 636b 6f70 7420 4950 5052 4f54 4f5f 4950 ckopt IPPROTO_IP\n-0012a970: 2049 505f 4d55 4c54 4943 4153 545f 4946 IP_MULTICAST_IF\n-0012a980: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
.<\n-0012a990: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012a9a0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n-0012a9d0: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .ipv6_m\n-0012aa20: 756c 7469 6361 7374 5f69 663c 2f61 3e20 ulticast_if \n-0012aa30: 3d20 6164 6472 3b20 3c73 7061 6e20 636c = addr; //\n-0012aa50: 206f 7074 696f 6e61 6c20 666f 7220 4950 optional for IP\n-0012aa60: 7636 3a20 6d75 6c74 6963 6173 7420 7369 v6: multicast si\n-0012aa70: 6e36 5f73 636f 7065 5f69 6420 3c2f 7370 n6_scope_id
.
soap.ipv4_multic\n-0012ab20: 6173 745f 7474 6c3c 2f61 3e20 3d20 313b ast_ttl = 1;\n-0012ab30: 203c 7370 616e 2063 6c61 7373 3d22 636f // option\n-0012ab50: 616c 2c20 7365 6520 7365 7473 6f63 6b6f al, see setsocko\n-0012ab60: 7074 2049 5050 524f 544f 5f49 502c 2049 pt IPPROTO_IP, I\n-0012ab70: 505f 4d55 4c54 4943 4153 545f 5454 4c20 P_MULTICAST_TTL \n-0012ab80: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-0012aba0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // set up \n-0012abc0: 5753 2d41 6464 7265 7373 696e 6720 6865 WS-Addressing he\n-0012abd0: 6164 6572 3c2f 7370 616e 3e3c 2f64 6976 ader.
soap_wsa_req\n-0012ac00: 7565 7374 2826 616d 703b 3c61 2063 6c61 uest(&soap, "mes\n-0012ac60: 7361 6765 2049 4426 7175 6f74 3b3c 2f73 sage ID", "endpoint\n-0012aca0: 2671 756f 743b 3c2f 7370 616e 3e2c 203c ", <\n-0012acb0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-0012acc0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-0012acd0: 3b53 4f41 5020 6163 7469 6f6e 2671 756f ;SOAP action&quo\n-0012ace0: 743b 3c2f 7370 616e 3e29 3b3c 2f64 6976 t;);.
// Sen\n-0012ad20: 6420 7468 6520 6d65 7373 6167 6520 6f76 d the message ov\n-0012ad30: 6572 2055 4450 2074 6f20 6120 6272 6f61 er UDP to a broa\n-0012ad40: 6463 6173 7420 6164 6472 6573 733a 203c dcast address: <\n-0012ad50: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.<\n-0012ad70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0012ad80: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_send_ns\n-0012ada0: 5f5f 6563 686f 5374 7269 6e67 2826 616d __echoString(&am\n-0012adb0: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, &\n-0012ae00: 7175 6f74 3b73 6f61 702e 7564 703a 2f2f quot;soap.udp://\n-0012ae10: 656e 6470 6f69 6e74 2671 756f 743b 3c2f endpoint", "SOAP ac\n-0012ae50: 7469 6f6e 2671 756f 743b 3c2f 7370 616e tion", &\n-0012ae80: 7175 6f74 3b68 656c 6c6f 2077 6f72 6c64 quot;hello world\n-0012ae90: 2126 7175 6f74 3b3c 2f73 7061 6e3e 2929 !"))\n-0012aea0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
s\n-0012af10: 6f61 705f 7072 696e 745f 6661 756c 743c oap_print_fault<\n-0012af20: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-0012af50: 736f 6170 3c2f 613e 2c20 7374 6465 7272 soap, stderr\n-0012af60: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // repo\n-0012af80: 7274 2065 7272 6f72 203c 2f73 7061 6e3e rt error \n-0012af90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
..soap_end(\n-0012b0c0: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n-0012b0f0: 3c2f 613e 293b 3c2f 6469 763e 0a3c 6469 );
.<\n-0012b110: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012b120: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-0012b130: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n-0012b140: 6761 3238 6565 3866 6463 6635 3030 3434 ga28ee8fdcf50044\n-0012b150: 3365 3065 3531 3735 3033 3234 6161 3661 3e0e51750324aa6a\n-0012b160: 3161 223e 736f 6170 5f64 6f6e 653c 2f61 1a\">soap_done(&so\n-0012b1a0: 6170 3c2f 613e 293b 3c2f 6469 763e 0a3c ap);
.<\n-0012b1b0: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-0012b1c0: 6964 3d22 6173 7472 7563 7473 6f61 705f id=\"astructsoap_\n-0012b1d0: 6874 6d6c 5f61 3364 6230 3534 3265 3865 html_a3db0542e8e\n-0012b1e0: 6237 6462 3661 3266 3263 6263 3136 6662 b7db6a2f2cbc16fb\n-0012b1f0: 3234 3038 3262 223e 3c64 6976 2063 6c61 24082b\">
\n-0012b340: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
soap::\n-0012b3e0: 636f 6e6e 6563 745f 666c 6167 733c 2f61 connect_flags
int c\n-0012b410: 6f6e 6e65 6374 5f66 6c61 6773 3c2f 6469 onnect_flags
User-defina\n-0012b440: 626c 6520 7365 7473 6f63 6b6f 7074 206c ble setsockopt l\n-0012b450: 6576 656c 2053 4f4c 5f53 4f43 4b45 5420 evel SOL_SOCKET \n-0012b460: 666c 6167 7320 7768 656e 2063 6f6e 6e65 flags when conne\n-0012b470: 6374 696e 6720 736f 6170 3a3a 736f 636b cting soap::sock\n-0012b480: 6574 2074 6f20 6120 7365 7276 6572 2028 et to a server (\n-0012b490: 7468 6520 7661 6c75 6520 2e2e 2e3c 2f64 the value ...
Definit\n-0012b4c0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n-0012b4d0: 322e 683a 3333 3737 3c2f 6469 763e 3c2f 2.h:3377
.
\n-0012b5a0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
unsigned cha\n-0012b5c0: 7220 6970 7634 5f6d 756c 7469 6361 7374 r ipv4_multicast\n-0012b5d0: 5f74 746c 3c2f 6469 763e 3c64 6976 2063 _ttl
Use\n-0012b5f0: 722d 6465 6669 6e61 626c 6520 7661 6c75 r-definable valu\n-0012b600: 6520 746f 2073 6574 2073 6574 736f 636b e to set setsock\n-0012b610: 6f70 7420 6c65 7665 6c20 4950 5052 4f54 opt level IPPROT\n-0012b620: 4f5f 4950 2074 6f20 4950 5f4d 554c 5449 O_IP to IP_MULTI\n-0012b630: 4341 5354 5f54 544c 2077 6865 6e20 6e6f CAST_TTL when no\n-0012b640: 6e7a 6572 6f2e 3c2f 6469 763e 3c64 6976 nzero.
<\n-0012b660: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:362\n-0012b680: 303c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 0
.<\n-0012b800: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:359\n-0012b820: 393c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 9
.

Please r\n-0012b850: 6566 6572 2074 6f20 7468 6520 736f 636b efer to the sock\n-0012b860: 6574 206f 7074 696f 6e73 2066 6f72 203c et options for <\n-0012b870: 636f 6465 3e49 5050 524f 544f 5f49 503c code>IPPROTO_IP<\n-0012b880: 2f63 6f64 653e 203c 636f 6465 3e49 505f /code> IP_\n-0012b890: 4d55 4c54 4943 4153 545f 4946 3c2f 636f MULTICAST_IF to specify t\n-0012b8b0: 6865 2064 6566 6175 6c74 2069 6e74 6572 he default inter\n-0012b8c0: 6661 6365 2066 6f72 206d 756c 7469 6361 face for multica\n-0012b8d0: 7374 2064 6174 6167 7261 6d73 2074 6f20 st datagrams to \n-0012b8e0: 6265 2073 656e 7420 6672 6f6d 2e20 5468 be sent from. Th\n-0012b8f0: 6973 2069 7320 6120 3c63 6f64 653e 7374 is is a st\n-0012b900: 7275 6374 2069 6e5f 6164 6472 3c2f 636f ruct in_addr (in_ad\n-0012b920: 6472 5f74 3c2f 636f 6465 3e20 666f 7220 dr_t for \n-0012b930: 3c63 6f64 653e 7369 6e36 5f73 636f 7065 sin6_scope\n-0012b940: 5f69 643c 2f63 6f64 653e 2920 696e 7465 _id) inte\n-0012b950: 7266 6163 6520 7661 6c75 652e 204f 7468 rface value. Oth\n-0012b960: 6572 7769 7365 2c20 7468 6520 6465 6661 erwise, the defa\n-0012b970: 756c 7420 696e 7465 7266 6163 6520 7365 ult interface se\n-0012b980: 7420 6279 2074 6865 2073 7973 7465 6d20 t by the system \n-0012b990: 6164 6d69 6e69 7374 7261 746f 7220 7769 administrator wi\n-0012b9a0: 6c6c 2062 6520 7573 6564 2028 6966 2061 ll be used (if a\n-0012b9b0: 6e79 292e 3c2f 703e 0a3c 703e 506c 6561 ny).

.

Plea\n-0012b9c0: 7365 2072 6566 6572 2074 6f20 7468 6520 se refer to the \n-0012b9d0: 736f 636b 6574 206f 7074 696f 6e73 2066 socket options f\n-0012b9e0: 6f72 203c 636f 6465 3e49 5050 524f 544f or IPPROTO\n-0012b9f0: 5f49 503c 2f63 6f64 653e 203c 636f 6465 _IP IP_MULTICAST_TT\n-0012ba10: 4c3c 2f63 6f64 653e 2074 6f20 6c69 6d69 L to limi\n-0012ba20: 7420 7468 6520 6c69 6665 7469 6d65 206f t the lifetime o\n-0012ba30: 6620 7468 6520 7061 636b 6574 2e20 4d75 f the packet. Mu\n-0012ba40: 6c74 6963 6173 7420 6461 7461 6772 616d lticast datagram\n-0012ba50: 7320 6172 6520 7365 6e74 2077 6974 6820 s are sent with \n-0012ba60: 6120 6465 6661 756c 7420 7661 6c75 6520 a default value \n-0012ba70: 6f66 2031 2c20 746f 2070 7265 7665 6e74 of 1, to prevent\n-0012ba80: 2074 6865 6d20 746f 2062 6520 666f 7277 them to be forw\n-0012ba90: 6172 6465 6420 6265 796f 6e64 2074 6865 arded beyond the\n-0012baa0: 206c 6f63 616c 206e 6574 776f 726b 2e20 local network. \n-0012bab0: 5468 6973 2070 6172 616d 6574 6572 2063 This parameter c\n-0012bac0: 616e 2062 6520 7365 7420 6265 7477 6565 an be set betwee\n-0012bad0: 6e20 3120 746f 2032 3535 2e3c 2f70 3e0a n 1 to 255.

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

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

.

.Cli\n-0012bb50: 656e 742d 7369 6465 2072 6571 7565 7374 ent-side request\n-0012bb60: 2d72 6573 706f 6e73 6520 5544 5020 756e -response UDP un\n-0012bb70: 6963 6173 743c 2f68 333e 0a3c 703e 5468 icast

.

Th\n-0012bb80: 6973 2065 7861 6d70 6c65 2061 7373 756d is example assum\n-0012bb90: 6573 2074 6861 7420 7468 6520 696e 7465 es that the inte\n-0012bba0: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil\n-0012bbb0: 6520 666f 7220 736f 6170 6370 7032 2069 e for soapcpp2 i\n-0012bbc0: 6e63 6c75 6465 7320 7468 6520 534f 4150 ncludes the SOAP\n-0012bbd0: 2048 6561 6465 7220 7769 7468 2057 532d Header with WS-\n-0012bbe0: 4164 6472 6573 7369 6e67 2065 6c65 6d65 Addressing eleme\n-0012bbf0: 6e74 7320 696d 706f 7274 6564 2077 6974 nts imported wit\n-0012bc00: 6820 3c63 6f64 653e 2369 6d70 6f72 7420 h #import \n-0012bc10: 2277 7361 2e68 223c 2f63 6f64 653e 2061 \"wsa.h\" a\n-0012bc20: 6e64 2074 6865 203c 636f 6465 3e6e 735f nd the ns_\n-0012bc30: 5f65 6368 6f53 7472 696e 673c 2f63 6f64 _echoString function disc\n-0012bc50: 7573 7365 6420 696e 2053 6563 7469 6f6e ussed in Section\n-0012bc60: 203c 6120 636c 6173 733d 2265 6c22 2068 Using WS\n-0012bc90: 2d41 6464 7265 7373 696e 6720 7769 7468 -Addressing with\n-0012bca0: 2053 4f41 502d 6f76 6572 2d55 4450 3c2f SOAP-over-UDP .

.
<\n-0012bcd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012bce0: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#inc\n-0012bd00: 6c75 6465 2026 7175 6f74 3b70 6c75 6769 lude "plugi\n-0012bd10: 6e2f 7773 6161 7069 2e68 2671 756f 743b n/wsaapi.h"\n-0012bd20: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-0012bd40: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
\n-0012bd70: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap soap; <\n-0012bde0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
st\n-0012be10: 7275 6374 203c 2f73 7061 6e3e 7773 615f ruct wsa_\n-0012be20: 5f45 6e64 706f 696e 7452 6566 6572 656e _EndpointReferen\n-0012be30: 6365 5479 7065 2072 6570 6c79 546f 3b20 ceType replyTo; \n-0012be40: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // (anonym\n-0012be60: 6f75 7329 2072 6570 6c79 2061 6464 7265 ous) reply addre\n-0012be70: 7373 203c 2f73 7061 6e3e 3c2f 6469 763e ss
\n-0012be80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
cha\n-0012beb0: 723c 2f73 7061 6e3e 202a 7265 733b 203c r *res; <\n-0012bec0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0012bed0: 656e 7422 3e2f 2f20 7365 7276 6572 2072 ent\">// server r\n-0012bee0: 6573 706f 6e73 6520 3c2f 7370 616e 3e3c esponse <\n-0012bef0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
soa\n-0012bf60: 705f 696e 6974 3c2f 613e 2826 616d 703b p_init(&\n-0012bf70: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-0012bfa0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
..<\n-0012c070: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012c080: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n-0012c0b0: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .send_t\n-0012c100: 696d 656f 7574 3c2f 613e 203d 2035 3b20 imeout = 5; \n-0012c110: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // 5 secon\n-0012c130: 6473 206d 6178 2073 6f63 6b65 7420 6465 ds max socket de\n-0012c140: 6c61 7920 3c2f 7370 616e 3e3c 2f64 6976 lay .
soap<\n-0012c190: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.rec\n-0012c1e0: 765f 7469 6d65 6f75 743c 2f61 3e20 3d20 v_timeout = \n-0012c1f0: 353b 203c 7370 616e 2063 6c61 7373 3d22 5; // 5 se\n-0012c210: 636f 6e64 7320 6d61 7820 736f 636b 6574 conds max socket\n-0012c220: 2064 656c 6179 203c 2f73 7061 6e3e 3c2f delay .
// \n-0012c260: 7365 7420 7570 2057 532d 4164 6472 6573 set up WS-Addres\n-0012c270: 7369 6e67 2068 6561 6465 723c 2f73 7061 sing header
.
soap_\n-0012c2a0: 7773 615f 7265 7175 6573 7428 2661 6d70 wsa_request(&\n-0012c2b0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-0012c2e0: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n-0012c300: 756f 743b 6d65 7373 6167 6520 4944 2671 uot;message ID&q\n-0012c310: 756f 743b 3c2f 7370 616e 3e2c 203c 7370 uot;, "e\n-0012c340: 6e64 706f 696e 7426 7175 6f74 3b3c 2f73 ndpoint", "SOAP act\n-0012c380: 696f 6e26 7175 6f74 3b3c 2f73 7061 6e3e ion"\n-0012c390: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
.
soap_\n-0012c3b0: 7773 615f 6164 645f 5265 706c 7954 6f28 wsa_add_ReplyTo(\n-0012c3c0: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n-0012c3f0: 3c2f 613e 2c20 4e55 4c4c 293b 203c 7370 , NULL); // anonymous \n-0012c420: 5265 706c 7954 6f20 6164 6472 6573 733c ReplyTo address<\n-0012c430: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.<\n-0012c450: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0012c460: 656e 7422 3e2f 2f20 5365 6e64 2061 6e64 ent\">// Send and\n-0012c470: 2072 6563 6569 7665 206d 6573 7361 6765 receive message\n-0012c480: 7320 6f76 6572 2055 4450 3a20 3c2f 7370 s over UDP:
.
if \n-0012c4d0: 2873 6f61 705f 6361 6c6c 5f6e 735f 5f65 (soap_call_ns__e\n-0012c4e0: 6368 6f53 7472 696e 6728 2661 6d70 3b3c choString(&<\n-0012c4f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012c500: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0012c510: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-0012c520: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-0012c540: 743b 736f 6170 2e75 6470 3a2f 2f65 6e64 t;soap.udp://end\n-0012c550: 706f 696e 7420 2671 756f 743b 3c2f 7370 point "SOAP action"\n-0012c590: 2c20 2671 756f 743b 3c2f 7370 616e 3e68 , "h\n-0012c5a0: 656c 6c6f 2077 6f72 6c64 213c 7370 616e ello world!", &\n-0012c5d0: 616d 703b 7265 7329 2920 3c2f 7370 616e amp;res))
.
{.
if (soap.er\n-0012c660: 726f 7220 3d3d 2053 4f41 505f 454f 4620 ror == SOAP_EOF \n-0012c670: 2661 6d70 3b26 616d 703b 2073 6f61 702e && soap.\n-0012c680: 6572 726e 756d 203d 3d20 3029 203c 2f73 errnum == 0)
.
...\n-0012c6d0: 202f 2f20 5469 6d65 6f75 743a 206e 6f20 // Timeout: no \n-0012c6e0: 7265 7370 6f6e 7365 2066 726f 6d20 7365 response from se\n-0012c6f0: 7276 6572 2028 6d65 7373 6167 6520 616c rver (message al\n-0012c700: 7265 6164 7920 6465 6c69 7665 7265 643f ready delivered?\n-0012c710: 2920 3c2f 7370 616e 3e3c 2f64 6976 3e0a )
.\n-0012c720: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
\n-0012c750: 656c 7365 203c 2f73 7061 6e3e 3c2f 6469 else .
soap_print_\n-0012c7a0: 6661 756c 7428 2661 6d70 3b73 6f61 702c fault(&soap,\n-0012c7b0: 2073 7464 6572 7229 3b20 3c2f 7370 616e stderr);
.
} <\n-0012c800: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
else \n-0012c840: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
... // UD\n-0012c880: 5020 7365 7276 6572 2072 6573 706f 6e73 P server respons\n-0012c890: 6520 6973 2073 746f 7265 6420 696e 2026 e is stored in &\n-0012c8a0: 2333 393b 7265 7326 2333 393b 203c 2f73 #39;res'
.
// chec\n-0012c8f0: 6b20 534f 4150 2068 6561 6465 7220 7265 k SOAP header re\n-0012c900: 6365 6976 6564 2c20 6966 2061 7070 6c69 ceived, if appli\n-0012c910: 6361 626c 6520 3c2f 7370 616e 3e3c 2f64 cable .
check_header(&\n-0012c960: 616d 703b 736f 6170 2e68 6561 6465 7229 amp;soap.header)\n-0012c970: 3b20 3c2f 7370 616e 3e3c 2f64 6976 3e0a ;
.\n-0012c980: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
so\n-0012c9b0: 6170 5f64 6573 7472 6f79 2826 616d 703b ap_destroy(&\n-0012c9c0: 736f 6170 293b 3c2f 7370 616e 3e3c 2f64 soap);.
soap_end(&\n-0012ca10: 736f 6170 293b 3c2f 7370 616e 3e3c 2f64 soap);.
soap_done(&\n-0012ca60: 3b73 6f61 7029 3b3c 2f73 7061 6e3e 3c2f ;soap);.

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

.Clien\n-0012cb00: 742d 7369 6465 2072 6571 7565 7374 2d72 t-side request-r\n-0012cb10: 6573 706f 6e73 6520 6d75 6c74 6963 6173 esponse multicas\n-0012cb20: 743c 2f68 333e 0a3c 703e 5468 6973 2065 t

.

This e\n-0012cb30: 7861 6d70 6c65 2069 7320 7369 6d69 6c61 xample is simila\n-0012cb40: 7220 746f 2074 6865 2072 6571 7565 7374 r to the request\n-0012cb50: 2d72 6573 706f 6e73 6520 756e 6963 6173 -response unicas\n-0012cb60: 7420 6578 616d 706c 6520 6469 7363 7573 t example discus\n-0012cb70: 7365 6420 6162 6f76 652c 2062 7574 2075 sed above, but u\n-0012cb80: 7365 7320 6120 6272 6f61 6463 6173 7420 ses a broadcast \n-0012cb90: 6164 6472 6573 7320 616e 6420 7468 6520 address and the \n-0012cba0: 3c63 6f64 653e 534f 5f42 524f 4144 4341 SO_BROADCA\n-0012cbb0: 5354 3c2f 636f 6465 3e20 736f 636b 6574 ST socket\n-0012cbc0: 206f 7074 696f 6e2e 2042 6563 6175 7365 option. Because\n-0012cbd0: 2077 6520 6578 7065 6374 2074 6f20 7265 we expect to re\n-0012cbe0: 6365 6976 6520 6d75 6c74 6970 6c65 2072 ceive multiple r\n-0012cbf0: 6573 706f 6e73 6573 2c20 7765 2061 6c73 esponses, we als\n-0012cc00: 6f20 6e65 6564 2074 6f20 7573 6520 7365 o need to use se\n-0012cc10: 7061 7261 7465 2072 6571 7565 7374 2d72 parate request-r\n-0012cc20: 6573 706f 6e73 6520 6d65 7373 6167 6573 esponse messages\n-0012cc30: 2074 6f20 7365 6e64 206f 6e65 2072 6571 to send one req\n-0012cc40: 7565 7374 2061 6e64 2063 6f6e 7375 6d65 uest and consume\n-0012cc50: 206d 756c 7469 706c 6520 7265 7370 6f6e multiple respon\n-0012cc60: 7365 732e 2049 6e20 7468 6973 2065 7861 ses. In this exa\n-0012cc70: 6d70 6c65 2077 6520 6465 6669 6e65 6420 mple we defined \n-0012cc80: 6120 3c63 6f64 653e 6263 6173 7453 7472 a bcastStr\n-0012cc90: 696e 673c 2f63 6f64 653e 2072 6571 7565 ing reque\n-0012cca0: 7374 2061 6e64 2061 203c 636f 6465 3e62 st and a b\n-0012ccb0: 6361 7374 5374 7269 6e67 5265 7370 6f6e castStringRespon\n-0012ccc0: 7365 3c2f 636f 6465 3e20 7265 7370 6f6e se respon\n-0012ccd0: 7365 206d 6573 7361 6765 2c20 7768 6963 se message, whic\n-0012cce0: 6820 6172 6520 6573 7365 6e74 6961 6c6c h are essentiall\n-0012ccf0: 7920 6465 636c 6172 6564 2061 7320 6f6e y declared as on\n-0012cd00: 652d 7761 7920 6d65 7373 6167 6573 2069 e-way messages i\n-0012cd10: 6e20 7468 6520 6865 6164 6572 2066 696c n the header fil\n-0012cd20: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

.
<\n-0012cd50: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0012cd60: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n-0012cd70: 7365 7276 6963 6520 6d65 7468 6f64 2d68 service method-h\n-0012cd80: 6561 6465 722d 7061 7274 3a20 2020 2020 eader-part: \n-0012cd90: 2020 2020 2062 6361 7374 5374 7269 6e67 bcastString\n-0012cda0: 2077 7361 5f5f 4d65 7373 6167 6549 4420 wsa__MessageID \n-0012cdb0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-0012cdd0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n-0012cdf0: 2073 6572 7669 6365 206d 6574 686f 642d service method-\n-0012ce00: 6865 6164 6572 2d70 6172 743a 2020 2020 header-part: \n-0012ce10: 2020 2020 2020 6263 6173 7453 7472 696e bcastStrin\n-0012ce20: 6720 7773 615f 5f54 6f20 3c2f 7370 616e g wsa__To
.
\n-0012ce60: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n-0012ce70: 6365 206d 6574 686f 642d 6865 6164 6572 ce method-header\n-0012ce80: 2d70 6172 743a 2020 2020 2020 2020 2020 -part: \n-0012ce90: 6263 6173 7453 7472 696e 6720 7773 615f bcastString wsa_\n-0012cea0: 5f41 6374 696f 6e20 3c2f 7370 616e 3e3c _Action <\n-0012ceb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
//\n-0012cee0: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n-0012cef0: 206d 6574 686f 642d 6865 6164 6572 2d70 method-header-p\n-0012cf00: 6172 743a 2020 2020 2020 2020 2020 6263 art: bc\n-0012cf10: 6173 7453 7472 696e 6720 7773 615f 5f52 astString wsa__R\n-0012cf20: 6570 6c79 546f 203c 2f73 7061 6e3e 3c2f eplyTo .
int ns__\n-0012cf70: 6263 6173 7453 7472 696e 6728 3c73 7061 bcastString(char *str, void); \n-0012cfd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
/\n-0012d000: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n-0012d010: 6520 6d65 7468 6f64 2d68 6561 6465 722d e method-header-\n-0012d020: 7061 7274 3a20 2020 2020 2020 2020 2062 part: b\n-0012d030: 6361 7374 5374 7269 6e67 5265 7370 6f6e castStringRespon\n-0012d040: 7365 2077 7361 5f5f 4d65 7373 6167 6549 se wsa__MessageI\n-0012d050: 4420 3c2f 7370 616e 3e3c 2f64 6976 3e0a D
.\n-0012d060: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
//gsoap \n-0012d090: 6e73 2073 6572 7669 6365 206d 6574 686f ns service metho\n-0012d0a0: 642d 6865 6164 6572 2d70 6172 743a 2020 d-header-part: \n-0012d0b0: 2020 2020 2020 2020 6263 6173 7453 7472 bcastStr\n-0012d0c0: 696e 6752 6573 706f 6e73 6520 7773 615f ingResponse wsa_\n-0012d0d0: 5f54 6f20 3c2f 7370 616e 3e3c 2f64 6976 _To .
//gsoa\n-0012d110: 7020 6e73 2073 6572 7669 6365 206d 6574 p ns service met\n-0012d120: 686f 642d 6865 6164 6572 2d70 6172 743a hod-header-part:\n-0012d130: 2020 2020 2020 2020 2020 6263 6173 7453 bcastS\n-0012d140: 7472 696e 6752 6573 706f 6e73 6520 7773 tringResponse ws\n-0012d150: 615f 5f41 6374 696f 6e20 3c2f 7370 616e a__Action
.
\n-0012d190: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n-0012d1a0: 6365 206d 6574 686f 642d 6865 6164 6572 ce method-header\n-0012d1b0: 2d70 6172 743a 2020 2020 2020 2020 2020 -part: \n-0012d1c0: 6263 6173 7453 7472 696e 6752 6573 706f bcastStringRespo\n-0012d1d0: 6e73 6520 7773 615f 5f52 656c 6174 6573 nse wsa__Relates\n-0012d1e0: 546f 203c 2f73 7061 6e3e 3c2f 6469 763e To
\n-0012d1f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
int\n-0012d220: 3c2f 7370 616e 3e20 6e73 5f5f 6263 6173 ns__bcas\n-0012d230: 7453 7472 696e 6752 6573 706f 6e73 6528 tStringResponse(\n-0012d240: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *res, void);
.
\n-0012d2a0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

Note \n-0012e5e0: 7468 6174 2061 2073 6572 7665 7220 666f that a server fo\n-0012e5f0: 7220 7468 6520 3c63 6f64 653e 6263 6173 r the bcas\n-0012e600: 7453 7472 696e 673c 2f63 6f64 653e 2064 tString d\n-0012e610: 6f65 7320 6e6f 7420 6e65 6564 2074 6f20 oes not need to \n-0012e620: 7573 6520 7477 6f2d 6f6e 6520 7761 7920 use two-one way \n-0012e630: 6d65 7373 6167 6573 2e20 5468 7573 2c20 messages. Thus, \n-0012e640: 6d75 6c74 6963 6173 7420 7265 7175 6573 multicast reques\n-0012e650: 742d 7265 7370 6f6e 7365 206d 6573 7361 t-response messa\n-0012e660: 6765 2070 6174 7465 726e 2063 616e 2062 ge pattern can b\n-0012e670: 6520 6465 636c 6172 6564 2061 6e64 2069 e declared and i\n-0012e680: 6d70 6c65 6d65 6e74 6564 2061 7320 7265 mplemented as re\n-0012e690: 7175 6573 742d 7265 7370 6f6e 7365 206f quest-response o\n-0012e6a0: 7065 7261 7469 6f6e 7320 6174 2074 6865 perations at the\n-0012e6b0: 2073 6572 7665 7220 7369 6465 2e3c 2f70 server side..

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

.

<\n-0012e720: 2f61 3e0a 534f 4150 2d6f 7665 722d 5544 /a>.SOAP-over-UD\n-0012e730: 5020 7365 7276 6572 3c2f 6832 3e0a 3c70 P server

.The following e\n-0012e750: 7861 6d70 6c65 2063 6f64 6520 696c 6c75 xample code illu\n-0012e760: 7374 7261 7465 7320 6120 534f 4150 2d6f strates a SOAP-o\n-0012e770: 7665 722d 5544 5020 7365 7276 6572 2066 ver-UDP server f\n-0012e780: 6f72 206f 6e65 2d77 6179 203c 636f 6465 or one-way sendString and request-r\n-0012e7b0: 6573 706f 6e73 6520 3c63 6f64 653e 6563 esponse ec\n-0012e7c0: 686f 5374 7269 6e67 3c2f 636f 6465 3e20 hoString \n-0012e7d0: 6d65 7373 6167 6573 2e20 5468 6973 2065 messages. This e\n-0012e7e0: 7861 6d70 6c65 2061 7373 756d 6573 2074 xample assumes t\n-0012e7f0: 6861 7420 7468 6520 696e 7465 7266 6163 hat the interfac\n-0012e800: 6520 6865 6164 6572 2066 696c 6520 696e e header file in\n-0012e810: 636c 7564 6573 2074 6865 2053 4f41 5020 cludes the SOAP \n-0012e820: 4865 6164 6572 2077 6974 6820 5753 2d41 Header with WS-A\n-0012e830: 6464 7265 7373 696e 6720 656c 656d 656e ddressing elemen\n-0012e840: 7473 2069 6d70 6f72 7465 6420 7769 7468 ts imported with\n-0012e850: 203c 636f 6465 3e23 696d 706f 7274 2022 #import \"\n-0012e860: 7773 612e 6822 3c2f 636f 6465 3e20 616e wsa.h\" an\n-0012e870: 6420 7468 6520 3c63 6f64 653e 6e73 5f5f d the ns__\n-0012e880: 6563 686f 5374 7269 6e67 3c2f 636f 6465 echoString function discu\n-0012e8a0: 7373 6564 2069 6e20 5365 6374 696f 6e20 ssed in Section \n-0012e8b0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 Using WS-\n-0012e8e0: 4164 6472 6573 7369 6e67 2077 6974 6820 Addressing with \n-0012e8f0: 534f 4150 2d6f 7665 722d 5544 503c 2f61 SOAP-over-UDP .

.
\n-0012e930: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl\n-0012e950: 7564 6520 2671 756f 743b 706c 7567 696e ude "plugin\n-0012e960: 2f77 7361 6170 692e 6826 7175 6f74 3b3c /wsaapi.h"<\n-0012e970: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
. \n-0012e990: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
int ma\n-0012e9d0: 696e 2829 203c 2f64 6976 3e0a 3c64 6976 in()
.{<\n-0012e9f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
\n-0012ea20: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap soap; <\n-0012ea90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
s\n-0012eb00: 6f61 705f 696e 6974 313c 2f61 3e28 2661 oap_init1(&a\n-0012eb10: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, SOAP_IO_U\n-0012eba0: 4450 3c2f 613e 293b 203c 7370 616e 2063 DP); /\n-0012ebc0: 2f20 6d75 7374 2073 6574 2055 4450 2066 / must set UDP f\n-0012ebd0: 6c61 6720 3c2f 7370 616e 3e3c 2f64 6976 lag ..
// bind to h\n-0012ece0: 6f73 7420 284e 554c 4c20 3d20 6375 7272 ost (NULL = curr\n-0012ecf0: 656e 7420 686f 7374 2920 616e 6420 706f ent host) and po\n-0012ed00: 7274 3a20 3c2f 7370 616e 3e3c 2f64 6976 rt: ..\n-0012ef00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{
. \n-0012ef30: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_print_\n-0012ef90: 6661 756c 743c 2f61 3e28 2661 6d70 3b3c fault(&<\n-0012efa0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012efb0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0012efc0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-0012efd0: 7374 6465 7272 293b 203c 2f64 6976 3e0a stderr);
.\n-0012efe0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
exit(EXIT_\n-0012f000: 4641 494c 5552 4529 3b20 3c2f 6469 763e FAILURE);
\n-0012f010: 0a3c 6469 7620 636c 6173 733d 226c 696e .
}
.\n-0012f040: 2020 3c73 7061 6e20 636c 6173 733d 226b whil\n-0012f060: 653c 2f73 7061 6e3e 2028 3129 3c2f 6469 e (1).
{
.<\n-0012f090: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012f0a0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n-0012f0c0: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (soap_s\n-0012f120: 6572 7665 3c2f 613e 2826 616d 703b 3c61 erve(&soap)) \n-0012f160: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<\n-0012f180: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012f190: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-0012f1a0: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga\n-0012f1b0: 3933 3161 3461 6236 6466 3235 3533 6234 931a4ab6df2553b4\n-0012f1c0: 3861 3063 3237 3066 3861 3061 3838 6166 8a0c270f8a0a88af\n-0012f1d0: 223e 736f 6170 5f70 7269 6e74 5f66 6175 \">soap_print_fau\n-0012f1e0: 6c74 3c2f 613e 2826 616d 703b 3c61 2063 lt(&soap, std\n-0012f220: 6572 7229 3b20 3c73 7061 6e20 636c 6173 err); // r\n-0012f240: 6570 6f72 7420 7468 6520 7072 6f62 6c65 eport the proble\n-0012f250: 6d20 3c2f 7370 616e 3e3c 2f64 6976 3e0a m
.\n-0012f260: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
soap_\n-0012f2d0: 6465 7374 726f 793c 2f61 3e28 2661 6d70 destroy(&\n-0012f2e0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-0012f310: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
.
\n-0012f330: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_end(&so\n-0012f3c0: 6170 3c2f 613e 293b 203c 2f64 6976 3e0a ap);
.\n-0012f3d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
}
. \n-0012f400: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_done<\n-0012f460: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-0012f490: 736f 6170 3c2f 613e 293b 203c 7370 616e soap); // close connec\n-0012f4c0: 7469 6f6e 203c 2f73 7061 6e3e 3c2f 6469 tion .
}
.\n-0012f500: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
..<\n-0012f6c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012f6d0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n-0012f6f0: 2f73 7061 6e3e 2028 736f 6170 5f77 7361 /span> (soap_wsa\n-0012f700: 5f63 6865 636b 283c 6120 636c 6173 733d _check(so\n-0012f730: 6170 3c2f 613e 2929 3c2f 6469 763e 0a3c ap))
.<\n-0012f740: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0012f750: 3e20 2020 203c 7370 616e 2063 6c61 7373 > r\n-0012f770: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn soap->\n-0012f7b0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;error<\n-0012f800: 2f61 3e3b 3c2f 6469 763e 0a3c 6469 7620 /a>;
.
<\n-0012f820: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0012f830: 656e 7422 3e2f 2f20 7368 6f75 6c64 2063 ent\">// should c\n-0012f840: 6865 636b 2066 6f72 2064 7570 6c69 6361 heck for duplica\n-0012f850: 7465 206d 6573 7361 6765 7320 2873 6f6d te messages (som\n-0012f860: 6574 6869 6e67 2074 6861 7420 5753 2d52 ething that WS-R\n-0012f870: 656c 6961 626c 654d 6573 7361 6769 6e67 eliableMessaging\n-0012f880: 2064 6f65 7320 746f 6f29 3c2f 7370 616e does too)
.
if \n-0012f8d0: 2863 6865 636b 5f72 6563 6569 7665 6428 (check_received(\n-0012f8e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n-0012f910: 2667 743b 3c61 2063 6c61 7373 3d22 636f >hea\n-0012f960: 6465 723c 2f61 3e2d 2667 743b 7773 615f der->wsa_\n-0012f970: 5f4d 6573 7361 6765 4944 2929 203c 2f64 _MessageID)) .
{
.\n-0012f9a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
// R\n-0012f9d0: 6571 7565 7374 206d 6573 7361 6765 2061 equest message a\n-0012f9e0: 6c72 6561 6479 2072 6563 6569 7665 6420 lready received \n-0012f9f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
.\n-0012fa10: 2020 2020 3c73 7061 6e20 636c 6173 733d re\n-0012fa30: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn \n-0012fa90: 534f 4150 5f53 544f 503c 2f61 3e3b 203c SOAP_STOP; <\n-0012faa0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0012fab0: 656e 7422 3e2f 2f20 646f 6e26 2333 393b ent\">// don'\n-0012fac0: 7420 7265 7475 726e 2072 6573 706f 6e73 t return respons\n-0012fad0: 6520 3c2f 7370 616e 3e3c 2f64 6976 3e0a e
.\n-0012fae0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
}
. \n-0012fb10: 202a 7265 7320 3d20 7374 723b 203c 2f64 *res = str; .
//\n-0012fb50: 2072 6574 7572 6e20 4f4b 2077 6974 6820 return OK with \n-0012fb60: 5753 2d41 6464 7265 7373 696e 6720 7265 WS-Addressing re\n-0012fb70: 706c 7920 6865 6164 6572 732c 206d 6573 ply headers, mes\n-0012fb80: 7361 6765 2049 4420 6973 2069 645f 636f sage ID is id_co\n-0012fb90: 756e 742b 313c 2f73 7061 6e3e 3c2f 6469 unt+1.
return s\n-0012fbe0: 6f61 705f 7773 615f 7265 706c 7928 3c61 oap_wsa_reply(soap, <\n-0012fc20: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012fc30: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-0012fc40: 705f 5f73 3273 2e68 746d 6c23 6761 3961 p__s2s.html#ga9a\n-0012fc50: 6664 6638 6465 3761 3833 3733 6631 3734 fdf8de7a8373f174\n-0012fc60: 3766 3431 6638 6533 6435 6565 3339 223e 7f41f8e3d5ee39\">\n-0012fc70: 736f 6170 5f69 6e74 3273 3c2f 613e 283c soap_int2s(<\n-0012fc80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0012fc90: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0012fca0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-0012fcb0: 6964 5f63 6f75 6e74 2b2b 292c 203c 7370 id_count++), "h\n-0012fce0: 7474 703a 2f2f 6765 6e69 7669 612e 636f ttp://genivia.co\n-0012fcf0: 6d2f 7564 702f 6563 686f 5374 7269 6e67 m/udp/echoString\n-0012fd00: 5265 7370 6f6e 7365 2671 756f 743b 3c2f Response");
.\n-0012fd30: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
.
.
i\n-0012fd80: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 7365 nt ns__se\n-0012fd90: 6e64 5374 7269 6e67 283c 7370 616e 2063 ndString(s\n-0012fdb0: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n-0012fe20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0012fe30: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *str) .
{
. \n-0012fe80: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_wsa_ch\n-0012feb0: 6563 6b28 3c61 2063 6c61 7373 3d22 636f eck(soap<\n-0012fee0: 2f61 3e29 293c 2f64 6976 3e0a 3c64 6976 /a>))
. \n-0012ff00: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n-0012ff20: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn soap->error\n-0012ffb0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
// should chec\n-0012fff0: 6b20 666f 7220 6475 706c 6963 6174 6520 k for duplicate \n-00130000: 6d65 7373 6167 6573 203c 2f73 7061 6e3e messages \n-00130010: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
if (\n-00130050: 6368 6563 6b5f 7265 6365 6976 6564 283c check_received(<\n-00130060: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00130070: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00130080: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-00130090: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;head\n-001300e0: 6572 3c2f 613e 2d26 6774 3b77 7361 5f5f er->wsa__\n-001300f0: 4d65 7373 6167 6549 4429 2920 3c2f 6469 MessageID)) .
{
.<\n-00130120: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00130130: 3e20 2020 203c 7370 616e 2063 6c61 7373 > // Re\n-00130150: 7175 6573 7420 6d65 7373 6167 6520 616c quest message al\n-00130160: 7265 6164 7920 7265 6365 6976 6564 203c ready received <\n-00130170: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
. \n-00130190: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret\n-001301b0: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn S\n-00130210: 4f41 505f 5354 4f50 3c2f 613e 3b3c 2f64 OAP_STOP;.
}
\n-00130240: 0a3c 6469 7620 636c 6173 733d 226c 696e .
r\n-00130270: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_OK;.
}
.<\n-00130300: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00130310: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
.
int \n-00130350: 6e73 5f5f 7365 6e64 5374 7269 6e67 5265 ns__sendStringRe\n-00130360: 7370 6f6e 7365 283c 7370 616e 2063 6c61 sponse(str\n-00130380: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, char *res)
.\n-00130420: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{
.
return SOAP_N\n-001304d0: 4f5f 4d45 5448 4f44 3c2f 613e 3b20 3c73 O_METHOD; // we don\n-00130500: 393b 7420 7365 7276 6520 7468 6973 206f 9;t serve this o\n-00130510: 7065 7261 7469 6f6e 3c2f 7370 616e 3e3c peration<\n-00130520: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
}
.\n-00130540: 3c64 6976 2063 6c61 7373 3d22 7474 6322
SOA\n-001305f0: 505f 494f 5f55 4450 3c2f 613e 3c2f 6469 P_IO_UDP
#define SO\n-00130620: 4150 5f49 4f5f 5544 503c 2f64 6976 3e3c AP_IO_UDP
<\n-00130630: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-00130640: 223e 736f 6170 5f6d 6f64 6520 494f 2069 \">soap_mode IO i\n-00130650: 6e70 7574 2f6f 7574 7075 7420 666c 6167 nput/output flag\n-00130660: 2076 616c 7565 2074 6f20 7573 6520 5544 value to use UD\n-00130670: 5020 6461 7461 6772 616d 732c 206d 6573 P datagrams, mes\n-00130680: 7361 6765 2073 697a 6520 6973 206c 696d sage size is lim\n-00130690: 6974 6564 2074 6f20 5544 5020 7061 636b ited to UDP pack\n-001306a0: 6574 2073 697a 653c 2f64 6976 3e3c 6469 et size
\n-001306c0: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:15\n-001306e0: 3936 3c2f 6469 763e 3c2f 6469 763e 0a3c 96
.<\n-001306f0: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-00130700: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n-00130710: 705f 5f73 3273 5f68 746d 6c5f 6761 3961 p__s2s_html_ga9a\n-00130720: 6664 6638 6465 3761 3833 3733 6631 3734 fdf8de7a8373f174\n-00130730: 3766 3431 6638 6533 6435 6565 3339 223e 7f41f8e3d5ee39\">\n-00130740: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 \n-001307c0: 636f 6e73 7420 6368 6172 202a 2073 6f61 const char * soa\n-001307d0: 705f 696e 7432 7328 7374 7275 6374 2073 p_int2s(struct s\n-001307e0: 6f61 7020 2a73 6f61 702c 2069 6e74 2076 oap *soap, int v\n-001307f0: 616c 7565 293c 2f64 6976 3e3c 6469 7620 alue)
Co\n-00130810: 6e76 6572 7420 6120 7369 676e 6564 2033 nvert a signed 3\n-00130820: 3220 6269 7420 696e 7465 6765 7220 746f 2 bit integer to\n-00130830: 2061 2064 6563 696d 616c 2073 7472 696e a decimal strin\n-00130840: 672e 3c2f 6469 763e 3c2f 6469 763e 0a3c g.
.<\n-00130850: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

The ser\n-00130870: 7665 7220 6269 6e64 7320 746f 2061 2068 ver binds to a h\n-00130880: 6f73 7420 616e 6420 706f 7274 2061 6e64 ost and port and\n-00130890: 2061 6363 6570 7473 206d 6573 7361 6765 accepts message\n-001308a0: 7320 696e 2061 206c 6f6f 702e 2042 6563 s in a loop. Bec\n-001308b0: 6175 7365 2055 4450 2064 6f65 7320 6e6f ause UDP does no\n-001308c0: 7420 6861 7665 2074 6865 2065 7175 6976 t have the equiv\n-001308d0: 616c 656e 7420 6f66 2061 6e20 6163 6365 alent of an acce\n-001308e0: 7074 2c20 7468 6520 6d65 7373 6167 6573 pt, the messages\n-001308f0: 2063 616e 6e6f 7420 6265 2064 6973 7061 cannot be dispa\n-00130900: 7463 6865 6420 746f 2074 6872 6561 6473 tched to threads\n-00130910: 2e20 496e 7374 6561 6420 7468 6520 3c63 . Instead the soap_serve waits f\n-001309b0: 6f72 2061 206d 6573 7361 6765 2061 6e64 or a message and\n-001309c0: 2069 6d6d 6564 6961 7465 6c79 2061 6363 immediately acc\n-001309d0: 6570 7473 2069 742e 2059 6f75 2063 616e epts it. You can\n-001309e0: 2075 7365 2061 2072 6563 6569 7665 2074 use a receive t\n-001309f0: 696d 656f 7574 2076 616c 7565 2066 6f72 imeout value for\n-00130a00: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::recv_tim\n-00130ac0: 656f 7574 3c2f 613e 3c2f 636f 6465 3e20 eout \n-00130ad0: 746f 206d 616b 6520 3c63 6f64 653e 3c61 to make soa\n-00130b50: 705f 7365 7276 653c 2f61 3e3c 2f63 6f64 p_serve non-blocking.\n-00130b70: 3c2f 703e 0a3c 703e 546f 206f 6274 6169

.

To obtai\n-00130b80: 6e20 7265 7370 6f6e 7365 206f 6e65 2d77 n response one-w\n-00130b90: 6179 206f 7065 7261 7469 6f6e 7320 6672 ay operations fr\n-00130ba0: 6f6d 2061 2057 5344 4c2c 2075 7365 203c om a WSDL, use <\n-00130bb0: 6120 6872 6566 3d22 2377 7364 6c32 682d a href=\"#wsdl2h-\n-00130bc0: 6222 3e3c 623e 3c63 6f64 653e 7773 646c b\">wsdl\n-00130bd0: 3268 202d 623c 2f63 6f64 653e 3c2f 623e 2h -b\n-00130be0: 206f 7074 696f 6e20 3c62 3e3c 636f 6465 option -b. This produce\n-00130c10: 7320 6164 6469 7469 6f6e 616c 206f 6e65 s additional one\n-00130c20: 2d77 6179 206f 7065 7261 7469 6f6e 7320 -way operations \n-00130c30: 746f 2073 7570 706f 7274 2061 7379 6e63 to support async\n-00130c40: 6872 6f6e 6f75 7320 6861 6e64 6c69 6e67 hronous handling\n-00130c50: 206f 6620 7265 7370 6f6e 7365 206d 6573 of response mes\n-00130c60: 7361 6765 7320 696e 2074 6865 2073 616d sages in the sam\n-00130c70: 6520 7761 7920 7265 7175 6573 7473 2061 e way requests a\n-00130c80: 7265 2068 616e 646c 6564 2e3c 2f70 3e0a re handled.

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

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

.

.SOAP-\n-00130d00: 6f76 6572 2d55 4450 206d 756c 7469 6361 over-UDP multica\n-00130d10: 7374 2072 6563 6569 7669 6e67 2073 6572 st receiving ser\n-00130d20: 7665 723c 2f68 333e 0a3c 703e 466f 7220 ver

.

For \n-00130d30: 5544 5020 6d75 6c74 6963 6173 7420 7375 UDP multicast su\n-00130d40: 7070 6f72 742c 2066 6f6c 6c6f 7720 7468 pport, follow th\n-00130d50: 6520 7375 6767 6573 7469 6f6e 7320 696e e suggestions in\n-00130d60: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section SOAP-over-U\n-00130da0: 4450 2073 6572 7665 723c 2f61 3e20 616e DP server an\n-00130db0: 6420 6368 616e 6765 2074 6865 2069 6e69 d change the ini\n-00130dc0: 7469 616c 697a 6174 696f 6e20 7061 7274 tialization part\n-00130dd0: 7320 6f66 2074 6865 2063 6f64 6520 746f s of the code to\n-00130de0: 2065 6e61 626c 6520 5544 5020 6d75 6c74 enable UDP mult\n-00130df0: 6963 6173 7420 706f 7274 2062 696e 6469 icast port bindi\n-00130e00: 6e67 2062 7920 746f 2074 656c 6c69 6e67 ng by to telling\n-00130e10: 2074 6865 206b 6572 6e65 6c20 7768 6963 the kernel whic\n-00130e20: 6820 6d75 6c74 6963 6173 7420 6772 6f75 h multicast grou\n-00130e30: 7073 2079 6f75 2061 7265 2069 6e74 6572 ps you are inter\n-00130e40: 6573 7465 6420 696e 3a3c 2f70 3e0a 3c64 ested in:

.
#include "\n-00130ea0: 706c 7567 696e 2f77 7361 6170 692e 6826 plugin/wsaapi.h&\n-00130eb0: 7175 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 quot;.
.<\n-00130ef0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00130f00: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int main() .
{
. \n-00130f50: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n-00130fa0: 2f61 3e20 3c61 2063 6c61 7373 3d22 636f /a> soap<\n-00130fd0: 2f61 3e3b 203c 2f64 6976 3e0a 3c64 6976 /a>;
. \n-00130ff0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct ip_mreq mcas\n-00131020: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
soap_init1(&so\n-001310d0: 6170 3c2f 613e 2c20 3c61 2063 6c61 7373 ap, SOAP_\n-00131130: 494f 5f55 4450 3c2f 613e 293b 203c 2f64 IO_UDP); .. \n-00131220: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (!soap_val\n-001312a0: 6964 5f73 6f63 6b65 743c 2f61 3e28 3c61 id_socket(so\n-00131300: 6170 5f62 696e 643c 2f61 3e28 2661 6d70 ap_bind(&\n-00131310: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-00131340: 2c20 686f 7374 2c20 706f 7274 2c20 4241 , host, port, BA\n-00131350: 434b 4c4f 4729 2929 203c 2f64 6976 3e0a CKLOG)))
.\n-00131360: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{
. \n-00131390: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_print_\n-001313f0: 6661 756c 743c 2f61 3e28 2661 6d70 3b3c fault(&<\n-00131400: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00131410: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00131420: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-00131430: 7374 6465 7272 293b 203c 2f64 6976 3e0a stderr);
.\n-00131440: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
exit(EXIT_\n-00131460: 4641 494c 5552 4529 3b20 3c2f 6469 763e FAILURE);
\n-00131470: 0a3c 6469 7620 636c 6173 733d 226c 696e .
}
.\n-001314a0: 2020 6d63 6173 742e 696d 725f 6d75 6c74 mcast.imr_mult\n-001314b0: 6961 6464 722e 735f 6164 6472 203d 2069 iaddr.s_addr = i\n-001314c0: 6e65 745f 6164 6472 2870 7574 2049 5020 net_addr(put IP \n-001314d0: 6d75 6c74 6963 6173 7420 6164 6472 6573 multicast addres\n-001314e0: 7320 6f66 2067 726f 7570 2068 6572 6529 s of group here)\n-001314f0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
mca\n-00131510: 7374 2e69 6d72 5f69 6e74 6572 6661 6365 st.imr_interface\n-00131520: 2e73 5f61 6464 7220 3d20 6874 6f6e 6c28 .s_addr = htonl(\n-00131530: 494e 4144 4452 5f41 4e59 293b 203c 2f64 INADDR_ANY); .
if (set\n-00131580: 736f 636b 6f70 7428 3c61 2063 6c61 7373 sockopt(s\n-001315b0: 6f61 703c 2f61 3e2e 3c61 2063 6c61 7373 oap.master, IPP\n-00131610: 524f 544f 5f49 502c 2049 505f 4144 445f ROTO_IP, IP_ADD_\n-00131620: 4d45 4d42 4552 5348 4950 2c20 2661 6d70 MEMBERSHIP, &\n-00131630: 3b6d 6361 7374 2c20 3c73 7061 6e20 636c ;mcast, si\n-00131650: 7a65 6f66 3c2f 7370 616e 3e28 6d63 6173 zeof(mcas\n-00131660: 7429 2926 6c74 3b30 2920 3c2f 6469 763e t))<0)
\n-00131670: 0a3c 6469 7620 636c 6173 733d 226c 696e .
... // error\n-001316b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
... <\n-001316d0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001316e0: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent\">//.. \n-001317c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_end(&so\n-00131850: 6170 3c2f 613e 293b 3c2f 6469 763e 0a3c ap);
.<\n-00131860: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00131870: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_don\n-001318d0: 653c 2f61 3e28 2661 6d70 3b3c 6120 636c e(&soap);.
}
.\n-001319f0: 534f 4150 5f53 4f43 4b45 5420 6d61 7374 SOAP_SOCKET mast\n-00131a00: 6572 3c2f 6469 763e 3c64 6976 2063 6c61 er
The s\n-00131a20: 6f63 6b65 7420 7365 7420 6279 2073 6f61 ocket set by soa\n-00131a30: 705f 6269 6e64 2028 6f72 2074 6865 2043 p_bind (or the C\n-00131a40: 2b2b 2073 6572 7669 6365 2063 6c61 7373 ++ service class\n-00131a50: 2062 696e 6420 6d65 7468 6f64 2920 746f bind method) to\n-00131a60: 2073 6572 7665 2061 7320 7468 6520 6d61 serve as the ma\n-00131a70: 7374 6572 2073 6f63 6b65 7420 626f 756e ster socket boun\n-00131a80: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
D\n-00131aa0: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-00131ab0: 7464 736f 6170 322e 683a 3330 3233 3c2f tdsoap2.h:3023
.

See a\n-00136460: 6c73 6f20 5365 6374 696f 6e20 3c61 2063 lso Section Transient \n-001364a0: 6461 7461 2074 7970 6573 3c2f 613e 202c data types ,\n-001364b0: 206e 6f6e 2d73 6572 6961 6c69 7a61 626c non-serializabl\n-001364c0: 6520 6461 7461 2074 7970 6573 2e3c 2f70 e data types..

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

.

.Ru\n-00136530: 6e2d 7469 6d65 2066 6c61 6773 3c2f 6831 n-time flags.

The gSOAP e\n-00136550: 6e67 696e 6520 7374 6174 6520 6973 2073 ngine state is s\n-00136560: 746f 7265 6420 696e 2074 6865 203c 636f tored in the s\n-001365c0: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c\n-001365d0: 6f6e 7465 7874 2074 6861 7420 6973 2069 ontext that is i\n-001365e0: 6e69 7469 616c 697a 6564 2061 6e64 2063 nitialized and c\n-001365f0: 6f6e 7472 6f6c 6c65 6420 6279 2076 6172 ontrolled by var\n-00136600: 696f 7573 206f 7074 696f 6e61 6c20 7275 ious optional ru\n-00136610: 6e74 696d 6520 666c 6167 732e 204d 6f73 ntime flags. Mos\n-00136620: 7420 666c 6167 7320 6172 6520 6170 706c t flags are appl\n-00136630: 6963 6162 6c65 2074 6f20 6569 7468 6572 icable to either\n-00136640: 2070 726f 6365 7373 696e 6720 696e 7075 processing inpu\n-00136650: 7420 6f72 2074 6f20 7072 6f63 6573 7369 t or to processi\n-00136660: 6e67 206f 7574 7075 742c 2062 7574 2073 ng output, but s\n-00136670: 6f6d 6520 6172 6520 6170 706c 6963 6162 ome are applicab\n-00136680: 6c65 2074 6f20 626f 7468 2069 6e70 7574 le to both input\n-00136690: 2061 6e64 206f 7574 7075 7420 6d65 7373 and output mess\n-001366a0: 6167 6520 616e 6420 646f 6375 6d65 6e74 age and document\n-001366b0: 2070 726f 6365 7373 696e 672e 3c2f 703e processing.

\n-001366c0: 0a3c 703e 4675 7274 6865 726d 6f72 652c .

Furthermore,\n-001366d0: 2074 6865 7365 2066 6c61 6773 2061 7265 these flags are\n-001366e0: 2064 6976 6964 6564 2069 6e74 6f20 666f divided into fo\n-001366f0: 7572 2063 6174 6567 6f72 6965 733a 2074 ur categories: t\n-00136700: 7261 6e73 706f 7274 2028 494f 292c 2063 ransport (IO), c\n-00136710: 6f6e 7465 6e74 2065 6e63 6f64 696e 6720 ontent encoding \n-00136720: 2845 4e43 292c 2058 4d4c 2070 6172 7369 (ENC), XML parsi\n-00136730: 6e67 2061 6e64 2067 656e 6572 6174 696f ng and generatio\n-00136740: 6e20 2858 4d4c 292c 2061 6e64 2043 2f43 n (XML), and C/C\n-00136750: 2b2b 2075 7361 6765 2028 4329 2e3c 2f70 ++ usage (C)..

The input-m\n-00136770: 6f64 6520 616e 6420 6f75 7470 7574 2d6d ode and output-m\n-00136780: 6f64 6520 666c 6167 7320 666f 7220 696e ode flags for in\n-00136790: 626f 756e 6420 2869 6e29 2061 6e64 206f bound (in) and o\n-001367a0: 7574 626f 756e 6420 286f 7574 2920 6d65 utbound (out) me\n-001367b0: 7373 6167 6520 7072 6f63 6573 7369 6e67 ssage processing\n-001367c0: 2061 7265 3a3c 2f70 3e0a 3c74 6162 6c65 are:

..

.\n-001368a0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....<\n-001369a0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-001369b0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-001369c0: 3e3c 636f 6465 3e23 534f 4150 5f49 4f5f >#SOAP_IO_\n-001369d0: 4255 4646 4552 3c2f 636f 6465 3e20 2020 BUFFER \n-001369e0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 ....\n-00136bf0: 3c74 6420 636c 6173 733d 226d 6172 6b64 e\n-00136c40: 6e61 626c 6520 4854 5450 2063 6875 6e6b nable HTTP chunk\n-00136c50: 696e 6720 2020 203c 2f74 643e 3c2f 7472 ing ..<\n-00136d80: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..\n-00136df0: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n-00136e20: 3c74 6420 636c 6173 733d 226d 6172 6b64 .<\n-00136e90: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-00136ea0: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n-00136eb0: 3c74 6420 636c 6173 733d 226d 6172 6b64 <\n-00136fa0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..i\n-00137030: 6e2b 6f75 7420 2020 3c2f 7464 3e3c 7464 n+out u\n-00137060: 7365 2070 6c61 696e 206d 6573 7361 6765 se plain message\n-00137070: 7320 7769 7468 6f75 7420 7061 7273 696e s without parsin\n-00137080: 6720 6f72 2065 6d69 7474 696e 6720 4854 g or emitting HT\n-00137090: 5450 2068 6561 6465 7273 2020 2020 3c2f TP headers ..\n-00137130: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 ..\n-001371d0: 3c63 6f64 653e 2353 4f41 505f 454e 435f #SOAP_ENC_\n-001371e0: 4449 4d45 3c2f 636f 6465 3e20 2020 3c2f DIME \n-00137220: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n-001372d0: 636f 6465 3e23 534f 4150 5f45 4e43 5f4d code>#SOAP_ENC_M\n-001372e0: 494d 453c 2f63 6f64 653e 2020 203c 2f74 IME <\n-00137320: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00137330: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00137340: 3e75 7365 204d 494d 4520 656e 636f 6469 >use MIME encodi\n-00137350: 6e67 2069 6e73 7465 6164 206f 6620 4449 ng instead of DI\n-00137360: 4d45 2c20 6163 7469 7661 7465 6420 7573 ME, activated us\n-00137370: 696e 6720 3c63 6f64 653e 3c61 2063 6c61 ing soap_\n-001373f0: 7365 745f 6d69 6d65 3c2f 613e 3c2f 636f set_mime ....\n-00137590: 6f75 7420 2020 3c2f 7464 3e3c 7464 2063 out ....<\n-001377e0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..\n-001378a0: 6f75 7470 7574 2063 616e 6f6e 6963 616c output canonical\n-001378b0: 2058 4d4c 2020 2020 3c2f 7464 3e3c 2f74 XML ..\n-00137950: 6f75 7420 2020 3c2f 7464 3e3c 7464 2063 out .<\n-001379d0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-001379e0: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n-001379f0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...\n-00137b70: 6170 706c 7920 7374 7269 6374 2076 616c apply strict val\n-00137b80: 6964 6174 696f 6e20 6f66 2058 4d4c 2069 idation of XML i\n-00137b90: 6e70 7574 2020 2020 3c2f 7464 3e3c 2f74 nput ....<\n-00137d80: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00137d90: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00137da0: 3e73 6572 6961 6c69 7a65 2061 7070 6c69 >serialize appli\n-00137db0: 6361 7469 6f6e 2064 6174 6120 6173 2061 cation data as a\n-00137dc0: 6e20 584d 4c20 6772 6170 6820 7769 7468 n XML graph with\n-00137dd0: 206d 756c 7469 2d72 6566 2069 642f 7265 multi-ref id/re\n-00137de0: 6620 6174 7472 6962 7574 6573 2020 2020 f attributes \n-00137df0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..<\n-00137e40: 636f 6465 3e23 534f 4150 5f58 4d4c 5f4e code>#SOAP_XML_N\n-00137e50: 494c 3c2f 636f 6465 3e20 2020 3c2f 7464 IL \n-00137eb0: 7365 7269 616c 697a 6520 4e55 4c4c 2064 serialize NULL d\n-00137ec0: 6174 6120 6173 2078 7369 3a6e 696c 2061 ata as xsi:nil a\n-00137ed0: 7474 7269 6275 7465 6420 656c 656d 656e ttributed elemen\n-00137ee0: 7473 2020 2020 3c2f 7464 3e3c 2f74 723e ts \n-00137ef0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....\n-00138070: 696e 2020 203c 2f74 643e 3c74 6420 636c in ...\n-001381f0: 3c74 7220 636c 6173 733d 226d 6172 6b64 .....

All fl\n-00138450: 6167 7320 6172 6520 696e 6465 7065 6e64 ags are independ\n-00138460: 656e 7420 616e 6420 6361 6e20 6265 2063 ent and can be c\n-00138470: 6f6d 6269 6e65 6420 7573 696e 6720 6120 ombined using a \n-00138480: 6269 7477 6973 6520 6f72 2028 3c63 6f64 bitwise or (|), exc\n-001384a0: 6570 7420 666f 7220 3c63 6f64 653e 2353 ept for #S\n-001384b0: 4f41 505f 494f 5f46 4c55 5348 3c2f 636f OAP_IO_FLUSH, #SOAP\n-001384d0: 5f49 4f5f 4255 4646 4552 3c2f 636f 6465 _IO_BUFFER, #SOAP_I\n-001384f0: 4f5f 5354 4f52 453c 2f63 6f64 653e 2c20 O_STORE, \n-00138500: 616e 6420 3c63 6f64 653e 2353 4f41 505f and #SOAP_\n-00138510: 494f 5f43 4855 4e4b 3c2f 636f 6465 3e20 IO_CHUNK \n-00138520: 7768 6963 6820 6172 6520 656e 756d 6572 which are enumer\n-00138530: 6174 696f 6e73 2061 6e64 206f 6e6c 7920 ations and only \n-00138540: 6f6e 6520 6f66 2074 6865 7365 2049 2f4f one of these I/O\n-00138550: 2066 6c61 6773 2063 616e 2062 6520 7573 flags can be us\n-00138560: 6564 2e20 416c 736f 2074 6865 2058 4d4c ed. Also the XML\n-00138570: 2073 6572 6961 6c69 7a61 7469 6f6e 2066 serialization f\n-00138580: 6c61 6773 203c 636f 6465 3e23 534f 4150 lags #SOAP\n-00138590: 5f58 4d4c 5f54 5245 453c 2f63 6f64 653e _XML_TREE\n-001385a0: 2061 6e64 203c 636f 6465 3e23 534f 4150 and #SOAP\n-001385b0: 5f58 4d4c 5f47 5241 5048 3c2f 636f 6465 _XML_GRAPH should not be \n-001385d0: 6d69 7865 642e 3c2f 703e 0a3c 703e 546f mixed.

.

To\n-001385e0: 2061 6c6c 6f63 6174 6520 616e 6420 696e allocate and in\n-001385f0: 6974 6961 6c69 7a65 2061 203c 636f 6465 itialize a soa\n-00138650: 703c 2f61 3e3c 2f63 6f64 653e 2063 6f6e p con\n-00138660: 7465 7874 2077 6974 6820 696e 7075 7420 text with input \n-00138670: 616e 6420 6f75 7470 7574 206d 6f64 6520 and output mode \n-00138680: 666c 6167 733a 3c2f 703e 0a3c 6469 7620 flags:

..\n-00138af0: 7374 7275 6374 2073 6f61 7020 2a20 736f struct soap * so\n-00138b00: 6170 5f6e 6577 3228 736f 6170 5f6d 6f64 ap_new2(soap_mod\n-00138b10: 6520 696e 7075 745f 6d6f 6465 2c20 736f e input_mode, so\n-00138b20: 6170 5f6d 6f64 6520 6f75 7470 7574 5f6d ap_mode output_m\n-00138b30: 6f64 6529 3c2f 6469 763e 3c64 6976 2063 ode)
All\n-00138b50: 6f63 6174 6520 616e 6420 696e 6974 6961 ocate and initia\n-00138b60: 6c69 7a65 2061 206e 6577 2073 6f61 7020 lize a new soap \n-00138b70: 636f 6e74 6578 7420 7769 7468 2073 6570 context with sep\n-00138b80: 6172 6174 6520 696e 7075 7420 616e 6420 arate input and \n-00138b90: 6f75 7470 7574 2073 6f61 705f 6d6f 6465 output soap_mode\n-00138ba0: 2066 6c61 6773 2e3c 2f64 6976 3e3c 2f64 flags.
.

To\n-00138bd0: 2069 6e69 7469 616c 697a 6520 6120 7374 initialize a st\n-00138be0: 6163 6b2d 616c 6c6f 6361 7465 6420 3c63 ack-allocated \n-00138c40: 736f 6170 3c2f 613e 3c2f 636f 6465 3e20 soap \n-00138c50: 636f 6e74 6578 7420 7769 7468 2069 6e70 context with inp\n-00138c60: 7574 2061 6e64 206f 7574 7075 7420 6d6f ut and output mo\n-00138c70: 6465 2066 6c61 6773 3a3c 2f70 3e0a 3c64 de flags:

.
\n-00138cc0: 766f 6964 3c2f 7370 616e 3e20 3c61 2063 void soap_init1(\n-00138d30: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n-00138d80: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n-00138db0: 3c2f 613e 2c20 3c61 2063 6c61 7373 3d22 , soap_mo\n-00138e10: 6465 3c2f 613e 2069 6f6d 6f64 6529 3b3c de iomode);<\n-00138e20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..void soap_init\n-001391a0: 3228 7374 7275 6374 2073 6f61 7020 2a73 2(struct soap *s\n-001391b0: 6f61 702c 2073 6f61 705f 6d6f 6465 2069 oap, soap_mode i\n-001391c0: 6e70 7574 5f6d 6f64 652c 2073 6f61 705f nput_mode, soap_\n-001391d0: 6d6f 6465 206f 7574 7075 745f 6d6f 6465 mode output_mode\n-001391e0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
Initia\n-00139200: 6c69 7a65 2061 2073 7461 636b 2d61 6c6c lize a stack-all\n-00139210: 6f63 6174 6564 2073 6f61 7020 636f 6e74 ocated soap cont\n-00139220: 6578 7420 7769 7468 2069 6e70 7574 2061 ext with input a\n-00139230: 6e64 206f 7574 7075 7420 736f 6170 5f6d nd output soap_m\n-00139240: 6f64 6520 666c 6167 732e 3c2f 6469 763e ode flags.
\n-00139250: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d .To set and clea\n-00139280: 7220 6d6f 6465 2066 6c61 6773 2075 7365 r mode flags use\n-00139290: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
void soap_se\n-00139340: 745f 6d6f 6465 3c2f 613e 283c 7370 616e t_mode(struct <\n-00139370: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00139380: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00139390: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-001393a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001393d0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_mode iomode); // set input an\n-00139460: 6420 6f75 7470 7574 206d 6f64 6520 666c d output mode fl\n-00139470: 6167 733c 2f73 7061 6e3e 3c2f 6469 763e ags
\n-00139480: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
void \n-001396d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_set_om\n-00139730: 6f64 653c 2f61 3e28 3c73 7061 6e20 636c ode(st\n-00139750: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, soap_mode <\n-00139820: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00139830: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00139840: 6874 6d6c 2361 3066 3763 6662 3464 6433 html#a0f7cfb4dd3\n-00139850: 3261 3762 6531 6563 3633 6132 3066 3535 2a7be1ec63a20f55\n-00139860: 6531 3235 3231 223e 6f6d 6f64 653c 2f61 e12521\">omode); // set\n-00139890: 206f 7574 7075 7420 6d6f 6465 2066 6c61 output mode fla\n-001398a0: 6773 3c2f 7370 616e 3e3c 2f64 6976 3e0a gs
.\n-001398b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
void\n-001398e0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 soa\n-00139940: 705f 636c 725f 6d6f 6465 3c2f 613e 283c p_clr_mode(<\n-00139950: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00139960: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n-001399d0: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, soap_mod\n-00139a30: 653c 2f61 3e20 696f 6d6f 6465 293b 203c e iomode); <\n-00139a40: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00139a50: 656e 7422 3e2f 2f20 636c 6561 7220 696e ent\">// clear in\n-00139a60: 7075 7420 616e 6420 6f75 7470 7574 206d put and output m\n-00139a70: 6f64 6520 666c 6167 733c 2f73 7061 6e3e ode flags\n-00139a80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
void <\n-00139ac0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00139ad0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00139ae0: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n-00139af0: 6761 3065 3738 3962 6436 6332 6637 3636 ga0e789bd6c2f766\n-00139b00: 3039 6165 6330 6339 6639 3364 3132 3165 09aec0c9f93d121e\n-00139b10: 3463 223e 736f 6170 5f63 6c72 5f69 6d6f 4c\">soap_clr_imo\n-00139b20: 6465 3c2f 613e 283c 7370 616e 2063 6c61 de(str\n-00139b40: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, \n-00139c00: 736f 6170 5f6d 6f64 653c 2f61 3e20 3c61 soap_mode imode\n-00139c60: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // clea\n-00139c80: 7220 696e 7075 7420 6d6f 6465 2066 6c61 r input mode fla\n-00139c90: 6773 3c2f 7370 616e 3e3c 2f64 6976 3e0a gs
.\n-00139ca0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
<\n-00139f10: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-00139f20: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soap_\n-00139f70: 636c 725f 6d6f 6465 3c2f 613e 3c2f 6469 clr_mode
void soap_\n-00139fa0: 636c 725f 6d6f 6465 2873 7472 7563 7420 clr_mode(struct \n-00139fb0: 736f 6170 202a 736f 6170 2c20 736f 6170 soap *soap, soap\n-00139fc0: 5f6d 6f64 6520 696e 7075 745f 616e 645f _mode input_and_\n-00139fd0: 6f75 7470 7574 5f6d 6f64 6529 3c2f 6469 output_mode)
Clear input\n-0013a000: 2061 6e64 206f 7574 7075 7420 736f 6170 and output soap\n-0013a010: 5f6d 6f64 6520 666c 6167 7320 6f66 2074 _mode flags of t\n-0013a020: 6865 2067 6976 656e 2073 6f61 7020 636f he given soap co\n-0013a030: 6e74 6578 742e 3c2f 6469 763e 3c2f 6469 ntext.
.
\n-0013a120: 766f 6964 2073 6f61 705f 636c 725f 696d void soap_clr_im\n-0013a130: 6f64 6528 7374 7275 6374 2073 6f61 7020 ode(struct soap \n-0013a140: 2a73 6f61 702c 2073 6f61 705f 6d6f 6465 *soap, soap_mode\n-0013a150: 2069 6e70 7574 5f6d 6f64 6529 3c2f 6469 input_mode)
Clear input\n-0013a180: 2073 6f61 705f 6d6f 6465 2066 6c61 6773 soap_mode flags\n-0013a190: 206f 6620 7468 6520 6769 7665 6e20 736f of the given so\n-0013a1a0: 6170 2063 6f6e 7465 7874 2e3c 2f64 6976 ap context.
.
soap_cl\n-0013a270: 725f 6f6d 6f64 653c 2f61 3e3c 2f64 6976 r_omode
void soap_c\n-0013a2a0: 6c72 5f6f 6d6f 6465 2873 7472 7563 7420 lr_omode(struct \n-0013a2b0: 736f 6170 202a 736f 6170 2c20 736f 6170 soap *soap, soap\n-0013a2c0: 5f6d 6f64 6520 6f75 7470 7574 5f6d 6f64 _mode output_mod\n-0013a2d0: 6529 3c2f 6469 763e 3c64 6976 2063 6c61 e)
Clear\n-0013a2f0: 206f 7574 7075 7420 736f 6170 5f6d 6f64 output soap_mod\n-0013a300: 6520 666c 6167 7320 6f66 2074 6865 2067 e flags of the g\n-0013a310: 6976 656e 2073 6f61 7020 636f 6e74 6578 iven soap contex\n-0013a320: 742e 3c2f 6469 763e 3c2f 6469 763e 0a3c t.
.<\n-0013a330: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-0013a340: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n-0013a350: 705f 5f63 6f6e 7465 7874 5f68 746d 6c5f p__context_html_\n-0013a360: 6761 6139 6230 3831 3964 6165 3834 3462 gaa9b0819dae844b\n-0013a370: 3834 3862 6364 3861 3335 3938 6133 3031 848bcd8a3598a301\n-0013a380: 6161 223e 3c64 6976 2063 6c61 7373 3d22 aa\">Set input soap_\n-0013a470: 6d6f 6465 2066 6c61 6773 206f 6620 7468 mode flags of th\n-0013a480: 6520 6769 7665 6e20 736f 6170 2063 6f6e e given soap con\n-0013a490: 7465 7874 2e3c 2f64 6976 3e3c 2f64 6976 text.
.
v\n-0013a580: 6f69 6420 736f 6170 5f73 6574 5f6f 6d6f oid soap_set_omo\n-0013a590: 6465 2873 7472 7563 7420 736f 6170 202a de(struct soap *\n-0013a5a0: 736f 6170 2c20 736f 6170 5f6d 6f64 6520 soap, soap_mode \n-0013a5b0: 6f75 7470 7574 5f6d 6f64 6529 3c2f 6469 output_mode)
Set output \n-0013a5e0: 736f 6170 5f6d 6f64 6520 666c 6167 7320 soap_mode flags \n-0013a5f0: 6f66 2074 6865 2067 6976 656e 2073 6f61 of the given soa\n-0013a600: 7020 636f 6e74 6578 742e 3c2f 6469 763e p context.
\n-0013a610: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.
Note<\n-0013a650: 2f64 743e 3c64 643e 5468 6520 3c63 6f64 /dt>
The #SOAP_XML_TREE\n-0013a670: 3c2f 636f 6465 3e20 6d6f 6465 2066 6c61 mode fla\n-0013a680: 6720 6361 6e20 6265 2075 7365 6420 746f g can be used to\n-0013a690: 2069 6d70 726f 7665 2069 6e74 6572 6f70 improve interop\n-0013a6a0: 6572 6162 696c 6974 7920 7769 7468 2053 erability with S\n-0013a6b0: 4f41 5020 696d 706c 656d 656e 7461 7469 OAP implementati\n-0013a6c0: 6f6e 7320 7468 6174 2061 7265 206e 6f74 ons that are not\n-0013a6d0: 2066 756c 6c79 2053 4f41 5020 312e 312f fully SOAP 1.1/\n-0013a6e0: 312e 3220 5250 4320 656e 636f 6469 6e67 1.2 RPC encoding\n-0013a6f0: 2063 6f6d 706c 6961 6e74 2077 6974 6820 compliant with \n-0013a700: 7265 7370 6563 7420 746f 2070 726f 6365 respect to proce\n-0013a710: 7373 696e 6720 6964 2d68 7265 662f 7265 ssing id-href/re\n-0013a720: 6620 6174 7472 6962 7574 6573 2e20 486f f attributes. Ho\n-0013a730: 7765 7665 722c 2074 7265 6520 7365 7269 wever, tree seri\n-0013a740: 616c 697a 6174 696f 6e20 7769 6c6c 2064 alization will d\n-0013a750: 7570 6c69 6361 7465 2064 6174 6120 7768 uplicate data wh\n-0013a760: 656e 2074 6869 7320 6461 7461 2069 7320 en this data is \n-0013a770: 636f 2d72 6566 6572 656e 6365 642e 2043 co-referenced. C\n-0013a780: 7963 6c65 7320 6172 6520 6465 7465 6374 ycles are detect\n-0013a790: 6564 2061 6e64 2062 726f 6b65 6e20 746f ed and broken to\n-0013a7a0: 2061 766f 6964 2069 6e66 696e 6974 6520 avoid infinite \n-0013a7b0: 7365 7269 616c 697a 6174 696f 6e2e 3c2f serialization..

In a\n-0013a7d0: 6464 6974 696f 6e20 746f 2074 6865 2063 ddition to the c\n-0013a7e0: 6f6e 7465 7874 206d 6f64 6520 666c 6167 ontext mode flag\n-0013a7f0: 732c 2074 6865 2066 6f6c 6c6f 7769 6e67 s, the following\n-0013a800: 2063 6f6e 7465 7874 2066 6c61 6773 2063 context flags c\n-0013a810: 616e 2062 6520 7573 6564 2074 6f20 7365 an be used to se\n-0013a820: 7420 3c63 6f64 653e 7365 7473 6f63 6b6f t setsocko\n-0013a830: 7074 3c2f 636f 6465 3e20 6c65 7665 6c20 pt level \n-0013a840: 3c63 6f64 653e 534f 4c5f 534f 434b 4554 SOL_SOCKET\n-0013a850: 3c2f 636f 6465 3e20 6f70 7469 6f6e 7320 options \n-0013a860: 7768 656e 2073 6f63 6b65 7473 2061 7265 when sockets are\n-0013a870: 2063 7265 6174 6564 2c20 7468 6f75 6768 created, though\n-0013a880: 2073 6f6d 6520 6f70 7469 6f6e 7320 6d61 some options ma\n-0013a890: 7920 6e6f 7420 6265 2061 7070 6c69 6361 y not be applica\n-0013a8a0: 626c 6520 746f 2079 6f75 7220 6f70 6572 ble to your oper\n-0013a8b0: 6174 696e 6720 7379 7374 656d 3a3c 2f70 ating system:.

1\n+000f2960: 2020 203c 2f74 643e 3c74 6420 636c 6173 1 <\n+000f2990: 3d20 7820 2020 203c 2f74 643e 3c2f 7472 = x
1 :<\n+000f29f0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
: 10 <\n+000f2a90: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>x <= 10\n+000f2ac0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
1 : 10<\n+000f2b20: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
1 <\n+000f2bc0: 203a 2026 6c74 3b20 3130 3c2f 636f 6465 : < 10 1 <\n+000f2c00: 3b20 7820 266c 743b 2031 3020 2020 203c ; x < 10 <\n+000f2c10: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
1 < 10 1 \n+000f2ca0: 266c 743b 2078 2026 6c74 3b20 3130 2020 < x < 10 \n+000f2cb0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
1 <= x <\n+000f2d50: 2031 3020 2020 203c 2f74 643e 3c2f 7472 10
: &l\n+000f2db0: 743b 2031 303c 2f63 6f64 653e 2020 203c t; 10 <\n+000f2dc0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>x < 10 \n+000f2df0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
1 < :\n+000f2ef0: 2020 203c 2f74 643e 3c74 6420 636c 6173 1 <\n+000f2f20: 2078 2020 2020 3c2f 7464 3e3c 2f74 723e x
1 <\n+000f2f80: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
1 < : 10 1 \n+000f3050: 266c 743b 2078 2026 6c74 3b3d 2031 3020 < x <= 10 \n+000f3060: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 2f74
mode fl\n-00136830: 6167 2020 203c 2f74 683e 3c74 6820 636c ag in/o\n-00136860: 7574 2020 203c 2f74 683e 3c74 6820 636c ut resu\n-00136890: 6c74 2020 2020 3c2f 7468 3e3c 2f74 723e lt
#SOAP_\n-001368f0: 494f 5f46 4c55 5348 3c2f 636f 6465 3e20 IO_FLUSH \n-00136900: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 out <\n-00136930: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>flush outp\n-00136960: 7574 2069 6d6d 6564 6961 7465 6c79 2020 ut immediately \n-00136970: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
out enable outpu\n-00136a40: 7420 6275 6666 6572 696e 672c 2074 6865 t buffering, the\n-00136a50: 2064 6566 6175 6c74 206d 6f64 6520 666f default mode fo\n-00136a60: 7220 736f 636b 6574 2063 6f6e 6e65 6374 r socket connect\n-00136a70: 696f 6e73 2020 2020 3c2f 7464 3e3c 2f74 ions
#SOA\n-00136ad0: 505f 494f 5f53 544f 5245 3c2f 636f 6465 P_IO_STORE out \n-00136b10: 203c 2f74 643e 3c74 6420 636c 6173 733d store th\n-00136b40: 6520 656e 7469 7265 206f 7574 626f 756e e entire outboun\n-00136b50: 6420 6d65 7373 6167 6520 746f 2063 616c d message to cal\n-00136b60: 6375 6c61 7465 2048 5454 5020 636f 6e74 culate HTTP cont\n-00136b70: 656e 7420 6c65 6e67 7468 2020 2020 3c2f ent length
#SOAP_IO_CHUN\n-00136be0: 4b3c 2f63 6f64 653e 2020 203c 2f74 643e K out
#SOAP\n-00136cb0: 5f49 4f5f 4c45 4e47 5448 3c2f 636f 6465 _IO_LENGTH out \n-00136cf0: 203c 2f74 643e 3c74 6420 636c 6173 733d used wit\n-00136d20: 6820 7477 6f2d 7068 6173 6520 7365 7269 h two-phase seri\n-00136d30: 616c 697a 6174 696f 6e2c 2066 6972 7374 alization, first\n-00136d40: 2070 6861 7365 2077 6974 6820 7468 6973 phase with this\n-00136d50: 2066 6c61 6720 746f 2063 616c 6375 6c61 flag to calcula\n-00136d60: 7465 2048 5454 5020 636f 6e74 656e 7420 te HTTP content \n-00136d70: 6c65 6e67 7468 2020 2020 3c2f 7464 3e3c length
#\n-00136dd0: 534f 4150 5f49 4f5f 4b45 4550 414c 4956 SOAP_IO_KEEPALIV\n-00136de0: 453c 2f63 6f64 653e 2020 203c 2f74 643e E in+out keep socket co\n-00136e50: 6e6e 6563 7469 6f6e 7320 616c 6976 652c nnections alive,\n-00136e60: 2077 6865 6e20 7375 7070 6f72 7465 6420 when supported \n-00136e70: 6279 2074 6865 2048 5454 5020 7065 6572 by the HTTP peer\n-00136e80: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
#SOAP_IO\n-00136ee0: 5f55 4450 3c2f 636f 6465 3e20 2020 3c2f _UDP in+out use UDP (da\n-00136f50: 7461 6772 616d 2920 7472 616e 7370 6f72 tagram) transpor\n-00136f60: 742c 206d 6178 696d 756d 206d 6573 7361 t, maximum messa\n-00136f70: 6765 206c 656e 6774 6820 6973 203c 636f ge length is #SOAP_BUFLEN<\n-00136f90: 2f63 6f64 653e 2020 2020 3c2f 7464 3e3c /code>
#\n-00136ff0: 534f 4150 5f45 4e43 5f50 4c41 494e 3c2f SOAP_ENC_PLAIN
#SOAP_ENC_XML<\n-00137100: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> alias for\n-00137160: 203c 636f 6465 3e23 534f 4150 5f45 4e43 #SOAP_ENC\n-00137170: 5f50 4c41 494e 3c2f 636f 6465 3e20 2020 _PLAIN \n-00137180: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
out use DIME encod\n-00137250: 696e 672c 2061 7574 6f6d 6174 6963 2077 ing, automatic w\n-00137260: 6865 6e20 4449 4d45 2061 7474 6163 686d hen DIME attachm\n-00137270: 656e 7473 2061 7265 2075 7365 6420 2020 ents are used \n-00137280: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
out
#SOA\n-00137460: 505f 454e 435f 4d54 4f4d 3c2f 636f 6465 P_ENC_MTOM out \n-001374a0: 203c 2f74 643e 3c74 6420 636c 6173 733d use MTOM\n-001374d0: 2058 4f50 2061 7474 6163 686d 656e 7473 XOP attachments\n-001374e0: 2069 6e73 7465 6164 206f 6620 4449 4d45 instead of DIME\n-001374f0: 2061 6e64 204d 494d 4520 2020 203c 2f74 and MIME
#SOAP_ENC_ZLIB<\n-00137560: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> com\n-001375c0: 7072 6573 7320 6f75 7470 7574 2077 6974 press output wit\n-001375d0: 6820 5a6c 6962 2c20 7573 696e 6720 6465 h Zlib, using de\n-001375e0: 666c 6174 6520 6f72 2067 7a69 7020 666f flate or gzip fo\n-001375f0: 726d 6174 2020 2020 3c2f 7464 3e3c 2f74 rmat
#SO\n-00137650: 4150 5f45 4e43 5f53 534c 3c2f 636f 6465 AP_ENC_SSL in+ou\n-00137690: 7420 2020 3c2f 7464 3e3c 7464 2063 6c61 t use S\n-001376c0: 534c 2f54 4c53 2c20 6175 746f 6d61 7469 SL/TLS, automati\n-001376d0: 6320 7768 656e 2063 6f6e 6e65 6374 696e c when connectin\n-001376e0: 6720 2268 7474 7073 3a22 2065 6e64 706f g \"https:\" endpo\n-001376f0: 696e 7473 2020 2020 3c2f 7464 3e3c 2f74 ints
#SOA\n-00137750: 505f 584d 4c5f 494e 4445 4e54 3c2f 636f P_XML_INDENT out\n-00137790: 2020 203c 2f74 643e 3c74 6420 636c 6173 output\n-001377c0: 2069 6e64 656e 7465 6420 584d 4c20 616e indented XML an\n-001377d0: 6420 4a53 4f4e 2020 2020 3c2f 7464 3e3c d JSON
#\n-00137830: 534f 4150 5f58 4d4c 5f43 414e 4f4e 4943 SOAP_XML_CANONIC\n-00137840: 414c 3c2f 636f 6465 3e20 2020 3c2f 7464 AL out
#SOA\n-00137910: 505f 584d 4c5f 4445 4641 554c 544e 533c P_XML_DEFAULTNS<\n-00137920: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> out\n-00137980: 7075 7420 584d 4c20 7769 7468 2064 6566 put XML with def\n-00137990: 6175 6c74 206e 616d 6573 7061 6365 2062 ault namespace b\n-001379a0: 696e 6469 6e67 7320 3c63 6f64 653e 786d indings xm\n-001379b0: 6c6e 733d 222e 2e2e 223c 2f63 6f64 653e lns=\"...\"\n-001379c0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
#SOAP_X\n-00137a20: 4d4c 5f49 474e 4f52 454e 533c 2f63 6f64 ML_IGNORENS in \n-00137a60: 203c 2f74 643e 3c74 6420 636c 6173 733d ignores \n-00137a90: 584d 4c20 6e61 6d65 7370 6163 6573 2069 XML namespaces i\n-00137aa0: 6e20 584d 4c20 696e 7075 7420 2020 203c n XML input <\n-00137ab0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
#SOAP_XML_STR\n-00137b10: 4943 543c 2f63 6f64 653e 2020 203c 2f74 ICT in
#SO\n-00137bf0: 4150 5f58 4d4c 5f54 5245 453c 2f63 6f64 AP_XML_TREE in+o\n-00137c30: 7574 2020 203c 2f74 643e 3c74 6420 636c ut out:\n-00137c60: 2073 6572 6961 6c69 7a65 2064 6174 6120 serialize data \n-00137c70: 6173 2058 4d4c 2074 7265 6573 2028 6e6f as XML trees (no\n-00137c80: 206d 756c 7469 2d72 6566 2c20 6475 706c multi-ref, dupl\n-00137c90: 6963 6174 6520 6461 7461 2077 6865 6e20 icate data when \n-00137ca0: 6e65 6365 7373 6172 7929 3b20 696e 3a20 necessary); in: \n-00137cb0: 6967 6e6f 7265 2069 6420 6174 7472 6962 ignore id attrib\n-00137cc0: 7574 6573 2028 646f 206e 6f74 2072 6573 utes (do not res\n-00137cd0: 6f6c 7665 2069 642d 7265 6629 2020 2020 olve id-ref) \n-00137ce0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
#SOAP_XML_GR\n-00137d40: 4150 483c 2f63 6f64 653e 2020 203c 2f74 APH out
out
#SOAP_\n-00137f40: 584d 4c5f 4e4f 5459 5045 3c2f 636f 6465 XML_NOTYPE out \n-00137f80: 203c 2f74 643e 3c74 6420 636c 6173 733d disable \n-00137fb0: 3c65 6d3e 3c63 6f64 653e 7873 693a 7479 xsi:ty\n-00137fc0: 7065 3c2f 636f 6465 3e3c 2f65 6d3e 2061 pe a\n-00137fd0: 7474 7269 6275 7465 7320 2020 203c 2f74 ttributes
#SOAP_C_NOIOB<\n-00138040: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> do n\n-001380a0: 6f74 2066 6175 6c74 2077 6974 6820 3c63 ot fault with #SOAP_IOB
#SOA\n-00138120: 505f 435f 5554 4653 5452 494e 473c 2f63 P_C_UTFSTRING in\n-00138160: 2b6f 7574 2020 203c 2f74 643e 3c74 6420 +out se\n-00138190: 7269 616c 697a 6520 382d 6269 7420 6368 rialize 8-bit ch\n-001381a0: 6172 6163 7465 7220 7374 7269 6e67 7320 aracter strings \n-001381b0: 2261 7320 6973 222c 206d 6561 6e69 6e67 \"as is\", meaning\n-001381c0: 2038 2d62 6974 2073 7472 696e 6773 2068 8-bit strings h\n-001381d0: 6176 6520 5554 462d 3820 636f 6e74 656e ave UTF-8 conten\n-001381e0: 7420 2020 203c 2f74 643e 3c2f 7472 3e0a t
#SOAP_\n-00138240: 435f 4d42 5354 5249 4e47 3c2f 636f 6465 C_MBSTRING in+ou\n-00138280: 7420 2020 3c2f 7464 3e3c 7464 2063 6c61 t enabl\n-001382b0: 6520 6d75 6c74 6962 7974 6520 6368 6172 e multibyte char\n-001382c0: 6163 7465 7220 7375 7070 6f72 7420 666f acter support fo\n-001382d0: 7220 382d 6269 7420 6368 6172 6163 7465 r 8-bit characte\n-001382e0: 7220 7374 7269 6e67 7320 7769 7468 203c r strings with <\n-001382f0: 636f 6465 3e77 6374 6f6d 623c 2f63 6f64 code>wctomb and mbt\n-00138310: 6f77 633c 2f63 6f64 653e 2075 7369 6e67 owc using\n-00138320: 2074 6865 2063 7572 7265 6e74 206c 6f63 the current loc\n-00138330: 616c 6520 2020 203c 2f74 643e 3c2f 7472 ale
#SOAP\n-00138390: 5f43 5f4e 494c 5354 5249 4e47 3c2f 636f _C_NILSTRING out\n-001383d0: 2020 203c 2f74 643e 3c74 6420 636c 6173 serial\n-00138400: 697a 6520 656d 7074 7920 7374 7269 6e67 ize empty string\n-00138410: 7320 6173 2078 7369 3a6e 696c 2061 7474 s as xsi:nil att\n-00138420: 7269 6275 7465 6420 656c 656d 656e 7473 ributed elements\n-00138430: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c2f
.\n-0013a8e0: 3c74 7220 636c 6173 733d 226d 6172 6b64 .<\n-0013a900: 7468 2063 6c61 7373 3d22 6d61 726b 646f th class=\"markdo\n-0013a910: 776e 5461 626c 6548 6561 644e 6f6e 6522 wnTableHeadNone\"\n-0013a920: 3e63 6f6e 7465 7874 2066 6c61 6720 7769 >context flag wi\n-0013a930: 7468 2073 6574 736f 636b 6f70 7420 6f70 th setsockopt op\n-0013a940: 7469 6f6e 2020 203c 2f74 683e 3c74 6820 tion ....\n-0013acc0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..<\n-0013ae80: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>....<\n-0013b120: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0013b130: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0013b140: 3e3c 636f 6465 3e3c 6120 636c 6173 733d >s\n-0013b200: 6f61 703a 3a63 6f6e 6e65 6374 5f66 6c61 oap::connect_fla\n-0013b210: 6773 3c2f 613e 3c2f 636f 6465 3e20 3d20 gs = \n-0013b220: 3c63 6f64 653e 534f 5f44 4f4e 5452 4f55 SO_DONTROU\n-0013b230: 5445 3c2f 636f 6465 3e20 2020 3c2f 7464 TE ..\n-0013b2c0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n-0013b600: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>....\n-0013b8c0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n-0013b980: 6170 3a3a 6163 6365 7074 5f66 6c61 6773 ap::accept_flags\n-0013b990: 3c2f 613e 3c2f 636f 6465 3e20 3d20 3c63 = SO_DONTROUTE\n-0013b9b0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n-0013b9c0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0013b9d0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0013b9e0: 3e65 6e61 626c 6573 2072 6f75 7469 6e67 >enables routing\n-0013b9f0: 2062 7970 6173 7320 666f 7220 6f75 7467 bypass for outg\n-0013ba00: 6f69 6e67 206d 6573 7361 6765 7320 2020 oing messages \n-0013ba10: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..\n-0013ba60: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n-0013bb20: 6170 3a3a 6269 6e64 5f66 6c61 6773 3c2f ap::bind_flags = SO_REUSEADDR e\n-0013bb80: 6e61 626c 6573 206c 6f63 616c 2061 6464 nables local add\n-0013bb90: 7265 7373 2072 6575 7365 2069 6d6d 6564 ress reuse immed\n-0013bba0: 6961 7465 6c79 2c20 7573 6520 7769 7468 iately, use with\n-0013bbb0: 2063 6175 7469 6f6e 2020 2020 3c2f 7464 caution ...
re\n-0013a970: 7375 6c74 2020 2020 3c2f 7468 3e3c 2f74 sult
soap::connec\n-0013aa90: 745f 666c 6167 733c 2f61 3e3c 2f63 6f64 t_flags = SO_NO\n-0013aab0: 5349 4750 4950 453c 2f63 6f64 653e 2020 SIGPIPE \n-0013aac0: 203c 2f74 643e 3c74 6420 636c 6173 733d disables\n-0013aaf0: 2053 4947 5049 5045 2020 2020 3c2f 7464 SIGPIPE
soap::c\n-0013ac10: 6f6e 6e65 6374 5f66 6c61 6773 3c2f 613e onnect_flags\n-0013ac20: 3c2f 636f 6465 3e20 3d20 3c63 6f64 653e = \n-0013ac30: 534f 5f44 4542 5547 3c2f 636f 6465 3e20 SO_DEBUG \n-0013ac40: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 turns o\n-0013ac70: 6e20 7265 636f 7264 696e 6720 6f66 2064 n recording of d\n-0013ac80: 6562 7567 6769 6e67 2069 6e66 6f72 6d61 ebugging informa\n-0013ac90: 7469 6f6e 2069 6e20 7468 6520 756e 6465 tion in the unde\n-0013aca0: 726c 7969 6e67 2070 726f 746f 636f 6c20 rlying protocol \n-0013acb0: 6d6f 6475 6c65 7320 2020 203c 2f74 643e modules
<\n-0013ad10: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0013ad20: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-0013ad30: 6d6c 2361 3532 6132 3266 6166 6333 3639 ml#a52a22fafc369\n-0013ad40: 6233 6135 3466 6230 6431 3666 3533 3135 b3a54fb0d16f5315\n-0013ad50: 3837 3934 2220 7469 746c 653d 2255 7365 8794\" title=\"Use\n-0013ad60: 722d 6465 6669 6e61 626c 6520 7365 7473 r-definable sets\n-0013ad70: 6f63 6b6f 7074 206c 6576 656c 2053 4f4c ockopt level SOL\n-0013ad80: 5f53 4f43 4b45 5420 666c 6167 7320 7768 _SOCKET flags wh\n-0013ad90: 656e 2063 6f6e 6e65 6374 696e 6720 736f en connecting so\n-0013ada0: 6170 3a3a 736f 636b 6574 2074 6f20 6120 ap::socket to a \n-0013adb0: 7365 7276 6572 2028 7468 6520 7661 6c75 server (the valu\n-0013adc0: 6520 2e2e 2e22 3e73 6f61 703a 3a63 6f6e e ...\">soap::con\n-0013add0: 6e65 6374 5f66 6c61 6773 3c2f 613e 3c2f nect_flags = SO\n-0013adf0: 5f42 524f 4144 4341 5354 3c2f 636f 6465 _BROADCAST permi\n-0013ae30: 7473 2073 656e 6469 6e67 206f 6620 6272 ts sending of br\n-0013ae40: 6f61 6463 6173 7420 6d65 7373 6167 6573 oadcast messages\n-0013ae50: 2c20 666f 7220 6578 616d 706c 6520 7769 , for example wi\n-0013ae60: 7468 2055 4450 2c20 7768 656e 2070 6572 th UDP, when per\n-0013ae70: 6d69 7474 6564 2020 2020 3c2f 7464 3e3c mitted
<\n-0013aed0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0013aee0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-0013aef0: 6d6c 2361 3532 6132 3266 6166 6333 3639 ml#a52a22fafc369\n-0013af00: 6233 6135 3466 6230 6431 3666 3533 3135 b3a54fb0d16f5315\n-0013af10: 3837 3934 2220 7469 746c 653d 2255 7365 8794\" title=\"Use\n-0013af20: 722d 6465 6669 6e61 626c 6520 7365 7473 r-definable sets\n-0013af30: 6f63 6b6f 7074 206c 6576 656c 2053 4f4c ockopt level SOL\n-0013af40: 5f53 4f43 4b45 5420 666c 6167 7320 7768 _SOCKET flags wh\n-0013af50: 656e 2063 6f6e 6e65 6374 696e 6720 736f en connecting so\n-0013af60: 6170 3a3a 736f 636b 6574 2074 6f20 6120 ap::socket to a \n-0013af70: 7365 7276 6572 2028 7468 6520 7661 6c75 server (the valu\n-0013af80: 6520 2e2e 2e22 3e73 6f61 703a 3a63 6f6e e ...\">soap::con\n-0013af90: 6e65 6374 5f66 6c61 6773 3c2f 613e 3c2f nect_flags = SO\n-0013afb0: 5f4c 494e 4745 523c 2f63 6f64 653e 2020 _LINGER \n-0013afc0: 203c 2f74 643e 3c74 6420 636c 6173 733d sets cli\n-0013aff0: 656e 742d 7369 6465 206c 696e 6765 7220 ent-side linger \n-0013b000: 7469 6d65 2074 6f20 7468 6520 7661 6c75 time to the valu\n-0013b010: 6520 6f66 203c 636f 6465 3e3c 6120 636c e of soap::linger_\n-0013b0e0: 7469 6d65 3c2f 613e 3c2f 636f 6465 3e20 time \n-0013b0f0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
enables routi\n-0013b270: 6e67 2062 7970 6173 7320 666f 7220 6f75 ng bypass for ou\n-0013b280: 7467 6f69 6e67 206d 6573 7361 6765 7320 tgoing messages \n-0013b290: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
\n-0013b3a0: 736f 6170 3a3a 6163 6365 7074 5f66 6c61 soap::accept_fla\n-0013b3b0: 6773 3c2f 613e 3c2f 636f 6465 3e20 3d20 gs = \n-0013b3c0: 3c63 6f64 653e 534f 5f4e 4f53 4947 5049 SO_NOSIGPI\n-0013b3d0: 5045 3c2f 636f 6465 3e20 2020 3c2f 7464 PE disables SIGP\n-0013b410: 4950 4520 2863 6865 636b 2079 6f75 7220 IPE (check your \n-0013b420: 4f53 2c20 7468 6973 2069 7320 6e6f 7420 OS, this is not \n-0013b430: 706f 7274 6162 6c65 2920 2020 203c 2f74 portable)
soap::a\n-0013b550: 6363 6570 745f 666c 6167 733c 2f61 3e3c ccept_flags<\n-0013b560: 2f63 6f64 653e 203d 203c 636f 6465 3e53 /code> = S\n-0013b570: 4f5f 4445 4255 473c 2f63 6f64 653e 2020 O_DEBUG \n-0013b580: 203c 2f74 643e 3c74 6420 636c 6173 733d turns on\n-0013b5b0: 2072 6563 6f72 6469 6e67 206f 6620 6465 recording of de\n-0013b5c0: 6275 6767 696e 6720 696e 666f 726d 6174 bugging informat\n-0013b5d0: 696f 6e20 696e 2074 6865 2075 6e64 6572 ion in the under\n-0013b5e0: 6c79 696e 6720 7072 6f74 6f63 6f6c 206d lying protocol m\n-0013b5f0: 6f64 756c 6573 2020 2020 3c2f 7464 3e3c odules
<\n-0013b650: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0013b660: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-0013b670: 6d6c 2361 6439 3866 3132 6636 3032 6566 ml#ad98f12f602ef\n-0013b680: 6464 6530 3439 6462 6433 3637 6134 3365 dde049dbd367a43e\n-0013b690: 3763 6230 2220 7469 746c 653d 2255 7365 7cb0\" title=\"Use\n-0013b6a0: 722d 6465 6669 6e61 626c 6520 7365 7473 r-definable sets\n-0013b6b0: 6f63 6b6f 7074 206c 6576 656c 2053 4f4c ockopt level SOL\n-0013b6c0: 5f53 4f43 4b45 5420 666c 6167 7320 2830 _SOCKET flags (0\n-0013b6d0: 2062 7920 6465 6661 756c 7429 2c20 7768 by default), wh\n-0013b6e0: 656e 206e 6f6e 7a65 726f 2073 6574 7320 en nonzero sets \n-0013b6f0: 7468 6520 736f 6170 3a3a 736f 636b 6574 the soap::socket\n-0013b700: 2066 2e2e 2e22 3e73 6f61 703a 3a61 6363 f...\">soap::acc\n-0013b710: 6570 745f 666c 6167 733c 2f61 3e3c 2f63 ept_flags = SO_\n-0013b730: 4c49 4e47 4552 3c2f 636f 6465 3e20 2020 LINGER \n-0013b740: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 sets serv\n-0013b770: 6572 2d73 6964 6520 6c69 6e67 6572 2074 er-side linger t\n-0013b780: 696d 6520 746f 2074 6865 2076 616c 7565 ime to the value\n-0013b790: 206f 6620 3c63 6f64 653e 3c61 2063 6c61 of soap::linger_t\n-0013b860: 696d 653c 2f61 3e3c 2f63 6f64 653e 2020 ime \n-0013b870: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
\n-0013bc10: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::bi\n-0013bcd0: 6e64 5f66 6c61 6773 3c2f 613e 3c2f 636f nd_flags = SO_R\n-0013bcf0: 4555 5345 504f 5254 3c2f 636f 6465 3e20 EUSEPORT \n-0013bd00: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 enables\n-0013bd30: 2064 7570 6c69 6361 7465 2061 6464 7265 duplicate addre\n-0013bd40: 7373 2061 6e64 2070 6f72 7420 6269 6e64 ss and port bind\n-0013bd50: 696e 6773 2020 203c 2f74 643e 3c2f 7472 ings
.

Fo\n-0013bd70: 7220 6578 616d 706c 652c 2077 6865 6e20 r example, when \n-0013bd80: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n-0013be40: 6170 3a3a 6163 6365 7074 5f66 6c61 6773 ap::accept_flags\n-0013be50: 3c2f 613e 3c2f 636f 6465 3e20 6973 2073 is s\n-0013be60: 6574 2074 6f20 3c63 6f64 653e 2853 4f5f et to (SO_\n-0013be70: 4e4f 5349 4750 4950 4520 7c20 534f 5f4c NOSIGPIPE | SO_L\n-0013be80: 494e 4745 5229 3c2f 636f 6465 3e20 7468 INGER) th\n-0013be90: 6973 2064 6973 6162 6c65 7320 5349 4750 is disables SIGP\n-0013bea0: 4950 4520 7369 676e 616c 7320 616e 6420 IPE signals and \n-0013beb0: 7365 7420 6c69 6e67 6572 2074 696d 6520 set linger time \n-0013bec0: 7661 6c75 6520 6769 7665 6e20 6279 203c value given by <\n-0013bed0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n-0013bf90: 703a 3a6c 696e 6765 725f 7469 6d65 3c2f p::linger_time, which\n-0013bfb0: 2069 7320 7a65 726f 2062 7920 6465 6661 is zero by defa\n-0013bfc0: 756c 742e 3c2f 703e 0a3c 703e 5468 6520 ult.

.

The \n-0013bfd0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n-0013c090: 6170 3a3a 736f 636b 6574 5f66 6c61 6773 ap::socket_flags\n-0013c0a0: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n-0013c0b0: 6578 7420 666c 6167 2063 616e 2062 6520 ext flag can be \n-0013c0c0: 7573 6564 2074 6f20 7061 7373 206f 7074 used to pass opt\n-0013c0d0: 696f 6e73 2074 6f20 7468 6520 3c63 6f64 ions to the <sys/socket\n-0013c0f0: 2e68 2667 743b 3c2f 636f 6465 3e20 3c63 .h> send,\n-0013c110: 203c 636f 6465 3e73 656e 6474 6f3c 2f63 sendto, recv\n-0013c130: 3c2f 636f 6465 3e2c 2061 6e64 203c 636f , and recvfrom calls made by\n-0013c160: 2074 6865 2065 6e67 696e 652c 2074 686f the engine, tho\n-0013c170: 7567 6820 736f 6d65 206f 7074 696f 6e73 ugh some options\n-0013c180: 206d 6179 206e 6f74 2062 6520 6170 706c may not be appl\n-0013c190: 6963 6162 6c65 2074 6f20 796f 7572 206f icable to your o\n-0013c1a0: 7065 7261 7469 6e67 2073 7973 7465 6d3a perating system:\n-0013c1b0: 3c2f 703e 0a3c 7461 626c 6520 636c 6173

...r\n-0013c260: 6573 756c 7420 2020 203c 2f74 683e 3c2f esult .....
context flag\n-0013c220: 2077 6974 6820 7365 6e74 2f72 6563 7620 with sent/recv \n-0013c230: 666c 6167 7320 2020 3c2f 7468 3e3c 7468 flags
soap::socke\n-0013c380: 745f 666c 6167 733c 2f61 3e3c 2f63 6f64 t_flags = MSG_N\n-0013c3a0: 4f53 4947 4e41 4c3c 2f63 6f64 653e 2020 OSIGNAL \n-0013c3b0: 203c 2f74 643e 3c74 6420 636c 6173 733d disables\n-0013c3e0: 2053 4947 5049 5045 2020 2020 3c2f 7464 SIGPIPE
soap::s\n-0013c500: 6f63 6b65 745f 666c 6167 733c 2f61 3e3c ocket_flags<\n-0013c510: 2f63 6f64 653e 203d 203c 636f 6465 3e4d /code> = M\n-0013c520: 5347 5f44 4f4e 5452 4f55 5445 3c2f 636f SG_DONTROUTE ena\n-0013c560: 626c 6573 2072 6f75 7469 6e67 2062 7970 bles routing byp\n-0013c570: 6173 7320 666f 7220 6f75 7467 6f69 6e67 ass for outgoing\n-0013c580: 206d 6573 7361 6765 7320 2020 3c2f 7464 messages
.\n-0013c5a0: 3c70 3e46 7572 7468 6572 6d6f 7265 2c20

Furthermore, \n-0013c5b0: 7468 6520 3c63 6f64 653e 7365 7473 6f63 the setsoc\n-0013c5c0: 6b6f 7074 3c2f 636f 6465 3e20 6c65 7665 kopt leve\n-0013c5d0: 6c20 3c63 6f64 653e 534f 4c5f 534f 434b l SOL_SOCK\n-0013c5e0: 4554 3c2f 636f 6465 3e20 6f70 7469 6f6e ET option\n-0013c5f0: 7320 3c63 6f64 653e 534f 5f53 4e44 4255 s SO_SNDBU\n-0013c600: 463c 2f63 6f64 653e 2061 6e64 203c 636f F and SO_RCVBUF are set the \n-0013c630: 656e 6769 6e65 2077 6865 6e20 3c63 6f64 engine when soap::s\n-0013c6f0: 6e64 6275 663c 2f61 3e3c 2f63 6f64 653e ndbuf\n-0013c700: 2061 6e64 203c 636f 6465 3e3c 6120 636c and soap::rcvbuf are se\n-0013c7d0: 7420 746f 2061 206e 6f6e 7a65 726f 2076 t to a nonzero v\n-0013c7e0: 616c 7565 2e20 5468 6520 6465 6661 756c alue. The defaul\n-0013c7f0: 7420 7661 6c75 6520 6973 203c 636f 6465 t value is #SOAP_BUFLEN, which is t\n-0013c820: 6865 2073 616d 6520 7369 7a65 2075 7365 he same size use\n-0013c830: 6420 6279 2074 6865 2069 6e74 6572 6e61 d by the interna\n-0013c840: 6c20 6275 6666 6572 203c 636f 6465 3e3c l buffer <\n-0013c850: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0013c860: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-0013c870: 6d6c 2361 6364 6131 3733 3666 6261 6163 ml#acda1736fbaac\n-0013c880: 3037 3236 3132 3236 6265 6665 3136 3561 07261226befe165a\n-0013c890: 3536 3831 2220 7469 746c 653d 2249 6e74 5681\" title=\"Int\n-0013c8a0: 6572 6e61 6c20 6275 6666 6572 2077 6974 ernal buffer wit\n-0013c8b0: 6820 7061 7274 6961 6c20 6461 7461 2072 h partial data r\n-0013c8c0: 6563 6569 7665 6420 6f72 2070 6172 7469 eceived or parti\n-0013c8d0: 616c 2064 6174 6120 746f 2062 6520 7365 al data to be se\n-0013c8e0: 6e74 2c20 7768 6572 6520 7468 6520 6461 nt, where the da\n-0013c8f0: 7461 206f 6363 7570 6965 7320 736f 6170 ta occupies soap\n-0013c900: 3a3a 2e2e 2e22 3e73 6f61 703a 3a62 7566 ::...\">soap::buf\n-0013c910: 3c2f 613e 3c2f 636f 6465 3e20 746f 2073 to s\n-0013c920: 656e 6420 616e 6420 7265 6365 6976 6520 end and receive \n-0013c930: 6d65 7373 6167 6573 2e20 4120 7a65 726f messages. A zero\n-0013c940: 2076 616c 7565 206f 6d69 7473 2074 6865 value omits the\n-0013c950: 2069 6e74 6572 6e61 6c20 3c63 6f64 653e internal \n-0013c960: 7365 7473 6f63 6b6f 7074 3c2f 636f 6465 setsockopt call to set th\n-0013c980: 6573 6520 6f70 7469 6f6e 732e 2053 6574 ese options. Set\n-0013c990: 7469 6e67 2074 6865 7365 2076 616c 7565 ting these value\n-0013c9a0: 7320 746f 207a 6572 6f20 6163 7469 7661 s to zero activa\n-0013c9b0: 7465 7320 6175 746f 2d74 756e 696e 6720 tes auto-tuning \n-0013c9c0: 7769 7468 204c 696e 7578 2032 2e34 2061 with Linux 2.4 a\n-0013c9d0: 6e64 2067 7265 6174 6572 2e3c 2f70 3e0a nd greater.

.\n-0013c9e0: 3c70 3e54 6865 203c 636f 6465 3e73 6574

The set\n-0013c9f0: 736f 636b 6f70 743c 2f63 6f64 653e 206c sockopt l\n-0013ca00: 6576 656c 203c 636f 6465 3e53 4f4c 5f53 evel SOL_S\n-0013ca10: 4f43 4b45 543c 2f63 6f64 653e 206f 7074 OCKET opt\n-0013ca20: 696f 6e20 3c63 6f64 653e 534f 5f4b 4545 ion SO_KEE\n-0013ca30: 5041 4c49 5645 3c2f 636f 6465 3e20 6973 PALIVE is\n-0013ca40: 2073 6574 2077 6865 6e20 6b65 6570 2d61 set when keep-a\n-0013ca50: 6c69 7665 2069 7320 656e 6162 6c65 6420 live is enabled \n-0013ca60: 7769 7468 2063 6f6e 7465 7874 2066 6c61 with context fla\n-0013ca70: 6720 3c63 6f64 653e 2353 4f41 505f 494f g #SOAP_IO\n-0013ca80: 5f4b 4545 5041 4c49 5645 3c2f 636f 6465 _KEEPALIVE or when \n-0013caa0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::tc\n-0013cb60: 705f 6b65 6570 5f61 6c69 7665 3c2f 613e p_keep_alive\n-0013cb70: 3c2f 636f 6465 3e20 6973 206e 6f6e 7a65 is nonze\n-0013cb80: 726f 2e20 5769 7468 203c 636f 6465 3e3c ro. With <\n-0013cb90: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0013cba0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-0013cbb0: 6d6c 2361 6638 6638 3061 3762 6438 6330 ml#af8f80a7bd8c0\n-0013cbc0: 3933 3335 6336 6662 3833 3661 3631 3232 9335c6fb836a6122\n-0013cbd0: 3331 6262 2220 7469 746c 653d 2255 7365 31bb\" title=\"Use\n-0013cbe0: 722d 6465 6669 6e61 626c 6520 7661 6c75 r-definable valu\n-0013cbf0: 6520 746f 2073 6574 2053 4f5f 4b45 4550 e to set SO_KEEP\n-0013cc00: 414c 4956 4520 7365 7473 6f63 6b6f 7074 ALIVE setsockopt\n-0013cc10: 2028 3020 6279 2064 6566 6175 6c74 2075 (0 by default u\n-0013cc20: 6e6c 6573 7320 7468 6520 2353 4f41 505f nless the #SOAP_\n-0013cc30: 494f 5f4b 4545 5041 4c49 5645 206d 6f64 IO_KEEPALIVE mod\n-0013cc40: 6520 2e2e 2e22 3e73 6f61 703a 3a74 6370 e ...\">soap::tcp\n-0013cc50: 5f6b 6565 705f 616c 6976 653c 2f61 3e3c _keep_alive<\n-0013cc60: 2f63 6f64 653e 2061 6464 6974 696f 6e61 /code> additiona\n-0013cc70: 6c20 6f70 7469 6f6e 7320 6361 6e20 6265 l options can be\n-0013cc80: 2073 7065 6369 6669 6564 2077 6974 6820 specified with \n-0013cc90: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::tcp_k\n-0013cd40: 6565 705f 6964 6c65 3c2f 613e 3c2f 636f eep_idle, soap:\n-0013ce00: 3a74 6370 5f6b 6565 705f 696e 7476 6c3c :tcp_keep_intvl<\n-0013ce10: 2f61 3e3c 2f63 6f64 653e 2c20 616e 6420 /a>, and \n-0013ce20: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::tcp_ke\n-0013ced0: 6570 5f63 6e74 3c2f 613e 3c2f 636f 6465 ep_cnt. For example:<\n-0013cef0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

struct \n-0013cf40: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-0013cf70: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-0013cfa0: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_new\n-0013d000: 3c2f 613e 2829 3b3c 2f64 6976 3e0a 3c64 ();
.\n-0013d020: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n-0013d050: 2667 743b 3c61 2063 6c61 7373 3d22 636f >tcp\n-0013d0a0: 5f6b 6565 705f 616c 6976 653c 2f61 3e20 _keep_alive \n-0013d0b0: 3d20 313b 2020 203c 7370 616e 2063 6c61 = 1; // \n-0013d0d0: 7365 7473 6f63 6b6f 7074 2053 4f5f 4b45 setsockopt SO_KE\n-0013d0e0: 4550 414c 4956 453c 2f73 7061 6e3e 3c2f EPALIVE.
so\n-0013d130: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->tcp_keep_idl\n-0013d190: 653c 2f61 3e20 3d20 3330 3b20 2020 3c73 e = 30; // time in s\n-0013d1c0: 6563 6f6e 6473 2074 6865 2063 6f6e 6e65 econds the conne\n-0013d1d0: 6374 696f 6e20 6e65 6564 7320 746f 2072 ction needs to r\n-0013d1e0: 656d 6169 6e20 6964 6c65 2062 6566 6f72 emain idle befor\n-0013d1f0: 6520 5443 5020 7374 6172 7473 2073 656e e TCP starts sen\n-0013d200: 6469 6e67 206b 6565 7061 6c69 7665 2070 ding keepalive p\n-0013d210: 726f 6265 733c 2f73 7061 6e3e 3c2f 6469 robes.
soap\n-0013d260: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->tcp_keep_intvl\n-0013d2c0: 3c2f 613e 203d 2031 3230 3b20 3c73 7061 = 120; // time in sec\n-0013d2f0: 6f6e 6473 2062 6574 7765 656e 2069 6e64 onds between ind\n-0013d300: 6976 6964 7561 6c20 6b65 6570 616c 6976 ividual keepaliv\n-0013d310: 6520 7072 6f62 6573 3c2f 7370 616e 3e3c e probes<\n-0013d320: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
s\n-0013d360: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->tcp_keep_cn\n-0013d3c0: 743c 2f61 3e20 3d20 353b 2020 2020 203c t = 5; <\n-0013d3d0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0013d3e0: 656e 7422 3e2f 2f20 6d61 7869 6d75 6d20 ent\">// maximum \n-0013d3f0: 6e75 6d62 6572 206f 6620 6b65 6570 616c number of keepal\n-0013d400: 6976 6520 7072 6f62 6573 2054 4350 2073 ive probes TCP s\n-0013d410: 686f 756c 6420 7365 6e64 2062 6566 6f72 hould send befor\n-0013d420: 6520 6472 6f70 7069 6e67 2074 6865 2063 e dropping the c\n-0013d430: 6f6e 6e65 6374 696f 6e3c 2f73 7061 6e3e onnection\n-0013d440: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
\n-0013d490: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 \n-0013d510: 756e 7369 676e 6564 2069 6e74 2074 6370 unsigned int tcp\n-0013d520: 5f6b 6565 705f 636e 743c 2f64 6976 3e3c _keep_cnt
<\n-0013d530: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-0013d540: 223e 5573 6572 2d64 6566 696e 6162 6c65 \">User-definable\n-0013d550: 2076 616c 7565 2074 6f20 7365 7420 5443 value to set TC\n-0013d560: 505f 4b45 4550 434e 5420 7365 7473 6f63 P_KEEPCNT setsoc\n-0013d570: 6b6f 7074 2028 7468 6520 7661 6c75 6520 kopt (the value \n-0013d580: 6973 2030 2062 7920 6465 6661 756c 7429 is 0 by default)\n-0013d590: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
Defi\n-0013d5b0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-0013d5c0: 6f61 7032 2e68 3a33 3538 343c 2f64 6976 oap2.h:3584
.
<\n-0013d690: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-0013d6a0: 6922 3e75 6e73 6967 6e65 6420 696e 7420 i\">unsigned int \n-0013d6b0: 7463 705f 6b65 6570 5f69 6e74 766c 3c2f tcp_keep_intvl
User-defi\n-0013d6e0: 6e61 626c 6520 7661 6c75 6520 746f 2073 nable value to s\n-0013d6f0: 6574 2054 4350 5f4b 4545 5049 4e54 564c et TCP_KEEPINTVL\n-0013d700: 2073 6574 736f 636b 6f70 7420 2874 6865 setsockopt (the\n-0013d710: 2076 616c 7565 2069 7320 3020 6279 2064 value is 0 by d\n-0013d720: 6566 6175 6c74 293c 2f64 6976 3e3c 6469 efault)
\n-0013d740: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:35\n-0013d760: 3539 3c2f 6469 763e 3c2f 6469 763e 0a3c 59
.<\n-0013d770: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-0013d780: 6964 3d22 6173 7472 7563 7473 6f61 705f id=\"astructsoap_\n-0013d790: 6874 6d6c 5f61 3863 3038 3232 6362 3033 html_a8c0822cb03\n-0013d7a0: 3939 6564 3535 6465 3663 3261 3438 3231 99ed55de6c2a4821\n-0013d7b0: 3731 3836 3866 223e 3c64 6976 2063 6c61 71868f\">
soap::tc\n-0013d810: 705f 6b65 6570 5f69 646c 653c 2f61 3e3c p_keep_idle<\n-0013d820: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
unsigne\n-0013d840: 6420 696e 7420 7463 705f 6b65 6570 5f69 d int tcp_keep_i\n-0013d850: 646c 653c 2f64 6976 3e3c 6469 7620 636c dle
User\n-0013d870: 2d64 6566 696e 6162 6c65 2076 616c 7565 -definable value\n-0013d880: 2074 6f20 7365 7420 5443 505f 4b45 4550 to set TCP_KEEP\n-0013d890: 4944 4c45 2073 6574 736f 636b 6f70 7420 IDLE setsockopt \n-0013d8a0: 2874 6865 2076 616c 7565 2069 7320 3020 (the value is 0 \n-0013d8b0: 6279 2064 6566 6175 6c74 293c 2f64 6976 by default)
Definitio\n-0013d8e0: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n-0013d8f0: 683a 3335 3334 3c2f 6469 763e 3c2f 6469 h:3534
.
in\n-0013d9d0: 7420 7463 705f 6b65 6570 5f61 6c69 7665 t tcp_keep_alive\n-0013d9e0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
User-de\n-0013da00: 6669 6e61 626c 6520 7661 6c75 6520 746f finable value to\n-0013da10: 2073 6574 2053 4f5f 4b45 4550 414c 4956 set SO_KEEPALIV\n-0013da20: 4520 7365 7473 6f63 6b6f 7074 2028 3020 E setsockopt (0 \n-0013da30: 6279 2064 6566 6175 6c74 2075 6e6c 6573 by default unles\n-0013da40: 7320 7468 6520 2353 4f41 505f 494f 5f4b s the #SOAP_IO_K\n-0013da50: 4545 5041 4c49 5645 206d 6f64 6520 2e2e EEPALIVE mode ..\n-0013da60: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
Def\n-0013da80: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n-0013da90: 736f 6170 322e 683a 3335 3039 3c2f 6469 soap2.h:3509
.
<\n-0013dab0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-0013dac0: 3c70 3e46 6f72 2055 4450 206d 6573 7361

For UDP messa\n-0013dad0: 6769 6e67 2c20 7573 6520 3c63 6f64 653e ging, use \n-0013dae0: 2353 4f41 505f 494f 5f55 4450 3c2f 636f #SOAP_IO_UDP. See also Se\n-0013db00: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction SOAP/X\n-0013db30: 4d4c 206f 7665 7220 5544 503c 2f61 3e2e ML over UDP.\n-0013db40: 2054 6865 2063 6f6e 7465 7874 2066 6c61 The context fla\n-0013db50: 6773 2074 6861 7420 6361 6e20 6265 2073 gs that can be s\n-0013db60: 6574 2061 7420 7468 6520 636c 6965 6e74 et at the client\n-0013db70: 2073 6964 6520 666f 7220 5544 5020 6d65 side for UDP me\n-0013db80: 7373 6167 696e 6720 6172 6520 3c63 6f64 ssaging are soap:\n-0013dc40: 3a69 7076 345f 6d75 6c74 6963 6173 745f :ipv4_multicast_\n-0013dc50: 6966 3c2f 613e 3c2f 636f 6465 3e2c 203c if, <\n-0013dc60: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>so\n-0013dd10: 6170 3a3a 6970 7634 5f6d 756c 7469 6361 ap::ipv4_multica\n-0013dd20: 7374 5f74 746c 3c2f 613e 3c2f 636f 6465 st_ttl, and soap::ipv6_mul\n-0013dde0: 7469 6361 7374 5f69 663c 2f61 3e3c 2f63 ticast_if:

...context\n-0013de60: 2066 6c61 6720 2020 3c2f 7468 3e3c 7468 flag r\n-0013de90: 6573 756c 7420 2020 203c 2f74 683e 3c2f esult ..soap::ipv4\n-0013dfa0: 5f6d 756c 7469 6361 7374 5f69 663c 2f61 _multicast_if \n-0013dfc0: 3c74 6420 636c 6173 733d 226d 6172 6b64 set sets\n-0013dff0: 6f63 6b6f 7074 3c2f 636f 6465 3e20 6c65 ockopt le\n-0013e000: 7665 6c20 3c63 6f64 653e 4950 5052 4f54 vel IPPROT\n-0013e010: 4f5f 4950 3c2f 636f 6465 3e20 746f 203c O_IP to <\n-0013e020: 636f 6465 3e49 505f 4d55 4c54 4943 4153 code>IP_MULTICAS\n-0013e030: 545f 4946 3c2f 636f 6465 3e20 7769 7468 T_IF with\n-0013e040: 2076 616c 7565 203c 636f 6465 3e3c 6120 value soap::ipv4\n-0013e100: 5f6d 756c 7469 6361 7374 5f69 663c 2f61 _multicast_if when no\n-0013e120: 6e2d 4e55 4c4c 2020 2020 3c2f 7464 3e3c n-NULL <\n-0013e130: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..<\n-0013e180: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0013e190: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-0013e1a0: 6d6c 2361 6135 6661 6137 3633 3034 3235 ml#aa5faa7630425\n-0013e1b0: 6138 6162 3830 3138 6630 6232 6434 6430 a8ab8018f0b2d4d0\n-0013e1c0: 6331 3864 2220 7469 746c 653d 2255 7365 c18d\" title=\"Use\n-0013e1d0: 722d 6465 6669 6e61 626c 6520 7661 6c75 r-definable valu\n-0013e1e0: 6520 746f 2073 6574 2073 6574 736f 636b e to set setsock\n-0013e1f0: 6f70 7420 6c65 7665 6c20 4950 5052 4f54 opt level IPPROT\n-0013e200: 4f5f 4950 2074 6f20 4950 5f4d 554c 5449 O_IP to IP_MULTI\n-0013e210: 4341 5354 5f54 544c 2077 6865 6e20 6e6f CAST_TTL when no\n-0013e220: 6e7a 6572 6f2e 223e 736f 6170 3a3a 6970 nzero.\">soap::ip\n-0013e230: 7634 5f6d 756c 7469 6361 7374 5f74 746c v4_multicast_ttl\n-0013e240: 3c2f 613e 3c2f 636f 6465 3e20 2020 3c2f set s\n-0013e280: 6574 736f 636b 6f70 743c 2f63 6f64 653e etsockopt\n-0013e290: 206c 6576 656c 203c 636f 6465 3e49 5050 level IPP\n-0013e2a0: 524f 544f 5f49 503c 2f63 6f64 653e 2074 ROTO_IP t\n-0013e2b0: 6f20 3c63 6f64 653e 4950 5f4d 554c 5449 o IP_MULTI\n-0013e2c0: 4341 5354 5f54 544c 3c2f 636f 6465 3e20 CAST_TTL \n-0013e2d0: 7769 7468 2076 616c 7565 203c 636f 6465 with value soap::\n-0013e390: 6970 7634 5f6d 756c 7469 6361 7374 5f74 ipv4_multicast_t\n-0013e3a0: 746c 3c2f 613e 3c2f 636f 6465 3e20 7768 tl
wh\n-0013e3b0: 656e 206e 6f6e 7a65 726f 2020 2020 3c2f en nonzero ..soap::ipv\n-0013e4b0: 365f 6d75 6c74 6963 6173 745f 6966 3c2f 6_multicast_if set soc\n-0013e500: 6b61 6464 725f 696e 363a 3a73 696e 365f kaddr_in6::sin6_\n-0013e510: 7363 6f70 655f 6964 3c2f 636f 6465 3e20 scope_id \n-0013e520: 746f 203c 636f 6465 3e3c 6120 636c 6173 to so\n-0013e5c0: 6170 3a3a 6970 7636 5f6d 756c 7469 6361 ap::ipv6_multica\n-0013e5d0: 7374 5f69 663c 2f61 3e3c 2f63 6f64 653e st_if\n-0013e5e0: 2077 6865 6e20 6e6f 6e7a 6572 6f20 2020 when nonzero \n-0013e5f0: 3c2f 7464 3e3c 2f74 723e 0a3c 2f74 6162 ..

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

.

.Run-time erro\n-0013e670: 7220 636f 6465 733c 2f68 313e 0a3c 703e r codes

.

\n-0013e680: 5374 6174 7573 2065 7272 6f72 2063 6f64 Status error cod\n-0013e690: 6573 2061 7265 2069 6e74 6567 6572 2076 es are integer v\n-0013e6a0: 616c 7565 732c 2077 6869 6368 2061 7265 alues, which are\n-0013e6b0: 2072 6574 7572 6e65 6420 6279 2074 6865 returned by the\n-0013e6c0: 2067 534f 4150 2041 5049 2066 756e 6374 gSOAP API funct\n-0013e6d0: 696f 6e73 2e20 5468 6520 6675 6c6c 206c ions. The full l\n-0013e6e0: 6973 7420 6f66 203c 636f 6465 3e3c 6120 ist of so\n-0013e7a0: 6170 5f73 7461 7475 733c 2f61 3e3c 2f63 ap_status error codes\n-0013e7c0: 2069 7320 6c69 7374 6564 2062 656c 6f77 is listed below\n-0013e7d0: 3a3c 2f70 3e0a 3c74 6162 6c65 2063 6c61 :

.........<\n-0013ea30: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0013ea40: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0013ea50: 3e3c 636f 6465 3e23 534f 4150 5f44 4154 >#SOAP_DAT\n-0013ea60: 4145 4e43 4f44 494e 4755 4e4b 4e4f 574e AENCODINGUNKNOWN\n-0013ea70: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n-0013ea80: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0013ea90: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0013eaa0: 3e53 4f41 5020 312e 3220 4461 7461 456e >SOAP 1.2 DataEn\n-0013eab0: 636f 6469 6e67 556e 6b6e 6f77 6e20 6661 codingUnknown fa\n-0013eac0: 756c 7420 2020 203c 2f74 643e 3c2f 7472 ult ..<\n-0013ed20: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>.....\n-0013eed0: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n-0013eef0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...\n-0013f010: 3c63 6f64 653e 2353 4f41 505f 4449 4d45 #SOAP_DIME\n-0013f020: 5f4d 4953 4d41 5443 483c 2f63 6f64 653e _MISMATCH\n-0013f030: 2020 203c 2f74 643e 3c74 6420 636c 6173 ....X\n-0013f220: 4d4c 2065 6c65 6d65 6e74 206f 7220 6174 ML element or at\n-0013f230: 7472 6962 7574 6520 6973 2065 6d70 7479 tribute is empty\n-0013f240: 2077 6865 6e20 6120 7661 6c75 6520 6973 when a value is\n-0013f250: 2072 6571 7569 7265 6420 2020 203c 2f74 required ....<\n-0013f3a0: 636f 6465 3e23 534f 4150 5f45 4f4d 3c2f code>#SOAP_EOM O\n-0013f3e0: 7574 206f 6620 6d65 6d6f 7279 2020 2020 ut of memory \n-0013f3f0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ....T\n-0013f550: 6865 2066 6175 6c74 2063 6f64 6520 746f he fault code to\n-0013f560: 2062 6520 7265 7475 726e 6564 2062 7920 be returned by \n-0013f570: 6120 7365 7276 6963 6520 6f70 6572 6174 a service operat\n-0013f580: 696f 6e20 7768 656e 2063 616c 6c69 6e67 ion when calling\n-0013f590: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_sender\n-0013f640: 5f66 6175 6c74 3c2f 613e 3c2f 636f 6465 _fault (client is at \n-0013f660: 6661 756c 7429 206f 7220 3c63 6f64 653e fault) or \n-0013f670: 3c61 2063 6c61 7373 3d22 656c 2220 6872 \n-0013f710: 736f 6170 5f72 6563 6569 7665 725f 6661 soap_receiver_fa\n-0013f720: 756c 743c 2f61 3e3c 2f63 6f64 653e 2028 ult (\n-0013f730: 7365 7276 6572 2069 7320 6174 2066 6175 server is at fau\n-0013f740: 6c74 292c 2063 6c69 656e 7473 2072 6563 lt), clients rec\n-0013f750: 6569 7665 2074 6865 2066 6175 6c74 2061 eive the fault a\n-0013f760: 7320 3c63 6f64 653e 2353 4f41 505f 434c s #SOAP_CL\n-0013f770: 495f 4641 554c 543c 2f63 6f64 653e 206f I_FAULT o\n-0013f780: 7220 3c63 6f64 653e 2353 4f41 505f 5356 r #SOAP_SV\n-0013f790: 525f 4641 554c 543c 2f63 6f64 653e 2072 R_FAULT r\n-0013f7a0: 6573 7065 6374 6976 656c 7920 2020 203c espectively <\n-0013f7b0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>....X\n-0013f8f0: 4d4c 2065 6c65 6d65 6e74 206f 7220 6174 ML element or at\n-0013f900: 7472 6962 7574 6520 7661 6c75 6520 6973 tribute value is\n-0013f910: 2066 6978 6564 2061 6e64 2074 6865 2070 fixed and the p\n-0013f920: 6172 7365 6420 7661 6c75 6520 646f 6573 arsed value does\n-0013f930: 206e 6f74 206d 6174 6368 2074 6865 2066 not match the f\n-0013f940: 6978 6564 2076 616c 7565 2020 2020 3c2f ixed value ..\n-0013fc00: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....<\n-0013fd90: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-0013fda0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-0013fdb0: 3e3c 636f 6465 3e23 534f 4150 5f48 5454 >#SOAP_HTT\n-0013fdc0: 505f 4552 524f 523c 2f63 6f64 653e 2020 P_ERROR \n-0013fdd0: 203c 2f74 643e 3c74 6420 636c 6173 733d ..\n-0013ff00: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n-0013ffb0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..<\n-001400a0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>........\n-00140350: 3c74 6420 636c 6173 733d 226d 6172 6b64 <\n-001403e0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..A\n-00140470: 6e20 584d 4c20 656c 656d 656e 7420 7769 n XML element wi\n-00140480: 7468 2069 6420 6174 7472 6962 7574 6520 th id attribute \n-00140490: 6973 206d 6973 7369 6e67 2074 6861 7420 is missing that \n-001404a0: 7368 6f75 6c64 206d 6174 6368 2074 6865 should match the\n-001404b0: 2065 6c65 6d65 6e74 2077 6974 6820 6872 element with hr\n-001404c0: 6566 2f72 6566 2061 7474 7269 6275 7465 ef/ref attribute\n-001404d0: 2028 6170 706c 6963 6162 6c65 2074 6f20 (applicable to \n-001404e0: 534f 4150 206d 756c 7469 2d72 6566 2065 SOAP multi-ref e\n-001404f0: 6e63 6f64 696e 6720 616e 6420 3c63 6f64 ncoding and #SOAP_XML_GRAP\n-00140510: 483c 2f63 6f64 653e 2073 6572 6961 6c69 H seriali\n-00140520: 7a61 7469 6f6e 2920 2020 203c 2f74 643e zation) \n-00140530: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..\n-00140620: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..A\n-001406b0: 6e20 584d 4c20 656c 656d 656e 7420 6973 n XML element is\n-001406c0: 2070 7265 7365 6e74 2077 6974 6820 6120 present with a \n-001406d0: 6d75 7374 556e 6465 7273 7461 6e64 2061 mustUnderstand a\n-001406e0: 7474 7269 6275 7465 2077 6869 6368 206d ttribute which m\n-001406f0: 7573 7420 6265 2075 6e64 6572 7374 6f6f ust be understoo\n-00140700: 6420 6275 7420 6973 206e 6f74 2064 6573 d but is not des\n-00140710: 6572 6961 6c69 7a65 6420 2020 203c 2f74 erialized ..\n-00140790: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n-00140830: 3c63 6f64 653e 2353 4f41 505f 4e4f 5f44 #SOAP_NO_D\n-00140840: 4154 413c 2f63 6f64 653e 2020 203c 2f74 ATA ....\n-00140a30: 4e6f 2058 4d4c 2065 6c65 6d65 6e74 2074 No XML element t\n-00140a40: 6167 2077 6173 2066 6f75 6e64 2077 6865 ag was found whe\n-00140a50: 6e20 6f6e 6520 7761 7320 6578 7065 6374 n one was expect\n-00140a60: 6564 2020 2020 3c2f 7464 3e3c 2f74 723e ed \n-00140a70: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ......<\n-00140c80: 636f 6465 3e23 534f 4150 5f4f 4343 5552 code>#SOAP_OCCUR\n-00140c90: 533c 2f63 6f64 653e 2020 203c 2f74 643e S \n-00140ca0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n-00140d70: 3c63 6f64 653e 2353 4f41 505f 5041 5443 #SOAP_PATC\n-00140d80: 485f 4d45 5448 4f44 3c2f 636f 6465 3e20 H_METHOD \n-00140d90: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 \n-00140f80: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ......<\n-00141140: 636f 6465 3e23 534f 4150 5f50 524f 4849 code>#SOAP_PROHI\n-00141150: 4249 5445 443c 2f63 6f64 653e 2020 203c BITED <\n-00141160: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>..<\n-00141200: 636f 6465 3e23 534f 4150 5f50 5554 5f4d code>#SOAP_PUT_M\n-00141210: 4554 484f 443c 2f63 6f64 653e 2020 203c ETHOD <\n-00141220: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>..<\n-001414c0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>.....\n-00141660: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n-00141680: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ..<\n-00141730: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-00141740: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n-00141750: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ........<\n-00141aa0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-00141ab0: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n-00141ac0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .....<\n-00141d10: 636f 6465 3e23 534f 4150 5f56 4552 5349 code>#SOAP_VERSI\n-00141d20: 4f4e 4d49 534d 4154 4348 3c2f 636f 6465 ONMISMATCH ..<\n-00141dc0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00141dd0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00141de0: 3e3c 636f 6465 3e23 534f 4150 5f5a 4c49 >#SOAP_ZLI\n-00141df0: 425f 4552 524f 523c 2f63 6f64 653e 2020 B_ERROR \n-00141e00: 203c 2f74 643e 3c74 6420 636c 6173 733d ..

A status \n-00141e60: 636f 6465 206f 6620 3c63 6f64 653e 2353 code of #S\n-00141e70: 4f41 505f 4f4b 3c2f 636f 6465 3e20 287a OAP_OK (z\n-00141e80: 6572 6f29 2069 7320 7265 7475 726e 6564 ero) is returned\n-00141e90: 2062 7920 6120 6753 4f41 5020 4150 4920 by a gSOAP API \n-00141ea0: 6675 6e63 7469 6f6e 2077 6865 6e20 7468 function when th\n-00141eb0: 6520 6675 6e63 7469 6f6e 2063 616c 6c20 e function call \n-00141ec0: 7761 7320 7375 6363 6573 7366 756c 2c20 was successful, \n-00141ed0: 6f74 6865 7277 6973 6520 6120 6e6f 6e2d otherwise a non-\n-00141ee0: 7a65 726f 2065 7272 6f72 2063 6f64 6520 zero error code \n-00141ef0: 6973 2072 6574 7572 6e65 642e 2054 6865 is returned. The\n-00141f00: 2073 7461 7475 7320 6572 726f 7220 636f status error co\n-00141f10: 6465 2069 7320 616c 736f 2073 746f 7265 de is also store\n-00141f20: 6420 696e 2074 6865 2063 7572 7265 6e74 d in the current\n-00141f30: 203c 636f 6465 3e3c 6120 636c 6173 733d soap context as soap::\n-00142050: 6572 726f 723c 2f61 3e3c 2f63 6f64 653e error\n-00142060: 2e20 466f 7220 494f 2061 6e64 2073 6f63 . For IO and soc\n-00142070: 6b65 742d 7265 6c61 7465 6420 6572 726f ket-related erro\n-00142080: 7273 2c20 616c 736f 2074 6865 203c 636f rs, also the soap::errnum<\n-00142120: 2f61 3e3c 2f63 6f64 653e 2076 6172 6961 /a> varia\n-00142130: 626c 6520 6973 2073 6574 2074 6f20 7468 ble is set to th\n-00142140: 6520 3c63 6f64 653e 6572 726e 6f3c 2f63 e errno value of th\n-00142160: 6520 7379 7374 656d 2065 7272 6f72 2066 e system error f\n-00142170: 6f72 2065 7861 6d70 6c65 2077 6865 6e20 or example when \n-00142180: 6120 3c63 6f64 653e 2353 4f41 505f 454f a #SOAP_EO\n-00142190: 463c 2f63 6f64 653e 2065 7272 6f72 206f F error o\n-001421a0: 6363 7572 7265 642e 3c2f 703e 0a3c 703e ccurred.

.

\n-001421b0: 546f 2064 6973 706c 6179 2074 6865 2065 To display the e\n-001421c0: 7272 6f72 2c20 7573 6520 3c63 6f64 653e rror, use \n-001421d0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_print\n-00142260: 5f66 6175 6c74 2873 7472 7563 7420 736f _fault(struct so\n-00142270: 6170 202a 736f 6170 2c20 4649 4c45 202a ap *soap, FILE *\n-00142280: 6664 293c 2f61 3e3c 2f63 6f64 653e 2077 fd) w\n-00142290: 6865 7265 2074 6865 2063 7572 7265 6e74 here the current\n-001422a0: 2076 616c 7565 206f 6620 3c63 6f64 653e value of \n-001422b0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::erro\n-00142360: 723c 2f61 3e3c 2f63 6f64 653e 2069 7320 r is \n-00142370: 7573 6564 2062 7920 7468 6520 6675 6e63 used by the func\n-00142380: 7469 6f6e 2074 6f20 7072 696e 7420 7468 tion to print th\n-00142390: 6520 6572 726f 7220 746f 2074 6865 2073 e error to the s\n-001423a0: 7065 6369 6669 6564 203c 636f 6465 3e66 pecified f\n-001423b0: 643c 2f63 6f64 653e 2066 696c 652e 2041 d file. A\n-001423c0: 6c74 6572 6e61 7469 7665 6c79 2c20 696e lternatively, in\n-001423d0: 2043 2b2b 2079 6f75 2063 616e 2075 7365 C++ you can use\n-001423e0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_stream_\n-00142480: 6661 756c 7428 7374 7275 6374 2073 6f61 fault(struct soa\n-00142490: 7020 2a73 6f61 702c 2073 7464 3a3a 6f73 p *soap, std::os\n-001424a0: 7472 6561 6d26 616d 703b 206f 7329 3c2f tream& os) to pri\n-001424c0: 6e74 2074 6865 2065 7272 6f72 206f 6e20 nt the error on \n-001424d0: 7468 6520 7370 6563 6966 6965 6420 3c63 the specified os ou\n-001424f0: 7470 7574 2073 7472 6561 6d2e 3c2f 703e tput stream.

\n-00142500: 0a3c 703e 546f 2064 6973 706c 6179 2074 .

To display t\n-00142510: 6865 206c 6f63 6174 696f 6e20 6f66 2061 he location of a\n-00142520: 6e20 584d 4c20 7061 7273 696e 6720 616e n XML parsing an\n-00142530: 6420 7661 6c69 6461 7469 6f6e 2065 7272 d validation err\n-00142540: 6f72 2c20 7573 6520 3c63 6f64 653e 3c61 or, use soap\n-001425f0: 5f70 7269 6e74 5f66 6175 6c74 5f6c 6f63 _print_fault_loc\n-00142600: 6174 696f 6e28 7374 7275 6374 2073 6f61 ation(struct soa\n-00142610: 7020 2a73 6f61 702c 2046 494c 4520 2a66 p *soap, FILE *f\n-00142620: 6429 3c2f 613e 3c2f 636f 6465 3e20 6f72 d) or\n-00142630: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_stream\n-001426e0: 5f66 6175 6c74 5f6c 6f63 6174 696f 6e28 _fault_location(\n-001426f0: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n-00142700: 702c 2073 7464 3a3a 6f73 7472 6561 6d26 p, std::ostream&\n-00142710: 616d 703b 206f 7329 3c2f 613e 3c2f 636f amp; os) to print par\n-00142730: 7420 6f66 2074 6865 2058 4d4c 2077 6974 t of the XML wit\n-00142740: 6820 7468 6520 6572 726f 7220 6c6f 6361 h the error loca\n-00142750: 7469 6f6e 206d 6172 6b65 6420 696e 2074 tion marked in t\n-00142760: 6865 2058 4d4c 206f 7574 7075 742e 3c2f he XML output..

To save th\n-00142780: 6520 6572 726f 7220 696e 2061 2073 7472 e error in a str\n-00142790: 696e 6720 6275 6666 6572 203c 636f 6465 ing buffer buf[0...len-1]<\n-001427b0: 2f63 6f64 653e 2c20 7573 6520 3c63 6f64 /code>, use s\n-00142850: 6f61 705f 7370 7269 6e74 5f66 6175 6c74 oap_sprint_fault\n-00142860: 2873 7472 7563 7420 736f 6170 2a2c 2063 (struct soap*, c\n-00142870: 6861 7220 2a62 7566 2c20 7369 7a65 5f74 har *buf, size_t\n-00142880: 206c 656e 293c 2f61 3e3c 2f63 6f64 653e len)\n-00142890: 2c20 7768 6572 6520 3c63 6f64 653e 6275 , where bu\n-001428a0: 663c 2f63 6f64 653e 2069 7320 706f 7075 f is popu\n-001428b0: 6c61 7465 6420 7769 7468 2074 6865 2066 lated with the f\n-001428c0: 6175 6c74 206d 6573 7361 6765 2074 6572 ault message ter\n-001428d0: 6d69 6e61 7469 6e67 2077 6974 6820 6120 minating with a \n-001428e0: 3c63 6f64 653e 5c30 3c2f 636f 6465 3e2e \\0.\n-001428f0: 3c2f 703e 0a3c 703e 546f 2064 6574 6572

.

To deter\n-00142900: 6d69 6e65 2074 6865 2074 7970 6520 6f66 mine the type of\n-00142910: 2065 7272 6f72 2074 6861 7420 6f63 6375 error that occu\n-00142920: 7272 6564 2c20 7573 653a 3c2f 703e 3c75 rred, use:

.
  • #soap_xml_error_\n-00142a10: 6368 6563 6b28 736f 6170 5f73 7461 7475 check(soap_statu\n-00142a20: 7320 6529 3c2f 613e 3c2f 636f 6465 3e20 s e) \n-00142a30: 6368 6563 6b73 2066 6f72 2058 4d4c 2070 checks for XML p\n-00142a40: 6172 7369 6e67 2061 6e64 2076 616c 6964 arsing and valid\n-00142a50: 6174 696f 6e20 6572 726f 7273 2c20 7265 ation errors, re\n-00142a60: 7475 726e 7320 7472 7565 2069 6620 7468 turns true if th\n-00142a70: 6520 7370 6563 6966 6965 6420 6572 726f e specified erro\n-00142a80: 7220 636f 6465 2069 7320 616e 2058 4d4c r code is an XML\n-00142a90: 2065 7272 6f72 2e3c 2f6c 693e 0a3c 6c69 error.
  • .#soap_\n-00142b70: 736f 6170 5f65 7272 6f72 5f63 6865 636b soap_error_check\n-00142b80: 2873 6f61 705f 7374 6174 7573 2065 293c (soap_status e)<\n-00142b90: 2f61 3e3c 2f63 6f64 653e 2063 6865 636b /a> check\n-00142ba0: 7320 666f 7220 534f 4150 2070 726f 746f s for SOAP proto\n-00142bb0: 636f 6c20 6661 756c 7473 2061 6e64 2065 col faults and e\n-00142bc0: 7272 6f72 732c 2072 6574 7572 6e73 2074 rrors, returns t\n-00142bd0: 7275 6520 6966 2074 6865 2073 7065 6369 rue if the speci\n-00142be0: 6669 6564 2065 7272 6f72 2063 6f64 6520 fied error code \n-00142bf0: 6973 2061 2053 4f41 5020 7072 6f74 6f63 is a SOAP protoc\n-00142c00: 6f6c 2065 7272 6f72 2e3c 2f6c 693e 0a3c ol error..<\n-00142c10: 6c69 3e3c 636f 6465 3e23 3c61 2063 6c61 li>#soa\n-00142ce0: 705f 6874 7470 5f65 7272 6f72 5f63 6865 p_http_error_che\n-00142cf0: 636b 2873 6f61 705f 7374 6174 7573 2065 ck(soap_status e\n-00142d00: 293c 2f61 3e3c 2f63 6f64 653e 2063 6865 ) che\n-00142d10: 636b 7320 666f 7220 4854 5450 2070 726f cks for HTTP pro\n-00142d20: 746f 636f 6c20 6572 726f 7273 2c20 7265 tocol errors, re\n-00142d30: 7475 726e 7320 7472 7565 2069 6620 7468 turns true if th\n-00142d40: 6520 7370 6563 6966 6965 6420 6572 726f e specified erro\n-00142d50: 7220 636f 6465 2069 7320 616e 2048 5454 r code is an HTT\n-00142d60: 5020 7072 6f74 6f63 6f6c 2065 7272 6f72 P protocol error\n-00142d70: 206f 7220 6120 4854 5450 2073 7461 7475 or a HTTP statu\n-00142d80: 7320 636f 6465 2062 6574 7765 656e 2031 s code between 1\n-00142d90: 3030 2061 6e64 2035 3939 2072 6574 7572 00 and 599 retur\n-00142da0: 6e65 6420 6279 2061 6e20 4854 5450 2073 ned by an HTTP s\n-00142db0: 6572 7665 722e 3c2f 6c69 3e0a 3c6c 693e erver..
  • \n-00142dc0: 3c63 6f64 653e 233c 6120 636c 6173 733d #soap\n-00142e80: 5f74 6370 5f65 7272 6f72 5f63 6865 636b _tcp_error_check\n-00142e90: 2873 6f61 705f 7374 6174 7573 2065 293c (soap_status e)<\n-00142ea0: 2f61 3e3c 2f63 6f64 653e 2063 6865 636b /a> check\n-00142eb0: 7320 666f 7220 5443 5020 7072 6f74 6f63 s for TCP protoc\n-00142ec0: 6f6c 2065 7272 6f72 732c 2072 6574 7572 ol errors, retur\n-00142ed0: 6e73 2074 7275 6520 6966 2074 6865 2073 ns true if the s\n-00142ee0: 7065 6369 6669 6564 2065 7272 6f72 2063 pecified error c\n-00142ef0: 6f64 6520 6973 2061 2054 4350 2065 7272 ode is a TCP err\n-00142f00: 6f72 2c20 7768 656e 2074 7275 6520 7573 or, when true us\n-00142f10: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap::er\n-00142fa0: 726e 756d 3c2f 613e 3c2f 636f 6465 3e20 rnum \n-00142fb0: 746f 2072 6574 7269 6576 6520 7468 6520 to retrieve the \n-00142fc0: 3c63 6f64 653e 6572 726e 6f3c 2f63 6f64 errno value to dete\n-00142fe0: 726d 696e 6520 7468 6520 6361 7573 652e rmine the cause.\n-00142ff0: 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 653e
  • .
  • \n-00143000: 233c 6120 636c 6173 733d 2265 6c22 2068 #soap_udp_e\n-001430c0: 7272 6f72 5f63 6865 636b 2873 6f61 705f rror_check(soap_\n-001430d0: 7374 6174 7573 2065 293c 2f61 3e3c 2f63 status e) checks for \n-001430f0: 5544 5020 7072 6f74 6f63 6f6c 2065 7272 UDP protocol err\n-00143100: 6f72 732c 2072 6574 7572 6e73 2074 7275 ors, returns tru\n-00143110: 6520 6966 2074 6865 2073 7065 6369 6669 e if the specifi\n-00143120: 6564 2065 7272 6f72 2063 6f64 6520 6973 ed error code is\n-00143130: 2061 2055 4450 2065 7272 6f72 2c20 7768 a UDP error, wh\n-00143140: 656e 2074 7275 6520 7573 6520 3c63 6f64 en true use soap::errnum to ret\n-001431f0: 7269 6576 6520 7468 6520 3c63 6f64 653e rieve the \n-00143200: 6572 726e 6f3c 2f63 6f64 653e 2076 616c errno val\n-00143210: 7565 2074 6f20 6465 7465 726d 696e 6520 ue to determine \n-00143220: 7468 6520 6361 7573 652e 3c2f 6c69 3e0a the cause.
  • .\n-00143230: 3c6c 693e 3c63 6f64 653e 233c 6120 636c
  • #soap_ssl\n-00143300: 5f65 7272 6f72 5f63 6865 636b 2873 6f61 _error_check(soa\n-00143310: 705f 7374 6174 7573 2065 293c 2f61 3e3c p_status e)<\n-00143320: 2f63 6f64 653e 2063 6865 636b 7320 666f /code> checks fo\n-00143330: 7220 5353 4c2f 544c 5320 7072 6f74 6f63 r SSL/TLS protoc\n-00143340: 6f6c 2065 7272 6f72 732c 2072 6574 7572 ol errors, retur\n-00143350: 6e73 2074 7275 6520 6966 2074 6865 2073 ns true if the s\n-00143360: 7065 6369 6669 6564 2065 7272 6f72 2063 pecified error c\n-00143370: 6f64 6520 6973 2061 2053 534c 2f54 4c53 ode is a SSL/TLS\n-00143380: 2065 7272 6f72 2c20 7768 656e 2074 7275 error, when tru\n-00143390: 6520 7573 6520 3c63 6f64 653e 3c61 2063 e use soap\n-00143420: 3a3a 6572 726e 756d 3c2f 613e 3c2f 636f ::errnum to retrieve \n-00143440: 7468 6520 3c63 6f64 653e 6572 726e 6f3c the errno<\n-00143450: 2f63 6f64 653e 2076 616c 7565 2074 6f20 /code> value to \n-00143460: 6465 7465 726d 696e 6520 7468 6520 6361 determine the ca\n-00143470: 7573 652e 3c2f 6c69 3e0a 3c6c 693e 3c63 use.
  • .
  • #soap_zli\n-00143540: 625f 6572 726f 725f 6368 6563 6b28 736f b_error_check(so\n-00143550: 6170 5f73 7461 7475 7320 6529 3c2f 613e ap_status e)\n-00143560: 3c2f 636f 6465 3e20 6368 6563 6b73 2066 checks f\n-00143570: 6f72 207a 6c69 6220 6c69 6272 6172 7920 or zlib library \n-00143580: 6572 726f 7273 2c20 7265 7475 726e 7320 errors, returns \n-00143590: 7472 7565 2069 6620 7468 6520 7370 6563 true if the spec\n-001435a0: 6966 6965 6420 6572 726f 7220 636f 6465 ified error code\n-001435b0: 2069 7320 6120 7a6c 6962 2065 7272 6f72 is a zlib error\n-001435c0: 2e3c 2f6c 693e 0a3c 2f75 6c3e 0a3c 703e .
  • ..

    \n-001435d0: 416e 2048 5454 5020 7374 6174 7573 2063 An HTTP status c\n-001435e0: 6f64 6520 6973 2072 6574 7572 6e65 6420 ode is returned \n-001435f0: 7768 656e 2074 6865 2063 6c69 656e 7420 when the client \n-00143600: 6661 696c 7320 746f 2063 6f6e 6e65 6374 fails to connect\n-00143610: 2074 6f20 616e 2048 5454 5020 7365 7276 to an HTTP serv\n-00143620: 6572 2061 6e64 2074 6865 2048 5454 5020 er and the HTTP \n-00143630: 7365 7276 6572 2072 6573 706f 6e73 6520 server response \n-00143640: 7769 7468 2061 6e20 6572 726f 722e 2054 with an error. T\n-00143650: 6865 206c 6973 7420 6f66 2048 5454 5020 he list of HTTP \n-00143660: 7374 6174 7573 2063 6f64 6573 2069 7320 status codes is \n-00143670: 6769 7665 6e20 6265 6c6f 773a 3c2f 703e given below:

    \n-00143680: 0a3c 7461 626c 6520 636c 6173 733d 226d .
    Error code \n-0013e840: 2020 3c2f 7468 3e3c 7468 2063 6c61 7373 Descrip\n-0013e870: 7469 6f6e 2020 2020 3c2f 7468 3e3c 2f74 tion
    #SOA\n-0013e8d0: 505f 4f4b 3c2f 636f 6465 3e20 2020 3c2f P_OK No error (z\n-0013e910: 6572 6f29 2020 2020 3c2f 7464 3e3c 2f74 ero)
    #SO\n-0013e970: 4150 5f43 4c49 5f46 4155 4c54 3c2f 636f AP_CLI_FAULT The\n-0013e9b0: 2073 6572 7669 6365 2072 6574 7572 6e65 service returne\n-0013e9c0: 6420 6120 534f 4150 2031 2e31 2063 6c69 d a SOAP 1.1 cli\n-0013e9d0: 656e 7420 6661 756c 7420 2f20 534f 4150 ent fault / SOAP\n-0013e9e0: 2031 2e32 2073 656e 6465 7220 6661 756c 1.2 sender faul\n-0013e9f0: 7420 746f 2074 6865 2063 6c69 656e 7420 t to the client \n-0013ea00: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #SOA\n-0013eb20: 505f 4445 4c5f 4d45 5448 4f44 3c2f 636f P_DEL_METHOD An \n-0013eb60: 4854 5450 2044 454c 4554 4520 7265 7175 HTTP DELETE requ\n-0013eb70: 6573 7420 7761 7320 7265 6365 6976 6564 est was received\n-0013eb80: 2062 7920 7468 6520 7365 7276 6963 6520 by the service \n-0013eb90: 6275 7420 7468 6520 4445 4c45 5445 2072 but the DELETE r\n-0013eba0: 6571 7565 7374 2063 616c 6c62 6163 6b20 equest callback \n-0013ebb0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap\n-0013ec80: 3a3a 6664 656c 3c2f 613e 3c2f 636f 6465 ::fdel is not impleme\n-0013eca0: 6e74 6564 2c20 7365 6520 5365 6374 696f nted, see Sectio\n-0013ecb0: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n Funct\n-0013ece0: 696f 6e20 6361 6c6c 6261 636b 7320 666f ion callbacks fo\n-0013ecf0: 7220 6375 7374 6f6d 697a 6564 2049 2f4f r customized I/O\n-0013ed00: 2061 6e64 2048 5454 5020 6861 6e64 6c69 and HTTP handli\n-0013ed10: 6e67 3c2f 613e 2020 2020 3c2f 7464 3e3c ng
    #S\n-0013ed70: 4f41 505f 4449 4d45 5f45 4e44 3c2f 636f OAP_DIME_END End\n-0013edb0: 206f 6620 4449 4d45 2061 7474 6163 686d of DIME attachm\n-0013edc0: 656e 7473 2070 726f 746f 636f 6c20 6572 ents protocol er\n-0013edd0: 726f 7220 2020 203c 2f74 643e 3c2f 7472 ror
    #SOA\n-0013ee30: 505f 4449 4d45 5f45 5252 4f52 3c2f 636f P_DIME_ERROR DIM\n-0013ee70: 4520 666f 726d 6174 7469 6e67 2065 7272 E formatting err\n-0013ee80: 6f72 206f 7220 4449 4d45 2061 7474 6163 or or DIME attac\n-0013ee90: 686d 656e 7420 7369 7a65 2065 7863 6565 hment size excee\n-0013eea0: 6473 203c 636f 6465 3e23 534f 4150 5f4d ds #SOAP_M\n-0013eeb0: 4158 4449 4d45 5349 5a45 3c2f 636f 6465 AXDIMESIZE
    #SOAP_D\n-0013ef20: 494d 455f 4852 4546 3c2f 636f 6465 3e20 IME_HREF \n-0013ef30: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 DIME at\n-0013ef60: 7461 6368 6d65 6e74 2068 6173 206e 6f20 tachment has no \n-0013ef70: 6872 6566 2066 726f 6d20 534f 4150 2062 href from SOAP b\n-0013ef80: 6f64 7920 616e 6420 6e6f 2044 494d 4520 ody and no DIME \n-0013ef90: 6361 6c6c 6261 636b 7320 7765 7265 2064 callbacks were d\n-0013efa0: 6566 696e 6564 2074 6f20 7361 7665 2074 efined to save t\n-0013efb0: 6865 2061 7474 6163 686d 656e 7420 2020 he attachment \n-0013efc0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    DIME v\n-0013f060: 6572 7369 6f6e 2065 7272 6f72 2020 2020 ersion error \n-0013f070: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    #SOAP_DUPLIC\n-0013f0d0: 4154 455f 4944 3c2f 636f 6465 3e20 2020 ATE_ID \n-0013f0e0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 XML eleme\n-0013f110: 6e74 2068 6173 2064 7570 6c69 6361 7465 nt has duplicate\n-0013f120: 2069 6420 6174 7472 6962 7574 6520 7661 id attribute va\n-0013f130: 6c75 6520 2861 7070 6c69 6361 626c 6520 lue (applicable \n-0013f140: 746f 2053 4f41 5020 6d75 6c74 692d 7265 to SOAP multi-re\n-0013f150: 6620 656e 636f 6469 6e67 2061 6e64 203c f encoding and <\n-0013f160: 636f 6465 3e23 534f 4150 5f58 4d4c 5f47 code>#SOAP_XML_G\n-0013f170: 5241 5048 3c2f 636f 6465 3e20 7365 7269 RAPH seri\n-0013f180: 616c 697a 6174 696f 6e29 2020 2020 3c2f alization)
    #SOAP_EMPTY
    #SOAP_EOF Unexp\n-0013f2f0: 6563 7465 6420 656e 6420 6f66 2066 696c ected end of fil\n-0013f300: 652c 206e 6f20 696e 7075 742c 2074 7261 e, no input, tra\n-0013f310: 6e73 6d69 7373 696f 6e20 696e 7465 7272 nsmission interr\n-0013f320: 7570 7465 6420 6f72 2074 696d 6564 206f upted or timed o\n-0013f330: 7574 2c20 7361 6d65 2061 7320 3c63 6f64 ut, same as EOF \n-0013f350: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    #SOAP_ERR Sa\n-0013f480: 6d65 2061 7320 3c63 6f64 653e 454f 463c me as EOF<\n-0013f490: 2f63 6f64 653e 2c20 6275 7420 696e 6469 /code>, but indi\n-0013f4a0: 6361 7465 7320 616e 2075 6e73 7065 6369 cates an unspeci\n-0013f4b0: 6669 6564 2065 7272 6f72 2020 2020 3c2f fied error
    #SOAP_FAULT
    #SOAP_FD_EXCE\n-0013f810: 4544 4544 3c2f 636f 6465 3e20 2020 3c2f EDED Too many op\n-0013f850: 656e 2073 6f63 6b65 7473 2020 2020 3c2f en sockets
    #SOAP_FIXED
    #SOAP_GET_METH\n-0013f9b0: 4f44 3c2f 636f 6465 3e20 2020 3c2f 7464 OD An HTTP GET r\n-0013f9f0: 6571 7565 7374 2077 6173 2072 6563 6569 equest was recei\n-0013fa00: 7665 6420 6279 2074 6865 2073 6572 7669 ved by the servi\n-0013fa10: 6365 2062 7574 2074 6865 2047 4554 2072 ce but the GET r\n-0013fa20: 6571 7565 7374 2063 616c 6c62 6163 6b20 equest callback \n-0013fa30: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fg\n-0013fb00: 6574 3c2f 613e 3c2f 636f 6465 3e20 6973 et is\n-0013fb10: 206e 6f74 2069 6d70 6c65 6d65 6e74 6564 not implemented\n-0013fb20: 2c20 7365 6520 5365 6374 696f 6e73 203c , see Sections <\n-0013fb30: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0013fb40: 663d 2269 6e64 6578 2e68 746d 6c23 6765 f=\"index.html#ge\n-0013fb50: 7422 3e48 6f77 2074 6f20 696d 706c 656d t\">How to implem\n-0013fb60: 656e 7420 4854 5450 2047 4554 2c20 5055 ent HTTP GET, PU\n-0013fb70: 542c 2061 6e64 2050 4154 4348 2073 6572 T, and PATCH ser\n-0013fb80: 7669 6365 733c 2f61 3e20 616e 6420 3c61 vices and Function \n-0013fbc0: 6361 6c6c 6261 636b 7320 666f 7220 6375 callbacks for cu\n-0013fbd0: 7374 6f6d 697a 6564 2049 2f4f 2061 6e64 stomized I/O and\n-0013fbe0: 2048 5454 5020 6861 6e64 6c69 6e67 3c2f HTTP handling
    #SOAP\n-0013fc50: 5f48 5245 463c 2f63 6f64 653e 2020 203c _HREF <\n-0013fc60: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>Reference \n-0013fc90: 746f 206f 626a 6563 7420 696e 2058 4d4c to object in XML\n-0013fca0: 2069 6465 6e74 6966 6965 6420 6279 2069 identified by i\n-0013fcb0: 7473 2069 6420 6174 7472 6962 7574 6520 ts id attribute \n-0013fcc0: 6973 2069 6e63 6f6d 7061 7469 626c 6520 is incompatible \n-0013fcd0: 7769 7468 2074 6865 206f 626a 6563 7420 with the object \n-0013fce0: 7265 6665 7272 6564 2074 6f20 6279 2074 referred to by t\n-0013fcf0: 6865 2072 6566 206f 7220 6872 6566 2061 he ref or href a\n-0013fd00: 7474 7269 6275 7465 2028 6170 706c 6963 ttribute (applic\n-0013fd10: 6162 6c65 2074 6f20 534f 4150 206d 756c able to SOAP mul\n-0013fd20: 7469 2d72 6566 2065 6e63 6f64 696e 6720 ti-ref encoding \n-0013fd30: 616e 6420 3c63 6f64 653e 2353 4f41 505f and #SOAP_\n-0013fd40: 584d 4c5f 4752 4150 483c 2f63 6f64 653e XML_GRAPH\n-0013fd50: 2073 6572 6961 6c69 7a61 7469 6f6e 2920 serialization) \n-0013fd60: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    An unspe\n-0013fe00: 6369 6669 6564 2048 5454 5020 6572 726f cified HTTP erro\n-0013fe10: 7220 6f63 6375 7272 6564 2020 2020 3c2f r occurred
    #SOAP_HTTP_ME\n-0013fe80: 5448 4f44 3c2f 636f 6465 3e20 2020 3c2f THOD An HTTP req\n-0013fec0: 7565 7374 2077 6173 2072 6563 6569 7665 uest was receive\n-0013fed0: 6420 6279 2074 6865 2073 6572 7669 6365 d by the service\n-0013fee0: 2074 6861 7420 6361 6e6e 6f74 2062 6520 that cannot be \n-0013fef0: 6861 6e64 6c65 6420 2020 203c 2f74 643e handled
    #\n-0013ff50: 534f 4150 5f49 4f42 3c2f 636f 6465 3e20 SOAP_IOB \n-0013ff60: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 SOAP ar\n-0013ff90: 7261 7920 696e 6465 7820 6f75 7420 6f66 ray index out of\n-0013ffa0: 2062 6f75 6e64 7320 2020 203c 2f74 643e bounds
    \n-00140000: 2353 4f41 505f 4c45 4e47 5448 3c2f 636f #SOAP_LENGTH XML\n-00140040: 2065 6c65 6d65 6e74 206f 7220 6174 7472 element or attr\n-00140050: 6962 7574 6520 6c65 6e67 7468 2076 616c ibute length val\n-00140060: 6964 6174 696f 6e20 6572 726f 7220 6f72 idation error or\n-00140070: 203c 636f 6465 3e23 534f 4150 5f4d 4158 #SOAP_MAX\n-00140080: 4c45 4e47 5448 3c2f 636f 6465 3e20 6578 LENGTH ex\n-00140090: 6365 6564 6564 2020 2020 3c2f 7464 3e3c ceeded
    #S\n-001400f0: 4f41 505f 4c45 5645 4c3c 2f63 6f64 653e OAP_LEVEL\n-00140100: 2020 203c 2f74 643e 3c74 6420 636c 6173 XML ne\n-00140130: 7374 696e 6720 6465 7074 6820 6c65 7665 sting depth leve\n-00140140: 6c20 6578 6365 6564 7320 3c63 6f64 653e l exceeds \n-00140150: 2353 4f41 505f 4d41 584c 4556 454c 3c2f #SOAP_MAXLEVEL
    #S\n-001401c0: 4f41 505f 4d49 4d45 5f45 4e44 3c2f 636f OAP_MIME_END End\n-00140200: 206f 6620 4d49 4d45 2061 7474 6163 686d of MIME attachm\n-00140210: 656e 7473 2070 726f 746f 636f 6c20 6572 ents protocol er\n-00140220: 726f 7220 2020 203c 2f74 643e 3c2f 7472 ror
    #SOAP\n-00140280: 5f4d 494d 455f 4552 524f 523c 2f63 6f64 _MIME_ERROR MIME\n-001402c0: 2061 7474 6163 686d 656e 7420 7061 7273 attachment pars\n-001402d0: 696e 6720 6572 726f 7220 2020 203c 2f74 ing error
    #SOAP_MIME_HRE\n-00140340: 463c 2f63 6f64 653e 2020 203c 2f74 643e F MIME attachmen\n-00140380: 7420 6861 7320 6e6f 2068 7265 6620 6672 t has no href fr\n-00140390: 6f6d 2053 4f41 5020 626f 6479 2061 6e64 om SOAP body and\n-001403a0: 206e 6f20 4d49 4d45 2063 616c 6c62 6163 no MIME callbac\n-001403b0: 6b73 2077 6572 6520 6465 6669 6e65 6420 ks were defined \n-001403c0: 746f 2073 6176 6520 7468 6520 6174 7461 to save the atta\n-001403d0: 6368 6d65 6e74 2020 2020 3c2f 7464 3e3c chment
    #S\n-00140430: 4f41 505f 4d49 5353 494e 475f 4944 3c2f OAP_MISSING_ID
    \n-00140580: 2353 4f41 505f 4d4f 453c 2f63 6f64 653e #SOAP_MOE\n-00140590: 2020 203c 2f74 643e 3c74 6420 636c 6173 Memory\n-001405c0: 206f 7665 7266 6c6f 7720 6f72 206d 656d overflow or mem\n-001405d0: 6f72 7920 636f 7272 7570 7469 6f6e 2065 ory corruption e\n-001405e0: 7272 6f72 2028 6170 706c 6963 6162 6c65 rror (applicable\n-001405f0: 2069 6e20 3c63 6f64 653e 2344 4542 5547 in #DEBUG\n-00140600: 3c2f 636f 6465 3e20 6d6f 6465 206f 6e6c mode onl\n-00140610: 7929 2020 2020 3c2f 7464 3e3c 2f74 723e y)
    #SOAP_\n-00140670: 4d55 5354 554e 4445 5253 5441 4e44 3c2f MUSTUNDERSTAND
    #SOAP_NAMESPAC\n-00140780: 453c 2f63 6f64 653e 2020 203c 2f74 643e E XML namespace \n-001407c0: 6e61 6d65 206d 6973 6d61 7463 6820 7661 name mismatch va\n-001407d0: 6c69 6461 7469 6f6e 2065 7272 6f72 2020 lidation error \n-001407e0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    No data in t\n-00140880: 6865 2048 5454 5020 626f 6479 206f 6620 he HTTP body of \n-00140890: 7468 6520 6d65 7373 6167 6520 7265 6365 the message rece\n-001408a0: 6976 6564 2020 2020 3c2f 7464 3e3c 2f74 ived
    #SO\n-00140900: 4150 5f4e 4f5f 4d45 5448 4f44 3c2f 636f AP_NO_METHOD The\n-00140940: 2073 6572 7669 6365 2072 6571 7565 7374 service request\n-00140950: 2064 6973 7061 7463 6865 7220 6469 6420 dispatcher did \n-00140960: 6e6f 7420 6669 6e64 2061 206d 6174 6368 not find a match\n-00140970: 696e 6720 7365 7276 6963 6520 6f70 6572 ing service oper\n-00140980: 6174 696f 6e20 666f 7220 6120 7365 7276 ation for a serv\n-00140990: 6963 6520 7265 7175 6573 7420 2020 203c ice request <\n-001409a0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_NO_TAG<\n-00140a00: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    #SOAP\n-00140ac0: 5f4e 544c 4d5f 4552 524f 523c 2f63 6f64 _NTLM_ERROR An N\n-00140b00: 544c 4d20 6175 7468 656e 7469 6361 7469 TLM authenticati\n-00140b10: 6f6e 2068 616e 6473 6861 6b65 2065 7272 on handshake err\n-00140b20: 6f72 206f 6363 7572 7265 6420 2020 203c or occurred <\n-00140b30: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_NULL XM\n-00140bc0: 4c20 656c 656d 656e 7420 6861 7320 616e L element has an\n-00140bd0: 203c 636f 6465 3e78 7369 3a6e 696c 3c2f xsi:nil attribute \n-00140bf0: 7768 656e 2074 6865 2065 6c65 6d65 6e74 when the element\n-00140c00: 2069 7320 6e6f 7420 6e69 6c6c 6162 6c65 is not nillable\n-00140c10: 2c20 6361 7573 696e 6720 6120 7661 6c69 , causing a vali\n-00140c20: 6461 7469 6f6e 2065 7272 6f72 2020 2020 dation error \n-00140c30: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    XML element mi\n-00140cd0: 6e4f 6363 7572 7320 6f72 206d 6178 4f63 nOccurs or maxOc\n-00140ce0: 6375 7273 2076 616c 6964 6174 696f 6e20 curs validation \n-00140cf0: 6572 726f 7220 6f72 203c 636f 6465 3e23 error or #\n-00140d00: 534f 4150 5f4d 4158 4f43 4355 5253 3c2f SOAP_MAXOCCURS exceeded \n-00140d20: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    An HTTP\n-00140dc0: 2050 4154 4348 2072 6571 7565 7374 2077 PATCH request w\n-00140dd0: 6173 2072 6563 6569 7665 6420 6279 2074 as received by t\n-00140de0: 6865 2073 6572 7669 6365 2062 7574 2074 he service but t\n-00140df0: 6865 2050 4154 4348 2072 6571 7565 7374 he PATCH request\n-00140e00: 2063 616c 6c62 6163 6b20 3c63 6f64 653e callback \n-00140e10: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fpat\n-00140ee0: 6368 3c2f 613e 3c2f 636f 6465 3e20 6973 ch is\n-00140ef0: 206e 6f74 2069 6d70 6c65 6d65 6e74 6564 not implemented\n-00140f00: 2c20 7365 6520 5365 6374 696f 6e20 3c61 , see Section Function \n-00140f40: 6361 6c6c 6261 636b 7320 666f 7220 6375 callbacks for cu\n-00140f50: 7374 6f6d 697a 6564 2049 2f4f 2061 6e64 stomized I/O and\n-00140f60: 2048 5454 5020 6861 6e64 6c69 6e67 3c2f HTTP handling
    #SOAP\n-00140fd0: 5f50 4154 5445 524e 3c2f 636f 6465 3e20 _PATTERN \n-00140fe0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 XML ele\n-00141010: 6d65 6e74 206f 7220 6174 7472 6962 7574 ment or attribut\n-00141020: 6520 7661 6c75 6520 7061 7474 6572 6e20 e value pattern \n-00141030: 6d69 736d 6174 6368 2020 2020 3c2f 7464 mismatch
    \n-00141090: 2353 4f41 505f 504c 5547 494e 5f45 5252 #SOAP_PLUGIN_ERR\n-001410a0: 4f52 3c2f 636f 6465 3e20 2020 3c2f 7464 OR Failed to reg\n-001410e0: 6973 7465 7220 706c 7567 696e 2020 2020 ister plugin \n-001410f0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    XML attrib\n-00141190: 7574 6520 6973 2070 726f 6869 6269 7465 ute is prohibite\n-001411a0: 6420 6275 7420 7072 6573 656e 7420 2020 d but present \n-001411b0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    An HTTP PU\n-00141250: 5420 7265 7175 6573 7420 7761 7320 7265 T request was re\n-00141260: 6365 6976 6564 2062 7920 7468 6520 7365 ceived by the se\n-00141270: 7276 6963 6520 6275 7420 7468 6520 5055 rvice but the PU\n-00141280: 5420 7265 7175 6573 7420 6361 6c6c 6261 T request callba\n-00141290: 636b 203c 636f 6465 3e3c 6120 636c 6173 ck soap:\n-00141360: 3a66 7075 743c 2f61 3e3c 2f63 6f64 653e :fput\n-00141370: 2069 7320 6e6f 7420 696d 706c 656d 656e is not implemen\n-00141380: 7465 642c 2073 6565 2053 6563 7469 6f6e ted, see Section\n-00141390: 203c 6120 636c 6173 733d 2265 6c22 2068 Functi\n-001413c0: 6f6e 2063 616c 6c62 6163 6b73 2066 6f72 on callbacks for\n-001413d0: 2063 7573 746f 6d69 7a65 6420 492f 4f20 customized I/O \n-001413e0: 616e 6420 4854 5450 2068 616e 646c 696e and HTTP handlin\n-001413f0: 673c 2f61 3e20 2020 203c 2f74 643e 3c2f g
    #S\n-00141450: 4f41 505f 5245 5155 4952 4544 3c2f 636f OAP_REQUIRED XML\n-00141490: 2061 7474 7269 6275 7465 2069 7320 7265 attribute is re\n-001414a0: 7175 6972 6564 2062 7574 206e 6f74 2070 quired but not p\n-001414b0: 7265 7365 6e74 2020 2020 3c2f 7464 3e3c resent
    #S\n-00141510: 4f41 505f 5353 4c5f 4552 524f 523c 2f63 OAP_SSL_ERROR An\n-00141550: 2053 534c 2065 7272 6f72 206f 6363 7572 SSL error occur\n-00141560: 7265 6420 2020 203c 2f74 643e 3c2f 7472 red
    #SOA\n-001415c0: 505f 5356 525f 4641 554c 543c 2f63 6f64 P_SVR_FAULT The \n-00141600: 7365 7276 6963 6520 7265 7475 726e 6564 service returned\n-00141610: 2061 2053 4f41 5020 312e 3120 7365 7276 a SOAP 1.1 serv\n-00141620: 6572 2066 6175 6c74 206f 7220 534f 4150 er fault or SOAP\n-00141630: 2031 2e32 2072 6563 6569 7665 7220 6661 1.2 receiver fa\n-00141640: 756c 7420 746f 2074 6865 2063 6c69 656e ult to the clien\n-00141650: 7420 2020 203c 2f74 643e 3c2f 7472 3e0a t
    #SOAP_S\n-001416b0: 594e 5441 585f 4552 524f 523c 2f63 6f64 YNTAX_ERROR An X\n-001416f0: 4d4c 2073 796e 7461 7820 6572 726f 7220 ML syntax error \n-00141700: 6f63 6375 7272 6564 2077 6869 6c65 2070 occurred while p\n-00141710: 6172 7369 6e67 2074 6865 2069 6e70 7574 arsing the input\n-00141720: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_T\n-00141780: 4147 5f4d 4953 4d41 5443 483c 2f63 6f64 AG_MISMATCH XML \n-001417c0: 656c 656d 656e 7420 7461 6720 7061 7273 element tag pars\n-001417d0: 6564 2064 6f65 7320 6e6f 7420 6d61 7463 ed does not matc\n-001417e0: 6820 616e 7974 6869 6e67 2074 6861 7420 h anything that \n-001417f0: 6973 2065 7870 6563 7465 6420 2020 203c is expected <\n-00141800: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_TCP_ERR\n-00141860: 4f52 3c2f 636f 6465 3e20 2020 3c2f 7464 OR A TCP/IP conn\n-001418a0: 6563 7469 6f6e 2065 7272 6f72 206f 6363 ection error occ\n-001418b0: 7572 7265 6420 2020 203c 2f74 643e 3c2f urred
    #S\n-00141910: 4f41 505f 5459 5045 3c2f 636f 6465 3e20 OAP_TYPE \n-00141920: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 XML ele\n-00141950: 6d65 6e74 206f 7220 6174 7472 6962 7574 ment or attribut\n-00141960: 6520 6861 7320 6120 6d69 736d 6174 6368 e has a mismatch\n-00141970: 696e 6720 7479 7065 206f 7220 7661 6c75 ing type or valu\n-00141980: 6520 7468 6174 2069 7320 6361 7573 696e e that is causin\n-00141990: 6720 6120 7661 6c69 6461 7469 6f6e 2065 g a validation e\n-001419a0: 7272 6f72 2020 2020 3c2f 7464 3e3c 2f74 rror
    #SOA\n-00141a00: 505f 5544 505f 4552 524f 523c 2f63 6f64 P_UDP_ERROR A UD\n-00141a40: 502f 4950 2063 6f6e 6e65 6374 696f 6e20 P/IP connection \n-00141a50: 6572 726f 7220 6f63 6375 7272 6564 206f error occurred o\n-00141a60: 7220 7468 6520 6d65 7373 6167 6520 746f r the message to\n-00141a70: 6f20 6c61 7267 6520 746f 2073 746f 7265 o large to store\n-00141a80: 2069 6e20 6120 5544 5020 7061 636b 6574 in a UDP packet\n-00141a90: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_U\n-00141af0: 5345 525f 4552 524f 523c 2f63 6f64 653e SER_ERROR\n-00141b00: 2020 203c 2f74 643e 3c74 6420 636c 6173 soap::user\n-00141bf0: 206e 6f74 2073 6574 2074 6f20 6e6f 6e2d not set to non-\n-00141c00: 4e55 4c4c 2020 2020 3c2f 7464 3e3c 2f74 NULL
    #SOA\n-00141c60: 505f 5554 465f 4552 524f 523c 2f63 6f64 P_UTF_ERROR An U\n-00141ca0: 5446 2d38 2064 6563 6f64 696e 6720 6572 TF-8 decoding er\n-00141cb0: 726f 7220 6f63 6375 7272 6564 2020 2020 ror occurred \n-00141cc0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    SOAP \n-00141d60: 7665 7273 696f 6e20 6d69 736d 6174 6368 version mismatch\n-00141d70: 206f 7220 6e6f 2053 4f41 5020 6d65 7373 or no SOAP mess\n-00141d80: 6167 6520 6973 2072 6563 6569 7665 6420 age is received \n-00141d90: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    A zlib e\n-00141e30: 7272 6f72 206f 6363 7572 7265 6420 2020 rror occurred \n-00141e40: 3c2f 7464 3e3c 2f74 723e 0a3c 2f74 6162
    .<\n-001436a0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-001436b0: 776e 5461 626c 6548 6561 6422 3e0a 3c74 wnTableHead\">.\n-001436e0: 436f 6465 2020 203c 2f74 683e 3c74 6820 Code .........<\n-00143960: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-00143970: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n-00143980: 3c74 6420 636c 6173 733d 226d 6172 6b64 N\n-001439d0: 6f20 436f 6e74 656e 7420 2020 203c 2f74 o Content ..<\n-00143a70: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>...........\n-00143d30: 3c74 7220 636c 6173 733d 226d 6172 6b64 .<\n-00143d80: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00143d90: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00143da0: 3e4e 6f74 204d 6f64 6966 6965 6420 2020 >Not Modified \n-00143db0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..3\n-00143e00: 3035 2020 203c 2f74 643e 3c74 6420 636c 05 ..\n-00143ed0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ...\n-00143f60: 3c74 7220 636c 6173 733d 226d 6172 6b64 .<\n-00143fb0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00143fc0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00143fd0: 3e55 6e61 7574 686f 7269 7a65 6420 2020 >Unauthorized \n-00143fe0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..4\n-00144030: 3032 2020 203c 2f74 643e 3c74 6420 636c 02 ..4\n-001440c0: 3033 2020 203c 2f74 643e 3c74 6420 636c 03 ....\n-001441d0: 3430 3520 2020 3c2f 7464 3e3c 7464 2063 405 ..<\n-00144240: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-00144250: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-00144260: 3e34 3036 2020 203c 2f74 643e 3c74 6420 >406 ..4\n-001442f0: 3037 2020 203c 2f74 643e 3c74 6420 636c 07 .....<\n-00144460: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-00144470: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n-00144480: 3c74 6420 636c 6173 733d 226d 6172 6b64 G\n-001444d0: 6f6e 6520 2020 203c 2f74 643e 3c2f 7472 one ..\n-00144570: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..<\n-001445c0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-001445d0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-001445e0: 3e50 7265 636f 6e64 6974 696f 6e20 4661 >Precondition Fa\n-001445f0: 696c 6564 2020 2020 3c2f 7464 3e3c 2f74 iled .....<\n-00144730: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-00144740: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n-00144750: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .\n-001447a0: 556e 7375 7070 6f72 7465 6420 4d65 6469 Unsupported Medi\n-001447b0: 6120 5479 7065 2020 2020 3c2f 7464 3e3c a Type <\n-001447c0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>....<\n-001448f0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>........<\n-00144b30: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>......

    HTTP st\n-00144c70: 6174 7573 2063 6f64 6520 3230 3020 6973 atus code 200 is\n-00144c80: 206e 6f74 2066 6c61 6767 6564 2061 7320 not flagged as \n-00144c90: 616e 2065 7272 6f72 2062 7920 7468 6520 an error by the \n-00144ca0: 656e 6769 6e65 2e20 5374 6174 7573 2063 engine. Status c\n-00144cb0: 6f64 6573 2032 3031 2061 6e64 2032 3032 odes 201 and 202\n-00144cc0: 2061 7265 2069 6e66 6f72 6d61 7469 7665 are informative\n-00144cd0: 2061 6e64 2073 686f 756c 6420 6e6f 7420 and should not \n-00144ce0: 6265 2063 6f6e 7369 6465 7265 6420 6572 be considered er\n-00144cf0: 726f 7273 2062 7920 7468 6520 6170 706c rors by the appl\n-00144d00: 6963 6174 696f 6e20 6c6f 6769 632e 3c2f ication logic..

    Server-sid\n-00144d20: 6520 696d 706c 656d 656e 7461 7469 6f6e e implementation\n-00144d30: 7320 6f66 2073 6572 7669 6365 206f 7065 s of service ope\n-00144d40: 7261 7469 6f6e 7320 7368 6f75 6c64 2072 rations should r\n-00144d50: 6574 7572 6e20 3c63 6f64 653e 2353 4f41 eturn #SOA\n-00144d60: 505f 4f4b 3c2f 636f 6465 3e20 7768 656e P_OK when\n-00144d70: 2074 6865 206f 7065 7261 7469 6f6e 2077 the operation w\n-00144d80: 6173 2073 7563 6365 7373 6675 6c2c 2077 as successful, w\n-00144d90: 6869 6368 2072 6574 7572 6e73 2061 2022 hich returns a \"\n-00144da0: 3230 3020 4f4b 2220 4854 5450 2068 6561 200 OK\" HTTP hea\n-00144db0: 6465 7220 7769 7468 2074 6865 2058 4d4c der with the XML\n-00144dc0: 2072 6573 706f 6e73 6520 6d65 7373 6167 response messag\n-00144dd0: 652e 2053 6572 7665 722d 7369 6465 2069 e. Server-side i\n-00144de0: 6d70 6c65 6d65 6e74 6174 696f 6e73 206f mplementations o\n-00144df0: 6620 7365 7276 6963 6520 6f70 6572 6174 f service operat\n-00144e00: 696f 6e73 2069 6e20 6753 4f41 5020 6d61 ions in gSOAP ma\n-00144e10: 7920 6469 7265 6374 6c79 2072 6574 7572 y directly retur\n-00144e20: 6e20 616e 2048 5454 5020 7374 6174 7573 n an HTTP status\n-00144e30: 2063 6f64 6520 7768 656e 2061 6e20 4854 code when an HT\n-00144e40: 5450 2d72 656c 6174 6564 2065 7272 6f72 TP-related error\n-00144e50: 2073 686f 756c 6420 6265 2072 6574 7572 should be retur\n-00144e60: 6e65 642e 2046 6f72 2065 7861 6d70 6c65 ned. For example\n-00144e70: 2c20 3c63 6f64 653e 7265 7475 726e 2034 , return 4\n-00144e80: 3034 3c2f 636f 6465 3e20 7265 7475 726e 04 return\n-00144e90: 7320 2234 3034 204e 6f74 2046 6f75 6e64 s \"404 Not Found\n-00144ea0: 2220 746f 2074 6865 2063 6c69 656e 7420 \" to the client \n-00144eb0: 616e 6420 7468 6520 3c63 6f64 653e 3c61 and the soap::error<\n-00144f70: 2f61 3e3c 2f63 6f64 653e 2076 6172 6961 /a> varia\n-00144f80: 626c 6520 6973 2073 6574 2074 6f20 3430 ble is set to 40\n-00144f90: 3420 6174 2074 6865 2063 6c69 656e 7420 4 at the client \n-00144fa0: 7369 6465 2e3c 2f70 3e0a 3c70 3e54 6f20 side.

    .

    To \n-00144fb0: 7265 7475 726e 2061 2053 4f41 5020 4661 return a SOAP Fa\n-00144fc0: 756c 7420 6672 6f6d 2061 2073 6572 7665 ult from a serve\n-00144fd0: 722d 7369 6465 2069 6d70 6c65 6d65 6e74 r-side implement\n-00144fe0: 6174 696f 6e20 6f66 2061 2073 6572 7669 ation of a servi\n-00144ff0: 6365 206f 7065 7261 7469 6f6e 2c20 7573 ce operation, us\n-00145000: 6520 6f6e 6520 6f66 2074 6865 2066 6f6c e one of the fol\n-00145010: 6c6f 7769 6e67 2066 756e 6374 696f 6e73 lowing functions\n-00145020: 2074 6f20 706f 7075 6c61 7465 2074 6865 to populate the\n-00145030: 2053 4f41 5020 4661 756c 7420 6d65 7373 SOAP Fault mess\n-00145040: 6167 653a 3c2f 703e 3c75 6c3e 0a3c 6c69 age:

    .

    \n-00145920: 4120 7265 6365 6976 6572 2065 7272 6f72 A receiver error\n-00145930: 2069 6e64 6963 6174 6573 2074 6861 7420 indicates that \n-00145940: 7468 6520 7365 7276 6963 6520 636f 756c the service coul\n-00145950: 6420 6e6f 7420 6861 6e64 6c65 2074 6865 d not handle the\n-00145960: 2063 6c69 656e 7420 7265 7175 6573 742c client request,\n-00145970: 2062 7574 2069 7420 6361 6e20 706f 7373 but it can poss\n-00145980: 6962 6c79 2072 6563 6f76 6572 2066 726f ibly recover fro\n-00145990: 6d20 7468 6520 6572 726f 7220 6c61 7465 m the error late\n-001459a0: 722c 2066 6f72 2065 7861 6d70 6c65 2077 r, for example w\n-001459b0: 6865 6e20 7265 736f 7572 6365 7320 6172 hen resources ar\n-001459c0: 6520 7465 6d70 6f72 6172 696c 7920 756e e temporarily un\n-001459d0: 6176 6169 6c61 626c 652e 2041 2073 656e available. A sen\n-001459e0: 6465 7220 6572 726f 7220 696e 6469 6361 der error indica\n-001459f0: 7465 7320 7468 6174 2074 6865 2063 6c69 tes that the cli\n-00145a00: 656e 7420 7265 7175 6573 7420 6973 2066 ent request is f\n-00145a10: 6175 6c74 7920 616e 6420 7320 7265 6a65 aulty and s reje\n-00145a20: 6374 6564 2062 7920 7468 6520 7365 7276 cted by the serv\n-00145a30: 6963 652e 3c2f 703e 0a3c 703e 5365 6520 ice.

    .

    See \n-00145a40: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section SO\n-00145a70: 4150 2046 6175 6c74 2070 726f 6365 7373 AP Fault process\n-00145a80: 696e 673c 2f61 3e20 666f 7220 6d6f 7265 ing for more\n-00145a90: 2064 6574 6169 6c73 206f 6e20 686f 7720 details on how \n-00145aa0: 746f 2075 7365 2074 6865 7365 2066 756e to use these fun\n-00145ab0: 6374 696f 6e73 2e3c 2f70 3e0a 3c70 3ef0 ctions.

    .

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

    .Memory \n-00145b20: 6d61 6e61 6765 6d65 6e74 3c2f 6831 3e0a management

    .\n-00145b30: 3c70 3e4d 656d 6f72 7920 6d61 6e61 6765

    Memory manage\n-00145b40: 6d65 6e74 2077 6974 6820 6753 4f41 5020 ment with gSOAP \n-00145b50: 6973 2061 7574 6f6d 6174 6963 2e20 5468 is automatic. Th\n-00145b60: 6520 656e 6769 6e65 2063 6f6e 7465 7874 e engine context\n-00145b70: 206d 616e 6167 6573 2061 6c6c 206d 656d manages all mem\n-00145b80: 6f72 7920 616c 6c6f 6361 7465 6420 746f ory allocated to\n-00145b90: 2073 6572 6961 6c69 7a65 2064 6174 6120 serialize data \n-00145ba0: 616e 6420 666f 7220 7465 6d70 6f72 6172 and for temporar\n-00145bb0: 7920 7374 6f72 6167 652e 2044 6573 6572 y storage. Deser\n-00145bc0: 6961 6c69 7a65 6420 6461 7461 2069 7320 ialized data is \n-00145bd0: 616c 6c6f 6361 7465 6420 696e 206d 616e allocated in man\n-00145be0: 6167 6564 206d 656d 6f72 7920 616e 6420 aged memory and \n-00145bf0: 6461 7461 2073 7472 7563 7475 7265 7320 data structures \n-00145c00: 6361 6e20 6265 2061 6c6c 6f63 6174 6564 can be allocated\n-00145c10: 2069 6e20 6d61 6e61 6765 6420 6d65 6d6f in managed memo\n-00145c20: 7279 2062 7920 7468 6520 7573 6572 2077 ry by the user w\n-00145c30: 6865 6e20 6465 7369 7265 6420 7573 696e hen desired usin\n-00145c40: 6720 3c63 6f64 653e 736f 6170 5f6e 6577 g soap_new\n-00145c50: 5f54 3c2f 636f 6465 3e20 6675 6e63 7469 _T functi\n-00145c60: 6f6e 7320 6765 6e65 7261 7465 6420 6279 ons generated by\n-00145c70: 2073 6f61 7063 7070 3220 666f 7220 6561 soapcpp2 for ea\n-00145c80: 6368 2073 6572 6961 6c69 7a61 626c 6520 ch serializable \n-00145c90: 7479 7065 203c 636f 6465 3e54 3c2f 636f type T. All memory \n-00145cb0: 6d61 6e61 6765 6420 6279 2061 2063 6f6e managed by a con\n-00145cc0: 7465 7874 2069 7320 6465 616c 6c6f 6361 text is dealloca\n-00145cd0: 7465 6420 7769 7468 203c 636f 6465 3e3c ted with <\n-00145ce0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00145cf0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00145d00: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga\n-00145d10: 6637 6430 3137 3631 3631 6539 6465 6633 f7d0176161e9def3\n-00145d20: 3639 3831 6532 3466 6161 3139 3133 6439 6981e24faa1913d9\n-00145d30: 2220 7469 746c 653d 2244 656c 6574 6520 \" title=\"Delete \n-00145d40: 616c 6c20 6479 6e61 6d69 6361 6c6c 792d all dynamically-\n-00145d50: 616c 6c6f 6361 7465 6420 432b 2b20 6f62 allocated C++ ob\n-00145d60: 6a65 6374 7320 6d61 6e61 6765 6420 6279 jects managed by\n-00145d70: 2074 6865 2073 7065 6369 6669 6564 2073 the specified s\n-00145d80: 6f61 7020 636f 6e74 6578 742e 223e 736f oap context.\">so\n-00145d90: 6170 5f64 6573 7472 6f79 3c2f 613e 3c2f ap_destroy to destroy\n-00145db0: 206d 616e 6167 6564 2043 2b2b 206f 626a managed C++ obj\n-00145dc0: 6563 7473 2061 6e64 203c 636f 6465 3e3c ects and <\n-00145dd0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00145de0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00145df0: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga\n-00145e00: 3831 6130 3039 6165 3165 6138 3235 6130 81a009ae1ea825a0\n-00145e10: 3565 3532 3431 6532 6237 6138 6563 6539 5e5241e2b7a8ece9\n-00145e20: 2220 7469 746c 653d 2244 656c 6574 6520 \" title=\"Delete \n-00145e30: 616c 6c20 6461 7461 2066 726f 6d20 6865 all data from he\n-00145e40: 6170 206d 656d 6f72 7920 6d61 6e61 6765 ap memory manage\n-00145e50: 6420 6279 2074 6865 2073 7065 6369 6669 d by the specifi\n-00145e60: 6564 2073 6f61 7020 636f 6e74 6578 7420 ed soap context \n-00145e70: 616e 6420 7265 6c65 6173 6520 7468 6520 and release the \n-00145e80: 6672 6565 6420 6d65 6d6f 7279 2062 2e2e freed memory b..\n-00145e90: 2e22 3e73 6f61 705f 656e 643c 2f61 3e3c .\">soap_end<\n-00145ea0: 2f63 6f64 653e 2074 6f20 6465 6c65 7465 /code> to delete\n-00145eb0: 2061 6c6c 206f 7468 6572 206d 616e 6167 all other manag\n-00145ec0: 6564 2064 6174 612e 2057 6865 6e20 6120 ed data. When a \n-00145ed0: 636f 6e74 6578 7420 6973 2066 696e 616c context is final\n-00145ee0: 697a 6564 206f 7220 6672 6565 6420 7769 ized or freed wi\n-00145ef0: 7468 203c 636f 6465 3e3c 6120 636c 6173 th soa\n-00145fc0: 705f 646f 6e65 2873 7472 7563 7420 736f p_done(struct so\n-00145fd0: 6170 2a29 3c2f 613e 3c2f 636f 6465 3e20 ap*) \n-00145fe0: 616e 6420 3c63 6f64 653e 3c61 2063 6c61 and soap_f\n-00146090: 7265 6528 7374 7275 6374 2073 6f61 702a ree(struct soap*\n-001460a0: 293c 2f61 3e3c 2f63 6f64 653e 2074 6865 ) the\n-001460b0: 6e20 6d61 6e61 6765 6420 6d65 6d6f 7279 n managed memory\n-001460c0: 2069 7320 6e6f 7420 7265 6c65 6173 6564 is not released\n-001460d0: 2c20 736f 2069 7420 6973 2069 6d70 6f72 , so it is impor\n-001460e0: 7461 6e74 2074 6f20 6361 6c6c 2074 6865 tant to call the\n-001460f0: 2064 6561 6c6c 6f63 6174 696f 6e20 6675 deallocation fu\n-00146100: 6e63 7469 6f6e 7320 6669 7273 742e 2054 nctions first. T\n-00146110: 6869 7320 7761 7320 646f 6e65 2074 6f20 his was done to \n-00146120: 616c 6c6f 7720 6d61 6e61 6765 6420 6461 allow managed da\n-00146130: 7461 2074 6f20 6f75 746c 6976 6520 7468 ta to outlive th\n-00146140: 6520 636f 6e74 6578 742c 2073 7563 6820 e context, such \n-00146150: 6173 2064 6573 6572 6961 6c69 7a65 6420 as deserialized \n-00146160: 6f62 6a65 6374 732c 2062 7574 2074 6869 objects, but thi\n-00146170: 7320 6973 2072 6172 656c 7920 6966 2065 s is rarely if e\n-00146180: 7665 7220 7573 6564 2062 6563 6175 7365 ver used because\n-00146190: 2064 656c 6574 696e 6720 7468 6520 6f75 deleting the ou\n-001461a0: 746c 6976 6564 2064 6174 6120 6578 706c tlived data expl\n-001461b0: 6963 6974 6c79 2069 7320 7072 6f6e 6520 icitly is prone \n-001461c0: 746f 206d 6973 7461 6b65 732e 3c2f 703e to mistakes.

    \n-001461d0: 0a3c 703e 4966 2079 6f75 2077 616e 7420 .

    If you want \n-001461e0: 746f 206c 6574 2064 6573 6572 6961 6c69 to let deseriali\n-001461f0: 7a65 6420 6461 7461 206f 7574 6c69 7665 zed data outlive\n-00146200: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap context tha\n-00146270: 7420 796f 7520 6172 6520 6162 6f75 7420 t you are about \n-00146280: 746f 2066 7265 652c 2074 6865 6e20 796f to free, then yo\n-00146290: 7520 6361 6e20 6465 6c65 6761 7465 206d u can delegate m\n-001462a0: 616e 6167 656d 656e 7420 6f66 2074 6865 anagement of the\n-001462b0: 2064 6174 6120 746f 2061 6e6f 7468 6572 data to another\n-001462c0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap context with \n-00146330: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_d\n-00146400: 656c 6567 6174 655f 6465 6c65 7469 6f6e elegate_deletion\n-00146410: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n-00146420: 6170 5f66 726f 6d2c 2073 7472 7563 7420 ap_from, struct \n-00146430: 736f 6170 202a 736f 6170 5f74 6f29 3c2f soap *soap_to). This \n-00146450: 6d6f 7665 7320 616c 6c20 6465 7365 7269 moves all deseri\n-00146460: 616c 697a 6564 2061 6e64 2074 656d 706f alized and tempo\n-00146470: 7261 7279 2064 6174 6120 746f 2074 6865 rary data to the\n-00146480: 206f 7468 6572 203c 636f 6465 3e3c 6120 other soap context\n-001464f0: 203c 636f 6465 3e73 6f61 705f 746f 3c2f soap_to, which wil\n-00146510: 6c20 6465 6c65 7465 2069 7473 2064 6174 l delete its dat\n-00146520: 6120 616e 6420 616c 6c20 7468 6520 6465 a and all the de\n-00146530: 6c65 6761 7465 6420 6461 7461 2069 7420 legated data it \n-00146540: 6973 2072 6573 706f 6e73 6962 6c65 2066 is responsible f\n-00146550: 6f72 2077 6865 6e20 796f 7520 6361 6c6c or when you call\n-00146560: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_destr\n-00146620: 6f79 3c2f 613e 3c2f 636f 6465 3e20 616e oy an\n-00146630: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d soap\n-00146700: 5f65 6e64 3c2f 613e 3c2f 636f 6465 3e2e _end.\n-00146710: 2054 6869 7320 6361 6e20 6265 2070 6172 This can be par\n-00146720: 7469 6375 6c61 726c 7920 7573 6566 756c ticularly useful\n-00146730: 2066 6f72 206d 616b 696e 6720 636c 6965 for making clie\n-00146740: 6e74 2063 616c 6c73 2069 6e73 6964 6520 nt calls inside \n-00146750: 6120 7365 7276 6572 206f 7065 7261 7469 a server operati\n-00146760: 6f6e 2c20 692e 652e 2061 206d 6978 6564 on, i.e. a mixed\n-00146770: 2073 6572 7665 7220 616e 6420 636c 6965 server and clie\n-00146780: 6e74 2e20 5468 6520 636c 6965 6e74 2063 nt. The client c\n-00146790: 616c 6c20 696e 7369 6465 2074 6865 2073 all inside the s\n-001467a0: 6572 7665 7220 6f70 6572 6174 696f 6e20 erver operation \n-001467b0: 7265 7175 6972 6573 2061 206e 6577 203c requires a new <\n-001467c0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n-00146820: 2063 6f6e 7465 7874 2c20 652e 672e 2063 context, e.g. c\n-00146830: 6f70 6965 6420 6672 6f6d 2074 6865 2073 opied from the s\n-00146840: 6572 7665 7227 7320 7769 7468 203c 636f erver's with so\n-00146900: 6170 5f63 6f70 793c 2f61 3e3c 2f63 6f64 ap_copy. Before destr\n-00146920: 6f79 696e 6720 7468 6520 636c 6965 6e74 oying the client\n-00146930: 2063 6f6e 7465 7874 2077 6974 6820 3c63 context with soap_free, the da\n-00146a00: 7461 2063 616e 2062 6520 6465 6c65 6761 ta can be delega\n-00146a10: 7465 6420 746f 2074 6865 2073 6572 7665 ted to the serve\n-00146a20: 7227 7320 636f 6e74 6578 7420 7769 7468 r's context with\n-00146a30: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_\n-00146b00: 6465 6c65 6761 7465 5f64 656c 6574 696f delegate_deletio\n-00146b10: 6e3c 2f61 3e3c 2f63 6f64 653e 2e20 5365 n. Se\n-00146b20: 6520 666f 7220 6578 616d 706c 6520 3c65 e for example gsoap/sa\n-00146b40: 6d70 6c65 732f 6d61 7368 7570 2f6d 6173 mples/mashup/mas\n-00146b50: 6875 7073 6572 7665 722e 633c 2f63 6f64 hupserver.c in the g\n-00146b70: 534f 4150 2073 6f75 7263 6520 636f 6465 SOAP source code\n-00146b80: 2070 6163 6b61 6765 2e3c 2f70 3e0a 3c70 package.

    .The functions r\n-00146ba0: 656c 6174 6564 2074 6f20 6d65 6d6f 7279 elated to memory\n-00146bb0: 206d 616e 6167 656d 656e 7420 6279 2074 management by t\n-00146bc0: 6865 2063 6f6e 7465 7874 2061 7265 3a3c he context are:<\n-00146bd0: 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e3c 636f /p>..<\n-00148140: 703e 546f 2068 656c 7020 756e 6465 7273 p>To help unders\n-00148150: 7461 6e64 2074 6865 2064 6966 6665 7265 tand the differe\n-00148160: 6e63 6573 2062 6574 7765 656e 206d 616e nces between man\n-00148170: 6167 6564 206f 626a 6563 7473 2c20 6d61 aged objects, ma\n-00148180: 6e61 6765 6420 6461 7461 2c20 616e 6420 naged data, and \n-00148190: 6d61 6e61 6765 6420 7465 6d70 6f72 6172 managed temporar\n-001481a0: 7920 6461 7461 3a20 7465 6d70 6f72 6172 y data: temporar\n-001481b0: 7920 6461 7461 2069 7320 6372 6561 7465 y data is create\n-001481c0: 6420 6279 2074 6865 2065 6e67 696e 6520 d by the engine \n-001481d0: 746f 206b 6565 7020 7472 6163 6b20 6f66 to keep track of\n-001481e0: 2074 6869 6e67 732c 2073 7563 6820 6173 things, such as\n-001481f0: 2068 6173 6820 7461 626c 6573 2074 6f20 hash tables to \n-00148200: 6b65 6570 2070 6f69 6e74 6572 2072 6566 keep pointer ref\n-00148210: 6572 656e 6365 2069 6e66 6f72 6d61 7469 erence informati\n-00148220: 6f6e 2066 6f72 2073 6572 6961 6c69 7a61 on for serializa\n-00148230: 7469 6f6e 2061 6e64 2068 6173 6820 7461 tion and hash ta\n-00148240: 626c 6573 2074 6f20 6b65 6570 2058 4d4c bles to keep XML\n-00148250: 2069 642f 6872 6566 2069 6e66 6f72 6d61 id/href informa\n-00148260: 7469 6f6e 2066 6f72 206d 756c 7469 2d72 tion for multi-r\n-00148270: 6566 6572 656e 6365 206f 626a 6563 7420 eference object \n-00148280: 6465 7365 7269 616c 697a 6174 696f 6e2e deserialization.\n-00148290: 2044 6573 6572 6961 6c69 7a65 6420 6461 Deserialized da\n-001482a0: 7461 2069 7320 616c 6c6f 6361 7465 6420 ta is allocated \n-001482b0: 6279 2074 6865 2063 6f6e 7465 7874 2069 by the context i\n-001482c0: 6e20 6d61 6e61 6765 6420 6d65 6d6f 7279 n managed memory\n-001482d0: 2077 6865 6e20 636f 6e73 7472 7563 7469 when constructi\n-001482e0: 6e67 2064 6174 6120 7374 7275 6374 7572 ng data structur\n-001482f0: 6573 2062 7920 6465 7365 7269 616c 697a es by deserializ\n-00148300: 696e 6720 584d 4c20 616e 6420 4a53 4f4e ing XML and JSON\n-00148310: 206d 6573 7361 6765 732e 2044 6174 6120 messages. Data \n-00148320: 6973 2073 746f 7265 6420 696e 206d 656d is stored in mem\n-00148330: 6f72 7920 6d61 6e61 6765 6420 6279 2074 ory managed by t\n-00148340: 6865 2063 6f6e 7465 7874 2075 7369 6e67 he context using\n-00148350: 2063 616c 6c73 2074 6f20 3c63 6f64 653e calls to \n-00148360: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_malloc to allo\n-00148420: 6361 7465 2068 6561 7020 7370 6163 6520 cate heap space \n-00148430: 7769 7468 203c 636f 6465 3e6d 616c 6c6f with mallo\n-00148440: 633c 2f63 6f64 653e 2e20 4120 7469 6e79 c. A tiny\n-00148450: 2062 6974 206d 6f72 6520 7370 6163 6520 bit more space \n-00148460: 6973 2061 6c6c 6f63 6174 6564 2074 6f20 is allocated to \n-00148470: 6b65 6570 2074 7261 636b 206f 6620 7468 keep track of th\n-00148480: 6520 616c 6c6f 6361 7469 6f6e 7320 616e e allocations an\n-00148490: 6420 746f 2061 6464 2061 2022 6361 6e61 d to add a \"cana\n-001484a0: 7279 2220 776f 7264 2074 6f20 6465 7465 ry\" word to dete\n-001484b0: 6374 2068 6561 7020 6d65 6d6f 7279 206f ct heap memory o\n-001484c0: 7665 7266 6c6f 7773 2e20 4865 6170 206d verflows. Heap m\n-001484d0: 656d 6f72 7920 6f76 6572 666c 6f77 7320 emory overflows \n-001484e0: 6172 6520 6465 7465 6374 6564 2077 6865 are detected whe\n-001484f0: 6e20 636f 6e74 6578 742d 6d61 6e61 6765 n context-manage\n-00148500: 6420 6461 7461 2069 7320 6465 616c 6c6f d data is deallo\n-00148510: 6361 7465 6420 7769 7468 203c 636f 6465 cated with soap_end. C++ ob\n-00148600: 6a65 6374 7320 6172 6520 616c 6c6f 6361 jects are alloca\n-00148610: 7465 6420 7769 7468 203c 636f 6465 3e6e ted with n\n-00148620: 6577 3c2f 636f 6465 3e20 696e 7374 6561 ew instea\n-00148630: 6420 6f66 203c 636f 6465 3e6d 616c 6c6f d of mallo\n-00148640: 633c 2f63 6f64 653e 2061 6e64 2061 7265 c and are\n-00148650: 2074 7261 636b 6564 2061 7320 7765 6c6c tracked as well\n-00148660: 2e20 5468 6573 6520 6f62 6a65 6374 7320 . These objects \n-00148670: 6172 6520 6465 616c 6c6f 6361 7465 6420 are deallocated \n-00148680: 7769 7468 203c 636f 6465 3e3c 6120 636c with soap_d\n-00148740: 6573 7472 6f79 3c2f 613e 3c2f 636f 6465 estroy.

    .

    When t\n-00148760: 6865 2067 534f 4150 2061 7070 6c69 6361 he gSOAP applica\n-00148770: 7469 6f6e 2069 7320 636f 6d70 696c 6564 tion is compiled\n-00148780: 2077 6974 6820 3c62 3e3c 636f 6465 3e2d with -\n-00148790: 4444 4542 5547 3c2f 636f 6465 3e3c 2f62 DDEBUG using the comp\n-001487b0: 696c 652d 7469 6d65 2066 6c61 6720 3c63 ile-time flag #DEBUG, the engine re\n-001487e0: 706f 7274 7320 6d65 6d6f 7279 206c 6561 ports memory lea\n-001487f0: 6b73 2077 6869 6368 2061 7265 2064 6574 ks which are det\n-00148800: 6563 7465 6420 6279 203c 636f 6465 3e3c ected by <\n-00148810: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00148820: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00148830: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga\n-00148840: 3238 6565 3866 6463 6635 3030 3434 3365 28ee8fdcf500443e\n-00148850: 3065 3531 3735 3033 3234 6161 3661 3161 0e51750324aa6a1a\n-00148860: 2220 7469 746c 653d 2246 696e 616c 697a \" title=\"Finaliz\n-00148870: 6520 7468 6520 6769 7665 6e20 736f 6170 e the given soap\n-00148880: 2063 6f6e 7465 7874 2c20 692e 652e 2077 context, i.e. w\n-00148890: 6865 6e20 7468 6520 736f 6170 2063 6f6e hen the soap con\n-001488a0: 7465 7874 2069 7320 7374 6163 6b20 616c text is stack al\n-001488b0: 6c6f 6361 7465 642c 2061 7574 6f6d 6174 located, automat\n-001488c0: 6963 616c 6c79 2069 6e76 6f6b 6564 2e2e ically invoked..\n-001488d0: 2e22 3e73 6f61 705f 646f 6e65 3c2f 613e .\">soap_done\n-001488e0: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and soap_free<\n-001489a0: 2f63 6f64 653e 2e20 546f 2069 6d70 726f /code>. To impro\n-001489b0: 7665 2074 6865 2061 6363 7572 6163 7920 ve the accuracy \n-001489c0: 6f66 2064 6574 6563 7469 6f6e 2c20 6e6f of detection, no\n-001489d0: 206d 656d 6f72 7920 6973 2061 6374 7561 memory is actua\n-001489e0: 6c6c 7920 6672 6565 6420 756e 7469 6c20 lly freed until \n-001489f0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_d\n-00148ac0: 6f6e 653c 2f61 3e3c 2f63 6f64 653e 206f one o\n-00148ad0: 7220 3c63 6f64 653e 3c61 2063 6c61 7373 r soap_fre\n-00148b80: 653c 2f61 3e3c 2f63 6f64 653e 2061 7265 e are\n-00148b90: 2063 616c 6c65 6420 746f 2064 6574 6563 called to detec\n-00148ba0: 7420 6d65 6d6f 7279 2069 7373 7565 732c t memory issues,\n-00148bb0: 2073 6f20 616e 7920 6361 6c6c 7320 746f so any calls to\n-00148bc0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_destr\n-00148c80: 6f79 3c2f 613e 3c2f 636f 6465 3e20 616e oy an\n-00148c90: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d soap\n-00148d60: 5f65 6e64 3c2f 613e 3c2f 636f 6465 3e20 _end \n-00148d70: 6172 6520 6163 7475 616c 6c79 2064 6566 are actually def\n-00148d80: 6572 7265 6420 746f 2062 6520 6578 6563 erred to be exec\n-00148d90: 7574 6564 2077 6865 6e20 7468 6520 636f uted when the co\n-00148da0: 6e74 6578 7420 6669 6e61 6c69 7a65 732e ntext finalizes.\n-00148db0: 3c2f 703e 0a3c 703e 5768 696c 6520 6d65

    .

    While me\n-00148dc0: 6d6f 7279 206d 616e 6167 656d 656e 7420 mory management \n-00148dd0: 696e 2067 534f 4150 2069 7320 6175 746f in gSOAP is auto\n-00148de0: 6d61 7469 632c 2069 7420 646f 6573 206e matic, it does n\n-00148df0: 6f74 2065 6e66 6f72 6365 2069 7473 206f ot enforce its o\n-00148e00: 776e 206d 656d 6f72 7920 6d61 6e61 6765 wn memory manage\n-00148e10: 6d65 6e74 2070 6f6c 6963 7920 6f6e 2074 ment policy on t\n-00148e20: 6865 2075 7365 722e 2054 6f20 6d6f 7665 he user. To move\n-00148e30: 206d 616e 6167 6564 206f 626a 6563 7473 managed objects\n-00148e40: 2061 6e64 2064 6174 6120 696e 746f 2075 and data into u\n-00148e50: 6e6d 616e 6167 6564 2068 6561 7020 7370 nmanaged heap sp\n-00148e60: 6163 652c 2074 6865 203c 636f 6465 3e73 ace, the s\n-00148e70: 6f61 705f 6475 705f 543c 2f63 6f64 653e oap_dup_T\n-00148e80: 2064 6565 7020 636f 7079 2066 756e 6374 deep copy funct\n-00148e90: 696f 6e73 2067 656e 6572 6174 6564 2062 ions generated b\n-00148ea0: 7920 3c62 3e3c 636f 6465 3e73 6f61 7063 y soapc\n-00148eb0: 7070 3220 2d45 633c 2f63 6f64 653e 3c2f pp2 -Ec option -Ec can be used. T\n-00148ef0: 6f20 6465 6c65 7465 2064 6565 7020 636f o delete deep co\n-00148f00: 7069 6573 2c20 7468 6520 3c63 6f64 653e pies, the \n-00148f10: 736f 6170 5f64 656c 5f54 3c2f 636f 6465 soap_del_T deep deletion \n-00148f30: 6675 6e63 7469 6f6e 7320 6765 6e65 7261 functions genera\n-00148f40: 7465 6420 6279 203c 623e 3c63 6f64 653e ted by \n-00148f50: 736f 6170 6370 7032 202d 4564 3c2f 636f soapcpp2 -Ed option <\n-00148f70: 623e 3c63 6f64 653e 2d45 643c 2f63 6f64 b>-Ed can be us\n-00148f90: 6564 2e20 4166 7465 7220 636f 7079 696e ed. After copyin\n-00148fa0: 6720 7468 6520 7573 7561 6c20 3c63 6f64 g the usual soap_destroy and soap_end<\n-00149150: 2f61 3e3c 2f63 6f64 653e 2066 756e 6374 /a> funct\n-00149160: 696f 6e73 2072 656d 6f76 6520 7468 6520 ions remove the \n-00149170: 6d61 6e61 6765 6420 6f72 6967 696e 616c managed original\n-00149180: 732e 2053 6565 2061 6c73 6f20 5365 6374 s. See also Sect\n-00149190: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion Generat\n-001491c0: 696e 6720 6465 6570 2063 6f70 7920 616e ing deep copy an\n-001491d0: 6420 6465 6c65 7469 6f6e 2066 756e 6374 d deletion funct\n-001491e0: 696f 6e73 3c2f 613e 2e3c 2f70 3e0a 3c70 ions.

    .Furthermore, th\n-00149200: 6520 6d65 6d6f 7279 2061 6c6c 6f63 6174 e memory allocat\n-00149210: 696f 6e20 6675 6e63 7469 6f6e 7320 3c63 ion functions malloc and new<\n-00149240: 2f63 6f64 653e 2075 7365 6420 6279 2074 /code> used by t\n-00149250: 6865 2065 6e67 696e 6520 696e 7465 726e he engine intern\n-00149260: 616c 6c79 2063 616e 2062 6520 7265 706c ally can be repl\n-00149270: 6163 6564 2077 6974 6820 6f74 6865 7220 aced with other \n-00149280: 616c 6c6f 6361 746f 7273 2062 7920 6465 allocators by de\n-00149290: 6669 6e69 6e67 203c 636f 6465 3e53 4f41 fining SOA\n-001492a0: 505f 4d41 4c4c 4f43 3c2f 636f 6465 3e20 P_MALLOC \n-001492b0: 616e 6420 3c63 6f64 653e 534f 4150 5f46 and SOAP_F\n-001492c0: 5245 453c 2f63 6f64 653e 2074 6f20 7265 REE to re\n-001492d0: 706c 6163 6520 3c63 6f64 653e 6d61 6c6c place mall\n-001492e0: 6f63 3c2f 636f 6465 3e20 616e 6420 3c63 oc and free,\n-00149300: 2061 6e64 2064 6566 696e 6520 3c63 6f64 and define SOAP_NEW, SOAP_NE\n-00149330: 575f 4152 5241 593c 2f63 6f64 653e 2c20 W_ARRAY, \n-00149340: 3c63 6f64 653e 534f 4150 5f50 4c41 4345 SOAP_PLACE\n-00149350: 4d45 4e54 5f4e 4557 3c2f 636f 6465 3e2c MENT_NEW,\n-00149360: 2061 6e64 203c 636f 6465 3e53 4f41 505f and SOAP_\n-00149370: 4445 4c45 5445 3c2f 636f 6465 3e2c 203c DELETE, <\n-00149380: 636f 6465 3e53 4f41 505f 4445 4c45 5445 code>SOAP_DELETE\n-00149390: 5f41 5252 4159 3c2f 636f 6465 3e20 746f _ARRAY to\n-001493a0: 2072 6570 6c61 6365 203c 636f 6465 3e6e replace n\n-001493b0: 6577 3c2f 636f 6465 3e20 616e 6420 3c63 ew and delete used by the en\n-001493e0: 6769 6e65 2074 6f20 616c 6c6f 6361 7465 gine to allocate\n-001493f0: 206d 616e 6167 6564 206d 656d 6f72 792e managed memory.\n-00149400: 204f 6e65 2063 616e 2066 6f72 2065 7861 One can for exa\n-00149410: 6d70 6c65 2075 7365 2061 2067 6172 6261 mple use a garba\n-00149420: 6765 2063 6f6c 6c65 6374 6f72 2077 6974 ge collector wit\n-00149430: 6820 6753 4f41 5020 6279 2064 6566 696e h gSOAP by defin\n-00149440: 696e 6720 7375 6974 6162 6c65 2072 6570 ing suitable rep\n-00149450: 6c61 6365 6d65 6e74 732e 3c2f 703e 0a3c lacements.

    .<\n-00149460: 703e 4d6f 7265 2069 6e66 6f72 6d61 7469 p>More informati\n-00149470: 6f6e 206f 6e20 6d65 6d6f 7279 206d 616e on on memory man\n-00149480: 6167 656d 656e 7420 6361 6e20 6265 2066 agement can be f\n-00149490: 6f75 6e64 2069 6e20 7468 6520 3c61 2068 ound in the C and C+\n-001494d0: 2b20 584d 4c20 4461 7461 2042 696e 6469 + XML Data Bindi\n-001494e0: 6e67 733c 2f61 3e20 646f 6375 6d65 6e74 ngs document\n-001494f0: 6174 696f 6e20 7468 6174 2068 6173 2073 ation that has s\n-00149500: 6570 6172 6174 6520 7365 6374 696f 6e73 eparate sections\n-00149510: 206f 6e20 6d65 6d6f 7279 206d 616e 6167 on memory manag\n-00149520: 656d 656e 7420 696e 2043 2061 6e64 2069 ement in C and i\n-00149530: 6e20 432b 2b2e 3c2f 703e 0a3c 703e f09f n C++.

    .

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

    \n-00149570: 0a3c 6831 3e3c 6120 636c 6173 733d 2261 .

    .Int\n-001495a0: 7261 2d63 6c61 7373 206d 656d 6f72 7920 ra-class memory \n-001495b0: 6d61 6e61 6765 6d65 6e74 3c2f 6831 3e0a management

    .\n-001495c0: 3c70 3e57 6865 6e20 6120 636c 6173 7320

    When a class \n-001495d0: 3c63 6f64 653e 543c 2f63 6f64 653e 2068 T h\n-001495e0: 6173 2061 203c 636f 6465 3e73 7472 7563 as a struc\n-001495f0: 7420 736f 6170 202a 2054 3a3a 736f 6170 t soap * T::soap\n-00149600: 3c2f 636f 6465 3e20 6d65 6d62 6572 2064 member d\n-00149610: 6563 6c61 7265 6420 696e 2061 6e20 696e eclared in an in\n-00149620: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f\n-00149630: 696c 6520 666f 7220 736f 6170 6370 7032 ile for soapcpp2\n-00149640: 2c20 7468 656e 2074 6869 7320 6d65 6d62 , then this memb\n-00149650: 6572 2077 696c 6c20 6265 2073 6574 2074 er will be set t\n-00149660: 6f20 706f 696e 7420 746f 2074 6865 2063 o point to the c\n-00149670: 7572 7265 6e74 2063 6f6e 7465 7874 2062 urrent context b\n-00149680: 7920 7468 6520 6465 7365 7269 616c 697a y the deserializ\n-00149690: 6572 7320 616e 6420 6279 2074 6865 203c ers and by the <\n-001496a0: 636f 6465 3e73 6f61 705f 6465 6661 756c code>soap_defaul\n-001496b0: 743c 2f63 6f64 653e 206d 6574 686f 6420 t method \n-001496c0: 6f66 2074 6865 2063 6c61 7373 2061 6e64 of the class and\n-001496d0: 2062 7920 7468 6520 3c63 6f64 653e 736f by the so\n-001496e0: 6170 5f64 6566 6175 6c74 5f54 3c2f 636f ap_default_T and so\n-00149700: 6170 5f6e 6577 5f54 3c2f 636f 6465 3e20 ap_new_T \n-00149710: 6675 6e63 7469 6f6e 7320 666f 7220 7468 functions for th\n-00149720: 6973 2063 6c61 7373 206e 616d 6564 203c is class named <\n-00149730: 636f 6465 3e54 3c2f 636f 6465 3e2e 2054 code>T. T\n-00149740: 6869 7320 7369 6d70 6c69 6669 6573 206d his simplifies m\n-00149750: 656d 6f72 7920 6d61 6e61 6765 6d65 6e74 emory management\n-00149760: 2062 7920 636c 6173 7320 6d65 7468 6f64 by class method\n-00149770: 7320 7468 6174 2061 6c6c 6f63 6174 6520 s that allocate \n-00149780: 6461 7461 2061 7373 6f63 6961 7465 6420 data associated \n-00149790: 7769 7468 2074 6865 2063 6c61 7373 2069 with the class i\n-001497a0: 6e73 7461 6e63 6520 7468 6174 206d 7573 nstance that mus\n-001497b0: 7420 6265 206d 616e 6167 6564 2062 7920 t be managed by \n-001497c0: 7468 6520 636f 6e74 6578 742e 3c2f 703e the context.

    \n-001497d0: 0a3c 703e 436f 6e73 6964 6572 2066 6f72 .

    Consider for\n-001497e0: 2065 7861 6d70 6c65 2074 6865 2066 6f6c example the fol\n-001497f0: 6c6f 7769 6e67 2063 6c61 7373 2064 6563 lowing class dec\n-00149800: 6c61 7261 7469 6f6e 3a3c 2f70 3e0a 3c64 laration:

    .
    clas\n-00149850: 7320 3c2f 7370 616e 3e43 6c61 7373 203c s Class <\n-00149860: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    { \n-00149890: 7075 626c 6963 3c2f 7370 616e 3e3a 3c2f public:.
    Class\n-001498c0: 2829 3b3c 2f64 6976 3e0a 3c64 6976 2063 ();
    .
    \n-001498e0: 7e43 6c61 7373 2829 3b3c 2f64 6976 3e0a ~Class();
    .\n-001498f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    stru\n-00149920: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap *soap;.
    char \n-001499f0: 2a6e 616d 653b 203c 2f64 6976 3e0a 3c64 *name;
    .\n-00149a10: 2020 2020 3c73 7061 6e20 636c 6173 733d vo\n-00149a30: 6964 3c2f 7370 616e 3e20 7365 744e 616d id setNam\n-00149a40: 6528 3c73 7061 6e20 636c 6173 733d 226b e(const c\n-00149a80: 6861 723c 2f73 7061 6e3e 202a 7329 3b20 har *s); \n-00149a90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    char *getName();.
    };
    .\n-00149b00: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    Since \n-00149b20: 7468 6520 3c63 6f64 653e 6e61 6d65 3c2f the name member is \n-00149b40: 6120 6368 6172 6163 7465 7220 706f 696e a character poin\n-00149b50: 7465 7220 746f 2061 2073 7472 696e 672c ter to a string,\n-00149b60: 2077 6865 7265 2073 686f 756c 6420 7765 where should we\n-00149b70: 2061 6c6c 6f63 6174 6520 7468 6973 2073 allocate this s\n-00149b80: 7472 696e 673f 2049 6e20 6d6f 7374 2063 tring? In most c\n-00149b90: 6173 6573 2077 6520 7769 6c6c 2061 6464 ases we will add\n-00149ba0: 2061 2063 6f6e 7374 7275 6374 6f72 2074 a constructor t\n-00149bb0: 6861 7420 696e 6974 6961 6c6c 7920 7365 hat initially se\n-00149bc0: 7473 203c 636f 6465 3e6e 616d 653c 2f63 ts name to NULL and\n-00149be0: 2061 2064 6573 7472 7563 746f 7220 7468 a destructor th\n-00149bf0: 6174 2064 656c 6574 6573 203c 636f 6465 at deletes name whe\n-00149c10: 6e20 6e6f 6e2d 4e55 4c4c 2c20 6c69 6b65 n non-NULL, like\n-00149c20: 2073 6f3a 3c2f 703e 0a3c 6469 7620 636c so:

    .
    <\n-00149c40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00149c50: 3e43 6c61 7373 3a3a 436c 6173 7328 2920 >Class::Class() \n-00149c60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-00149c80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap\n-00149cc0: 3c2f 613e 203d 204e 554c 4c3b 3c2f 6469 = NULL;.
    name = NU\n-00149cf0: 4c4c 3b3c 2f64 6976 3e0a 3c64 6976 2063 LL;
    .
    } .
    Class::~C\n-00149d30: 6c61 7373 2829 203c 2f64 6976 3e0a 3c64 lass()
    .\n-00149d50: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    if \n-00149d90: 286e 616d 6529 3c2f 6469 763e 0a3c 6469 (name)
    . \n-00149db0: 2020 2066 7265 6528 6e61 6d65 293b 3c2f free(name);.
    }
    .<\n-00149de0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    However\n-00149e00: 2c20 7768 656e 2069 6e73 7461 6e63 6573 , when instances\n-00149e10: 206f 6620 3c63 6f64 653e 436c 6173 733c of Class<\n-00149e20: 2f63 6f64 653e 2061 7265 2064 6573 6572 /code> are deser\n-00149e30: 6961 6c69 7a65 6420 7765 2068 6176 6520 ialized we have \n-00149e40: 6120 7072 6f62 6c65 6d20 7769 7468 2074 a problem with t\n-00149e50: 6869 7320 6170 7072 6f61 6368 2062 6563 his approach bec\n-00149e60: 6175 7365 203c 636f 6465 3e66 7265 6528 ause free(\n-00149e70: 6e61 6d65 293c 2f63 6f64 653e 2064 656c name) del\n-00149e80: 6574 6573 2061 206d 616e 6167 6564 2073 etes a managed s\n-00149e90: 7472 696e 672c 2077 6869 6368 2069 7320 tring, which is \n-00149ea0: 6d61 6e61 6765 6420 6279 2074 6865 2063 managed by the c\n-00149eb0: 6f6e 7465 7874 2e20 4265 6361 7573 6520 ontext. Because \n-00149ec0: 7468 6520 6465 7365 7269 616c 697a 6572 the deserializer\n-00149ed0: 2061 6c73 6f20 7365 7473 2074 6865 203c also sets the <\n-00149ee0: 636f 6465 3e73 6f61 703c 2f63 6f64 653e code>soap\n-00149ef0: 206d 656d 6265 7220 6f66 2074 6869 7320 member of this \n-00149f00: 636c 6173 732c 2074 6865 7265 2069 7320 class, there is \n-00149f10: 616e 2065 6173 7920 736f 6c75 7469 6f6e an easy solution\n-00149f20: 2074 6f20 7468 6973 2070 726f 626c 656d to this problem\n-00149f30: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    Cl\n-00149f60: 6173 733a 3a7e 436c 6173 7328 2920 3c2f ass::~Class() .
    {
    .<\n-00149f90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00149fa0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n-00149fc0: 2f73 7061 6e3e 2028 213c 6120 636c 6173 /span> (!\n-00149ff0: 736f 6170 3c2f 613e 2026 616d 703b 2661 soap &&a\n-0014a000: 6d70 3b20 6e61 6d65 293c 2f64 6976 3e0a mp; name)
    .\n-0014a010: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    free(name)\n-0014a030: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    }.

    This\n-0014a070: 206f 6e6c 7920 6672 6565 7320 3c63 6f64 only frees name if\n-0014a090: 2074 6865 203c 636f 6465 3e73 6f61 703c the soap<\n-0014a0a0: 2f63 6f64 653e 2063 6f6e 7465 7874 2070 /code> context p\n-0014a0b0: 6f69 6e74 6572 206d 656d 6265 7220 6973 ointer member is\n-0014a0c0: 204e 554c 4c2c 206d 6561 6e69 6e67 2074 NULL, meaning t\n-0014a0d0: 6861 7420 6120 6d61 6e61 6765 6420 7374 hat a managed st\n-0014a0e0: 7269 6e67 203c 636f 6465 3e6e 616d 653c ring name<\n-0014a0f0: 2f63 6f64 653e 2077 696c 6c20 6265 2064 /code> will be d\n-0014a100: 656c 6574 6564 2061 7320 7573 7561 6c20 eleted as usual \n-0014a110: 7769 7468 2074 6865 2064 6573 6572 6961 with the deseria\n-0014a120: 6c69 7a65 6420 636c 6173 7320 7573 696e lized class usin\n-0014a130: 6720 3c63 6f64 653e 3c61 2063 6c61 7373 g soap_dest\n-0014a1f0: 726f 793c 2f61 3e3c 2f63 6f64 653e 2061 roy a\n-0014a200: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd soa\n-0014a2d0: 705f 656e 643c 2f61 3e3c 2f63 6f64 653e p_end\n-0014a2e0: 2e3c 2f70 3e0a 3c70 3e54 6865 206f 7468 .

    .

    The oth\n-0014a2f0: 6572 206d 6574 686f 6473 2061 7265 2061 er methods are a\n-0014a300: 6c73 6f20 6d61 6465 2063 6f67 6e69 7a61 lso made cogniza\n-0014a310: 6e74 206f 6620 7468 6520 7072 6573 656e nt of the presen\n-0014a320: 6365 206f 6620 6120 636f 6e74 6578 743a ce of a context:\n-0014a330: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    void Class::setNam\n-0014a390: 6528 3c73 7061 6e20 636c 6173 733d 226b e(const c\n-0014a3d0: 6861 723c 2f73 7061 6e3e 202a 7329 3c2f har *s).
    {
    .<\n-0014a400: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0014a410: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n-0014a430: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (s\n-0014a460: 6f61 703c 2f61 3e29 3c2f 6469 763e 0a3c oap)
    .<\n-0014a470: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0014a480: 3e20 2020 206e 616d 6520 3d20 3c61 2063 > name = soap_strdup\n-0014a4f0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-0014a520: 2c20 7329 3b3c 2f64 6976 3e0a 3c64 6976 , s);
    . \n-0014a540: 3c73 7061 6e20 636c 6173 733d 226b 6579 else
    . \n-0014a580: 2020 6e61 6d65 203d 2073 7472 6475 7028 name = strdup(\n-0014a590: 7329 3b3c 2f64 6976 3e0a 3c64 6976 2063 s);
    .
    }.
    cons\n-0014a5e0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n-0014a610: 6765 744e 616d 6528 293c 2f64 6976 3e0a getName()
    .\n-0014a620: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    return name;.
    }
    .

    Another ap\n-0014a6c0: 7072 6f61 6368 2069 7320 746f 2075 7365 proach is to use\n-0014a6d0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_\n-0014a7a0: 756e 6c69 6e6b 3c2f 613e 3c2f 636f 6465 unlink to unlink data\n-0014a7c0: 206d 616e 6167 6564 2062 7920 7468 6520 managed by the \n-0014a7d0: 636f 6e74 6578 7420 616e 6420 6d61 6b65 context and make\n-0014a7e0: 2061 6c6c 2061 6c6c 6f63 6174 696f 6e73 all allocations\n-0014a7f0: 2065 7870 6c69 6369 746c 793a 3c2f 703e explicitly:

    \n-0014a800: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    Class::\n-0014a830: 7e43 6c61 7373 2829 203c 2f64 6976 3e0a ~Class()
    .\n-0014a840: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    if (name)
    .<\n-0014a8a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0014a8b0: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
    .
    \n-0014a8d0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_unlin\n-0014a930: 6b3c 2f61 3e28 3c61 2063 6c61 7373 3d22 k(soa\n-0014a960: 703c 2f61 3e2c 206e 616d 6529 3b20 3c73 p, name); // unlinks t\n-0014a990: 6865 206e 616d 6520 6966 2073 6f61 7020 he name if soap \n-0014a9a0: 6973 206e 6f6e 2d4e 554c 4c3c 2f73 7061 is non-NULL
    .
    f\n-0014a9d0: 7265 6528 6e61 6d65 293b 3c2f 6469 763e ree(name);
    \n-0014a9e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .}\n-0014aa10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    void C\n-0014aa50: 6c61 7373 3a3a 7365 744e 616d 6528 3c73 lass::setName(const\n-0014aa80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-0014aaa0: 2f73 7061 6e3e 202a 7329 3c2f 6469 763e /span> *s)
    \n-0014aab0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    n\n-0014aae0: 616d 6520 3d20 7374 7264 7570 2873 293b ame = strdup(s);\n-0014aaf0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    \n-0014ab10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    const \n-0014ab60: 6368 6172 3c2f 7370 616e 3e20 2a67 6574 char *get\n-0014ab70: 4e61 6d65 2829 3c2f 6469 763e 0a3c 6469 Name()
    .{\n-0014ab90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return name;
    .<\n-0014abe0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0014abf0: 3e7d 3c2f 6469 763e 0a3c 6469 7620 636c >}
    .<\n-0014acc0: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-0014acd0: 6922 3e69 6e74 2073 6f61 705f 756e 6c69 i\">int soap_unli\n-0014ace0: 6e6b 2873 7472 7563 7420 736f 6170 202a nk(struct soap *\n-0014acf0: 736f 6170 2c20 636f 6e73 7420 766f 6964 soap, const void\n-0014ad00: 202a 7074 7229 3c2f 6469 763e 3c64 6976 *ptr)U\n-0014ad20: 6e6c 696e 6b20 6120 626c 6f63 6b20 6f66 nlink a block of\n-0014ad30: 2068 6561 7020 6d65 6d6f 7279 206d 616e heap memory man\n-0014ad40: 6167 6564 2062 7920 7468 6520 7370 6563 aged by the spec\n-0014ad50: 6966 6965 6420 736f 6170 2063 6f6e 7465 ified soap conte\n-0014ad60: 7874 2c20 746f 2072 656c 6561 7365 2074 xt, to release t\n-0014ad70: 6865 206d 656d 6f72 7920 6578 706c 6963 he memory explic\n-0014ad80: 6974 6c79 2e2e 2e3c 2f64 6976 3e3c 2f64 itly....

    Th\n-0014adb0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap\n-0014ae80: 5f75 6e6c 696e 6b3c 2f61 3e3c 2f63 6f64 _unlink call unlinks \n-0014aea0: 6461 7461 2061 6e64 206f 626a 6563 7473 data and objects\n-0014aeb0: 2066 726f 6d20 6d61 6e61 6765 6420 6d65 from managed me\n-0014aec0: 6d6f 7279 2e20 496e 2074 6869 7320 7761 mory. In this wa\n-0014aed0: 7920 3c63 6f64 653e 3c61 2063 6c61 7373 y soap_dest\n-0014af90: 726f 793c 2f61 3e3c 2f63 6f64 653e 2061 roy a\n-0014afa0: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd soa\n-0014b070: 705f 656e 643c 2f61 3e3c 2f63 6f64 653e p_end\n-0014b080: 2063 616e 2062 6520 6361 6c6c 6564 206c can be called l\n-0014b090: 6174 6572 2065 7665 6e20 7768 656e 2074 ater even when t\n-0014b0a0: 6869 7320 636c 6173 7320 7761 7320 6465 his class was de\n-0014b0b0: 7365 7269 616c 697a 6564 2e3c 2f70 3e0a serialized.

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

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

    .

    .\n-0014b120: 4465 6275 6767 696e 673c 2f68 313e 0a3c Debugging

    .<\n-0014b130: 703e 546f 2061 6374 6976 6174 6520 6465 p>To activate de\n-0014b140: 6275 6767 696e 6720 616e 6420 6d65 7373 bugging and mess\n-0014b150: 6167 6520 6c6f 6767 696e 6720 636f 6d70 age logging comp\n-0014b160: 696c 6520 7468 6520 736f 7572 6365 2063 ile the source c\n-0014b170: 6f64 6520 7769 7468 2063 6f6d 7069 6c65 ode with compile\n-0014b180: 2d74 696d 6520 666c 6167 203c 636f 6465 -time flag #DEBUG
    . \n-0014b1a0: 4f72 2077 6865 6e20 7573 696e 6720 3c62 Or when using -lgsoap
    or \n-0014b1d0: 3c63 6f64 653e 2d6c 6773 6f61 702b 2b3c -lgsoap++<\n-0014b1e0: 2f63 6f64 653e 3c2f 623e 2074 6865 6e20 /code> then \n-0014b1f0: 7265 696e 7374 616c 6c20 6753 4f41 5020 reinstall gSOAP \n-0014b200: 7769 7468 203c 623e 3c63 6f64 653e 2e2f with ./\n-0014b210: 636f 6e66 6967 7572 6520 2d2d 656e 6162 configure --enab\n-0014b220: 6c65 2d64 6562 7567 3c2f 636f 6465 3e3c le-debug<\n-0014b230: 2f62 3e20 616e 6420 3c62 3e3c 636f 6465 /b> and make\n-0014b250: 2e3c 2f70 3e0a 3c70 3e57 6865 6e20 796f .

    .

    When yo\n-0014b260: 7572 2067 534f 4150 2063 6c69 656e 7420 ur gSOAP client \n-0014b270: 6f72 2073 6572 7665 7220 6170 706c 6963 or server applic\n-0014b280: 6174 696f 6e73 2072 756e 2c20 7468 6579 ations run, they\n-0014b290: 2077 696c 6c20 6c6f 6720 7468 6569 7220 will log their \n-0014b2a0: 6163 7469 7669 7479 2069 6e20 7468 7265 activity in thre\n-0014b2b0: 6520 7365 7061 7261 7465 2066 696c 6573 e separate files\n-0014b2c0: 3a3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e3c :

    .
      .
    • <\n-0014b2d0: 656d 3e3c 636f 6465 3e53 454e 542e 6c6f em>SENT.lo\n-0014b2e0: 673c 2f63 6f64 653e 3c2f 656d 3e20 6120 g a \n-0014b2f0: 636f 6e63 6174 656e 6174 696f 6e20 6f66 concatenation of\n-0014b300: 2061 6c6c 206d 6573 7361 6765 7320 7365 all messages se\n-0014b310: 6e74 3c2f 6c69 3e0a 3c6c 693e 3c65 6d3e nt
    • .
    • \n-0014b320: 3c63 6f64 653e 5245 4356 2e6c 6f67 3c2f RECV.log a con\n-0014b340: 6361 7465 6e61 7469 6f6e 206f 6620 616c catenation of al\n-0014b350: 6c20 6d65 7373 6167 6573 2072 6563 6569 l messages recei\n-0014b360: 7665 643c 2f6c 693e 0a3c 6c69 3e3c 656d ved
    • .
    • TEST.log<\n-0014b380: 2f63 6f64 653e 3c2f 656d 3e20 6120 6c6f /code> a lo\n-0014b390: 6720 6f66 2074 6865 2065 6e67 696e 6527 g of the engine'\n-0014b3a0: 7320 6f70 6572 6174 696f 6e73 3c2f 6c69 s operations.
    .
    Warning<\n-0014b3e0: 2f64 743e 3c64 643e 5468 6520 6753 4f41 /dt>
    The gSOA\n-0014b3f0: 5020 636c 6965 6e74 2061 6e64 2073 6572 P client and ser\n-0014b400: 7665 7220 6170 706c 6963 6174 696f 6e73 ver applications\n-0014b410: 2077 696c 6c20 7275 6e20 736c 6f77 2064 will run slow d\n-0014b420: 7565 2074 6f20 6465 6275 6767 696e 6720 ue to debugging \n-0014b430: 616e 6420 6d65 7373 6167 6520 6c6f 6767 and message logg\n-0014b440: 696e 672e 3c2f 6464 3e3c 2f64 6c3e 0a3c ing.
    .<\n-0014b450: 703e 596f 7520 6361 6e20 7365 7420 6d61 p>You can set ma\n-0014b460: 6372 6f20 3c63 6f64 653e 2344 4542 5547 cro #DEBUG\n-0014b470: 5f53 5441 4d50 3c2f 636f 6465 3e20 696e _STAMP in\n-0014b480: 7374 6561 6420 6f66 203c 636f 6465 3e23 stead of #\n-0014b490: 4445 4255 473c 2f63 6f64 653e 2074 6f20 DEBUG to \n-0014b4a0: 6164 6420 7469 6d65 2073 7461 6d70 7320 add time stamps \n-0014b4b0: 746f 203c 636f 6465 3e54 4553 542e 6c6f to TEST.lo\n-0014b4c0: 673c 2f63 6f64 653e 2e20 5468 6973 2077 g. This w\n-0014b4d0: 6f72 6b73 206f 6e20 616c 6c20 6f70 6572 orks on all oper\n-0014b4e0: 6174 696e 6720 7379 7374 656d 7320 7375 ating systems su\n-0014b4f0: 7070 6f72 7469 6e67 2074 6865 203c 636f pporting the gettimeofday<\n-0014b510: 2f63 6f64 653e 2066 756e 6374 696f 6e2e /code> function.\n-0014b520: 3c2f 703e 0a3c 703e 5768 656e 2069 6e73

    .

    When ins\n-0014b530: 7461 6c6c 696e 6720 6120 4347 4920 7365 talling a CGI se\n-0014b540: 7276 6963 6520 6170 706c 6963 6174 696f rvice applicatio\n-0014b550: 6e20 636f 6d70 696c 6564 2077 6974 6820 n compiled with \n-0014b560: 6465 6275 6767 696e 6720 656e 6162 6c65 debugging enable\n-0014b570: 642c 2074 6865 206c 6f67 2066 696c 6573 d, the log files\n-0014b580: 206d 6179 2073 6f6d 6574 696d 6573 206e may sometimes n\n-0014b590: 6f74 2062 6520 6372 6561 7465 6420 6475 ot be created du\n-0014b5a0: 6520 746f 2066 696c 6520 6163 6365 7373 e to file access\n-0014b5b0: 2070 6572 6d69 7373 696f 6e20 7265 7374 permission rest\n-0014b5c0: 7269 6374 696f 6e73 2069 6d70 6f73 6564 rictions imposed\n-0014b5d0: 206f 6e20 4347 4920 6170 706c 6963 6174 on CGI applicat\n-0014b5e0: 696f 6e73 2e20 546f 2067 6574 2061 726f ions. To get aro\n-0014b5f0: 756e 6420 7468 6973 2c20 6372 6561 7465 und this, create\n-0014b600: 2065 6d70 7479 206c 6f67 2066 696c 6573 empty log files\n-0014b610: 2077 6974 6820 756e 6976 6572 7361 6c20 with universal \n-0014b620: 7772 6974 6520 7065 726d 6973 7369 6f6e write permission\n-0014b630: 732e 2042 6520 6361 7265 6675 6c20 6162 s. Be careful ab\n-0014b640: 6f75 7420 7468 6520 7365 6375 7269 7479 out the security\n-0014b650: 2069 6d70 6c69 6361 7469 6f6e 206f 6620 implication of \n-0014b660: 7468 6973 2e3c 2f70 3e0a 3c70 3e59 6f75 this.

    .

    You\n-0014b670: 2063 616e 2061 6374 7561 6c6c 7920 7465 can actually te\n-0014b680: 7374 2061 2043 4749 2073 6572 7669 6365 st a CGI service\n-0014b690: 2061 7070 6c69 6361 7469 6f6e 2077 6974 application wit\n-0014b6a0: 686f 7574 2064 6570 6c6f 7969 6e67 2069 hout deploying i\n-0014b6b0: 7420 6f6e 2074 6865 2057 6562 2e20 546f t on the Web. To\n-0014b6c0: 2064 6f20 7468 6973 2c20 6372 6561 7465 do this, create\n-0014b6d0: 2074 6865 2043 4749 2073 6572 7669 6365 the CGI service\n-0014b6e0: 2061 7070 6c69 6361 7469 6f6e 2061 6e64 application and\n-0014b6f0: 2073 656e 6420 6974 2061 2072 6571 7565 send it a reque\n-0014b700: 7374 206d 6573 7361 6765 2075 7369 6e67 st message using\n-0014b710: 2072 6564 6972 6563 7469 6f6e 2061 7320 redirection as \n-0014b720: 666f 6c6c 6f77 733a 203c 2f70 3e3c 7072 follows:

    ./service.cgi\n-0014b750: 2026 6c74 3b20 6e73 2e61 6464 2e72 6571 < ns.add.req\n-0014b760: 2e78 6d6c 0a3c 2f70 7265 3e3c 703e 2074 .xml.

    t\n-0014b770: 6869 7320 7368 6f75 6c64 2064 6973 706c his should displ\n-0014b780: 6179 2074 6865 2073 6572 7669 6365 2072 ay the service r\n-0014b790: 6573 706f 6e73 6520 6f6e 2074 6865 2074 esponse on the t\n-0014b7a0: 6572 6d69 6e61 6c2c 2077 6865 7265 203c erminal, where <\n-0014b7b0: 656d 3e3c 636f 6465 3e6e 732e 6164 642e em>ns.add.\n-0014b7c0: 7265 712e 786d 6c3c 2f63 6f64 653e 3c2f req.xml was generate\n-0014b7e0: 6420 6279 2073 6f61 7063 7070 3220 6f72 d by soapcpp2 or\n-0014b7f0: 2061 206d 6f64 6966 6965 6420 7665 7273 a modified vers\n-0014b800: 696f 6e20 6f66 2074 6869 7320 6669 6c65 ion of this file\n-0014b810: 2e20 596f 7520 6361 6e20 616c 736f 2075 . You can also u\n-0014b820: 7365 2061 203c 656d 3e3c 636f 6465 3e53 se a S\n-0014b830: 454e 542e 6c6f 673c 2f63 6f64 653e 3c2f ENT.log file produce\n-0014b850: 6420 6279 2061 2063 6c69 656e 7420 6170 d by a client ap\n-0014b860: 706c 6963 6174 696f 6e20 746f 2072 6564 plication to red\n-0014b870: 6972 6563 7420 746f 2074 6865 2043 4749 irect to the CGI\n-0014b880: 2073 6572 7669 6365 2061 7070 6c69 6361 service applica\n-0014b890: 7469 6f6e 2e20 596f 7520 6361 6e20 616c tion. You can al\n-0014b8a0: 736f 2075 7365 2074 6865 2067 534f 4150 so use the gSOAP\n-0014b8b0: 203c 6120 6872 6566 3d22 2e2e 2f2e 2e2f Test M\n-0014b8e0: 6573 7365 6e67 6572 3c2f 613e 2061 7070 essenger app\n-0014b8f0: 6c69 6361 7469 6f6e 2074 6f20 6765 6e65 lication to gene\n-0014b900: 7261 7465 2072 616e 646f 6d69 7a65 6420 rate randomized \n-0014b910: 6d65 7373 6167 6573 2074 6f20 7465 7374 messages to test\n-0014b920: 2079 6f75 7220 7365 7276 6572 732e 3c2f your servers..

    The file n\n-0014b940: 616d 6573 206f 6620 7468 6520 6c6f 6720 ames of the log \n-0014b950: 6669 6c65 7320 616e 6420 7468 6520 6c6f files and the lo\n-0014b960: 6767 696e 6720 6163 7469 7669 7479 2063 gging activity c\n-0014b970: 616e 2062 6520 636f 6e74 726f 6c6c 6564 an be controlled\n-0014b980: 2061 7420 7468 6520 6170 706c 6963 6174 at the applicat\n-0014b990: 696f 6e20 6c65 7665 6c2e 2054 6869 7320 ion level. This \n-0014b9a0: 616c 6c6f 7773 2074 6865 2063 7265 6174 allows the creat\n-0014b9b0: 696f 6e20 6f66 2073 6570 6172 6174 6520 ion of separate \n-0014b9c0: 6c6f 6720 6669 6c65 7320 6279 2073 6570 log files by sep\n-0014b9d0: 6172 6174 6520 7365 7276 6963 6573 2c20 arate services, \n-0014b9e0: 636c 6965 6e74 732c 2061 6e64 2074 6872 clients, and thr\n-0014b9f0: 6561 6473 2e20 466f 7220 6578 616d 706c eads. For exampl\n-0014ba00: 652c 2074 6865 2066 6f6c 6c6f 7769 6e67 e, the following\n-0014ba10: 2073 6572 7669 6365 206c 6f67 7320 616c service logs al\n-0014ba20: 6c20 6d65 7373 6167 6573 2028 6275 7420 l messages (but \n-0014ba30: 6e6f 2064 6562 7567 206d 6573 7361 6765 no debug message\n-0014ba40: 7329 2069 6e20 7365 7061 7261 7465 2064 s) in separate d\n-0014ba50: 6972 6563 746f 7269 6573 3a3c 2f70 3e0a irectories:

    .\n-0014ba60: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st\n-0014baa0: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = <\n-0014bb10: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0014bb20: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-0014bb30: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n-0014bb40: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68\n-0014bb50: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498\n-0014bb60: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c\">soap_new\n-0014bb70: 2829 3b20 3c2f 6469 763e 0a3c 6469 7620 ();
    .
    \n-0014bbe0: 736f 6170 5f73 6574 5f72 6563 765f 6c6f soap_set_recv_lo\n-0014bbf0: 6766 696c 653c 2f61 3e28 3c61 2063 6c61 gfile(soap, "log\n-0014bc50: 732f 7265 6376 2f73 6572 7669 6365 3132 s/recv/service12\n-0014bc60: 2e6c 6f67 2671 756f 743b 3c2f 7370 616e .log"); // app\n-0014bc90: 656e 6420 616c 6c20 6d65 7373 6167 6573 end all messages\n-0014bca0: 2072 6563 6569 7665 6420 696e 202f 6c6f received in /lo\n-0014bcb0: 6773 2f72 6563 762f 7365 7276 6963 6531 gs/recv/service1\n-0014bcc0: 322e 6c6f 6720 3c2f 7370 616e 3e3c 2f64 2.log ..
    so\n-0014be90: 6170 5f73 6574 5f74 6573 745f 6c6f 6766 ap_set_test_logf\n-0014bea0: 696c 653c 2f61 3e28 3c61 2063 6c61 7373 ile(s\n-0014bed0: 6f61 703c 2f61 3e2c 204e 554c 4c29 3b20 oap, NULL); \n-0014bee0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-0014bef0: 2020 2020 203c 7370 616e 2063 6c61 7373 // no\n-0014bf10: 2066 696c 6520 6e61 6d65 3a20 646f 206e file name: do n\n-0014bf20: 6f74 2073 6176 6520 6465 6275 6720 6d65 ot save debug me\n-0014bf30: 7373 6167 6573 203c 2f73 7061 6e3e 3c2f ssages .
    ... //
    \n-0014bf80: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    ...\n-0014c040: 203c 7370 616e 2063 6c61 7373 3d22 636f //\n-0014c060: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    so\n-0014c0d0: 6170 5f66 7265 653c 2f61 3e28 3c61 2063 ap_free(soap);.
    \n-0014c1e0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    void soap_se\n-0014c200: 745f 7265 6376 5f6c 6f67 6669 6c65 2873 t_recv_logfile(s\n-0014c210: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-0014c220: 2c20 636f 6e73 7420 6368 6172 202a 6c6f , const char *lo\n-0014c230: 6766 696c 6529 3c2f 6469 763e 3c64 6976 gfile)
    S\n-0014c250: 7065 6369 6679 2061 2066 696c 6520 6e61 pecify a file na\n-0014c260: 6d65 2074 6f20 7361 7665 206d 6573 7361 me to save messa\n-0014c270: 6765 7320 7265 6365 6976 6564 2e3c 2f64 ges received.
    .
    soap_set_\n-0014c340: 7465 7374 5f6c 6f67 6669 6c65 3c2f 613e test_logfile\n-0014c350: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    void s\n-0014c370: 6f61 705f 7365 745f 7465 7374 5f6c 6f67 oap_set_test_log\n-0014c380: 6669 6c65 2873 7472 7563 7420 736f 6170 file(struct soap\n-0014c390: 202a 736f 6170 2c20 636f 6e73 7420 6368 *soap, const ch\n-0014c3a0: 6172 202a 6c6f 6766 696c 6529 3c2f 6469 ar *logfile)
    Specify a f\n-0014c3d0: 696c 6520 6e61 6d65 2074 6f20 7361 7665 ile name to save\n-0014c3e0: 2064 6562 7567 6769 6e67 2069 6e66 6f2e debugging info.\n-0014c3f0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .\n-0014c450: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 .<\n-0014c570: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    Likewis\n-0014c590: 652c 206d 6573 7361 6765 7320 6361 6e20 e, messages can \n-0014c5a0: 6265 206c 6f67 6765 6420 666f 7220 696e be logged for in\n-0014c5b0: 6469 7669 6475 616c 2063 6c69 656e 742d dividual client-\n-0014c5c0: 7369 6465 2073 6572 7669 6365 206f 7065 side service ope\n-0014c5d0: 7261 7469 6f6e 2063 616c 6c73 2069 6e20 ration calls in \n-0014c5e0: 6120 636c 6965 6e74 2061 7070 6c69 6361 a client applica\n-0014c5f0: 7469 6f6e 2e3c 2f70 3e0a 3c70 3e54 6f20 tion.

    .

    To \n-0014c600: 6c6f 6720 6d65 7373 6167 6573 206d 6f72 log messages mor\n-0014c610: 6520 6566 6669 6369 656e 746c 792c 2075 e efficiently, u\n-0014c620: 7365 2074 6865 203c 636f 6465 3e3c 6120 se the \n-0014c6b0: 6c6f 6767 696e 673c 2f61 3e3c 2f63 6f64 logging plugin.

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

    .

    \n-0014c730: 0a4c 696d 6974 6174 696f 6e73 3c2f 6831 .Limitations.

    From the pe\n-0014c750: 7273 7065 6374 6976 6520 6f66 2074 6865 rspective of the\n-0014c760: 2043 2f43 2b2b 206c 616e 6775 6167 652c C/C++ language,\n-0014c770: 2061 2066 6577 2043 2f43 2b2b 206c 616e a few C/C++ lan\n-0014c780: 6775 6167 6520 6665 6174 7572 6573 2061 guage features a\n-0014c790: 7265 206e 6f74 2073 7570 706f 7274 6564 re not supported\n-0014c7a0: 2062 7920 6753 4f41 5020 616e 6420 7468 by gSOAP and th\n-0014c7b0: 6573 6520 6665 6174 7572 6573 2063 616e ese features can\n-0014c7c0: 6e6f 7420 6265 2075 7365 6420 696e 2061 not be used in a\n-0014c7d0: 6e20 696e 7465 7266 6163 6520 6865 6164 n interface head\n-0014c7e0: 6572 2066 696c 6520 666f 7220 736f 6170 er file for soap\n-0014c7f0: 6370 7032 2e3c 2f70 3e0a 3c75 6c3e 0a3c cpp2.

    .
      .<\n-0014c800: 6c69 3e53 544c 3a20 7468 6520 736f 6170 li>STL: the soap\n-0014c810: 6370 7032 2074 6f6f 6c20 7375 7070 6f72 cpp2 tool suppor\n-0014c820: 7473 2074 6865 2073 6572 6961 6c69 7a61 ts the serializa\n-0014c830: 7469 6f6e 206f 6620 432b 2b20 7374 7269 tion of C++ stri\n-0014c840: 6e67 7320 3c63 6f64 653e 7374 643a 3a73 ngs std::s\n-0014c850: 7472 696e 673c 2f63 6f64 653e 2061 6e64 tring and\n-0014c860: 203c 636f 6465 3e73 7464 3a3a 7773 7472 std::wstr\n-0014c870: 696e 673c 2f63 6f64 653e 2061 6e64 2074 ing and t\n-0014c880: 6865 2063 6f6e 7461 696e 6572 7320 3c63 he containers std::deque, std\n-0014c8b0: 3a3a 6c69 7374 3c2f 636f 6465 3e2c 203c ::list, <\n-0014c8c0: 636f 6465 3e73 7464 3a3a 7665 6374 6f72 code>std::vector\n-0014c8d0: 3c2f 636f 6465 3e2c 2061 6e64 203c 636f , and std::set, (see Section\n-0014c900: 203c 6120 636c 6173 733d 2265 6c22 2068 STL c\n-0014c930: 6f6e 7461 696e 6572 733c 2f61 3e20 292e ontainers ).\n-0014c940: 2041 6c73 6f20 3c63 6f64 653e 7374 643a Also std:\n-0014c950: 3a73 6861 7265 645f 7074 723c 2f63 6f64 :shared_ptr, std::u\n-0014c970: 6e69 7175 655f 7074 723c 2f63 6f64 653e nique_ptr\n-0014c980: 2c20 616e 6420 3c63 6f64 653e 7374 643a , and std:\n-0014c990: 3a61 7574 6f5f 7074 723c 2f63 6f64 653e :auto_ptr\n-0014c9a0: 2061 7265 2073 7570 706f 7274 6564 2e20 are supported. \n-0014c9b0: 4f74 6865 7220 5354 4c20 7479 7065 7320 Other STL types \n-0014c9c0: 6172 6520 6e6f 7420 7365 7269 616c 697a are not serializ\n-0014c9d0: 6162 6c65 2e3c 2f6c 693e 0a3c 6c69 3e54 able..
    • T\n-0014c9e0: 656d 706c 6174 6573 3a20 7468 6520 736f emplates: the so\n-0014c9f0: 6170 6370 7032 2074 6f6f 6c20 6173 7375 apcpp2 tool assu\n-0014ca00: 6d65 7320 7468 6174 2074 656d 706c 6174 mes that templat\n-0014ca10: 6573 2063 6c61 7373 6573 2068 6176 6520 es classes have \n-0014ca20: 6f6e 6c79 206f 6e65 2074 656d 706c 6174 only one templat\n-0014ca30: 6520 7061 7261 6d65 7465 7220 7479 7065 e parameter type\n-0014ca40: 2061 6e64 2074 6865 7365 2074 656d 706c and these templ\n-0014ca50: 6174 6573 2061 7265 2063 6f6e 7461 696e ates are contain\n-0014ca60: 6572 7320 6f66 2076 616c 7565 7320 6f66 ers of values of\n-0014ca70: 2074 6869 7320 7465 6d70 6c61 7465 2070 this template p\n-0014ca80: 6172 616d 6574 6572 2074 7970 652e 2054 arameter type. T\n-0014ca90: 6869 7320 7465 6d70 6c61 7465 2063 6c61 his template cla\n-0014caa0: 7373 2073 686f 756c 6420 6465 6669 6e65 ss should define\n-0014cab0: 203c 636f 6465 3e62 6567 696e 2829 3c2f begin(), end\n-0014cad0: 2829 3c2f 636f 6465 3e2c 203c 636f 6465 (), size(), \n-0014caf0: 3c63 6f64 653e 636c 6561 7228 293c 2f63 clear(), and \n-0014cb10: 696e 7365 7274 2829 3c2f 636f 6465 3e20 insert() \n-0014cb20: 6d65 7468 6f64 732e 3c2f 6c69 3e0a 3c6c methods.
    • .Inheritance: s\n-0014cb40: 696e 676c 6520 636c 6173 7320 696e 6865 ingle class inhe\n-0014cb50: 7269 7461 6e63 6520 6973 2073 7570 706f ritance is suppo\n-0014cb60: 7274 6564 2e3c 2f6c 693e 0a3c 6c69 3e41 rted..
    • A\n-0014cb70: 6273 7472 6163 7420 6d65 7468 6f64 733a bstract methods:\n-0014cb80: 2061 2063 6c61 7373 206d 7573 7420 6265 a class must be\n-0014cb90: 2069 6e73 7461 6e74 6961 626c 6520 746f instantiable to\n-0014cba0: 2073 7570 706f 7274 2073 6572 6961 6c69 support seriali\n-0014cbb0: 7a61 7469 6f6e 206f 6620 7468 6174 2063 zation of that c\n-0014cbc0: 6c61 7373 2e20 416e 2061 6273 7472 6163 lass. An abstrac\n-0014cbd0: 7420 636c 6173 7320 7768 656e 2075 7365 t class when use\n-0014cbe0: 6420 7368 6f75 6c64 2062 6520 6465 636c d should be decl\n-0014cbf0: 6172 6564 2074 7261 6e73 6965 6e74 2c20 ared transient, \n-0014cc00: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section Transient \n-0014cc40: 6461 7461 2074 7970 6573 3c2f 613e 2e3c data types.<\n-0014cc50: 2f6c 693e 0a3c 6c69 3e44 6972 6563 7469 /li>.
    • Directi\n-0014cc60: 7665 733a 2064 6972 6563 7469 7665 7320 ves: directives \n-0014cc70: 616e 6420 7072 6167 6d61 7320 7375 6368 and pragmas such\n-0014cc80: 2061 7320 3c63 6f64 653e 2369 6e63 6c75 as #inclu\n-0014cc90: 6465 3c2f 636f 6465 3e20 616e 6420 3c63 de and #define are moved to \n-0014ccc0: 7468 6520 6765 6e65 7261 7465 6420 3c65 the generated soapStub\n-0014cce0: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2073 .h s\n-0014ccf0: 6f75 7263 6520 636f 6465 2062 7920 736f ource code by so\n-0014cd00: 6170 6370 7032 2e20 5468 6573 6520 6469 apcpp2. These di\n-0014cd10: 7265 6374 6976 6573 2061 7265 2061 6c6c rectives are all\n-0014cd20: 2070 6c61 6365 6420 6174 2074 6865 2074 placed at the t\n-0014cd30: 6f70 206f 6620 7468 6174 2066 696c 652c op of that file,\n-0014cd40: 2073 6565 203c 6120 636c 6173 733d 2265 see The\n-0014cd70: 2023 696e 636c 7564 6520 616e 6420 2364 #include and #d\n-0014cd80: 6566 696e 6520 6469 7265 6374 6976 6573 efine directives\n-0014cd90: 3c2f 613e 2e20 5573 6520 7468 6520 3c63 . Use the #import directive to \n-0014cdc0: 696d 706f 7274 2069 6e74 6572 6661 6365 import interface\n-0014cdd0: 2068 6561 6465 7220 6669 6c65 7320 696e header files in\n-0014cde0: 746f 206f 7468 6572 2069 6e74 6572 6661 to other interfa\n-0014cdf0: 6365 2068 6561 6465 7220 6669 6c65 732c ce header files,\n-0014ce00: 2073 6565 2053 6563 7469 6f6e 203c 6120 see Section The #import \n-0014ce40: 6469 7265 6374 6976 653c 2f61 3e20 2e3c directive .<\n-0014ce50: 2f6c 693e 0a3c 6c69 3e43 2061 6e64 2043 /li>.
    • C and C\n-0014ce60: 2b2b 2063 6f64 6520 7374 6174 656d 656e ++ code statemen\n-0014ce70: 7473 3a20 6e6f 2063 6f64 6520 7374 6174 ts: no code stat\n-0014ce80: 656d 656e 7473 2061 7265 2061 6c6c 6f77 ements are allow\n-0014ce90: 7320 696e 2069 6e74 6572 6661 6365 2068 s in interface h\n-0014cea0: 6561 6465 7220 6669 6c65 732e 2043 6c61 eader files. Cla\n-0014ceb0: 7373 206d 6574 686f 6473 2073 686f 756c ss methods shoul\n-0014cec0: 6420 6265 2064 6563 6c61 7265 6420 7769 d be declared wi\n-0014ced0: 7468 6f75 7420 636f 6465 2069 6e20 3c63 thout code in { and\n-0014cef0: 203c 636f 6465 3e7d 3c2f 636f 6465 3e2e }.\n-0014cf00: 2041 6c73 6f20 636f 6e73 7472 7563 746f Also constructo\n-0014cf10: 7220 696e 6974 6961 6c69 7a65 7273 2061 r initializers a\n-0014cf20: 7265 206e 6f74 2061 6c6c 6f77 6564 2e20 re not allowed. \n-0014cf30: 436c 6173 7320 6d65 7468 6f64 2069 6d70 Class method imp\n-0014cf40: 6c65 6d65 6e74 6174 696f 6e73 2073 686f lementations sho\n-0014cf50: 756c 6420 6265 2064 6566 696e 6564 2069 uld be defined i\n-0014cf60: 6e20 6120 7365 7061 7261 7465 2043 2b2b n a separate C++\n-0014cf70: 2073 6f75 7263 6520 6669 6c65 2e3c 2f6c source file..
    • C++ refer\n-0014cf90: 656e 6365 733a 2074 6865 7365 2063 616e ences: these can\n-0014cfa0: 6e6f 7420 6265 2073 6572 6961 6c69 7a65 not be serialize\n-0014cfb0: 642c 2075 7365 2070 6f69 6e74 6572 7320 d, use pointers \n-0014cfc0: 696e 7374 6561 642e 3c2f 6c69 3e0a 3c2f instead.
    • ..

      The follo\n-0014cfe0: 7769 6e67 2043 2f43 2b2b 2064 6174 6120 wing C/C++ data \n-0014cff0: 7479 7065 7320 7265 7175 6972 6520 736f types require so\n-0014d000: 6d65 2061 7474 656e 7469 6f6e 2074 6f20 me attention to \n-0014d010: 656e 7375 7265 2074 6865 7920 6361 6e20 ensure they can \n-0014d020: 6265 2073 6572 6961 6c69 7a65 643a 3c2f be serialized:.

        .
      • Unio\n-0014d040: 6e20 7479 7065 733a 2061 2075 6e69 6f6e n types: a union\n-0014d050: 2064 6174 6120 7479 7065 2063 616e 206e data type can n\n-0014d060: 6f74 2062 6520 7365 7269 616c 697a 6564 ot be serialized\n-0014d070: 2075 6e6c 6573 7320 7275 6e2d 7469 6d65 unless run-time\n-0014d080: 2069 6e66 6f72 6d61 7469 6f6e 2069 7320 information is \n-0014d090: 6173 736f 6369 6174 6564 2077 6974 6820 associated with \n-0014d0a0: 6120 756e 696f 6e20 666f 7220 7468 6520 a union for the \n-0014d0b0: 7365 7269 616c 697a 6572 2074 6f20 6465 serializer to de\n-0014d0c0: 7465 726d 696e 6520 7768 6963 6820 756e termine which un\n-0014d0d0: 696f 6e20 6d65 6d62 6572 2069 7320 7661 ion member is va\n-0014d0e0: 6c69 642e 2054 6f20 7365 7269 616c 697a lid. To serializ\n-0014d0f0: 6520 6120 756e 696f 6e2c 2070 6c61 6365 e a union, place\n-0014d100: 2074 6865 2075 6e69 6f6e 2069 6e20 6120 the union in a \n-0014d110: 7374 7275 6374 206f 7220 636c 6173 7320 struct or class \n-0014d120: 6173 2061 206d 656d 6265 7220 616e 6420 as a member and \n-0014d130: 7072 6563 6564 6520 7468 6973 206d 656d precede this mem\n-0014d140: 6265 7220 7769 7468 2061 6e20 696e 7465 ber with an inte\n-0014d150: 6765 7220 6d65 6d62 6572 2074 6861 7420 ger member that \n-0014d160: 7365 7276 6573 2061 7320 6120 7365 6c65 serves as a sele\n-0014d170: 6374 6f72 2e20 5365 6520 5365 6374 696f ctor. See Sectio\n-0014d180: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n Union se\n-0014d1b0: 7269 616c 697a 6174 696f 6e3c 2f61 3e20 rialization \n-0014d1c0: 666f 7220 6465 7461 696c 732e 3c2f 6c69 for details..
      • void\n-0014d1e0: 2a3c 2f63 6f64 653e 2074 7970 6573 3a20 * types: \n-0014d1f0: 7468 6520 3c63 6f64 653e 766f 6964 2a3c the void*<\n-0014d200: 2f63 6f64 653e 2064 6174 6120 7479 7065 /code> data type\n-0014d210: 2063 616e 6e6f 7420 6265 2073 6572 6961 cannot be seria\n-0014d220: 6c69 7a65 6420 756e 6c65 7373 2072 756e lized unless run\n-0014d230: 2d74 696d 6520 7479 7065 2069 6e66 6f72 -time type infor\n-0014d240: 6d61 7469 6f6e 2069 7320 6173 736f 6369 mation is associ\n-0014d250: 6174 6564 2077 6974 6820 7468 6520 706f ated with the po\n-0014d260: 696e 7465 7220 7573 696e 6720 6120 3c63 inter using a int __type member in \n-0014d290: 7468 6520 7374 7275 6374 206f 7220 636c the struct or cl\n-0014d2a0: 6173 7320 7468 6174 2063 6f6e 7461 696e ass that contain\n-0014d2b0: 7320 7468 6520 3c63 6f64 653e 766f 6964 s the void\n-0014d2c0: 2a3c 2f63 6f64 653e 206d 656d 6265 722e * member.\n-0014d2d0: 2053 6565 2053 6563 7469 6f6e 203c 6120 See Section Void pointer s\n-0014d310: 6572 6961 6c69 7a61 7469 6f6e 3c2f 613e erialization\n-0014d320: 2066 6f72 2064 6574 6169 6c73 2e3c 2f6c for details..
      • Pointers \n-0014d340: 746f 2061 7272 6179 733a 2061 6e79 2070 to arrays: any p\n-0014d350: 6f69 6e74 6572 2c20 6578 6365 7074 2066 ointer, except f\n-0014d360: 6f72 2043 2073 7472 696e 6773 2077 6869 or C strings whi\n-0014d370: 6368 2061 7265 2070 6f69 6e74 6572 7320 ch are pointers \n-0014d380: 746f 2061 6e20 6172 7261 7920 6f66 2063 to an array of c\n-0014d390: 6861 7261 6374 6572 732c 2061 7265 2074 haracters, are t\n-0014d3a0: 7265 6174 6564 2062 7920 7468 6520 736f reated by the so\n-0014d3b0: 6170 6370 7032 2074 6f6f 6c20 6173 2069 apcpp2 tool as i\n-0014d3c0: 6620 7468 6520 706f 696e 7465 7220 706f f the pointer po\n-0014d3d0: 696e 7473 2074 6f20 6f6e 6c79 206f 6e65 ints to only one\n-0014d3e0: 2076 616c 7565 2e20 436f 6e73 6571 7565 value. Conseque\n-0014d3f0: 6e74 6c79 2c20 7468 6520 7365 7269 616c ntly, the serial\n-0014d400: 697a 6174 696f 6e20 6675 6e63 7469 6f6e ization function\n-0014d410: 7320 666f 7220 706f 696e 7465 7273 206f s for pointers o\n-0014d420: 6e6c 7920 7365 7269 616c 697a 6520 7468 nly serialize th\n-0014d430: 6520 6669 7273 7420 7661 6c75 6520 706f e first value po\n-0014d440: 696e 7465 6420 746f 2c20 7768 656e 2074 inted to, when t\n-0014d450: 6865 2070 6f69 6e74 6572 2069 7320 6e6f he pointer is no\n-0014d460: 6e2d 4e55 4c4c 2e20 546f 2064 6563 6c61 n-NULL. To decla\n-0014d470: 7265 2070 6f69 6e74 6572 7320 746f 2061 re pointers to a\n-0014d480: 7272 6179 7320 6173 2073 7472 7563 7420 rrays as struct \n-0014d490: 616e 6420 636c 6173 7320 6d65 6d62 6572 and class member\n-0014d4a0: 732c 2061 2073 697a 6520 6d65 6d62 6572 s, a size member\n-0014d4b0: 2069 7320 696e 636c 7564 6564 2069 6e20 is included in \n-0014d4c0: 7468 6520 7374 7275 6374 206f 7220 636c the struct or cl\n-0014d4d0: 6173 732c 2073 6565 2053 6563 7469 6f6e ass, see Section\n-0014d4e0: 203c 6120 636c 6173 733d 2265 6c22 2068 Dynami\n-0014d510: 6320 6172 7261 7920 7365 7269 616c 697a c array serializ\n-0014d520: 6174 696f 6e3c 2f61 3e20 666f 7220 6465 ation for de\n-0014d530: 7461 696c 732e 3c2f 6c69 3e0a 3c6c 693e tails.
      • .
      • \n-0014d540: 436f 6e73 7461 6e74 2076 616c 7565 733a Constant values:\n-0014d550: 203c 636f 6465 3e63 6f6e 7374 3c2f 636f const constant val\n-0014d570: 7565 7320 7375 6368 2061 7320 3c63 6f64 ues such as const m\n-0014d590: 656d 6265 7273 206f 6620 6120 7374 7275 embers of a stru\n-0014d5a0: 6374 206f 7220 636c 6173 7320 6361 6e6e ct or class cann\n-0014d5b0: 6f74 2062 6520 7365 7269 616c 697a 6564 ot be serialized\n-0014d5c0: 2065 7863 6570 7420 666f 7220 3c63 6f64 except for const char* and c\n-0014d5f0: 6f6e 7374 2077 6368 6172 5f74 2a3c 2f63 onst wchar_t* strings..
      • Uninitial\n-0014d620: 697a 6564 2070 6f69 6e74 6572 733a 204f ized pointers: O\n-0014d630: 6276 696f 7573 6c79 2c20 616c 6c20 706f bviously, all po\n-0014d640: 696e 7465 7273 2074 6861 7420 6172 6520 inters that are \n-0014d650: 7061 7274 206f 6620 6120 6461 7461 2073 part of a data s\n-0014d660: 7472 7563 7475 7265 2074 6f20 7365 7269 tructure to seri\n-0014d670: 616c 697a 6520 6d75 7374 2062 6520 7661 alize must be va\n-0014d680: 6c69 6420 6f72 204e 554c 4c2e 204f 7468 lid or NULL. Oth\n-0014d690: 6572 7769 7365 2074 6865 2073 6572 6961 erwise the seria\n-0014d6a0: 6c69 7a65 7220 7769 6c6c 2063 7261 7368 lizer will crash\n-0014d6b0: 2e3c 2f6c 693e 0a3c 2f75 6c3e 0a3c 703e .
      • .
      .

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

      .Adva\n-0014d720: 6e63 6564 2066 6561 7475 7265 733c 2f68 nced features.

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

      .

      .In\n-0014d7a0: 7465 726e 6174 696f 6e61 6c69 7a61 7469 ternationalizati\n-0014d7b0: 6f6e 3c2f 6832 3e0a 3c70 3e52 6567 756c on

      .

      Regul\n-0014d7c0: 6172 2038 2d62 6974 2073 7472 696e 6773 ar 8-bit strings\n-0014d7d0: 2063 616e 6e6f 7420 686f 6c64 2077 6964 cannot hold wid\n-0014d7e0: 6520 6368 6172 6163 7465 7273 206f 7574 e characters out\n-0014d7f0: 7369 6465 206f 6620 7468 6520 6368 6172 side of the char\n-0014d800: 6163 7465 7220 7261 6e67 6520 5b31 2c32 acter range [1,2\n-0014d810: 3535 5d2e 204f 6620 636f 7572 7365 2079 55]. Of course y\n-0014d820: 6f75 2063 616e 2075 7365 2077 6964 6520 ou can use wide \n-0014d830: 7374 7269 6e67 7320 696e 7374 6561 6420 strings instead \n-0014d840: 6f66 2038 2d62 6974 2073 7472 696e 6773 of 8-bit strings\n-0014d850: 2069 6e20 7468 6520 696e 7465 7266 6163 in the interfac\n-0014d860: 6520 6865 6164 6572 2066 696c 6520 666f e header file fo\n-0014d870: 7220 736f 6170 6370 7032 2e20 416c 7465 r soapcpp2. Alte\n-0014d880: 726e 6174 6976 656c 792c 2073 6574 2074 rnatively, set t\n-0014d890: 6865 203c 636f 6465 3e23 534f 4150 5f43 he #SOAP_C\n-0014d8a0: 5f55 5446 5354 5249 4e47 3c2f 636f 6465 _UTFSTRING mode flag to e\n-0014d8c0: 6e63 6f64 6520 7769 6465 2063 6861 7261 ncode wide chara\n-0014d8d0: 6374 6572 7320 696e 2038 2d62 6974 2073 cters in 8-bit s\n-0014d8e0: 7472 696e 6773 2069 6e20 5554 462d 3820 trings in UTF-8 \n-0014d8f0: 666f 726d 6174 2e3c 2f70 3e0a 3c70 3e46 format.

      .

      F\n-0014d900: 6f72 2065 7861 6d70 6c65 2c20 7468 6520 or example, the \n-0014d910: 3c65 6d3e 3c63 6f64 653e 7873 643a 7374 xsd:st\n-0014d920: 7269 6e67 3c2f 636f 6465 3e3c 2f65 6d3e ring\n-0014d930: 2073 7472 696e 6720 7363 6865 6d61 2074 string schema t\n-0014d940: 7970 6520 6361 6e20 6265 2064 6563 6c61 ype can be decla\n-0014d950: 7265 6420 6173 2061 2077 6964 652d 6368 red as a wide-ch\n-0014d960: 6172 6163 7465 7220 7374 7269 6e67 2061 aracter string a\n-0014d970: 6e64 2075 7365 6420 7375 6273 6571 7565 nd used subseque\n-0014d980: 6e74 6c79 3a3c 2f70 3e0a 3c64 6976 2063 ntly:

      .
      \n-0014d9a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      typedef<\n-0014d9d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> wchar_t \n-0014da00: 2a78 7364 5f5f 7374 7269 6e67 3b20 3c2f *xsd__string; .
      int ns__\n-0014da50: 6d79 4d65 7468 6f64 2878 7364 5f5f 7374 myMethod(xsd__st\n-0014da60: 7269 6e67 2069 6e70 7574 2c20 7873 645f ring input, xsd_\n-0014da70: 5f73 7472 696e 6720 2a6f 7574 7075 7429 _string *output)\n-0014da80: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
      .
      <\n-0014daa0: 703e 546f 2064 6f20 736f 2061 7574 6f6d p>To do so autom\n-0014dab0: 6174 6963 616c 6c79 2077 6974 6820 7773 atically with ws\n-0014dac0: 646c 3268 2c20 6564 6974 203c 656d 3e3c dl2h, edit <\n-0014dad0: 636f 6465 3e74 7970 656d 6170 2e64 6174 code>typemap.dat\n-0014dae0: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 6e64
      and\n-0014daf0: 2061 6464 2074 6865 206c 696e 653a 203c add the line: <\n-0014db00: 2f70 3e3c 7072 6520 636c 6173 733d 2266 /p>
      xsd__st\n-0014db20: 7269 6e67 203d 207c 2077 6368 6172 5f74  ring = | wchar_t\n-0014db30: 2a20 7c20 7763 6861 725f 742a 0a3c 2f70  * | wchar_t*.

      or for C+\n-0014db50: 2b3a 203c 2f70 3e3c 7072 6520 636c 6173 +:

      xsd\n-0014db70: 5f5f 7374 7269 6e67 203d 207c 2073 7464  __string = | std\n-0014db80: 3a3a 7773 7472 696e 6720 7c20 7374 643a  ::wstring | std:\n-0014db90: 3a77 7374 7269 6e67 2a0a 3c2f 7072 653e  :wstring*.
      \n-0014dba0: 3c70 3e20 416c 7465 726e 6174 6976 656c

      Alternativel\n-0014dbb0: 792c 2038 2d62 6974 2073 7472 696e 6773 y, 8-bit strings\n-0014dbc0: 2063 616e 2068 6f6c 6420 5554 462d 3820 can hold UTF-8 \n-0014dbd0: 666f 726d 6174 7465 6420 7769 6465 2063 formatted wide c\n-0014dbe0: 6861 7261 6374 6572 7320 7768 656e 2074 haracters when t\n-0014dbf0: 6865 203c 636f 6465 3e23 534f 4150 5f43 he #SOAP_C\n-0014dc00: 5f55 5446 5354 5249 4e47 3c2f 636f 6465 _UTFSTRING flag is enable\n-0014dc20: 642c 2073 6565 2053 6563 7469 6f6e 203c d, see Section <\n-0014dc30: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0014dc40: 663d 2269 6e64 6578 2e68 746d 6c23 666c f=\"index.html#fl\n-0014dc50: 6167 7322 3e52 756e 2d74 696d 6520 666c ags\">Run-time fl\n-0014dc60: 6167 733c 2f61 3e20 2e20 5468 6520 6170 ags . The ap\n-0014dc70: 706c 6963 6174 696f 6e20 6973 2072 6573 plication is res\n-0014dc80: 706f 6e73 6962 6c65 2066 6f72 2066 696c ponsible for fil\n-0014dc90: 6c69 6e67 2072 6567 756c 6172 2073 7472 ling regular str\n-0014dca0: 696e 6773 2077 6974 6820 5554 462d 3820 ings with UTF-8 \n-0014dcb0: 636f 6e74 656e 742e 3c2f 703e 0a3c 703e content.

      .

      \n-0014dcc0: 416c 736f 2074 6865 203c 636f 6465 3e23 Also the #\n-0014dcd0: 534f 4150 5f43 5f4d 4253 5452 494e 473c SOAP_C_MBSTRING<\n-0014dce0: 2f63 6f64 653e 2066 6c61 6720 6361 6e20 /code> flag can \n-0014dcf0: 6265 2075 7365 6420 746f 2061 6374 6976 be used to activ\n-0014dd00: 6174 6520 6d75 6c74 6962 7974 6520 6368 ate multibyte ch\n-0014dd10: 6172 6163 7465 7220 7375 7070 6f72 7420 aracter support \n-0014dd20: 7573 696e 6720 7468 6520 6375 7272 656e using the curren\n-0014dd30: 7420 6c6f 6361 6c65 2e20 4d75 6c74 6962 t locale. Multib\n-0014dd40: 7974 6520 7375 7070 6f72 7420 6465 7065 yte support depe\n-0014dd50: 6e64 7320 6f6e 2074 6865 206c 6f63 616c nds on the local\n-0014dd60: 6520 7365 7474 696e 6773 2066 6f72 2064 e settings for d\n-0014dd70: 6561 6c69 6e67 2077 6974 6820 6578 7465 ealing with exte\n-0014dd80: 6e64 6564 206e 6174 7572 616c 206c 616e nded natural lan\n-0014dd90: 6775 6167 6520 656e 636f 6469 6e67 732e guage encodings.\n-0014dda0: 3c2f 703e 0a3c 703e 426f 7468 2038 2d62

      .

      Both 8-b\n-0014ddb0: 6974 2073 7472 696e 6773 2061 6e64 2077 it strings and w\n-0014ddc0: 6964 652d 6368 6172 6163 7465 7220 7374 ide-character st\n-0014ddd0: 7269 6e67 7320 6361 6e20 6265 2075 7365 rings can be use\n-0014dde0: 6420 746f 6765 7468 6572 2077 6974 6869 d together withi\n-0014ddf0: 6e20 616e 2061 7070 6c69 6361 7469 6f6e n an application\n-0014de00: 2e20 466f 7220 6578 616d 706c 652c 2074 . For example, t\n-0014de10: 6865 2066 6f6c 6c6f 7769 6e67 2068 6561 he following hea\n-0014de20: 6465 7220 6669 6c65 2064 6563 6c61 7261 der file declara\n-0014de30: 7469 6f6e 2069 6e74 726f 6475 6365 7320 tion introduces \n-0014de40: 7477 6f20 7374 7269 6e67 2073 6368 656d two string schem\n-0014de50: 6120 7479 7065 733a 3c2f 703e 0a3c 6469 a types:

      .
      typed\n-0014dea0: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef wchar_t *xsd__string;\n-0014dee0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      \n-0014df10: 7479 7065 6465 663c 2f73 7061 6e3e 203c typedef <\n-0014df20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0014df30: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *xsd__strin\n-0014df50: 675f 3b20 3c73 7061 6e20 636c 6173 733d g_; // tra\n-0014df70: 696c 696e 6720 2623 3339 3b5f 2623 3339 iling '_'\n-0014df80: 3b20 6176 6f69 6473 206e 616d 6520 636c ; avoids name cl\n-0014df90: 6173 6820 3c2f 7370 616e 3e3c 2f64 6976 ash .
      in\n-0014dfd0: 743c 2f73 7061 6e3e 206e 735f 5f6d 794d t ns__myM\n-0014dfe0: 6574 686f 6428 7873 645f 5f73 7472 696e ethod(xsd__strin\n-0014dff0: 6720 696e 7075 742c 2078 7364 5f5f 7374 g input, xsd__st\n-0014e000: 7269 6e67 5f20 2a6f 7574 7075 7429 3b3c ring_ *output);<\n-0014e010: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

      \n-0014e030: 506c 6561 7365 2063 6f6e 7375 6c74 2074 Please consult t\n-0014e040: 6865 2055 5446 2d38 2073 7065 6369 6669 he UTF-8 specifi\n-0014e050: 6361 7469 6f6e 2066 6f72 2064 6574 6169 cation for detai\n-0014e060: 6c73 206f 6e20 7468 6520 5554 462d 3820 ls on the UTF-8 \n-0014e070: 666f 726d 6174 2077 6865 6e20 7072 6f63 format when proc\n-0014e080: 6573 7369 6e67 2038 2d62 6974 2073 7472 essing 8-bit str\n-0014e090: 696e 6773 2077 6974 6820 5554 462d 3820 ings with UTF-8 \n-0014e0a0: 636f 6e74 656e 742e 204e 6f74 6520 7468 content. Note th\n-0014e0b0: 6174 2074 6865 2041 5343 4949 2063 6861 at the ASCII cha\n-0014e0c0: 7261 6374 6572 2073 6574 205b 312d 3132 racter set [1-12\n-0014e0d0: 375d 2069 7320 6120 7375 6273 6574 206f 7] is a subset o\n-0014e0e0: 6620 5554 462d 382e 2054 6865 7265 666f f UTF-8. Therefo\n-0014e0f0: 7265 2c20 7769 7468 2074 6865 203c 636f re, with the #SOAP_C_UTFST\n-0014e110: 5249 4e47 3c2f 636f 6465 3e20 666c 6167 RING flag\n-0014e120: 2073 6574 2c20 7374 7269 6e67 7320 6d61 set, strings ma\n-0014e130: 7920 686f 6c64 2041 5343 4949 2063 6861 y hold ASCII cha\n-0014e140: 7261 6374 6572 2064 6174 6120 616e 6420 racter data and \n-0014e150: 5554 462d 3820 6578 7465 6e73 696f 6e73 UTF-8 extensions\n-0014e160: 2e3c 2f70 3e0a 3c70 3e53 6565 2061 6c73 .

      .

      See als\n-0014e170: 6f20 3c61 2068 7265 663d 222e 2e2f 2e2e o C \n-0014e1a0: 616e 6420 432b 2b20 584d 4c20 6461 7461 and C++ XML data\n-0014e1b0: 2062 696e 6469 6e67 733c 2f61 3e20 646f bindings do\n-0014e1c0: 6375 6d65 6e74 6174 696f 6e20 666f 7220 cumentation for \n-0014e1d0: 6d6f 7265 2064 6574 6169 6c73 206f 6e20 more details on \n-0014e1e0: 7573 696e 6720 3c65 6d3e 3c63 6f64 653e using \n-0014e1f0: 7479 7065 6d61 702e 6461 743c 2f63 6f64 typemap.dat for wsdl\n-0014e210: 3268 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 2h.

      .

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

      ..Directi\n-0014e280: 7665 733c 2f68 323e 0a3c 703e 416e 2069 ves

    .

    An i\n-0014e290: 6e74 6572 6661 6365 2068 6561 6465 7220 nterface header \n-0014e2a0: 6669 6c65 2066 6f72 2073 6f61 7063 7070 file for soapcpp\n-0014e2b0: 3220 6d61 7920 696e 636c 7564 6520 3c63 2 may include //gsoap directives to\n-0014e2e0: 2063 6f6e 6669 6775 7265 206d 6573 7361 configure messa\n-0014e2f0: 6769 6e67 2070 726f 746f 636f 6c73 2073 ging protocols s\n-0014e300: 7563 6820 6173 2053 4f41 5020 6f72 2052 uch as SOAP or R\n-0014e310: 4553 542c 2074 6f20 6173 736f 6369 6174 EST, to associat\n-0014e320: 6520 534f 4150 2048 6561 6465 7273 2061 e SOAP Headers a\n-0014e330: 6e64 2046 6175 6c74 7320 7769 7468 206d nd Faults with m\n-0014e340: 6573 7361 6765 732c 2061 6e64 2074 6f20 essages, and to \n-0014e350: 7365 7420 7072 6f70 6572 7469 6573 206f set properties o\n-0014e360: 6620 7468 6520 5765 6220 7365 7276 6963 f the Web servic\n-0014e370: 6520 6465 6669 6e65 6420 696e 2074 6865 e defined in the\n-0014e380: 2073 6f61 7063 7070 322d 6765 6e65 7261 soapcpp2-genera\n-0014e390: 7465 6420 5753 444c 2061 6e64 2058 5344 ted WSDL and XSD\n-0014e3a0: 2066 696c 6573 2e20 4469 7265 6374 6976 files. Directiv\n-0014e3b0: 6573 2066 6f72 2073 6f61 7063 7070 3220 es for soapcpp2 \n-0014e3c0: 6172 6520 7370 6563 6966 6965 6420 6173 are specified as\n-0014e3d0: 203c 636f 6465 3e2f 2f67 736f 6170 3c2f //gsoap-comments t\n-0014e3f0: 6861 7420 6172 6520 7072 6f63 6573 7365 hat are processe\n-0014e400: 6420 6279 2073 6f61 7063 7070 322e 3c2f d by soapcpp2..

    .\n-0014e440: 5365 7276 6963 6520 6469 7265 6374 6976 Service directiv\n-0014e450: 6573 3c2f 6833 3e0a 3c70 3e41 2073 6572 es

    .

    A ser\n-0014e460: 7669 6365 2064 6972 6563 7469 7665 206d vice directive m\n-0014e470: 7573 7420 7374 6172 7420 6174 2061 206e ust start at a n\n-0014e480: 6577 206c 696e 6520 616e 6420 6973 206f ew line and is o\n-0014e490: 6620 7468 6520 666f 726d 3a3c 2f70 3e0a f the form:

    .\n-0014e4a0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    //\n-0014e4e0: 6773 6f61 7020 266c 743b 7072 6566 6978 gsoap <prefix\n-0014e4f0: 2667 743b 2073 6572 7669 6365 2026 6c74 > service <\n-0014e500: 3b70 726f 7065 7274 7926 6774 3b3a 2026 ;property>: &\n-0014e510: 6c74 3b76 616c 7565 2667 743b 3c2f 7370 lt;value>
    .
    \n-0014e530: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    where prefix can now be use\n-001504e0: 6420 746f 206c 6574 2064 6972 6563 7469 d to let directi\n-001504f0: 7665 7320 7461 6b65 2065 6666 6563 7420 ves take effect \n-00150500: 6f6e 2074 6869 7320 7365 7276 6963 6520 on this service \n-00150510: 6f70 6572 6174 696f 6e2e 3c2f 703e 0a3c operation.

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

    .

    .Service method\n-00150590: 2064 6972 6563 7469 7665 733c 2f68 333e directives

    \n-001505a0: 0a3c 703e 5365 7276 6963 6520 7072 6f70 .

    Service prop\n-001505b0: 6572 7469 6573 2061 7265 2061 7070 6c69 erties are appli\n-001505c0: 6361 626c 6520 746f 2061 2073 6572 7669 cable to a servi\n-001505d0: 6365 2061 6e64 2074 6f20 616c 6c20 6f66 ce and to all of\n-001505e0: 2069 7473 206f 7065 7261 7469 6f6e 732e its operations.\n-001505f0: 2053 6572 7669 6365 206d 6574 686f 6420 Service method \n-00150600: 6469 7265 6374 6976 6573 2061 7265 2073 directives are s\n-00150610: 7065 6369 6669 6361 6c6c 7920 6170 706c pecifically appl\n-00150620: 6963 6162 6c65 2074 6f20 6120 7365 7276 icable to a serv\n-00150630: 6963 6520 6f70 6572 6174 696f 6e2e 3c2f ice operation..

    A service \n-00150650: 6d65 7468 6f64 2064 6972 6563 7469 7665 method directive\n-00150660: 2069 7320 6f66 2074 6865 2066 6f72 6d3a is of the form:\n-00150670: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    //gsoap <p\n-001506c0: 7265 6669 7826 6774 3b20 7365 7276 6963 refix> servic\n-001506d0: 6520 6d65 7468 6f64 2d26 6c74 3b70 726f e method-<pro\n-001506e0: 7065 7274 7926 6774 3b3a 2026 6c74 3b6d perty>: <m\n-001506f0: 6574 686f 6426 6774 3b20 266c 743b 7661 ethod> <va\n-00150700: 6c75 6526 6774 3b3c 2f73 7061 6e3e 3c2f lue>.

    w\n-00150730: 6865 7265 203c 636f 6465 3e26 6c74 3b70 here <p\n-00150740: 7265 6669 7826 6774 3b3c 2f63 6f64 653e refix>\n-00150750: 2069 7320 7468 6520 584d 4c20 6e61 6d65 is the XML name\n-00150760: 7370 6163 6520 7072 6566 6978 206f 6620 space prefix of \n-00150770: 6120 7365 7276 6963 6520 6269 6e64 696e a service bindin\n-00150780: 6720 616e 6420 3c63 6f64 653e 266c 743b g and <\n-00150790: 6d65 7468 6f64 2667 743b 3c2f 636f 6465 method> is the unquali\n-001507b0: 6669 6564 206e 616d 6520 6f66 2061 2073 fied name of a s\n-001507c0: 6572 7669 6365 206f 7065 7261 7469 6f6e ervice operation\n-001507d0: 2e20 5468 6520 3c63 6f64 653e 266c 743b . The <\n-001507e0: 7072 6f70 6572 7479 2667 743b 3c2f 636f property> and &l\n-00150800: 743b 7661 6c75 6526 6774 3b3c 2f63 6f64 t;value> fields are on\n-00150820: 6520 6f66 2074 6865 2066 6f6c 6c6f 7769 e of the followi\n-00150830: 6e67 3a3c 2f70 3e0a 3c74 6162 6c65 2063 ng:

    .
    De\n-00143710: 7363 7269 7074 696f 6e20 2020 203c 2f74 scription
    200 \n-00143770: 203c 2f74 643e 3c74 6420 636c 6173 733d OK (no e\n-001437a0: 7272 6f72 2920 2020 203c 2f74 643e 3c2f rror)
    201 Created \n-00143830: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    20\n-00143880: 3220 2020 3c2f 7464 3e3c 7464 2063 6c61 2 Accep\n-001438b0: 7465 6420 2020 203c 2f74 643e 3c2f 7472 ted
    203 Non-Authorita\n-00143940: 7469 7665 2049 6e66 6f72 6d61 7469 6f6e tive Information\n-00143950: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    204
    205 \n-00143a30: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 Reset C\n-00143a60: 6f6e 7465 6e74 2020 2020 3c2f 7464 3e3c ontent
    206 Partial Con\n-00143af0: 7465 6e74 2020 2020 3c2f 7464 3e3c 2f74 tent
    300 Multiple Cho\n-00143b80: 6963 6573 2020 2020 3c2f 7464 3e3c 2f74 ices
    301 Moved Permane\n-00143c10: 6e74 6c79 2020 2020 3c2f 7464 3e3c 2f74 ntly
    302 Found
    303 \n-00143cf0: 203c 2f74 643e 3c74 6420 636c 6173 733d See Othe\n-00143d20: 7220 2020 203c 2f74 643e 3c2f 7472 3e0a r
    304
    Use \n-00143e30: 5072 6f78 7920 2020 203c 2f74 643e 3c2f Proxy
    307 Temporary R\n-00143ec0: 6564 6972 6563 7420 2020 203c 2f74 643e edirect
    400 <\n-00143f20: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>Bad Reques\n-00143f50: 7420 2020 203c 2f74 643e 3c2f 7472 3e0a t
    401
    Paym\n-00144060: 656e 7420 5265 7175 6972 6564 2020 2020 ent Required \n-00144070: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    Forb\n-001440f0: 6964 6465 6e20 2020 203c 2f74 643e 3c2f idden
    404 Not Found \n-00144180: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    Met\n-00144200: 686f 6420 4e6f 7420 416c 6c6f 7765 6420 hod Not Allowed \n-00144210: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    No\n-00144290: 7420 4163 6365 7074 6162 6c65 2020 2020 t Acceptable \n-001442a0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    Prox\n-00144320: 7920 4175 7468 656e 7469 6361 7469 6f6e y Authentication\n-00144330: 2052 6571 7569 7265 6420 2020 203c 2f74 Required
    408 \n-00144390: 203c 2f74 643e 3c74 6420 636c 6173 733d Request \n-001443c0: 5469 6d65 2d6f 7574 2020 2020 3c2f 7464 Time-out
    409 \n-00144420: 203c 2f74 643e 3c74 6420 636c 6173 733d Conflict\n-00144450: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    410
    411 Length Requir\n-00144560: 6564 2020 2020 3c2f 7464 3e3c 2f74 723e ed
    412
    413 Request Enti\n-00144680: 7479 2054 6f6f 204c 6172 6765 2020 2020 ty Too Large \n-00144690: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    41\n-001446e0: 3420 2020 3c2f 7464 3e3c 7464 2063 6c61 4 Reque\n-00144710: 7374 2d55 5249 2054 6f6f 204c 6172 6765 st-URI Too Large\n-00144720: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    415
    416 Requested r\n-00144840: 616e 6765 206e 6f74 2073 6174 6973 6669 ange not satisfi\n-00144850: 6162 6c65 2020 2020 3c2f 7464 3e3c 2f74 able
    417 Expectation \n-001448e0: 4661 696c 6564 2020 2020 3c2f 7464 3e3c Failed
    500 Internal Se\n-00144970: 7276 6572 2045 7272 6f72 2020 2020 3c2f rver Error
    501\n-001449d0: 2020 203c 2f74 643e 3c74 6420 636c 6173 Not Im\n-00144a00: 706c 656d 656e 7465 6420 2020 203c 2f74 plemented
    502 \n-00144a60: 203c 2f74 643e 3c74 6420 636c 6173 733d Bad Gate\n-00144a90: 7761 7920 2020 203c 2f74 643e 3c2f 7472 way
    503 Service Unava\n-00144b20: 696c 6162 6c65 2020 2020 3c2f 7464 3e3c ilable
    504 Gateway Tim\n-00144bb0: 652d 6f75 7420 2020 203c 2f74 643e 3c2f e-out
    505 HTTP Versio\n-00144c40: 6e20 6e6f 7420 7375 7070 6f72 7465 6420 n not supported \n-00144c50: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 2f74
    ..\n-001508d0: 7661 6c75 6520 2020 203c 2f74 683e 3c2f value ..\n-00150950: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n-001509a0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ......\n-00150b60: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n-00150c90: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n-00150d50: 636f 6465 3e6d 6574 686f 642d 6661 756c code>method-faul\n-00150d60: 742d 6163 7469 6f6e 3c2f 636f 6465 3e20 t-action \n-00150d70: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 .<\n-00150df0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-00150e00: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n-00150e10: 3c74 6420 636c 6173 733d 226d 6172 6b64 ....\n-001510d0: 3c63 6f64 653e 6d65 7468 6f64 2d6f 7574 method-out\n-001510e0: 7075 742d 6865 6164 6572 2d70 6172 743c put-header-part<\n-001510f0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n-00151120: 6d65 6d62 6572 206e 616d 6520 6f66 2074 member name of t\n-00151130: 6865 203c 636f 6465 3e3c 6120 636c 6173 he SOAP_ENV__He\n-001511a0: 6164 6572 3c2f 613e 3c2f 636f 6465 3e20 ader \n-001511b0: 7374 7275 6374 2075 7365 6420 696e 2053 struct used in S\n-001511c0: 4f41 5020 4865 6164 6572 7320 6f66 2072 OAP Headers of r\n-001511d0: 6573 706f 6e73 6573 2020 2020 3c2f 7464 esponses ...\n-001512d0: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n-001512f0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .....<\n-001514b0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n-001514c0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n-001514d0: 3e3c 636f 6465 3e6d 6574 686f 642d 6f75 >method-ou\n-001514e0: 7470 7574 2d6d 696d 652d 7479 7065 3c2f tput-mime-type R\n-00151520: 4553 5420 636f 6e74 656e 7420 7479 7065 EST content type\n-00151530: 206f 7220 534f 4150 204d 494d 4520 6174 or SOAP MIME at\n-00151540: 7461 6368 6d65 6e74 2063 6f6e 7465 6e74 tachment content\n-00151550: 2074 7970 6528 7329 206f 6620 7265 7370 type(s) of resp\n-00151560: 6f6e 7365 206d 6573 7361 6765 2020 2020 onse message \n-00151570: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..<\n-001515c0: 636f 6465 3e6d 6574 686f 642d 7374 796c code>method-styl\n-001515d0: 653c 2f63 6f64 653e 2020 203c 2f74 643e e \n-001515e0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ....<\n-00151770: 636f 6465 3e6d 6574 686f 642d 7265 7370 code>method-resp\n-00151780: 6f6e 7365 2d65 6e63 6f64 696e 673c 2f63 onse-encoding .<\n-00151830: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n-00151840: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n-00151850: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..

    The method-header-p\n-00151940: 6172 743c 2f63 6f64 653e 2070 726f 7065 art prope\n-00151950: 7274 6965 7320 6361 6e20 6265 2072 6570 rties can be rep\n-00151960: 6561 7465 6420 666f 7220 6120 7365 7276 eated for a serv\n-00151970: 6963 6520 6f70 6572 6174 696f 6e20 746f ice operation to\n-00151980: 2064 6563 6c61 7265 206d 756c 7469 706c declare multipl\n-00151990: 6520 534f 4150 2048 6561 6465 7220 7061 e SOAP Header pa\n-001519a0: 7274 7320 7468 6174 2074 6865 2073 6572 rts that the ser\n-001519b0: 7669 6365 206f 7065 7261 7469 6f6e 2072 vice operation r\n-001519c0: 6571 7569 7265 732e 2059 6f75 2063 616e equires. You can\n-001519d0: 2075 7365 203c 636f 6465 3e6d 6574 686f use metho\n-001519e0: 642d 696e 7075 742d 6865 6164 6572 2d70 d-input-header-p\n-001519f0: 6172 743c 2f63 6f64 653e 2061 6e64 203c art and <\n-00151a00: 636f 6465 3e6d 6574 686f 642d 6f75 7470 code>method-outp\n-00151a10: 7574 2d68 6561 6465 722d 7061 7274 3c2f ut-header-part to differe\n-00151a30: 6e74 6961 7465 2062 6574 7765 656e 2072 ntiate between r\n-00151a40: 6571 7565 7374 2061 6e64 2072 6573 706f equest and respo\n-00151a50: 6e73 6520 6d65 7373 6167 6573 2e3c 2f70 nse messages..

    The m\n-00151a70: 6574 686f 642d 6661 756c 743c 2f63 6f64 ethod-fault property can \n-00151a90: 6265 2072 6570 6561 7465 6420 666f 7220 be repeated for \n-00151aa0: 6120 7365 7276 6963 6520 6f70 6572 6174 a service operat\n-00151ab0: 696f 6e20 746f 2064 6563 6c61 7265 206d ion to declare m\n-00151ac0: 756c 7469 706c 6520 6661 756c 7473 2074 ultiple faults t\n-00151ad0: 6861 7420 7468 6520 7365 7276 6963 6520 hat the service \n-00151ae0: 6f70 6572 6174 696f 6e20 6d61 7920 7265 operation may re\n-00151af0: 7475 726e 2e3c 2f70 3e0a 3c70 3e54 6865 turn.

    .

    The\n-00151b00: 203c 636f 6465 3e6d 6574 686f 642d 6163 method-ac\n-00151b10: 7469 6f6e 3c2f 636f 6465 3e20 7072 6f70 tion prop\n-00151b20: 6572 7479 2073 6572 7665 7320 7477 6f20 erty serves two \n-00151b30: 7075 7270 6f73 6573 3a3c 2f70 3e0a 3c6f purposes:

    ..
  • \n-00151b50: 546f 2073 6574 2074 6865 2053 4f41 5041 To set the SOAPA\n-00151b60: 6374 696f 6e20 6865 6164 6572 2066 6f72 ction header for\n-00151b70: 2053 4f41 5020 7072 6f74 6f63 6f6c 732c SOAP protocols,\n-00151b80: 2069 2e65 2e20 7365 7473 2074 6865 2064 i.e. sets the d\n-00151b90: 6566 696e 6974 696f 6e73 2f62 696e 6469 efinitions/bindi\n-00151ba0: 6e67 2f6f 7065 7261 7469 6f6e 2f53 4f41 ng/operation/SOA\n-00151bb0: 503a 6f70 6572 6174 696f 6e2f 4073 6f61 P:operation/@soa\n-00151bc0: 7041 6374 696f 6e2e 3c2f 6c69 3e0a 3c6c pAction.
  • .To set the URL\n-00151be0: 2071 7565 7279 2073 7472 696e 6720 666f query string fo\n-00151bf0: 7220 656e 6470 6f69 6e74 7320 7769 7468 r endpoints with\n-00151c00: 2052 4553 5420 7072 6f74 6f63 6f6c 732c REST protocols,\n-00151c10: 2069 2e65 2e20 7365 7473 2074 6865 2064 i.e. sets the d\n-00151c20: 6566 696e 6974 696f 6e73 2f62 696e 6469 efinitions/bindi\n-00151c30: 6e67 2f6f 7065 7261 7469 6f6e 2f48 5454 ng/operation/HTT\n-00151c40: 503a 6f70 6572 6174 696f 6e2f 406c 6f63 P:operation/@loc\n-00151c50: 6174 696f 6e2c 2077 6869 6368 2073 7065 ation, which spe\n-00151c60: 6369 6669 6573 2061 2055 524c 2071 7565 cifies a URL que\n-00151c70: 7279 2073 7472 696e 6720 2873 7461 7274 ry string (start\n-00151c80: 7320 7769 7468 2061 203c 636f 6465 3e3f s with a ?\n-00151c90: 3c2f 636f 6465 3e29 2074 6f20 636f 6d70 ) to comp\n-00151ca0: 6c65 7465 2074 6865 2073 6572 7669 6365 lete the service\n-00151cb0: 2065 6e64 706f 696e 7420 5552 4c20 6f72 endpoint URL or\n-00151cc0: 2065 7874 656e 6473 2074 6865 2065 6e64 extends the end\n-00151cd0: 706f 696e 7420 5552 4c20 7769 7468 2061 point URL with a\n-00151ce0: 206c 6f63 616c 2070 6174 6820 2873 7461 local path (sta\n-00151cf0: 7274 7320 7769 7468 2061 203c 636f 6465 rts with a /
    ).\n-00151d10: 0a3c 2f6f 6c3e 0a3c 703e 5573 6520 3c63 ..

    Use method-input\n-00151d30: 2d61 6374 696f 6e3c 2f63 6f64 653e 2061 -action a\n-00151d40: 6e64 203c 636f 6465 3e6d 6574 686f 642d nd method-\n-00151d50: 6f75 7470 7574 2d61 6374 696f 6e3c 2f63 output-action to differen\n-00151d70: 7469 6174 6520 7468 6520 534f 4150 4163 tiate the SOAPAc\n-00151d80: 7469 6f6e 2062 6574 7765 656e 2053 4f41 tion between SOA\n-00151d90: 5020 7265 7175 6573 7420 616e 6420 7265 P request and re\n-00151da0: 7370 6f6e 7365 206d 6573 7361 6765 732e sponse messages.\n-00151db0: 3c2f 703e 0a3c 703e 596f 7520 6361 6e20

    .

    You can \n-00151dc0: 616c 7761 7973 206f 7665 7272 6964 6520 always override \n-00151dd0: 7468 6520 706f 7274 2065 6e64 706f 696e the port endpoin\n-00151de0: 7420 5552 4c20 616e 6420 6163 7469 6f6e t URL and action\n-00151df0: 2076 616c 7565 7320 6174 2072 756e 7469 values at runti\n-00151e00: 6d65 2069 6e20 7468 6520 6175 746f 2d67 me in the auto-g\n-00151e10: 656e 6572 6174 6564 203c 636f 6465 3e73 enerated s\n-00151e20: 6f61 705f 6361 6c6c 5f70 7265 6669 785f oap_call_prefix_\n-00151e30: 5f66 756e 633c 2f63 6f64 653e 2073 6572 _func ser\n-00151e40: 7669 6365 2063 616c 6c20 2843 2f43 2b2b vice call (C/C++\n-00151e50: 2063 6c69 656e 7420 7369 6465 2920 616e client side) an\n-00151e60: 6420 696e 2074 6865 2061 7574 6f2d 6765 d in the auto-ge\n-00151e70: 6e65 7261 7465 6420 432b 2b20 7072 6f78 nerated C++ prox\n-00151e80: 7920 636c 6173 7320 7365 7276 6963 6520 y class service \n-00151e90: 6361 6c6c 732e 2041 2072 756e 7469 6d65 calls. A runtime\n-00151ea0: 204e 554c 4c20 656e 6470 6f69 6e74 2055 NULL endpoint U\n-00151eb0: 524c 2061 6e64 2f6f 7220 6163 7469 6f6e RL and/or action\n-00151ec0: 2075 7365 7320 7468 6520 6465 6661 756c uses the defaul\n-00151ed0: 7473 2073 6574 2062 7920 7468 6573 6520 ts set by these \n-00151ee0: 6469 7265 6374 6976 6573 2e3c 2f70 3e0a directives.

    .\n-00151ef0: 3c70 3e54 6865 203c 636f 6465 3e6d 6574

    The met\n-00151f00: 686f 642d 6d69 6d65 2d74 7970 653c 2f63 hod-mime-type property se\n-00151f20: 7276 6573 2074 776f 2070 7572 706f 7365 rves two purpose\n-00151f30: 733a 3c2f 703e 0a3c 6f6c 2074 7970 653d s:

    .
      .
    1. To set \n-00151f50: 7468 6520 7479 7065 206f 6620 4d49 4d45 the type of MIME\n-00151f60: 2f4d 544f 4d20 6174 7461 6368 6d65 6e74 /MTOM attachment\n-00151f70: 7320 7573 6564 2077 6974 6820 534f 4150 s used with SOAP\n-00151f80: 2070 726f 746f 636f 6c73 2e20 4d75 6c74 protocols. Mult\n-00151f90: 6970 6c65 2061 7474 6163 686d 656e 7420 iple attachment \n-00151fa0: 7479 7065 7320 6361 6e20 6265 2064 6563 types can be dec\n-00151fb0: 6c61 7265 6420 666f 7220 6120 534f 4150 lared for a SOAP\n-00151fc0: 2073 6572 7669 6365 206f 7065 7261 7469 service operati\n-00151fd0: 6f6e 2c20 692e 652e 2061 6464 7320 6465 on, i.e. adds de\n-00151fe0: 6669 6e69 7469 6f6e 732f 6269 6e64 696e finitions/bindin\n-00151ff0: 672f 6f70 6572 6174 696f 6e2f 696e 7075 g/operation/inpu\n-00152000: 742f 4d49 4d45 3a6d 756c 7469 7061 7274 t/MIME:multipart\n-00152010: 5265 6c61 7465 642f 4d49 4d45 3a70 6172 Related/MIME:par\n-00152020: 742f 4d49 4d45 3a63 6f6e 7465 6e74 2f40 t/MIME:content/@\n-00152030: 7479 7065 2066 6f72 2065 6163 6820 7479 type for each ty\n-00152040: 7065 2073 7065 6369 6669 6564 2e3c 2f6c pe specified..
    2. To set th\n-00152060: 6520 4d49 4d45 2074 7970 6520 6f66 2061 e MIME type of a\n-00152070: 2052 4553 5420 6f70 6572 6174 696f 6e2e REST operation.\n-00152080: 2054 6869 7320 7265 706c 6163 6573 2058 This replaces X\n-00152090: 4d4c 2064 6563 6c61 7265 6420 696e 2057 ML declared in W\n-001520a0: 5344 4c20 6279 2064 6566 696e 6974 696f SDL by definitio\n-001520b0: 6e73 2f62 696e 6469 6e67 2f6f 7065 7261 ns/binding/opera\n-001520c0: 7469 6f6e 2f28 696e 7075 747c 6f75 7470 tion/(input|outp\n-001520d0: 7574 292f 4d49 4d45 3a6d 696d 6558 6d6c ut)/MIME:mimeXml\n-001520e0: 2077 6974 6820 4d49 4d45 3a63 6f6e 7465 with MIME:conte\n-001520f0: 6e74 2f40 7479 7065 2e20 5573 6520 3c63 nt/@type. Use application/\n-00152110: 782d 7777 772d 666f 726d 2d75 726c 656e x-www-form-urlen\n-00152120: 636f 6465 643c 2f63 6f64 653e 2077 6974 coded wit\n-00152130: 6820 5245 5354 2050 4f53 5420 616e 6420 h REST POST and \n-00152140: 5055 5420 7072 6f74 6f63 6f6c 7320 746f PUT protocols to\n-00152150: 2073 656e 6420 656e 636f 6465 6420 666f send encoded fo\n-00152160: 726d 2064 6174 6120 6175 746f 6d61 7469 rm data automati\n-00152170: 6361 6c6c 7920 696e 7374 6561 6420 6f66 cally instead of\n-00152180: 2058 4d4c 2e20 4f6e 6c79 2070 7269 6d69 XML. Only primi\n-00152190: 7469 7665 2074 7970 6520 7661 6c75 6573 tive type values\n-001521a0: 2063 616e 2062 6520 7472 616e 736d 6974 can be transmit\n-001521b0: 7465 6420 7769 7468 2066 6f72 6d20 6461 ted with form da\n-001521c0: 7461 2c20 7375 6368 2061 7320 6e75 6d62 ta, such as numb\n-001521d0: 6572 7320 616e 6420 7374 7269 6e67 732c ers and strings,\n-001521e0: 2069 2e65 2e20 6f6e 6c79 2074 7970 6573 i.e. only types\n-001521f0: 2074 6861 7420 6172 6520 6c65 6761 6c20 that are legal \n-00152200: 746f 2075 7365 2061 7320 6174 7472 6962 to use as attrib\n-00152210: 7574 6573 206d 656d 6265 7273 2e3c 2f6c utes members..
    .

    Use \n-00152230: 3c63 6f64 653e 6d65 7468 6f64 2d69 6e70 method-inp\n-00152240: 7574 2d6d 696d 652d 7479 7065 3c2f 636f ut-mime-type and me\n-00152260: 7468 6f64 2d6f 7574 7075 742d 6d69 6d65 thod-output-mime\n-00152270: 2d74 7970 653c 2f63 6f64 653e 2074 6f20 -type to \n-00152280: 6469 6666 6572 656e 7469 6174 6520 7468 differentiate th\n-00152290: 6520 6174 7461 6368 6d65 6e74 2074 7970 e attachment typ\n-001522a0: 6573 2062 6574 7765 656e 2072 6571 7565 es between reque\n-001522b0: 7374 2061 6e64 2072 6573 706f 6e73 6520 st and response \n-001522c0: 6d65 7373 6167 6573 2e3c 2f70 3e0a 3c70 messages.

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

    \n-00152330: 0a53 6368 656d 6120 6469 7265 6374 6976 .Schema directiv\n-00152340: 6573 3c2f 6833 3e0a 3c70 3e41 2073 6368 es

    .

    A sch\n-00152350: 656d 6120 6469 7265 6374 6976 6520 6973 ema directive is\n-00152360: 206f 6620 7468 6520 666f 726d 3a3c 2f70 of the form:.

    \n-001523b0: 2f2f 6773 6f61 7020 266c 743b 7072 6566 //gsoap <pref\n-001523c0: 6978 2667 743b 2073 6368 656d 6120 266c ix> schema &l\n-001523d0: 743b 7072 6f70 6572 7479 2667 743b 3a20 t;property>: \n-001523e0: 266c 743b 7661 6c75 6526 6774 3b3c 2f73 <value>
    .

    where <prefix&g\n-00152ff0: 743b 3c2f 636f 6465 3e20 6973 2074 6865 t; is the\n-00153000: 2058 4d4c 206e 616d 6573 7061 6365 2070 XML namespace p\n-00153010: 7265 6669 7820 6f66 2061 2073 6368 656d refix of a schem\n-00153020: 6120 616e 6420 3c63 6f64 653e 266c 743b a and <\n-00153030: 6e61 6d65 2667 743b 3c2f 636f 6465 3e20 name> \n-00153040: 6973 2061 6e20 756e 7175 616c 6966 6965 is an unqualifie\n-00153050: 6420 6e61 6d65 206f 6620 6120 432f 432b d name of a C/C+\n-00153060: 2b20 7479 7065 2c20 616e 6420 7468 6520 + type, and the \n-00153070: 6f70 7469 6f6e 616c 203c 636f 6465 3e26 optional &\n-00153080: 6c74 3b6d 656d 6265 7226 6774 3b3c 2f63 lt;member> is a class/\n-001530a0: 7374 7275 6374 206d 656d 6265 7273 206f struct members o\n-001530b0: 7220 656e 756d 2063 6f6e 7374 616e 742e r enum constant.\n-001530c0: 3c2f 703e 0a3c 703e 596f 7520 6361 6e20

    .

    You can \n-001530d0: 6465 7363 7269 6265 2061 2074 7970 6520 describe a type \n-001530e0: 7769 7468 206f 6e65 206f 6620 7468 6520 with one of the \n-001530f0: 666f 6c6c 6f77 696e 673a 3c2f 703e 0a3c following:

    .<\n-00153100: 7461 626c 6520 636c 6173 733d 226d 6172 table class=\"mar\n-00153110: 6b64 6f77 6e54 6162 6c65 223e 0a3c 7472 kdownTable\">..
    ....\n-001532c0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..

    For example\n-00153340: 2c20 796f 7520 6361 6e20 6164 6420 6120 , you can add a \n-00153350: 6465 7363 7269 7074 696f 6e20 746f 2061 description to a\n-00153360: 6e20 656e 756d 6572 6174 696f 6e3a 3c2f n enumeration:.

    //gsoap ns sche\n-001533c0: 6d61 2074 7970 653a 2056 6f77 656c 7320 ma type: Vowels \n-001533d0: 5468 6520 6c65 7474 6572 7320 412c 2045 The letters A, E\n-001533e0: 2c20 492c 204f 2c20 552c 2061 6e64 2073 , I, O, U, and s\n-001533f0: 6f6d 6574 696d 6573 2059 3c2f 7370 616e ometimes Y
    .
    \n-00153430: 2f2f 6773 6f61 7020 6e73 2073 6368 656d //gsoap ns schem\n-00153440: 6120 7479 7065 3a20 566f 7765 6c73 3a3a a type: Vowels::\n-00153450: 5920 4120 766f 7765 6c2c 2073 6f6d 6574 Y A vowel, somet\n-00153460: 696d 6573 3c2f 7370 616e 3e3c 2f64 6976 imes.
    enum c\n-001534a0: 6c61 7373 3c2f 7370 616e 3e20 6e73 5f5f lass ns__\n-001534b0: 566f 7765 6c73 203a 2063 6861 7220 7b20 Vowels : char { \n-001534c0: 4120 3d20 3c73 7061 6e20 636c 6173 733d A = &#\n-001534e0: 3339 3b41 2623 3339 3b3c 2f73 7061 6e3e 39;A'\n-001534f0: 2c20 4520 3d20 3c73 7061 6e20 636c 6173 , E = \n-00153510: 2623 3339 3b45 2623 3339 3b3c 2f73 7061 'E', I = 'I', O = 'O'<\n-00153580: 2f73 7061 6e3e 2c20 5520 3d20 3c73 7061 /span>, U = 'U'\n-001535b0: 3b3c 2f73 7061 6e3e 2c20 5920 3d20 3c73 ;, Y = 'Y&#\n-001535e0: 3339 3b3c 2f73 7061 6e3e 207d 3b3c 2f64 39; };.

    Th\n-00153610: 6973 2064 6f63 756d 656e 7465 6420 656e is documented en\n-00153620: 756d 6572 6174 696f 6e20 6d61 7073 2074 umeration maps t\n-00153630: 6f20 6120 7369 6d70 6c65 5479 7065 2072 o a simpleType r\n-00153640: 6573 7472 6963 7469 6f6e 206f 6620 3c65 estriction of xsd:stri\n-00153660: 6e67 3c2f 636f 6465 3e3c 2f65 6d3e 2069 ng i\n-00153670: 6e20 7468 6520 736f 6170 6370 7032 2d67 n the soapcpp2-g\n-00153680: 656e 6572 6174 6564 2073 6368 656d 613a enerated schema:\n-00153690: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    &\n-001536d0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;sim\n-001536f0: 706c 6554 7970 653c 2f73 7061 6e3e 203c pleType <\n-00153700: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00153710: 6f72 6422 3e6e 616d 653c 2f73 7061 6e3e ord\">name\n-00153720: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n-00153740: 6f74 3b56 6f77 656c 7326 7175 6f74 3b3c ot;Vowels"<\n-00153750: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
    \n-00153760: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    <annotation>
    .<\n-001537b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001537c0: 3e20 2020 2026 6c74 3b3c 7370 616e 2063 > <documentation\n-001537f0: 3c2f 7370 616e 3e26 6774 3b3c 7370 616e >The letters\n-00153840: 203c 7370 616e 2063 6c61 7373 3d22 6b65 A,\n-00153860: 203c 7370 616e 2063 6c61 7373 3d22 6b65 E,\n-00153880: 203c 7370 616e 2063 6c61 7373 3d22 6b65 I,\n-001538a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 O,\n-001538c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 U,\n-001538e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 and sometime\n-00153920: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s Y\n-00153940: 3c2f 7370 616e 3e26 6c74 3b2f 3c73 7061 </documentat\n-00153970: 696f 6e3c 2f73 7061 6e3e 2667 743b 3c2f ion>.
    </annotati\n-001539c0: 6f6e 3c2f 7370 616e 3e26 6774 3b3c 2f64 on>.
    <restrictio\n-00153a10: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n b\n-00153a30: 6173 653c 2f73 7061 6e3e 3d3c 7370 616e ase="xsd\n-00153a60: 3a73 7472 696e 6726 7175 6f74 3b3c 2f73 :string">
    .<\n-00153a80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00153a90: 3e20 2020 2026 6c74 3b3c 7370 616e 2063 > <enumeration valu\n-00153ae0: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="A&quo\n-00153b10: 743b 3c2f 7370 616e 3e2f 2667 743b 3c2f t;/>.
    <<\n-00153b40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00153b50: 6f72 6474 7970 6522 3e65 6e75 6d65 7261 ordtype\">enumera\n-00153b60: 7469 6f6e 3c2f 7370 616e 3e20 3c73 7061 tion value=<\n-00153b90: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-00153ba0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-00153bb0: 3b45 2671 756f 743b 3c2f 7370 616e 3e2f ;E"/\n-00153bc0: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
    .
    \n-00153be0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <e\n-00153c00: 6e75 6d65 7261 7469 6f6e 3c2f 7370 616e numeration value="I"/>
    \n-00153c70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    <enumeration\n-00153cb0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c va\n-00153cd0: 6c75 653c 2f73 7061 6e3e 3d3c 7370 616e lue="O&q\n-00153d00: 756f 743b 3c2f 7370 616e 3e2f 2667 743b uot;/>\n-00153d10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n-00153d30: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;enume\n-00153d50: 7261 7469 6f6e 3c2f 7370 616e 3e20 3c73 ration value\n-00153d80: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu\n-00153da0: 6f74 3b55 2671 756f 743b 3c2f 7370 616e ot;U"/>
    . \n-00153dd0: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <enumeration value<\n-00153e20: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="Y"\n-00153e50: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >.
    <annotati\n-00153ea0: 6f6e 3c2f 7370 616e 3e26 6774 3b3c 2f64 on>.
    &l\n-00153ed0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;docu\n-00153ef0: 6d65 6e74 6174 696f 6e3c 2f73 7061 6e3e mentation\n-00153f00: 2667 743b 3c73 7061 6e20 636c 6173 733d >A vowel, som\n-00153f60: 6574 696d 6573 3c2f 7370 616e 3e26 6c74 etimes<\n-00153f70: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/docu\n-00153f90: 6d65 6e74 6174 696f 6e3c 2f73 7061 6e3e mentation\n-00153fa0: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
    .
    \n-00153fc0: 2020 2026 6c74 3b2f 3c73 7061 6e20 636c </annotation>
    .\n-00154010: 2020 2020 266c 743b 3c73 7061 6e20 636c <enumeration/>
    .\n-00154050: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    </restriction>
    .\n-001540a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    </simpleType>
    .

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

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

    .Examp\n-00154170: 6c65 3c2f 6833 3e0a 3c70 3e54 6865 2075 le

    .

    The u\n-00154180: 7365 206f 6620 6469 7265 6374 6976 6573 se of directives\n-00154190: 2069 7320 6265 7374 2069 6c6c 7573 7472 is best illustr\n-001541a0: 6174 6564 2077 6974 6820 616e 2065 7861 ated with an exa\n-001541b0: 6d70 6c65 2e20 5468 6520 6578 616d 706c mple. The exampl\n-001541c0: 6520 7573 6573 2061 2068 7970 6f74 6865 e uses a hypothe\n-001541d0: 7469 6361 6c20 7374 6f63 6b20 7175 6f74 tical stock quot\n-001541e0: 6520 7365 7276 6963 6520 616e 6420 6578 e service and ex\n-001541f0: 6368 616e 6765 2072 6174 6520 7365 7276 change rate serv\n-00154200: 6963 652c 2061 6374 7561 6c20 7365 7276 ice, actual serv\n-00154210: 6963 6573 2073 7563 6820 6173 2074 6865 ices such as the\n-00154220: 7365 2061 7265 2061 7661 696c 6162 6c65 se are available\n-00154230: 2066 6f72 2066 7265 6520 6f6e 2074 6865 for free on the\n-00154240: 2077 6562 2e3c 2f70 3e0a 3c64 6976 2063 web.

    .
    \n-00154260: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n-00154290: 6e73 3120 7365 7276 6963 6520 6e61 6d65 ns1 service name\n-001542a0: 7370 6163 653a 2020 7572 6e3a 4765 7451 space: urn:GetQ\n-001542b0: 756f 7465 203c 2f73 7061 6e3e 3c2f 6469 uote .
    i\n-001542f0: 6e74 3c2f 7370 616e 3e20 6e73 315f 5f67 nt ns1__g\n-00154300: 6574 5175 6f74 6528 3c73 7061 6e20 636c etQuote(char *s\n-00154330: 796d 626f 6c2c 203c 7370 616e 2063 6c61 ymbol, float &a\n-00154360: 6d70 3b72 6573 756c 7429 3b20 3c2f 6469 mp;result); .
    .<\n-001543a0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001543b0: 656e 7422 3e2f 2f67 736f 6170 206e 7332 ent\">//gsoap ns2\n-001543c0: 2073 6572 7669 6365 206e 616d 6573 7061 service namespa\n-001543d0: 6365 3a20 2075 726e 3a43 7572 7265 6e63 ce: urn:Currenc\n-001543e0: 7945 7863 6861 6e67 6520 3c2f 7370 616e yExchange
    .
    int n\n-00154430: 7332 5f5f 6765 7452 6174 6528 3c73 7061 s2__getRate(char *country1, char *country2, float &result\n-001544d0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    .
    //gs\n-00154520: 6f61 7020 6e73 3320 7365 7276 6963 6520 oap ns3 service \n-00154530: 6e61 6d65 3a20 2020 2020 2020 7175 6f74 name: quot\n-00154540: 6578 203c 2f73 7061 6e3e 3c2f 6469 763e ex
    \n-00154550: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n-00154580: 206e 7333 2073 6572 7669 6365 2073 7479 ns3 service sty\n-00154590: 6c65 3a20 2020 2020 2072 7063 203c 2f73 le: rpc
    .
    //gsoap ns3 s\n-001545e0: 6572 7669 6365 2065 6e63 6f64 696e 673a ervice encoding:\n-001545f0: 2020 2065 6e63 6f64 6564 203c 2f73 7061 encoded
    .
    //gsoap ns3 ser\n-00154640: 7669 6365 2070 6f72 743a 2020 2020 2020 vice port: \n-00154650: 2068 7474 703a 2f2f 7777 772e 6d79 646f http://www.mydo\n-00154660: 6d61 696e 2e63 6f6d 2f71 756f 7465 782e main.com/quotex.\n-00154670: 6367 6920 3c2f 7370 616e 3e3c 2f64 6976 cgi .
    //gsoa\n-001546b0: 7020 6e73 3320 7365 7276 6963 6520 6e61 p ns3 service na\n-001546c0: 6d65 7370 6163 653a 2020 7572 6e3a 7175 mespace: urn:qu\n-001546d0: 6f74 6578 203c 2f73 7061 6e3e 3c2f 6469 otex .
    i\n-00154710: 6e74 3c2f 7370 616e 3e20 6e73 335f 5f67 nt ns3__g\n-00154720: 6574 5175 6f74 6528 3c73 7061 6e20 636c etQuote(char *s\n-00154750: 796d 626f 6c2c 203c 7370 616e 2063 6c61 ymbol, char *co\n-00154780: 756e 7472 792c 203c 7370 616e 2063 6c61 untry, float &a\n-001547b0: 6d70 3b72 6573 756c 7429 3b3c 2f64 6976 mp;result);.

    The \n-001547e0: 3c65 6d3e 3c63 6f64 653e 7175 6f74 6578 quotex\n-001547f0: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2065 .h e\n-00154800: 7861 6d70 6c65 2069 7320 6120 6e65 7720 xample is a new \n-00154810: 5765 6220 5365 7276 6963 6520 6372 6561 Web Service crea\n-00154820: 7465 6420 6279 2063 6f6d 6269 6e69 6e67 ted by combining\n-00154830: 2074 776f 2065 7869 7374 696e 6720 5765 two existing We\n-00154840: 6220 5365 7276 6963 6573 3a20 6120 5374 b Services: a St\n-00154850: 6f63 6b20 5175 6f74 6520 7365 7276 6963 ock Quote servic\n-00154860: 6520 616e 6420 6120 4375 7272 656e 6379 e and a Currency\n-00154870: 2045 7863 6861 6e67 6520 7365 7276 6963 Exchange servic\n-00154880: 652e 3c2f 703e 0a3c 703e 5468 6520 6e61 e.

    .

    The na\n-00154890: 6d65 7370 6163 6520 7072 6566 6978 203c mespace prefix <\n-001548a0: 636f 6465 3e6e 7333 3c2f 636f 6465 3e20 code>ns3 \n-001548b0: 6973 2075 7365 6420 666f 7220 7468 6520 is used for the \n-001548c0: 6e65 7720 3c63 6f64 653e 7175 6f74 6578 new quotex\n-001548d0: 3c2f 636f 6465 3e20 5765 6220 5365 7276 Web Serv\n-001548e0: 6963 6520 7769 7468 206e 616d 6573 7061 ice with namespa\n-001548f0: 6365 2055 5249 203c 656d 3e3c 636f 6465 ce URI urn:quotex, service\n-00154920: 206e 616d 6520 3c63 6f64 653e 7175 6f74 name quot\n-00154930: 6578 3c2f 636f 6465 3e2c 2061 6e64 2065 ex, and e\n-00154940: 6e64 706f 696e 7420 706f 7274 203c 656d ndpoint port http://www.m\n-00154990: 7964 6f6d 6169 6e2e 636f 6d2f 7175 6f74 ydomain.com/quot\n-001549a0: 6578 2e63 6769 3c2f 613e 3c2f 636f 6465 ex.cgi.

    .

    S\n-001549c0: 696e 6365 2074 6865 206e 6577 2057 6562 ince the new Web\n-001549d0: 2053 6572 7669 6365 2069 6e76 6f6b 6573 Service invokes\n-001549e0: 2074 6865 203c 636f 6465 3e6e 7331 5f5f the ns1__\n-001549f0: 6765 7451 756f 7465 3c2f 636f 6465 3e20 getQuote \n-00154a00: 616e 6420 3c63 6f64 653e 6e73 325f 5f67 and ns2__g\n-00154a10: 6574 5261 7465 3c2f 636f 6465 3e20 7365 etRate se\n-00154a20: 7276 6963 6520 6f70 6572 6174 696f 6e73 rvice operations\n-00154a30: 2c20 7468 6520 7365 7276 6963 6520 6e61 , the service na\n-00154a40: 6d65 7370 6163 6573 2061 6e64 206f 7468 mespaces and oth\n-00154a50: 6572 2064 6574 6169 6c73 2073 7563 6820 er details such \n-00154a60: 6173 2073 7479 6c65 2061 6e64 2065 6e63 as style and enc\n-00154a70: 6f64 696e 6720 6f66 2074 6865 7365 206d oding of these m\n-00154a80: 6574 686f 6473 2061 7265 2067 6976 656e ethods are given\n-00154a90: 2062 7920 6469 7265 6374 6976 6573 2e20 by directives. \n-00154aa0: 4166 7465 7220 696e 766f 6b69 6e67 2074 After invoking t\n-00154ab0: 6865 2073 6f61 7063 7070 3220 746f 6f6c he soapcpp2 tool\n-00154ac0: 206f 6e20 7468 6520 3c65 6d3e 3c63 6f64 on the quotex.h header fi\n-00154af0: 6c65 3a20 3c2f 703e 3c70 7265 2063 6c61 le:

     s\n-00154b10: 6f61 7063 7070 3220 7175 6f74 6578 2e68  oapcpp2 quotex.h\n-00154b20: 0a3c 2f70 7265 3e3c 703e 2074 6865 2057  .

    the W\n-00154b30: 5344 4c20 6f66 2074 6865 206e 6577 203c SDL of the new <\n-00154b40: 636f 6465 3e71 756f 7465 783c 2f63 6f64 code>quotex Web Service i\n-00154b60: 7320 7361 7665 6420 6173 203c 656d 3e3c s saved as <\n-00154b70: 636f 6465 3e71 756f 7465 782e 7773 646c code>quotex.wsdl\n-00154b80: 3c2f 636f 6465 3e3c 2f65 6d3e 2e20 5369 . Si\n-00154b90: 6e63 6520 7468 6520 7365 7276 6963 6520 nce the service \n-00154ba0: 6e61 6d65 2c20 656e 6470 6f69 6e74 2070 name, endpoint p\n-00154bb0: 6f72 742c 2061 6e64 206e 616d 6573 7061 ort, and namespa\n-00154bc0: 6365 2055 5249 2077 6572 6520 7072 6f76 ce URI were prov\n-00154bd0: 6964 6564 2069 6e20 7468 6520 6865 6164 ided in the head\n-00154be0: 6572 2066 696c 652c 2074 6865 2067 656e er file, the gen\n-00154bf0: 6572 6174 6564 2057 5344 4c20 6669 6c65 erated WSDL file\n-00154c00: 2063 616e 2062 6520 7075 626c 6973 6865 can be publishe\n-00154c10: 6420 746f 6765 7468 6572 2077 6974 6820 d together with \n-00154c20: 7468 6520 636f 6d70 696c 6564 2057 6562 the compiled Web\n-00154c30: 2053 6572 7669 6365 2069 6e73 7461 6c6c Service install\n-00154c40: 6564 2061 7320 6120 4347 4920 6170 706c ed as a CGI appl\n-00154c50: 6963 6174 696f 6e2e 3c2f 703e 0a3c 703e ication.

    .

    \n-00154c60: 5468 6520 6e61 6d65 7370 6163 6520 6d61 The namespace ma\n-00154c70: 7070 696e 6720 7461 626c 6520 666f 7220 pping table for \n-00154c80: 7468 6520 3c65 6d3e 3c63 6f64 653e 7175 the qu\n-00154c90: 6f74 6578 2e63 7070 3c2f 636f 6465 3e3c otex.cpp<\n-00154ca0: 2f65 6d3e 2057 6562 2053 6572 7669 6365 /em> Web Service\n-00154cb0: 2069 6d70 6c65 6d65 6e74 6174 696f 6e20 implementation \n-00154cc0: 6973 2073 6176 6564 2061 7320 3c65 6d3e is saved as \n-00154cd0: 3c63 6f64 653e 7175 6f74 6578 2e6e 736d quotex.nsm\n-00154ce0: 6170 3c2f 636f 6465 3e3c 2f65 6d3e 2e20 ap. \n-00154cf0: 5468 6973 2066 696c 6520 6361 6e20 6265 This file can be\n-00154d00: 2064 6972 6563 746c 7920 696e 636c 7564 directly includ\n-00154d10: 6564 2069 6e20 3c65 6d3e 3c63 6f64 653e ed in \n-00154d20: 7175 6f74 6578 2e63 7070 3c2f 636f 6465 quotex.cpp instead o\n-00154d40: 6620 7370 6563 6966 6965 6420 6279 2068 f specified by h\n-00154d50: 616e 6420 696e 2074 6865 2073 6f75 7263 and in the sourc\n-00154d60: 6520 6f66 203c 656d 3e3c 636f 6465 3e71 e of q\n-00154d70: 756f 7465 782e 6370 703c 2f63 6f64 653e uotex.cpp\n-00154d80: 3c2f 656d 3e2e 3c2f 703e 0a3c 703e f09f .

    .

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

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

    .Trans\n-00154df0: 6965 6e74 2064 6174 6120 7479 7065 733c ient data types<\n-00154e00: 2f68 323e 0a3c 703e 5468 6572 6520 6172 /h2>.

    There ar\n-00154e10: 6520 7369 7475 6174 696f 6e73 2077 6865 e situations whe\n-00154e20: 6e20 6365 7274 6169 6e20 7479 7065 7320 n certain types \n-00154e30: 6861 7665 2074 6f20 6265 2075 7365 6420 have to be used \n-00154e40: 696e 2061 6e20 696e 7465 7266 6163 6520 in an interface \n-00154e50: 6865 6164 6572 2066 696c 652c 2062 7574 header file, but\n-00154e60: 2074 6865 2074 7970 6573 2061 7265 206e the types are n\n-00154e70: 6f74 2073 6572 6961 6c69 7a61 626c 6520 ot serializable \n-00154e80: 616e 6420 7468 6572 6566 6f72 6520 6861 and therefore ha\n-00154e90: 7665 2074 6f20 6265 2022 696e 7669 7369 ve to be \"invisi\n-00154ea0: 626c 6522 2074 6f20 7468 6520 736f 6170 ble\" to the soap\n-00154eb0: 6370 7032 2074 6f6f 6c2e 2054 6865 7365 cpp2 tool. These\n-00154ec0: 2074 7970 6573 2061 7265 2063 616c 6c65 types are calle\n-00154ed0: 6420 7472 616e 7369 656e 742e 3c2f 703e d transient.

    \n-00154ee0: 0a3c 703e 5468 6973 2066 6561 7475 7265 .

    This feature\n-00154ef0: 2069 7320 7573 6566 756c 2077 6865 6e20 is useful when \n-00154f00: 6120 6c69 6272 6172 7920 7479 7065 2069 a library type i\n-00154f10: 7320 7573 6564 2069 6e20 7468 6520 696e s used in the in\n-00154f20: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f\n-00154f30: 696c 6520 6173 2070 6172 7420 6f66 2061 ile as part of a\n-00154f40: 2073 7472 7563 7420 6f72 2063 6c61 7373 struct or class\n-00154f50: 2c20 666f 7220 6578 616d 706c 6520 7468 , for example th\n-00154f60: 6520 3c63 6f64 653e 4649 4c45 3c2f 636f e FILE type or std::ostream that are c\n-00154fa0: 6c65 6172 6c79 206e 6f74 2073 6572 6961 learly not seria\n-00154fb0: 6c69 7a61 626c 652e 2049 6620 7468 6573 lizable. If thes\n-00154fc0: 6520 7479 7065 7320 6172 6520 696e 7472 e types are intr\n-00154fd0: 6f64 7563 6564 2069 6e20 616e 2069 6e74 oduced in an int\n-00154fe0: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi\n-00154ff0: 6c65 2074 6865 6e20 7468 6573 6520 7479 le then these ty\n-00155000: 7065 7320 6d75 7374 2062 6520 6465 636c pes must be decl\n-00155010: 6172 6564 2074 7261 6e73 6965 6e74 2e20 ared transient. \n-00155020: 4f74 6865 7277 6973 652c 2073 6f61 7063 Otherwise, soapc\n-00155030: 7070 3220 7769 6c6c 2074 6872 6f77 2061 pp2 will throw a\n-00155040: 6e20 6572 726f 722e 3c2f 703e 0a3c 703e n error.

    .

    \n-00155050: 546f 2064 6563 6c61 7265 2061 2074 7261 To declare a tra\n-00155060: 6e73 6965 6e74 2074 7970 6520 7573 6520 nsient type use \n-00155070: 3c63 6f64 653e 6578 7465 726e 3c2f 636f extern. For example\n-00155090: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    extern class FILE;
    \n-00155110: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    Even \n-00155130: 7468 6f75 6768 203c 636f 6465 3e46 494c though FIL\n-00155140: 453c 2f63 6f64 653e 2069 7320 6e6f 7420 E is not \n-00155150: 6120 636c 6173 732c 2074 6869 7320 6465 a class, this de\n-00155160: 636c 6172 6174 696f 6e20 6d65 7265 6c79 claration merely\n-00155170: 2069 6e74 726f 6475 6365 7320 7468 6520 introduces the \n-00155180: 3c63 6f64 653e 4649 4c45 3c2f 636f 6465 FILE type name with\n-001551a0: 6f75 7420 7370 6563 6966 7969 6e67 2069 out specifying i\n-001551b0: 7473 2064 6574 6169 6c73 2e3c 2f70 3e0a ts details.

    .\n-001551c0: 3c70 3e49 6e20 4320 7765 2063 616e 2073

    In C we can s\n-001551d0: 7469 6c6c 2075 7365 2074 6865 2063 6c61 till use the cla\n-001551e0: 7373 206b 6579 776f 7264 2c20 6265 6361 ss keyword, beca\n-001551f0: 7573 6520 6e6f 2063 6f64 6520 6973 2067 use no code is g\n-00155200: 656e 6572 6174 6564 2062 7920 736f 6170 enerated by soap\n-00155210: 6370 7032 2066 6f72 2074 6869 7320 7472 cpp2 for this tr\n-00155220: 616e 7369 656e 7420 7479 7065 2e3c 2f70 ansient type..

    We can then\n-00155240: 2075 7365 2074 6869 7320 7479 7065 2065 use this type e\n-00155250: 6c73 6577 6865 7265 2c20 666f 7220 6578 lsewhere, for ex\n-00155260: 616d 706c 653a 3c2f 703e 0a3c 6469 7620 ample:

    .
    struct \n-001552b0: 3c2f 7370 616e 3e6e 735f 5f72 6563 6f72 ns__recor\n-001552c0: 643c 2f64 6976 3e0a 3c64 6976 2063 6c61 d
    .
    {.
    FILE *fd\n-00155300: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    const\n-00155340: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-00155360: 2f73 7061 6e3e 202a 6e61 6d65 3b3c 2f64 /span> *name;.
    };
    .<\n-00155390: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    Only th\n-001553b0: 6520 3c63 6f64 653e 6e61 6d65 3c2f 636f e name member is se\n-001553d0: 7269 616c 697a 6564 206f 6620 3c63 6f64 rialized of ns__record.

    .

    Anot\n-00155400: 6865 7220 6578 616d 706c 653a 3c2f 703e her example:

    \n-00155410: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    e\n-00155450: 7874 6572 6e3c 2f73 7061 6e3e 203c 7370 xtern class \n-00155480: 7374 643a 3a6f 7374 7265 616d 3b20 3c73 std::ostream; // std::ostr\n-001554b0: 6561 6d20 6361 6e26 2333 393b 7420 6265 eam can't be\n-001554c0: 2073 6572 6961 6c69 7a65 642c 2062 7574 serialized, but\n-001554d0: 206e 6565 6420 746f 2062 6520 6465 636c need to be decl\n-001554e0: 6172 6564 3c2f 7370 616e 3e3c 2f64 6976 ared.
    class \n-00155520: 3c2f 7370 616e 3e6e 735f 5f6d 7943 6c61 ns__myCla\n-00155530: 7373 203c 2f64 6976 3e0a 3c64 6976 2063 ss
    .
    { public:
    .
    <\n-00155590: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001555a0: 6f72 6422 3e76 6972 7475 616c 3c2f 7370 ord\">virtual vo\n-001555d0: 6964 3c2f 7370 616e 3e20 7072 696e 7428 id print(\n-001555e0: 7374 643a 3a6f 7374 7265 616d 2026 616d std::ostream &am\n-001555f0: 703b 7329 203c 7370 616e 2063 6c61 7373 p;s) const\n-00155610: 3c2f 7370 616e 3e3b 203c 7370 616e 2063 ; /\n-00155630: 2f20 6e65 6564 206f 7374 7265 616d 2068 / need ostream h\n-00155640: 6572 6520 3c2f 7370 616e 3e3c 2f64 6976 ere .
    ... //.
    };
    .

    In other \n-001556d0: 6361 7365 7320 7765 2064 6f20 7761 6e74 cases we do want\n-001556e0: 2074 6f20 6465 636c 6172 6520 6120 7479 to declare a ty\n-001556f0: 7065 2074 6861 7420 736f 6170 6370 7032 pe that soapcpp2\n-00155700: 2073 686f 756c 6420 636f 7079 2069 6e74 should copy int\n-00155710: 6f20 3c65 6d3e 3c63 6f64 653e 736f 6170 o soap\n-00155720: 5374 7562 2e68 3c2f 636f 6465 3e3c 2f65 Stub.h for the appli\n-00155740: 6361 7469 6f6e 2073 6f75 7263 6520 636f cation source co\n-00155750: 6465 2c20 6275 7420 7768 6963 6820 7368 de, but which sh\n-00155760: 6f75 6c64 206e 6f74 2062 6520 7365 7269 ould not be seri\n-00155770: 616c 697a 6162 6c65 2e20 5765 2063 616e alizable. We can\n-00155780: 2075 7365 203c 636f 6465 3e65 7874 6572 use exter\n-00155790: 6e3c 2f63 6f64 653e 2066 6f72 2074 6869 n for thi\n-001557a0: 7320 6f72 2070 7574 2074 6865 2064 6563 s or put the dec\n-001557b0: 6c61 7261 7469 6f6e 2069 6e20 3c63 6f64 laration in [ and <\n-001557d0: 636f 6465 3e5d 3c2f 636f 6465 3e20 6272 code>] br\n-001557e0: 6163 6b65 7473 3a3c 2f70 3e0a 3c64 6976 ackets:

    .
    [
    . \n-00155830: 203c 7370 616e 2063 6c61 7373 3d22 6b65 class ns__myBase <\n-00155860: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00155870: 656e 7422 3e2f 2f20 6261 7365 2063 6c61 ent\">// base cla\n-00155880: 7373 206e 6565 6420 6e6f 7420 6265 2073 ss need not be s\n-00155890: 6572 6961 6c69 7a61 626c 653c 2f73 7061 erializable
    .
    {.
    ... <\n-001558e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001558f0: 656e 7422 3e2f 2f20 6d65 6d62 6572 733c ent\">// members<\n-00155900: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-00155920: 207d 3b20 3c2f 6469 763e 0a3c 6469 7620 };
    .
    ] <\n-00155940: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    cl\n-00155970: 6173 7320 3c2f 7370 616e 3e6e 735f 5f6d ass ns__m\n-00155980: 7944 6572 6976 6564 203a 206e 735f 5f6d yDerived : ns__m\n-00155990: 7942 6173 6520 3c2f 6469 763e 0a3c 6469 yBase
    .{\n-001559b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... <\n-001559d0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001559e0: 656e 7422 3e2f 2f20 6d65 6d62 6572 733c ent\">// members<\n-001559f0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .}\n-00155a10: 3b20 3c2f 6469 763e 0a3c 2f64 6976 3e3c ;
    .
    <\n-00155a20: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-00155a30: 3c70 3e57 6520 6361 6e20 7573 6520 3c63

    We can use [ and\n-00155a50: 203c 636f 6465 3e5d 3c2f 636f 6465 3e20 ] \n-00155a60: 6272 6163 6b65 7473 2066 6f72 2070 6172 brackets for par\n-00155a70: 7473 206f 6620 7468 6520 636f 6465 2c20 ts of the code, \n-00155a80: 666f 7220 6578 616d 706c 6520 746f 206d for example to m\n-00155a90: 616b 6520 7365 7665 7261 6c20 636c 6173 ake several clas\n-00155aa0: 7320 6d65 6d62 6572 7320 7472 616e 7369 s members transi\n-00155ab0: 656e 743a 3c2f 703e 0a3c 6469 7620 636c ent:

    .
    <\n-00155ad0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00155ae0: 3e5b 203c 7370 616e 2063 6c61 7373 3d22 >[ typedef\n-00155b00: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c int tra\n-00155b30: 6e73 6965 6e74 496e 743b 205d 203c 2f64 nsientInt; ] .
    clas\n-00155b70: 7320 3c2f 7370 616e 3e6e 735f 5f6d 7943 s ns__myC\n-00155b80: 6c61 7373 203c 2f64 6976 3e0a 3c64 6976 lass
    .{<\n-00155ba0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int a\n-00155be0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // will \n-00155c00: 6265 2073 6572 6961 6c69 7a65 6420 3c2f be serialized
    . \n-00155c30: 5b20 3c2f 6469 763e 0a3c 6469 7620 636c [
    .
    int b; // tr\n-00155c90: 616e 7369 656e 7420 6d65 6d62 6572 203c ansient member <\n-00155ca0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-00155cc0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-00155ce0: 2f73 7061 6e3e 2073 5b32 3536 5d3b 203c /span> s[256]; <\n-00155cf0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00155d00: 656e 7422 3e2f 2f20 7472 616e 7369 656e ent\">// transien\n-00155d10: 7420 6d65 6d62 6572 203c 2f73 7061 6e3e t member \n-00155d20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ] .
    e\n-00155d70: 7874 6572 6e3c 2f73 7061 6e3e 203c 7370 xtern float d; // \n-00155dc0: 7472 616e 7369 656e 7420 7479 7065 2066 transient type f\n-00155dd0: 6c6f 6174 2061 6e64 206d 656d 6265 723c loat and member<\n-00155de0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-00155e00: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-00155e20: 2f73 7061 6e3e 202a 743b 203c 7370 616e /span> *t; // will be seri\n-00155e50: 616c 697a 6564 203c 2f73 7061 6e3e 3c2f alized .
    transie\n-00155e80: 6e74 496e 7420 2a6e 3b20 3c73 7061 6e20 ntInt *n; \n-00155ea0: 2f2f 2074 7261 6e73 6965 6e74 2074 7970 // transient typ\n-00155eb0: 6520 696e 7420 616e 6420 6d65 6d62 6572 e int and member\n-00155ec0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-00155ed0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00155ee0: 3e20 205b 203c 2f64 6976 3e0a 3c64 6976 > [
    . \n-00155f00: 3c73 7061 6e20 636c 6173 733d 226b 6579 virtual v\n-00155f40: 6f69 643c 2f73 7061 6e3e 206d 6574 686f oid metho\n-00155f50: 6428 3c73 7061 6e20 636c 6173 733d 226b d(char\n-00155f70: 3c2f 7370 616e 3e20 6275 665b 3130 3234 buf[1024\n-00155f80: 5d29 3b20 3c73 7061 6e20 636c 6173 733d ]); // doe\n-00155fa0: 7320 6e6f 7420 6372 6561 7465 2061 2063 s not create a c\n-00155fb0: 6861 725b 3130 3234 5d20 7365 7269 616c har[1024] serial\n-00155fc0: 697a 6572 203c 2f73 7061 6e3e 3c2f 6469 izer .
    ]
    \n-00155ff0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .

    In this ex\n-00156030: 616d 706c 652c 203c 636f 6465 3e6e 735f ample, ns_\n-00156040: 5f6d 7943 6c61 7373 3c2f 636f 6465 3e20 _myClass \n-00156050: 6861 7320 7468 7265 6520 7472 616e 7369 has three transi\n-00156060: 656e 7420 6d65 6d62 6572 733a 203c 636f ent members: b, s, and\n-00156090: 203c 636f 6465 3e6e 3c2f 636f 6465 3e20 n \n-001560a0: 7768 6963 6820 7769 6c6c 206e 6f74 2062 which will not b\n-001560b0: 6520 7365 7269 616c 697a 6564 2e20 4d65 e serialized. Me\n-001560c0: 6d62 6572 203c 636f 6465 3e6e 3c2f 636f mber n is transient\n-001560e0: 2062 6563 6175 7365 2074 6865 2074 7970 because the typ\n-001560f0: 6520 6973 2064 6563 6c61 7265 6420 7769 e is declared wi\n-00156100: 7468 696e 2061 2074 7261 6e73 6965 6e74 thin a transient\n-00156110: 2062 6c6f 636b 2e20 506f 696e 7465 7273 block. Pointers\n-00156120: 2c20 7265 6665 7265 6e63 6573 2c20 616e , references, an\n-00156130: 6420 6172 7261 7973 206f 6620 7472 616e d arrays of tran\n-00156140: 7369 656e 7420 7479 7065 7320 6172 6520 sient types are \n-00156150: 7472 616e 7369 656e 742e 2054 6865 2073 transient. The s\n-00156160: 696e 676c 6520 636c 6173 7320 6d65 7468 ingle class meth\n-00156170: 6f64 2069 7320 656e 6361 7073 756c 6174 od is encapsulat\n-00156180: 6564 2077 6974 6869 6e20 3c63 6f64 653e ed within \n-00156190: 5b3c 2f63 6f64 653e 2061 6e64 203c 636f [ and ] to p\n-001561b0: 7265 7665 6e74 2073 6f61 7063 7070 3220 revent soapcpp2 \n-001561c0: 6672 6f6d 2063 7265 6174 696e 6720 7365 from creating se\n-001561d0: 7269 616c 697a 6572 7320 666f 7220 7468 rializers for th\n-001561e0: 6520 3c63 6f64 653e 6368 6172 5b31 3032 e char[102\n-001561f0: 345d 3c2f 636f 6465 3e20 7479 7065 2e3c 4] type.<\n-00156200: 2f70 3e0a 3c70 3e57 6520 616c 736f 2075 /p>.

    We also u\n-00156210: 7365 203c 636f 6465 3e5b 3c2f 636f 6465 se [ and ] brackets to\n-00156240: 2069 6e74 726f 6475 6365 2061 2074 7261 introduce a tra\n-00156250: 6e73 6965 6e74 2069 6e74 6567 6572 2074 nsient integer t\n-00156260: 7970 6520 3c63 6f64 653e 7472 616e 7369 ype transi\n-00156270: 656e 7449 6e74 3c2f 636f 6465 3e20 7573 entInt us\n-00156280: 696e 6720 6120 7479 7065 6465 662e 2057 ing a typedef. W\n-00156290: 6520 6361 6e6e 6f74 2075 7365 203c 636f e cannot use extern\n-001562b0: 2077 6974 6820 3c63 6f64 653e 7479 7065 with type\n-001562c0: 6465 663c 2f63 6f64 653e 2062 6563 6175 def becau\n-001562d0: 7365 2074 6869 7320 636f 6e73 7472 7563 se this construc\n-001562e0: 7420 6973 2072 6573 6572 7665 6420 666f t is reserved fo\n-001562f0: 7220 6375 7374 6f6d 2073 6572 6961 6c69 r custom seriali\n-00156300: 7a65 7273 2e3c 2f70 3e0a 3c70 3ef0 9f94 zers.

    .

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

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

    .Seriali\n-00156370: 7a61 7469 6f6e 2022 6173 2069 7322 206f zation \"as is\" o\n-00156380: 6620 766f 6c61 7469 6c65 2064 6174 6120 f volatile data \n-00156390: 7479 7065 733c 2f68 323e 0a3c 703e 5479 types

    .

    Ty\n-001563a0: 7065 7320 6465 636c 6172 6564 203c 636f pes declared volatile in an interfa\n-001563d0: 6365 2068 6561 6465 7220 6669 6c65 2061 ce header file a\n-001563e0: 7265 2073 6572 6961 6c69 7a61 626c 6520 re serializable \n-001563f0: 6275 7420 6e6f 7420 636f 7069 6564 2062 but not copied b\n-00156400: 7920 736f 6170 6370 7032 2074 6f20 3c65 y soapcpp2 to soapStub\n-00156420: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2e20 .h. \n-00156430: 5468 6573 6520 7479 7065 7320 6172 6520 These types are \n-00156440: 7479 7069 6361 6c6c 7920 6c69 6272 6172 typically librar\n-00156450: 7920 7479 7065 7320 7468 6174 2061 7265 y types that are\n-00156460: 2069 6e63 6c75 6465 6420 696e 2074 6865 included in the\n-00156470: 2073 6f75 7263 6520 636f 6465 2061 6e64 source code and\n-00156480: 2073 686f 756c 6420 6e6f 7420 6265 2072 should not be r\n-00156490: 6564 6566 696e 6564 2069 6e20 7468 6520 edefined in the \n-001564a0: 6170 706c 6963 6174 696f 6e20 736f 7572 application sour\n-001564b0: 6365 2063 6f64 652e 2057 6520 7761 6e74 ce code. We want\n-001564c0: 2074 6f20 7365 7269 616c 697a 6520 7468 to serialize th\n-001564d0: 6573 6520 6c69 6272 6172 7920 7479 7065 ese library type\n-001564e0: 7320 2261 7320 6973 2220 7769 7468 6f75 s \"as is\" withou\n-001564f0: 7420 7265 6465 6669 6e69 6e67 2074 6865 t redefining the\n-00156500: 6d2e 3c2f 703e 0a3c 703e 436f 6e73 6964 m.

    .

    Consid\n-00156510: 6572 2066 6f72 2065 7861 6d70 6c65 203c er for example <\n-00156520: 636f 6465 3e73 7472 7563 7420 746d 3c2f code>struct tm, declared \n-00156540: 696e 203c 656d 3e3c 636f 6465 3e74 696d in tim\n-00156550: 652e 683c 2f63 6f64 653e 3c2f 656d 3e2e e.h.\n-00156560: 2054 6865 2073 7472 7563 7475 7265 206d The structure m\n-00156570: 6179 2061 6374 7561 6c6c 7920 7661 7279 ay actually vary\n-00156580: 2062 6574 7765 656e 2070 6c61 7466 6f72 between platfor\n-00156590: 6d73 2c20 6275 7420 7468 6520 3c63 6f64 ms, but the tm stru\n-001565b0: 6374 7572 6520 696e 636c 7564 6573 2061 cture includes a\n-001565c0: 7420 6c65 6173 7420 7468 6520 666f 6c6c t least the foll\n-001565d0: 6f77 696e 6720 6d65 6d62 6572 7320 6173 owing members as\n-001565e0: 2064 6563 6c61 7265 6420 696e 2074 6865 declared in the\n-001565f0: 2066 6f6c 6c6f 7769 6e67 2069 6e74 6572 following inter\n-00156600: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file\n-00156610: 2066 6f72 2073 6f61 7063 7070 323a 3c2f for soapcpp2:.

    #include &\n-00156670: 6c74 3b74 696d 652e 6826 6774 3b3c 2f73 lt;time.h>
    .
    volatile struct \n-001566e0: 3c2f 7370 616e 3e74 6d20 3c2f 6469 763e tm
    \n-001566f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    \n-00156720: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int tm_sec; \n-00156750: 2020 2020 2020 3c73 7061 6e20 636c 6173 /* s\n-00156770: 6563 6f6e 6473 2028 3020 2d20 3630 2920 econds (0 - 60) \n-00156780: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    \n-00156790: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int tm_m\n-001567d0: 696e 3b20 2020 2020 2020 2020 3c73 7061 in; /* minutes (0 \n-00156800: 2d20 3539 2920 2a2f 3c2f 7370 616e 3e20 - 59) */ \n-00156810: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int tm_hour; \n-00156860: 2020 3c73 7061 6e20 636c 6173 733d 2263 /* hours\n-00156880: 2028 3020 2d20 3233 2920 2a2f 3c2f 7370 (0 - 23) */
    .
    \n-001568b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int tm_mday; \n-001568e0: 2020 2020 2020 3c73 7061 6e20 636c 6173 /* d\n-00156900: 6179 206f 6620 6d6f 6e74 6820 2831 202d ay of month (1 -\n-00156910: 2033 3129 202a 2f3c 2f73 7061 6e3e 203c 31) */ <\n-00156920: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int\n-00156960: 2074 6d5f 6d6f 6e3b 2020 2020 2020 2020 tm_mon; \n-00156970: 203c 7370 616e 2063 6c61 7373 3d22 636f /* month \n-00156990: 6f66 2079 6561 7220 2830 202d 2031 3129 of year (0 - 11)\n-001569a0: 202a 2f3c 2f73 7061 6e3e 203c 2f64 6976 */ .
    int tm_\n-001569f0: 7965 6172 3b20 2020 2020 2020 203c 7370 year; /* year - 190\n-00156a20: 3020 2a2f 3c2f 7370 616e 3e20 3c2f 6469 0 */ .
    int tm\n-00156a70: 5f77 6461 793b 2020 2020 2020 2020 3c73 _wday; /* day of we\n-00156aa0: 656b 2028 5375 6e64 6179 203d 2030 2920 ek (Sunday = 0) \n-00156ab0: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    \n-00156ac0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int tm_y\n-00156b00: 6461 793b 2020 2020 2020 2020 3c73 7061 day; /* day of year\n-00156b30: 2028 3020 2d20 3336 3529 202a 2f3c 2f73 (0 - 365) */
    . \n-00156b60: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n-00156b80: 2f73 7061 6e3e 2074 6d5f 6973 6473 743b /span> tm_isdst;\n-00156b90: 2020 2020 2020 203c 7370 616e 2063 6c61 /* \n-00156bb0: 6973 2073 756d 6d65 7220 7469 6d65 2069 is summer time i\n-00156bc0: 6e20 6566 6665 6374 3f20 2a2f 3c2f 7370 n effect? */
    .
    \n-00156bf0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-00156c10: 2f73 7061 6e3e 202a 746d 5f7a 6f6e 653b /span> *tm_zone;\n-00156c20: 2020 2020 2020 2020 3c73 7061 6e20 636c /*\n-00156c40: 2061 6262 7265 7669 6174 696f 6e20 6f66 abbreviation of\n-00156c50: 2074 696d 657a 6f6e 6520 6e61 6d65 202a timezone name *\n-00156c60: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    .\n-00156c70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00156ca0: 6c6f 6e67 3c2f 7370 616e 3e20 746d 5f67 long tm_g\n-00156cb0: 6d74 6f66 663b 2020 2020 2020 3c73 7061 mtoff; /* offset from\n-00156ce0: 2055 5443 2069 6e20 7365 636f 6e64 7320 UTC in seconds \n-00156cf0: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    \n-00156d00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .

    By declari\n-00156d40: 6e67 2073 7472 7563 7420 3c63 6f64 653e ng struct \n-00156d50: 746d 3c2f 636f 6465 3e20 766f 6c61 7469 tm volati\n-00156d60: 6c65 2c20 736f 6170 6370 7032 2064 6f65 le, soapcpp2 doe\n-00156d70: 7320 6e6f 7420 7265 6465 6669 6e65 2069 s not redefine i\n-00156d80: 7420 696e 2074 6865 206f 7574 7075 7420 t in the output \n-00156d90: 736f 7572 6365 2063 6f64 652e 2054 6865 source code. The\n-00156da0: 203c 636f 6465 3e23 696e 636c 7564 6520 #include \n-00156db0: 266c 743b 7469 6d65 2e68 2667 743b 3c2f <time.h> is copied \n-00156dd0: 746f 2074 6865 2073 6f75 7263 6520 636f to the source co\n-00156de0: 6465 206f 7574 7075 742e 2057 6520 6361 de output. We ca\n-00156df0: 6e20 6e6f 7720 7365 7269 616c 697a 6520 n now serialize \n-00156e00: 7468 6520 3c63 6f64 653e 746d 3c2f 636f the tm structure. T\n-00156e20: 6865 2066 6f6c 6c6f 7769 6e67 2065 7861 he following exa\n-00156e30: 6d70 6c65 2073 6572 6961 6c69 7a65 7320 mple serializes \n-00156e40: 7468 6520 6c6f 6361 6c20 7469 6d65 2073 the local time s\n-00156e50: 746f 7265 6420 696e 2061 203c 636f 6465 tored in a tm struc\n-00156e70: 7475 7265 2074 6f20 7374 646f 7574 3a3c ture to stdout:<\n-00156e80: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    struct \n-00156ed0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-00156f00: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-00156f30: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_new\n-00156f90: 3c2f 613e 2829 3b20 3c2f 6469 763e 0a3c ();
    .<\n-00156fa0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00156fb0: 3e74 696d 655f 7420 5420 3d20 7469 6d65 >time_t T = time\n-00156fc0: 284e 554c 4c29 3b20 3c2f 6469 763e 0a3c (NULL);
    .<\n-00156fd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00156fe0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct tm *t = loc\n-00157010: 616c 7469 6d65 2826 616d 703b 5429 3b20 altime(&T); \n-00157020: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap_wr\n-00157040: 6974 655f 746d 283c 6120 636c 6173 733d ite_tm(so\n-00157070: 6170 3c2f 613e 2c20 7429 3b20 3c2f 6469 ap, t); .
    soap_d\n-001570f0: 6573 7472 6f79 3c2f 613e 283c 6120 636c estroy(soap); .\n-001571e0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..

    It is al\n-001572b0: 736f 2070 6f73 7369 626c 6520 746f 2073 so possible to s\n-001572c0: 6572 6961 6c69 7a65 2074 6865 203c 636f erialize the tm mem\n-001572e0: 6265 7273 2061 7320 584d 4c20 6174 7472 bers as XML attr\n-001572f0: 6962 7574 6573 2062 7920 6465 636c 6172 ibutes by declar\n-00157300: 696e 6720 7468 6520 6d65 6d62 6572 7320 ing the members \n-00157310: 6173 2061 7474 7269 6275 7465 7320 7769 as attributes wi\n-00157320: 7468 2074 6865 203c 636f 6465 3e40 3c2f th the @ qualifier,\n-00157340: 2073 6565 2053 6563 7469 6f6e 203c 6120 see Section How to d\n-00157380: 6563 6c61 7265 2058 4d4c 2061 7474 7269 eclare XML attri\n-00157390: 6275 7465 733c 2f61 3e20 2e3c 2f70 3e0a butes .

    .\n-001573a0: 3c70 3e49 6620 796f 7520 7761 6e74 2074

    If you want t\n-001573b0: 6f20 7072 6f64 7563 6520 6120 7363 6865 o produce a sche\n-001573c0: 6d61 2066 696c 652c 2073 6179 203c 656d ma file, say time.xsd<\n-001573e0: 2f63 6f64 653e 3c2f 656d 3e2c 2074 6861 /code>, tha\n-001573f0: 7420 6465 6669 6e65 7320 616e 2058 4d4c t defines an XML\n-00157400: 2073 6368 656d 6120 616e 6420 6e61 6d65 schema and name\n-00157410: 7370 6163 6520 666f 7220 7468 6520 3c63 space for the tm st\n-00157430: 7275 6374 2c20 796f 7520 6361 6e20 6164 ruct, you can ad\n-00157440: 6420 6120 3c63 6f64 653e 7479 7065 6465 d a typede\n-00157450: 663c 2f63 6f64 653e 2064 6563 6c61 7261 f declara\n-00157460: 7469 6f6e 2074 6f20 7468 6520 6865 6164 tion to the head\n-00157470: 6572 2066 696c 653a 3c2f 703e 0a3c 6469 er file:

    .
    \n-001574c0: 2369 6e63 6c75 6465 2026 6c74 3b74 696d #include <tim\n-001574d0: 652e 6826 6774 3b3c 2f73 7061 6e3e 3c2f e.h>.
    vol\n-00157510: 6174 696c 653c 2f73 7061 6e3e 203c 7370 atile struct tm
    .
    {.
    ... // see above\n-001575a0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001575c0: 7d3b 3c2f 6469 763e 0a3c 6469 7620 636c };
    .
    typedef \n-00157600: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct tm time__str\n-00157630: 7563 745f 746d 3b3c 2f64 6976 3e0a 3c2f uct_tm;
    .

    or simpl\n-00157660: 7920 7573 6520 636f 6c6f 6e20 6e6f 7461 y use colon nota\n-00157670: 7469 6f6e 2073 696e 6365 2077 6520 6b65 tion since we ke\n-00157680: 6570 2074 6865 203c 636f 6465 3e74 6d3c ep the tm<\n-00157690: 2f63 6f64 653e 206e 616d 653a 3c2f 703e /code> name:

    \n-001576a0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    #include <\n-001576f0: 3b74 696d 652e 6826 6774 3b3c 2f73 7061 ;time.h>
    .
    volatile\n-00157740: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct time:tm .
    {
    .\n-001577a0: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n-001577c0: 743c 2f73 7061 6e3e 2074 6d5f 7365 633b t tm_sec;\n-001577d0: 2020 2020 2020 2020 203c 7370 616e 2063 /\n-001577f0: 2a20 7365 636f 6e64 7320 2830 202d 2036 * seconds (0 - 6\n-00157800: 3029 202a 2f3c 2f73 7061 6e3e 203c 2f64 0) */ .
    int t\n-00157850: 6d5f 6d69 6e3b 2020 2020 2020 2020 203c m_min; <\n-00157860: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00157870: 656e 7422 3e2f 2a20 6d69 6e75 7465 7320 ent\">/* minutes \n-00157880: 2830 202d 2035 3929 202a 2f3c 2f73 7061 (0 - 59) */
    .
    \n-001578b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int tm_hour; \n-001578e0: 2020 2020 203c 7370 616e 2063 6c61 7373 /* ho\n-00157900: 7572 7320 2830 202d 2032 3329 202a 2f3c urs (0 - 23) */<\n-00157910: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n-00157930: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n-00157950: 743c 2f73 7061 6e3e 2074 6d5f 6d64 6179 t tm_mday\n-00157960: 3b20 2020 2020 2020 203c 7370 616e 2063 ; /\n-00157980: 2a20 6461 7920 6f66 206d 6f6e 7468 2028 * day of month (\n-00157990: 3120 2d20 3331 2920 2a2f 3c2f 7370 616e 1 - 31) */
    .
    <\n-001579c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001579d0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int tm_mon; \n-001579f0: 2020 2020 3c73 7061 6e20 636c 6173 733d /* mon\n-00157a10: 7468 206f 6620 7965 6172 2028 3020 2d20 th of year (0 - \n-00157a20: 3131 2920 2a2f 3c2f 7370 616e 3e20 3c2f 11) */ .
    int \n-00157a70: 746d 5f79 6561 723b 2020 2020 2020 2020 tm_year; \n-00157a80: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* year - \n-00157aa0: 3139 3030 202a 2f3c 2f73 7061 6e3e 203c 1900 */ <\n-00157ab0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int\n-00157af0: 2074 6d5f 7764 6179 3b20 2020 2020 2020 tm_wday; \n-00157b00: 203c 7370 616e 2063 6c61 7373 3d22 636f /* day of\n-00157b20: 2077 6565 6b20 2853 756e 6461 7920 3d20 week (Sunday = \n-00157b30: 3029 202a 2f3c 2f73 7061 6e3e 203c 2f64 0) */ .
    int t\n-00157b80: 6d5f 7964 6179 3b20 2020 2020 2020 203c m_yday; <\n-00157b90: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00157ba0: 656e 7422 3e2f 2a20 6461 7920 6f66 2079 ent\">/* day of y\n-00157bb0: 6561 7220 2830 202d 2033 3635 2920 2a2f ear (0 - 365) */\n-00157bc0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n-00157bd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00157be0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n-00157c00: 6e74 3c2f 7370 616e 3e20 746d 5f69 7364 nt tm_isd\n-00157c10: 7374 3b20 2020 2020 2020 3c73 7061 6e20 st; \n-00157c30: 2f2a 2069 7320 7375 6d6d 6572 2074 696d /* is summer tim\n-00157c40: 6520 696e 2065 6666 6563 743f 202a 2f3c e in effect? */<\n-00157c50: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n-00157c70: 2020 2020 3c73 7061 6e20 636c 6173 733d ch\n-00157c90: 6172 3c2f 7370 616e 3e20 2a74 6d5f 7a6f ar *tm_zo\n-00157ca0: 6e65 3b20 2020 2020 203c 7370 616e 2063 ne; /\n-00157cc0: 2a20 6162 6272 6576 6961 7469 6f6e 206f * abbreviation o\n-00157cd0: 6620 7469 6d65 7a6f 6e65 206e 616d 6520 f timezone name \n-00157ce0: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    \n-00157cf0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    long tm_\n-00157d30: 676d 746f 6666 3b20 2020 2020 3c73 7061 gmtoff; /* offset from\n-00157d60: 2055 5443 2069 6e20 7365 636f 6e64 7320 UTC in seconds \n-00157d70: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    \n-00157d80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .

    We used th\n-00157dc0: 6520 7479 7065 6465 6620 6e61 6d65 203c e typedef name <\n-00157dd0: 636f 6465 3e74 696d 655f 5f73 7472 7563 code>time__struc\n-00157de0: 745f 746d 3c2f 636f 6465 3e20 7261 7468 t_tm rath\n-00157df0: 6572 2074 6861 6e20 3c63 6f64 653e 7469 er than ti\n-00157e00: 6d65 5f5f 746d 3c2f 636f 6465 3e2c 2062 me__tm, b\n-00157e10: 6563 6175 7365 2061 2073 6368 656d 6120 ecause a schema \n-00157e20: 6e61 6d65 2063 6c61 7368 2077 696c 6c20 name clash will \n-00157e30: 6f63 6375 7220 666f 7220 7468 6520 6669 occur for the fi\n-00157e40: 7273 7420 6578 616d 706c 6520 6162 6f76 rst example abov\n-00157e50: 6520 7468 6174 2068 6173 203c 636f 6465 e that has tm alrea\n-00157e70: 6479 2064 6563 6c61 7265 6420 6173 2073 dy declared as s\n-00157e80: 6572 6961 6c69 7a61 626c 6520 7479 7065 erializable type\n-00157e90: 2069 6e20 7468 6520 7363 6865 6d61 206f in the schema o\n-00157ea0: 6620 7468 6520 6765 6e65 7261 7465 6420 f the generated \n-00157eb0: 5753 444c 2e20 5468 6520 7365 636f 6e64 WSDL. The second\n-00157ec0: 2065 7861 6d70 6c65 2077 6974 6820 7468 example with th\n-00157ed0: 6520 636f 6c6f 6e20 6e6f 7461 7469 6f6e e colon notation\n-00157ee0: 2061 766f 6964 7320 7468 6973 2061 6c74 avoids this alt\n-00157ef0: 6f67 6574 6865 722e 3c2f 703e 0a3c 703e ogether.

    .

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

    .How to\n-00157f60: 2064 6563 6c61 7265 2063 7573 746f 6d20 declare custom \n-00157f70: 7365 7269 616c 697a 6572 7320 616e 6420 serializers and \n-00157f80: 6465 7365 7269 616c 697a 6572 733c 2f68 deserializers.

    You can im\n-00157fa0: 706c 656d 656e 7420 796f 7572 206f 776e plement your own\n-00157fb0: 2063 7573 746f 6d20 7365 7269 616c 697a custom serializ\n-00157fc0: 6572 7320 666f 7220 6461 7461 2074 7970 ers for data typ\n-00157fd0: 6573 2e20 4120 6375 7374 6f6d 2073 6572 es. A custom ser\n-00157fe0: 6961 6c69 7a65 7220 6973 2064 6563 6c61 ializer is decla\n-00157ff0: 7265 6420 696e 2061 6e20 696e 7465 7266 red in an interf\n-00158000: 6163 6520 6865 6164 6572 2066 696c 6520 ace header file \n-00158010: 666f 7220 736f 6170 6370 7032 2075 7369 for soapcpp2 usi\n-00158020: 6e67 2074 6865 2070 6169 7220 6f66 206b ng the pair of k\n-00158030: 6579 776f 7264 7320 3c63 6f64 653e 6578 eywords ex\n-00158040: 7465 726e 2074 7970 6564 6566 3c2f 636f tern typedef. For example\n-00158060: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    extern typedef<\n-001580d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *My\n-00158100: 4461 7461 3b20 3c2f 6469 763e 0a3c 6469 Data;
    .<\n-00158120: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00158130: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct Sample

    \n-00158150: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    \n-00158180: 204d 7944 6174 6120 733b 203c 7370 616e MyData s; // use custom s\n-001581b0: 6572 6961 6c69 7a65 7220 666f 7220 7468 erializer for th\n-001581c0: 6973 206d 656d 6265 7220 3c2f 7370 616e is member
    .
    char *t; /\n-00158230: 2f20 7573 6520 6175 746f 2d67 656e 6572 / use auto-gener\n-00158240: 6174 6564 2073 6572 6961 6c69 7a65 723c ated serializer<\n-00158250: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .}\n-00158270: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    <\n-00158290: 703e 5468 656e 2070 726f 7669 6465 2074 p>Then provide t\n-001582a0: 6865 2066 6f6c 6c6f 7769 6e67 2066 756e he following fun\n-001582b0: 6374 696f 6e73 2066 6f72 2065 6163 6820 ctions for each \n-001582c0: 3c63 6f64 653e 6578 7465 726e 2074 7970 extern typ\n-001582d0: 6564 6566 3c2f 636f 6465 3e20 6465 636c edef decl\n-001582e0: 6172 6573 2074 7970 6520 3c63 6f64 653e ares type \n-001582f0: 543c 2f63 6f64 653e 3a3c 2f70 3e0a 3c64 T:

    .
    \n-00158340: 696e 743c 2f73 7061 6e3e 2073 6f61 705f int soap_\n-00158350: 7365 7269 616c 697a 655f 5428 3c73 7061 serialize_T(struct \n-00158380: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-001583b0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-001583e0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const T *a);.
    vo\n-00158440: 6964 3c2f 7370 616e 3e20 736f 6170 5f64 id soap_d\n-00158450: 6566 6175 6c74 5f54 283c 7370 616e 2063 efault_T(s\n-00158470: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, T\n-001584e0: 202a 6129 3b3c 2f64 6976 3e0a 3c64 6976 *a);
    .int soap_out_T(struct soap *soap, const<\n-001585d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *ta\n-00158600: 672c 203c 7370 616e 2063 6c61 7373 3d22 g, int\n-00158620: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c id, const \n-00158670: 5420 2a61 2c20 3c73 7061 6e20 636c 6173 T *a, cons\n-00158690: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n-001586c0: 7479 7065 293b 3c2f 6469 763e 0a3c 6469 type);
    .T\n-001586e0: 202a 736f 6170 5f69 6e5f 5428 3c73 7061 *soap_in_T(struct \n-00158710: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-00158740: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-00158770: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const c\n-001587b0: 6861 723c 2f73 7061 6e3e 202a 7461 672c har *tag,\n-001587c0: 2054 202a 612c 203c 7370 616e 2063 6c61 T *a, con\n-001587e0: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n-00158810: 2a74 7970 6529 3b3c 2f64 6976 3e0a 3c2f *type);
    .

    The func\n-00158840: 7469 6f6e 2070 726f 746f 7479 7065 7320 tion prototypes \n-00158850: 6f66 2074 6865 7365 2066 756e 6374 696f of these functio\n-00158860: 6e73 2063 616e 2062 6520 666f 756e 6420 ns can be found \n-00158870: 696e 2074 6865 2073 6f61 7063 7070 322d in the soapcpp2-\n-00158880: 6765 6e65 7261 7465 6420 3c65 6d3e 3c63 generated soapH.h file..

    For example\n-001588c0: 2c20 7468 6520 7365 7269 616c 697a 6174 , the serializat\n-001588d0: 696f 6e20 6f66 203c 636f 6465 3e4d 7944 ion of MyD\n-001588e0: 6174 613c 2f63 6f64 653e 2063 616e 2062 ata can b\n-001588f0: 6520 646f 6e65 2077 6974 6820 7468 6520 e done with the \n-00158900: 666f 6c6c 6f77 696e 6720 636f 6465 3a3c following code:<\n-00158910: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    int\n-00158960: 2073 6f61 705f 7365 7269 616c 697a 655f soap_serialize_\n-00158970: 4d79 4461 7461 283c 7370 616e 2063 6c61 MyData(str\n-00158990: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, MyD\n-00158a00: 6174 6120 3c73 7061 6e20 636c 6173 733d ata const<\n-00158a20: 2f73 7061 6e3e 2a61 2920 3c2f 6469 763e /span>*a)
    \n-00158a30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n-00158a60: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00158a70: 656e 7422 3e2f 2f20 6e6f 206e 6565 6420 ent\">// no need \n-00158a80: 746f 206d 6172 6b20 7468 6973 206e 6f64 to mark this nod\n-00158a90: 6520 2866 6f72 206d 756c 7469 2d72 6566 e (for multi-ref\n-00158aa0: 2061 6e64 2063 7963 6c65 2064 6574 6563 and cycle detec\n-00158ab0: 7469 6f6e 2920 3c2f 7370 616e 3e3c 2f64 tion) .
    return \n-00158b00: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_OK;\n-00158b60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    \n-00158b80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    voi\n-00158bb0: 643c 2f73 7061 6e3e 2073 6f61 705f 6465 d soap_de\n-00158bc0: 6661 756c 745f 4d79 4461 7461 283c 7370 fault_MyData(struct\n-00158bf0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-00158c20: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, MyData *a) .
    {
    .<\n-00158c80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00158c90: 3e20 202a 6120 3d20 4e55 4c4c 3b3c 2f64 > *a = NULL;.
    }
    .<\n-00158cc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00158cd0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int soap_out_M\n-00158d00: 7944 6174 6128 3c73 7061 6e20 636c 6173 yData(stru\n-00158d20: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct
    soap *soap, const <\n-00158db0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00158dc0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *tag, int \n-00158e00: 3c73 7061 6e20 636c 6173 733d 226b 6579 id, MyData const*a\n-00158e50: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const c\n-00158e90: 6861 723c 2f73 7061 6e3e 202a 7479 7065 har *type\n-00158ea0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    if (soap\n-00158f00: 5f65 6c65 6d65 6e74 5f62 6567 696e 5f6f _element_begin_o\n-00158f10: 7574 283c 6120 636c 6173 733d 2263 6f64 ut(soap, tag, id, ty\n-00158f70: 7065 2920 3c73 7061 6e20 636c 6173 733d pe) // pri\n-00158f90: 6e74 2058 4d4c 2062 6567 696e 6e69 6e67 nt XML beginning\n-00158fa0: 2074 6167 203c 2f73 7061 6e3e 3c2f 6469 tag .
    || soap_\n-00159020: 7365 6e64 3c2f 613e 283c 6120 636c 6173 send(\n-00159050: 736f 6170 3c2f 613e 2c20 2a61 2920 3c73 soap, *a) // just prin\n-00159080: 7420 7468 6520 7374 7269 6e67 2028 6e6f t the string (no\n-00159090: 2058 4d4c 2063 6f6e 7665 7273 696f 6e29 XML conversion)\n-001590a0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-001590b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001590c0: 3e20 2020 7c7c 2073 6f61 705f 656c 656d > || soap_elem\n-001590d0: 656e 745f 656e 645f 6f75 7428 3c61 2063 ent_end_out(soap, tag\n-00159110: 2929 203c 7370 616e 2063 6c61 7373 3d22 )) // prin\n-00159130: 7420 584d 4c20 656e 6469 6e67 2074 6167 t XML ending tag\n-00159140: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-00159150: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00159160: 3e20 2020 203c 7370 616e 2063 6c61 7373 > r\n-00159180: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn soap->\n-001591c0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;error<\n-00159210: 2f61 3e3b 203c 2f64 6976 3e0a 3c64 6976 /a>;
    . \n-00159230: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-00159250: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP\n-001592b0: 5f4f 4b3c 2f61 3e3b 203c 2f64 6976 3e0a _OK;
    .\n-001592c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    MyD\n-001592f0: 6174 6120 2a2a 736f 6170 5f69 6e5f 4d79 ata **soap_in_My\n-00159300: 4461 7461 283c 7370 616e 2063 6c61 7373 Data(struc\n-00159320: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n-00159350: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, const char *tag, MyData\n-001593e0: 202a 612c 203c 7370 616e 2063 6c61 7373 *a, const\n-00159400: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *t\n-00159430: 7970 6529 203c 2f64 6976 3e0a 3c64 6976 ype)
    .{<\n-00159450: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (s\n-00159490: 6f61 705f 656c 656d 656e 745f 6265 6769 oap_element_begi\n-001594a0: 6e5f 696e 283c 6120 636c 6173 733d 2263 n_in(soap\n-001594d0: 3c2f 613e 2c20 7461 6729 2920 3c2f 6469 , tag)) .
    return\n-00159520: 204e 554c 4c3b 203c 2f64 6976 3e0a 3c64 NULL;
    .\n-00159540: 2020 3c73 7061 6e20 636c 6173 733d 226b if (!a) .
    a = (MyD\n-00159590: 6174 612a 293c 6120 636c 6173 733d 2263 ata*)soap_m\n-001595f0: 616c 6c6f 633c 2f61 3e28 3c61 2063 6c61 alloc(soap, sizeof(M\n-00159650: 7944 6174 6129 293b 203c 2f64 6976 3e0a yData));
    .\n-00159660: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if\n-00159690: 3c2f 7370 616e 3e20 283c 6120 636c 6173 (\n-001596c0: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->null) \n-00159720: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    *a \n-00159740: 3d20 4e55 4c4c 3b20 3c73 7061 6e20 636c = NULL; //\n-00159760: 2078 7369 3a6e 696c 2065 6c65 6d65 6e74 xsi:nil element\n-00159770: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-00159780: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00159790: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n-001597b0: 2f73 7061 6e3e 2028 2a3c 6120 636c 6173 /span> (*\n-001597e0: 736f 6170 3c2f 613e 2d26 6774 3b74 7970 soap->typ\n-001597f0: 6520 2661 6d70 3b26 616d 703b 203c 6120 e && s\n-00159850: 6f61 705f 6d61 7463 685f 7461 673c 2f61 oap_match_tag(soap, soap->type, typ\n-001598d0: 6529 2920 3c2f 6469 763e 0a3c 6469 7620 e))
    .
    {\n-001598f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    .\n-00159a00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00159a30: 7265 7475 726e 3c2f 7370 616e 3e20 4e55 return NU\n-00159a40: 4c4c 3b20 3c73 7061 6e20 636c 6173 733d LL; // typ\n-00159a60: 6520 6d69 736d 6174 6368 203c 2f73 7061 e mismatch
    .
    } <\n-00159a90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (*\n-00159ad0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n-00159b00: 2667 743b 6872 6566 2920 3c2f 6469 763e >href)
    \n-00159b10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    a = (MyDa\n-00159b30: 7461 2a2a 2973 6f61 705f 6964 5f66 6f72 ta**)soap_id_for\n-00159b40: 7761 7264 283c 6120 636c 6173 733d 2263 ward(soap\n-00159b70: 3c2f 613e 2c20 3c61 2063 6c61 7373 3d22 , soa\n-00159ba0: 703c 2f61 3e2d 2667 743b 6872 6566 2c20 p->href, \n-00159bb0: 612c 2030 2c20 534f 4150 5f54 5950 455f a, 0, SOAP_TYPE_\n-00159bc0: 4d79 4461 7461 2c20 302c 203c 7370 616e MyData, 0, sizeof(M\n-00159bf0: 7944 6174 6129 2c20 302c 204e 554c 4c2c yData), 0, NULL,\n-00159c00: 204e 554c 4c29 203c 2f64 6976 3e0a 3c64 NULL)
    .\n-00159c20: 2020 3c73 7061 6e20 636c 6173 733d 226b else\n-00159c40: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c if (soap->\n-00159ca0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;body)
    .
    {\n-00159d10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    .
    *a\n-00159de0: 203d 2028 3c73 7061 6e20 636c 6173 733d = (ch\n-00159e00: 6172 3c2f 7370 616e 3e2a 293c 6120 636c ar*)\n-00159e60: 736f 6170 5f6d 616c 6c6f 633c 2f61 3e28 soap_malloc(\n-00159e70: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-00159ea0: 2073 7472 6c65 6e28 7329 2b31 293b 203c strlen(s)+1); <\n-00159eb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    strc\n-00159ed0: 7079 282a 612c 2073 293b 203c 2f64 6976 py(*a, s); .
    }
    .<\n-00159f00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00159f10: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n-00159f30: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (s\n-00159f60: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->body &a\n-00159fc0: 6d70 3b26 616d 703b 2073 6f61 705f 656c mp;& soap_el\n-00159fd0: 656d 656e 745f 656e 645f 696e 283c 6120 ement_end_in(soap, ta\n-0015a010: 6729 2920 3c2f 6469 763e 0a3c 6469 7620 g))
    .
    \n-0015a030: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-0015a050: 6e3c 2f73 7061 6e3e 204e 554c 4c3b 203c n NULL; <\n-0015a060: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return a;
    .}<\n-0015a0c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    SOAP_TYPE
    #def\n-0015a1a0: 696e 6520 534f 4150 5f54 5950 453c 2f64 ine SOAP_TYPE
    A soap_sta\n-0015a1d0: 7475 7320 6572 726f 7220 636f 6465 3a20 tus error code: \n-0015a1e0: 584d 4c20 656c 656d 656e 7420 6f72 2061 XML element or a\n-0015a1f0: 7474 7269 6275 7465 2068 6173 2061 206d ttribute has a m\n-0015a200: 6973 6d61 7463 6869 6e67 2074 7970 6520 ismatching type \n-0015a210: 6f72 2076 616c 7565 2074 6861 7420 6973 or value that is\n-0015a220: 2063 6175 7369 6e67 2061 202e 2e2e 3c2f causing a ...
    Defini\n-0015a250: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n-0015a260: 7032 2e68 3a32 3630 373c 2f64 6976 3e3c p2.h:2607
    <\n-0015a270: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-0015a330: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    int soap_sen\n-0015a350: 6428 7374 7275 6374 2073 6f61 7020 2a73 d(struct soap *s\n-0015a360: 6f61 702c 2063 6f6e 7374 2063 6861 7220 oap, const char \n-0015a370: 2a73 293c 2f64 6976 3e3c 6469 7620 636c *s)
    Send\n-0015a390: 2061 2073 7472 696e 672e 3c2f 6469 763e a string.
    \n-0015a3a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    in\n-0015a480: 7420 736f 6170 5f6d 6174 6368 5f74 6167 t soap_match_tag\n-0015a490: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n-0015a4a0: 6170 2c20 636f 6e73 7420 6368 6172 202a ap, const char *\n-0015a4b0: 7461 6731 2c20 636f 6e73 7420 6368 6172 tag1, const char\n-0015a4c0: 202a 7461 6732 293c 2f64 6976 3e3c 6469 *tag2)
    \n-0015a4e0: 4d61 7463 6820 616e 2058 4d4c 2074 6167 Match an XML tag\n-0015a4f0: 206e 616d 652e 3c2f 6469 763e 3c2f 6469 name.
    .
    \n-0015a560: 3c61 2068 7265 663d 2273 7472 7563 7473 soap\n-0015a5a0: 3a3a 626f 6479 3c2f 613e 3c2f 6469 763e ::body
    \n-0015a5b0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    short body
    The soap:\n-0015a5f0: 3a62 6f64 7920 666c 6167 2069 7320 7365 :body flag is se\n-0015a600: 7420 7768 656e 2061 6e20 656c 656d 656e t when an elemen\n-0015a610: 7420 6861 7320 656c 656d 656e 7420 636f t has element co\n-0015a620: 6e74 656e 7420 6475 7269 6e67 2058 4d4c ntent during XML\n-0015a630: 2070 6172 7369 6e67 206f 7220 7768 656e parsing or when\n-0015a640: 2061 2048 5454 5020 6d65 7373 2e2e 2e3c a HTTP mess...<\n-0015a650: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n-0015a670: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n-0015a680: 6170 322e 683a 3239 3635 3c2f 6469 763e ap2.h:2965
    \n-0015a690: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-0015a6e0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    \n-0015a730: 736f 6170 3a3a 6e75 6c6c 3c2f 613e 3c2f soap::null
    short nu\n-0015a760: 6c6c 3c2f 6469 763e 3c64 6976 2063 6c61 ll
    The s\n-0015a780: 6f61 703a 3a6e 756c 6c20 666c 6167 2069 oap::null flag i\n-0015a790: 7320 7365 7420 7768 656e 2061 6e20 656c s set when an el\n-0015a7a0: 656d 656e 7420 6361 7272 6965 7320 6120 ement carries a \n-0015a7b0: 7873 693a 6e69 6c20 6174 7472 6962 7574 xsi:nil attribut\n-0015a7c0: 6520 7468 6174 2069 7320 7472 7565 2e3c e that is true.<\n-0015a7d0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n-0015a7f0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n-0015a800: 6170 322e 683a 3239 3633 3c2f 6469 763e ap2.h:2963
    \n-0015a810: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    More informatio\n-0015a840: 6e20 6f6e 2063 7573 746f 6d20 7365 7269 n on custom seri\n-0015a850: 616c 697a 6174 696f 6e20 6973 2061 7661 alization is ava\n-0015a860: 696c 6162 6c65 2069 6e20 7468 6520 6753 ilable in the gS\n-0015a870: 4f41 5020 736f 7572 6365 2063 6f64 6520 OAP source code \n-0015a880: 7061 636b 6167 6520 696e 2074 6865 203c package in the <\n-0015a890: 656d 3e3c 636f 6465 3e67 736f 6170 2f63 em>gsoap/c\n-0015a8a0: 7573 746f 6d3c 2f63 6f64 653e 3c2f 656d ustom directory, whe\n-0015a8c0: 7265 2079 6f75 2063 616e 2061 6c73 6f20 re you can also \n-0015a8d0: 6669 6e64 2073 6576 6572 616c 2063 7573 find several cus\n-0015a8e0: 746f 6d20 7365 7269 616c 697a 6572 7320 tom serializers \n-0015a8f0: 746f 2075 7365 2077 6974 6820 796f 7572 to use with your\n-0015a900: 2070 726f 6a65 6374 732e 3c2f 703e 0a3c projects.

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

    .

    .Fu\n-0015a970: 6e63 7469 6f6e 2063 616c 6c62 6163 6b73 nction callbacks\n-0015a980: 2066 6f72 2063 7573 746f 6d69 7a65 6420 for customized \n-0015a990: 492f 4f20 616e 6420 4854 5450 2068 616e I/O and HTTP han\n-0015a9a0: 646c 696e 673c 2f68 323e 0a3c 703e 5468 dling

    .

    Th\n-0015a9b0: 6520 666f 6c6c 6f77 696e 6720 6c69 7374 e following list\n-0015a9c0: 206f 6620 6675 6e63 7469 6f6e 7320 6361 of functions ca\n-0015a9d0: 6e20 6265 2075 7365 6420 666f 7220 6375 n be used for cu\n-0015a9e0: 7374 6f6d 697a 6564 2048 5454 5020 6861 stomized HTTP ha\n-0015a9f0: 6e64 6c69 6e67 2061 6e64 2049 2f4f 2e3c ndling and I/O.<\n-0015aa00: 2f70 3e0a 3c70 3e53 6565 2061 6c73 6f20 /p>.

    See also \n-0015aa10: 4150 4920 646f 6375 6d65 6e74 6174 696f API documentatio\n-0015aa20: 6e20 4d6f 6475 6c65 203c 6120 636c 6173 n Module Callb\n-0015aa60: 6163 6b20 6675 6e63 7469 6f6e 733c 2f61 ack functions.

    .

    To res\n-0015aa80: 6574 2074 6865 2063 616c 6c62 6163 6b20 et the callback \n-0015aa90: 6675 6e63 7469 6f6e 7320 746f 2074 6865 functions to the\n-0015aaa0: 2069 6e74 6572 6e61 6c20 6675 6e63 7469 internal functi\n-0015aab0: 6f6e 7320 6f66 2074 6865 2065 6e67 696e ons of the engin\n-0015aac0: 652c 2075 7365 203c 636f 6465 3e3c 6120 e, use soap_done followed b\n-0015abb0: 7920 3c63 6f64 653e 3c61 2063 6c61 7373 y so\n-0015ac40: 6170 5f69 6e69 743c 2f61 3e3c 2f63 6f64 ap_init. This re-init\n-0015ac60: 6961 6c69 7a65 7320 7468 6520 3c63 6f64 ializes the so\n-0015acc0: 6170 3c2f 613e 3c2f 636f 6465 3e20 636f ap co\n-0015acd0: 6e74 6578 742c 2072 656d 6f76 6573 2061 ntext, removes a\n-0015ace0: 6c6c 2070 6c75 6769 6e73 2c20 616e 6420 ll plugins, and \n-0015acf0: 7265 7365 7473 2066 756e 6374 696f 6e20 resets function \n-0015ad00: 6361 6c6c 6261 636b 732e 3c2f 703e 0a3c callbacks.

    .<\n-0015ad10: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.fpos\n-0015ad40: 743c 2f68 333e 0a3c 703e 3c63 6f64 653e t.

    \n-0015ad50: 696e 7420 283c 6120 636c 6173 733d 2265 int (soap::fpo\n-0015ae20: 7374 3c2f 613e 2928 7374 7275 6374 2073 st)(struct s\n-0015ae30: 6f61 7020 2a73 6f61 702c 2063 6f6e 7374 oap *soap, const\n-0015ae40: 2063 6861 7220 2a65 6e64 706f 696e 742c char *endpoint,\n-0015ae50: 2063 6f6e 7374 2063 6861 7220 2a68 6f73 const char *hos\n-0015ae60: 742c 2069 6e74 2070 6f72 742c 2063 6f6e t, int port, con\n-0015ae70: 7374 2063 6861 7220 2a70 6174 682c 2063 st char *path, c\n-0015ae80: 6f6e 7374 2063 6861 7220 2a61 6374 696f onst char *actio\n-0015ae90: 6e2c 2055 4c4f 4e47 3634 2063 6f75 6e74 n, ULONG64 count\n-0015aea0: 293c 2f63 6f64 653e 3c2f 703e 0a3c 703e )

    .

    \n-0015aeb0: 5468 6973 2063 616c 6c62 6163 6b20 6973 This callback is\n-0015aec0: 2063 616c 6c65 6420 6174 2074 6865 2073 called at the s\n-0015aed0: 6572 7665 7220 7369 6465 2062 7920 7468 erver side by th\n-0015aee0: 6520 656e 6769 6e65 2074 6f20 7365 6e64 e engine to send\n-0015aef0: 2074 6865 2048 5454 5020 6865 6164 6572 the HTTP header\n-0015af00: 7320 746f 2074 6865 2063 6f6e 6e65 6374 s to the connect\n-0015af10: 6564 2063 6c69 656e 742e 2054 6865 2070 ed client. The p\n-0015af20: 6172 616d 6574 6572 203c 636f 6465 3e73 arameter s\n-0015af30: 7461 7475 733c 2f63 6f64 653e 2073 686f tatus sho\n-0015af40: 756c 6420 6265 2061 6e20 4854 5450 2073 uld be an HTTP s\n-0015af50: 7461 7475 7320 6572 726f 7220 636f 6465 tatus error code\n-0015af60: 206f 7220 3c63 6f64 653e 2353 4f41 505f or #SOAP_\n-0015af70: 4f4b 3c2f 636f 6465 3e20 2832 3030 204f OK (200 O\n-0015af80: 4b29 206f 7220 3c63 6f64 653e 2353 4f41 K) or #SOA\n-0015af90: 505f 4854 4d4c 3c2f 636f 6465 3e20 6f72 P_HTML or\n-0015afa0: 203c 636f 6465 3e23 534f 4150 5f46 494c #SOAP_FIL\n-0015afb0: 453c 2f63 6f64 653e 2e20 5573 696e 6720 E. Using \n-0015afc0: 3c63 6f64 653e 2353 4f41 505f 4854 4d4c #SOAP_HTML\n-0015afd0: 3c2f 636f 6465 3e20 7365 7473 2074 6865 sets the\n-0015afe0: 2063 6f6e 7465 6e74 2d74 7970 6520 6865 content-type he\n-0015aff0: 6164 6572 2074 6f20 3c63 6f64 653e 7465 ader to te\n-0015b000: 7874 2f68 746d 6c3b 2063 6861 7273 6574 xt/html; charset\n-0015b010: 3d75 7466 2d38 3c2f 636f 6465 3e2e 2055 =utf-8. U\n-0015b020: 7369 6e67 203c 636f 6465 3e23 534f 4150 sing #SOAP\n-0015b030: 5f46 494c 453c 2f63 6f64 653e 2073 6574 _FILE set\n-0015b040: 7320 7468 6520 636f 6e74 656e 742d 7479 s the content-ty\n-0015b050: 7065 2068 6561 6465 7220 746f 2074 6865 pe header to the\n-0015b060: 2076 616c 7565 206f 6620 3c63 6f64 653e value of \n-0015b070: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::ht\n-0015b130: 7470 5f63 6f6e 7465 6e74 3c2f 613e 3c2f tp_content. Extra HTT\n-0015b150: 5020 6865 6164 6572 7320 6172 6520 6164 P headers are ad\n-0015b160: 6465 6420 7768 656e 203c 636f 6465 3e3c ded when <\n-0015b170: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0015b180: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-0015b190: 6d6c 2361 6662 3232 6165 3061 3439 3461 ml#afb22ae0a494a\n-0015b1a0: 3335 3236 3839 3134 3238 3662 6430 3034 35268914286bd004\n-0015b1b0: 3436 6162 2220 7469 746c 653d 2255 7365 46ab\" title=\"Use\n-0015b1c0: 722d 6465 6669 6e61 626c 6520 7374 7269 r-definable stri\n-0015b1d0: 6e67 2074 6861 7420 7370 6563 6966 6965 ng that specifie\n-0015b1e0: 7320 616e 2065 7874 7261 2048 5454 5020 s an extra HTTP \n-0015b1f0: 6865 6164 6572 206f 7220 6865 6164 6572 header or header\n-0015b200: 7320 7768 656e 2073 6570 6172 6174 6564 s when separated\n-0015b210: 2062 7920 4352 4c46 2c2e 2e2e 223e 736f by CRLF,...\">so\n-0015b220: 6170 3a3a 6874 7470 5f65 7874 7261 5f68 ap::http_extra_h\n-0015b230: 6561 6465 723c 2f61 3e3c 2f63 6f64 653e eader\n-0015b240: 2069 7320 7365 7420 746f 206f 6e65 206f is set to one o\n-0015b250: 7220 6d6f 7265 2068 6561 6465 7220 6c69 r more header li\n-0015b260: 6e65 7320 7365 7061 7261 7465 6420 6279 nes separated by\n-0015b270: 2043 524c 462e 2057 6865 6e20 7265 6465 CRLF. When rede\n-0015b280: 6669 6e69 6e67 2074 6869 7320 6361 6c6c fining this call\n-0015b290: 6261 636b 2c20 7573 6520 6675 6e63 7469 back, use functi\n-0015b2a0: 6f6e 203c 636f 6465 3e3c 6120 636c 6173 on so\n-0015b310: 6170 5f73 656e 643c 2f61 3e3c 2f63 6f64 ap_send to write the \n-0015b330: 6865 6164 6572 2063 6f6e 7465 6e74 732e header contents.\n-0015b340: 2052 6574 7572 6e73 203c 636f 6465 3e23 Returns #\n-0015b350: 534f 4150 5f4f 4b3c 2f63 6f64 653e 206f SOAP_OK o\n-0015b360: 7220 6120 3c63 6f64 653e 3c61 2063 6c61 r a soap_\n-0015b420: 7374 6174 7573 3c2f 613e 3c2f 636f 6465 status error code. Th\n-0015b440: 6520 6275 696c 742d 696e 2066 756e 6374 e built-in funct\n-0015b450: 696f 6e20 6173 7369 676e 6564 2074 6f20 ion assigned to \n-0015b460: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::frespon\n-0015b530: 7365 3c2f 613e 3c2f 636f 6465 3e20 6973 se is\n-0015b540: 203c 636f 6465 3e68 7474 705f 7265 7370 http_resp\n-0015b550: 6f6e 7365 3c2f 636f 6465 3e2e 3c2f 703e onse.

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

    .fr\n-0015b590: 6573 706f 6e73 653c 2f68 333e 0a3c 703e esponse

    .

    \n-0015b5a0: 3c63 6f64 653e 696e 7420 283c 6120 636c int (soap::fr\n-0015b670: 6573 706f 6e73 653c 2f61 3e29 2873 7472 esponse)(str\n-0015b680: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n-0015b690: 696e 7420 736f 6170 5f65 7272 6f72 5f63 int soap_error_c\n-0015b6a0: 6f64 652c 2055 4c4f 4e47 3634 2063 6f75 ode, ULONG64 cou\n-0015b6b0: 6e74 293c 2f63 6f64 653e 3c2f 703e 0a3c nt)

    .<\n-0015b6c0: 703e 5468 6973 2063 616c 6c62 6163 6b20 p>This callback \n-0015b6d0: 6973 2063 616c 6c65 6420 6174 2074 6865 is called at the\n-0015b6e0: 2073 6572 7665 7220 7369 6465 2062 7920 server side by \n-0015b6f0: 7468 6520 656e 6769 6e65 2074 6f20 7365 the engine to se\n-0015b700: 6e64 2074 6865 2048 5454 5020 6865 6164 nd the HTTP head\n-0015b710: 6572 7320 746f 2074 6865 2063 6f6e 6e65 ers to the conne\n-0015b720: 6374 6564 2063 6c69 656e 742e 2054 6865 cted client. The\n-0015b730: 2070 6172 616d 6574 6572 203c 636f 6465 parameter status
    s\n-0015b750: 686f 756c 6420 6265 2061 6e20 4854 5450 hould be an HTTP\n-0015b760: 2073 7461 7475 7320 6572 726f 7220 636f status error co\n-0015b770: 6465 206f 7220 3c63 6f64 653e 2353 4f41 de or #SOA\n-0015b780: 505f 4f4b 3c2f 636f 6465 3e20 2832 3030 P_OK (200\n-0015b790: 204f 4b29 206f 7220 3c63 6f64 653e 2353 OK) or #S\n-0015b7a0: 4f41 505f 4854 4d4c 3c2f 636f 6465 3e20 OAP_HTML \n-0015b7b0: 6f72 203c 636f 6465 3e23 534f 4150 5f46 or #SOAP_F\n-0015b7c0: 494c 453c 2f63 6f64 653e 2e20 5573 696e ILE. Usin\n-0015b7d0: 6720 3c63 6f64 653e 2353 4f41 505f 4854 g #SOAP_HT\n-0015b7e0: 4d4c 3c2f 636f 6465 3e20 7365 7473 2074 ML sets t\n-0015b7f0: 6865 2063 6f6e 7465 6e74 2d74 7970 6520 he content-type \n-0015b800: 6865 6164 6572 2074 6f20 3c63 6f64 653e header to \n-0015b810: 7465 7874 2f68 746d 6c3b 2063 6861 7273 text/html; chars\n-0015b820: 6574 3d75 7466 2d38 3c2f 636f 6465 3e2e et=utf-8.\n-0015b830: 2055 7369 6e67 203c 636f 6465 3e23 534f Using #SO\n-0015b840: 4150 5f46 494c 453c 2f63 6f64 653e 2073 AP_FILE s\n-0015b850: 6574 7320 7468 6520 636f 6e74 656e 742d ets the content-\n-0015b860: 7479 7065 2068 6561 6465 7220 746f 2074 type header to t\n-0015b870: 6865 2076 616c 7565 206f 6620 3c63 6f64 he value of soap::\n-0015b940: 6874 7470 5f63 6f6e 7465 6e74 3c2f 613e http_content\n-0015b950: 3c2f 636f 6465 3e2e 2045 7874 7261 2048
    . Extra H\n-0015b960: 5454 5020 6865 6164 6572 7320 6172 6520 TTP headers are \n-0015b970: 6164 6465 6420 7768 656e 203c 636f 6465 added when \n-0015ba30: 736f 6170 3a3a 6874 7470 5f65 7874 7261 soap::http_extra\n-0015ba40: 5f68 6561 6465 723c 2f61 3e3c 2f63 6f64 _header is set to one\n-0015ba60: 206f 7220 6d6f 7265 2068 6561 6465 7220 or more header \n-0015ba70: 6c69 6e65 7320 7365 7061 7261 7465 6420 lines separated \n-0015ba80: 6279 2043 524c 462e 2057 6865 6e20 7265 by CRLF. When re\n-0015ba90: 6465 6669 6e69 6e67 2074 6869 7320 6361 defining this ca\n-0015baa0: 6c6c 6261 636b 2c20 7573 6520 6675 6e63 llback, use func\n-0015bab0: 7469 6f6e 203c 636f 6465 3e3c 6120 636c tion \n-0015bb20: 736f 6170 5f73 656e 643c 2f61 3e3c 2f63 soap_send to write th\n-0015bb40: 6520 6865 6164 6572 2063 6f6e 7465 6e74 e header content\n-0015bb50: 732e 2052 6574 7572 6e73 203c 636f 6465 s. Returns #SOAP_OK\n-0015bb70: 206f 7220 6120 3c63 6f64 653e 3c61 2063 or a soa\n-0015bc30: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status error code. \n-0015bc50: 5468 6520 6275 696c 742d 696e 2066 756e The built-in fun\n-0015bc60: 6374 696f 6e20 6173 7369 676e 6564 2074 ction assigned t\n-0015bc70: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o soap::fresp\n-0015bd40: 6f6e 7365 3c2f 613e 3c2f 636f 6465 3e20 onse \n-0015bd50: 6973 203c 636f 6465 3e68 7474 705f 7265 is http_re\n-0015bd60: 7370 6f6e 7365 3c2f 636f 6465 3e2e 3c2f sponse..

    .\n-0015bda0: 6670 6f73 7468 6472 3c2f 6833 3e0a 3c70 fposthdr

    .int (soap::\n-0015be60: 6670 6f73 7468 6472 3c2f 613e 2928 7374 fposthdr)(st\n-0015be70: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n-0015be80: 2063 6f6e 7374 2063 6861 7220 2a6b 6579 const char *key\n-0015be90: 2c20 636f 6e73 7420 6368 6172 202a 7661 , const char *va\n-0015bea0: 6c29 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 l)

    .This callback i\n-0015bec0: 7320 6361 6c6c 6564 2062 7920 3c63 6f64 s called by soap::fpost<\n-0015bfa0: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a>
    and <\n-0015bfb0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::frespons\n-0015c080: 653c 2f61 3e3c 2f63 6f64 653e 2074 6f20 e to \n-0015c090: 7365 6e64 2061 6e20 4854 5450 2068 6561 send an HTTP hea\n-0015c0a0: 6465 7220 7769 7468 2061 206b 6579 2061 der with a key a\n-0015c0b0: 6e64 2061 6e20 6f70 7469 6f6e 616c 2076 nd an optional v\n-0015c0c0: 616c 7565 2e20 5265 7475 726e 7320 3c63 alue. Returns #SOAP_OK or a <\n-0015c0f0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0015c100: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-0015c110: 5f65 7272 6f72 732e 6874 6d6c 2367 6163 _errors.html#gac\n-0015c120: 3065 6164 6638 6637 3262 6163 6235 6234 0eadf8f72bacb5b4\n-0015c130: 3162 3735 3062 6561 6563 6130 3434 3422 1b750beaeca0444\"\n-0015c140: 2074 6974 6c65 3d22 5374 6174 7573 2061 title=\"Status a\n-0015c150: 6e64 2065 7272 6f72 2063 6f64 6573 2061 nd error codes a\n-0015c160: 7265 2069 6e74 2076 616c 7565 732c 2061 re int values, a\n-0015c170: 207a 6572 6f20 7661 6c75 6520 6f72 2023 zero value or #\n-0015c180: 534f 4150 5f4f 4b20 2830 2920 6d65 616e SOAP_OK (0) mean\n-0015c190: 7320 6e6f 2065 7272 6f72 2c2e 2e2e 223e s no error,...\">\n-0015c1a0: 736f 6170 5f73 7461 7475 733c 2f61 3e3c soap_status<\n-0015c1b0: 2f63 6f64 653e 2028 696e 7429 2065 7272 /code> (int) err\n-0015c1c0: 6f72 2063 6f64 652e 2054 6865 2062 7569 or code. The bui\n-0015c1d0: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2061 lt-in function a\n-0015c1e0: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to s\n-0015c290: 6f61 703a 3a66 706f 7374 6864 723c 2f61 oap::fposthdr is http_post_head\n-0015c2c0: 6572 3c2f 636f 6465 3e2e 3c2f 703e 0a3c er.

    .<\n-0015c2d0: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>
    .fpar\n-0015c300: 7365 3c2f 6833 3e0a 3c70 3e3c 636f 6465 se.

    int (soap::f\n-0015c3b0: 7061 7273 653c 2f61 3e29 2873 7472 7563 parse)(struc\n-0015c3c0: 7420 736f 6170 202a 736f 6170 293c 2f63 t soap *soap)

    .

    This\n-0015c3e0: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal\n-0015c3f0: 6c65 6420 6279 2074 6865 2065 6e67 696e led by the engin\n-0015c400: 6520 2861 7320 6120 636c 6965 6e74 206f e (as a client o\n-0015c410: 7220 7365 7276 6572 2920 746f 2072 6561 r server) to rea\n-0015c420: 6420 616e 6420 7061 7273 6520 4854 5450 d and parse HTTP\n-0015c430: 2068 6561 6465 7273 206f 7220 4d49 4d45 headers or MIME\n-0015c440: 2068 6561 6465 7273 2e20 5768 656e 2072 headers. When r\n-0015c450: 6564 6566 696e 6564 2c20 7468 6973 2066 edefined, this f\n-0015c460: 756e 6374 696f 6e20 7368 6f75 6c64 2061 unction should a\n-0015c470: 7420 7265 6164 206f 7220 736b 6970 2074 t read or skip t\n-0015c480: 6865 2065 6e74 6972 6520 4854 5450 2068 he entire HTTP h\n-0015c490: 6561 6465 7220 746f 2072 6561 6368 2074 eader to reach t\n-0015c4a0: 6865 206d 6573 7361 6765 2062 6f64 792e he message body.\n-0015c4b0: 2046 756e 6374 696f 6e20 3c63 6f64 653e Function \n-0015c4c0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_ge\n-0015c530: 746c 696e 653c 2f61 3e3c 2f63 6f64 653e tline\n-0015c540: 2069 7320 7573 6564 2062 7920 7468 6973 is used by this\n-0015c550: 2063 616c 6c62 6163 6b20 746f 2072 6561 callback to rea\n-0015c560: 6420 6561 6368 2068 6561 6465 7220 6c69 d each header li\n-0015c570: 6e65 2069 6e74 6f20 616e 2069 6e74 6572 ne into an inter\n-0015c580: 6e61 6c20 6275 6666 6572 203c 636f 6465 nal buffer soap::m\n-0015c650: 7367 6275 663c 2f61 3e3c 2f63 6f64 653e sgbuf\n-0015c660: 2077 6974 6820 3c63 6f64 653e 3c61 2063 with soap_getlin\n-0015c6e0: 653c 2f61 3e28 736f 6170 2c20 736f 6170 e(soap, soap\n-0015c6f0: 2d26 6774 3b6d 7367 6275 662c 2073 697a ->msgbuf, siz\n-0015c700: 656f 6628 736f 6170 2d26 6774 3b6d 7367 eof(soap->msg\n-0015c710: 6275 6629 293c 2f63 6f64 653e 2e20 5265 buf)). Re\n-0015c720: 7475 726e 7320 3c63 6f64 653e 2353 4f41 turns #SOA\n-0015c730: 505f 4f4b 3c2f 636f 6465 3e2c 206f 7220 P_OK, or \n-0015c740: 6120 6753 4f41 5020 6572 726f 7220 636f a gSOAP error co\n-0015c750: 6465 2e20 5468 6520 6275 696c 742d 696e de. The built-in\n-0015c760: 2066 756e 6374 696f 6e20 6173 7369 676e function assign\n-0015c770: 6564 2074 6f20 3c63 6f64 653e 3c61 2063 ed to s\n-0015c810: 6f61 703a 3a66 7061 7273 653c 2f61 3e3c oap::fparse<\n-0015c820: 2f63 6f64 653e 2069 7320 3c63 6f64 653e /code> is \n-0015c830: 6874 7470 5f70 6172 7365 3c2f 636f 6465 http_parse.

    .

    <\n-0015c870: 2f61 3e0a 6670 6172 7365 6864 723c 2f68 /a>.fparsehdr.

    int \n-0015c890: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap::fpa\n-0015c940: 7273 6568 6472 3c2f 613e 2928 7374 7275 rsehdr)(stru\n-0015c950: 6374 2073 6f61 7020 2a73 6f61 702c 2063 ct soap *soap, c\n-0015c960: 6f6e 7374 2063 6861 7220 2a6b 6579 2c20 onst char *key, \n-0015c970: 636f 6e73 7420 6368 6172 202a 7661 6c29 const char *val)\n-0015c980: 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 3e54

    .

    T\n-0015c990: 6869 7320 6361 6c6c 6261 636b 2069 7320 his callback is \n-0015c9a0: 6361 6c6c 6564 2062 7920 3c63 6f64 653e called by \n-0015c9b0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fparse<\n-0015ca50: 2f61 3e3c 2f63 6f64 653e 2c20 636f 6e73 /a>, cons\n-0015ca60: 756d 6573 2061 6e20 4854 5450 2068 6561 umes an HTTP hea\n-0015ca70: 6465 7220 7468 6174 2069 7320 7370 6c69 der that is spli\n-0015ca80: 7420 696e 2061 206b 6579 2d76 616c 7565 t in a key-value\n-0015ca90: 2070 6169 7220 616e 6420 7570 6461 7465 pair and update\n-0015caa0: 7320 7468 6520 3c63 6f64 653e 3c61 2063 s the soap\n-0015cb00: 3c2f 636f 6465 3e20 636f 6e74 6578 7420 context \n-0015cb10: 7374 6174 6520 6163 636f 7264 696e 676c state accordingl\n-0015cb20: 792e 2054 6865 2063 6f6e 7465 7874 2069 y. The context i\n-0015cb30: 7320 7570 6461 7465 6420 7769 7468 2074 s updated with t\n-0015cb40: 6865 2048 5454 5020 6865 6164 6572 2069 he HTTP header i\n-0015cb50: 6e66 6f72 6d61 7469 6f6e 2072 6563 6569 nformation recei\n-0015cb60: 7665 642c 2062 7574 2048 5454 5020 6865 ved, but HTTP he\n-0015cb70: 6164 6572 7320 6172 6520 6e6f 7420 6c69 aders are not li\n-0015cb80: 7465 7261 6c6c 7920 7265 7461 696e 6564 terally retained\n-0015cb90: 2062 7920 7468 6520 656e 6769 6e65 2e20 by the engine. \n-0015cba0: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S\n-0015cbb0: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or\n-0015cbc0: 203c 636f 6465 3e23 534f 4150 5f53 544f #SOAP_STO\n-0015cbd0: 503c 2f63 6f64 653e 2074 6f20 7072 6576 P to prev\n-0015cbe0: 656e 7420 6675 7274 6865 7220 7265 6164 ent further read\n-0015cbf0: 696e 6720 6f66 2074 6865 2048 5454 5020 ing of the HTTP \n-0015cc00: 626f 6479 2c20 6f72 2061 203c 636f 6465 body, or a soap_status (int) e\n-0015cce0: 7272 6f72 2063 6f64 652e 2054 6865 2062 rror code. The b\n-0015ccf0: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function\n-0015cd00: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to soap::f\n-0015cdc0: 7061 7273 6568 6472 3c2f 613e 3c2f 636f parsehdr is htt\n-0015cde0: 705f 7061 7273 655f 6865 6164 6572 3c2f p_parse_header.

    .

    <\n-0015ce00: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n-0015ce10: 2069 643d 2261 7574 6f74 6f63 5f6d 6433 id=\"autotoc_md3\n-0015ce20: 3322 3e3c 2f61 3e0a 6667 6574 3c2f 6833 3\">.fget.

    int (\n-0015ce40: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fget\n-0015cf10: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s\n-0015cf20: 6f61 7029 3c2f 636f 6465 3e3c 2f70 3e0a oap)

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

    This callback\n-0015cf40: 2069 7320 6361 6c6c 6564 2062 7920 7468 is called by th\n-0015cf50: 6520 7365 7276 6963 6520 6469 7370 6174 e service dispat\n-0015cf60: 6368 6572 2077 6865 6e20 616e 2048 5454 cher when an HTT\n-0015cf70: 5020 4745 5420 7265 7175 6573 7420 6973 P GET request is\n-0015cf80: 2070 656e 6469 6e67 2e20 5265 6465 6669 pending. Redefi\n-0015cf90: 6e65 2074 6869 7320 6361 6c6c 6261 636b ne this callback\n-0015cfa0: 2074 6f20 7265 7370 6f6e 6420 746f 2048 to respond to H\n-0015cfb0: 5454 5020 4745 5420 7265 7175 6573 7473 TTP GET requests\n-0015cfc0: 2077 6974 6820 636f 6e74 656e 742c 2073 with content, s\n-0015cfd0: 6565 2074 6865 203c 636f 6465 3e3c 6120 ee the ht\n-0015d060: 7470 5f67 6574 3c2f 613e 3c2f 636f 6465 tp_get HTTP GET plugi\n-0015d080: 6e20 666f 7220 6d6f 7265 2064 6574 6169 n for more detai\n-0015d090: 6c73 2e20 5265 7475 726e 7320 3c63 6f64 ls. Returns #SOAP_OK or a so\n-0015d170: 6170 5f73 7461 7475 733c 2f61 3e3c 2f63 ap_status (int) error\n-0015d190: 2063 6f64 652e 2054 6865 2062 7569 6c74 code. The built\n-0015d1a0: 2d69 6e20 6675 6e63 7469 6f6e 2061 7373 -in function ass\n-0015d1b0: 6967 6e65 6420 746f 203c 636f 6465 3e3c igned to <\n-0015d1c0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0015d1d0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-0015d1e0: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n-0015d1f0: 6761 6530 3232 3230 3466 6637 3030 3464 gae022204ff7004d\n-0015d200: 6632 6435 6163 3965 3038 3363 6262 3562 f2d5ac9e083cbb5b\n-0015d210: 3136 2220 7469 746c 653d 2243 616c 6c62 16\" title=\"Callb\n-0015d220: 6163 6b20 746f 2069 6d70 6c65 6d65 6e74 ack to implement\n-0015d230: 206c 6f67 6963 2061 7420 7468 6520 7365 logic at the se\n-0015d240: 7276 6572 2d73 6964 6520 746f 2073 6572 rver-side to ser\n-0015d250: 7665 2072 6573 706f 6e73 6573 2074 6f20 ve responses to \n-0015d260: 4854 5450 2047 4554 2072 6571 7565 7374 HTTP GET request\n-0015d270: 7320 6672 6f6d 2063 6c69 656e 7473 2e22 s from clients.\"\n-0015d280: 3e73 6f61 703a 3a66 6765 743c 2f61 3e3c >soap::fget<\n-0015d290: 2f63 6f64 653e 2069 7320 7468 6520 696e /code> is the in\n-0015d2a0: 7465 726e 616c 2073 7461 7469 6320 6675 ternal static fu\n-0015d2b0: 6e63 7469 6f6e 203c 636f 6465 3e68 7474 nction htt\n-0015d2c0: 705f 6765 743c 2f63 6f64 653e 2074 6861 p_get tha\n-0015d2d0: 7420 7265 7475 726e 7320 7468 6520 3c63 t returns the #SOAP_GET_ME\n-0015d2f0: 5448 4f44 3c2f 636f 6465 3e20 6572 726f THOD erro\n-0015d300: 722e 3c2f 703e 0a3c 6833 3e3c 6120 636c r.

    .

    <\n-0015d330: 2f61 3e0a 6670 7574 3c2f 6833 3e0a 3c70 /a>.fput

    .int (so\n-0015d410: 6170 3a3a 6670 7574 3c2f 613e 2928 7374 ap::fput)(st\n-0015d420: 7275 6374 2073 6f61 7020 2a73 6f61 7029 ruct soap *soap)\n-0015d430: 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 3e54

    .

    T\n-0015d440: 6869 7320 6361 6c6c 6261 636b 2069 7320 his callback is \n-0015d450: 6361 6c6c 6564 2062 7920 7468 6520 7365 called by the se\n-0015d460: 7276 6963 6520 6469 7370 6174 6368 6572 rvice dispatcher\n-0015d470: 2077 6865 6e20 616e 2048 5454 5020 5055 when an HTTP PU\n-0015d480: 5420 7265 7175 6573 7420 6973 2070 656e T request is pen\n-0015d490: 6469 6e67 2e20 5265 6465 6669 6e65 2074 ding. Redefine t\n-0015d4a0: 6869 7320 6361 6c6c 6261 636b 2074 6f20 his callback to \n-0015d4b0: 7265 7370 6f6e 6420 746f 2048 5454 5020 respond to HTTP \n-0015d4c0: 5055 5420 7265 7175 6573 7473 2c20 7365 PUT requests, se\n-0015d4d0: 6520 7468 6520 3c63 6f64 653e 3c61 2063 e the ht\n-0015d560: 7470 5f70 6f73 743c 2f61 3e3c 2f63 6f64 tp_post HTTP POST plu\n-0015d580: 6769 6e20 666f 7220 6d6f 7265 2064 6574 gin for more det\n-0015d590: 6169 6c73 2e20 5265 7475 726e 7320 3c63 ails. Returns #SOAP_OK or a <\n-0015d5c0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0015d5d0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-0015d5e0: 5f65 7272 6f72 732e 6874 6d6c 2367 6163 _errors.html#gac\n-0015d5f0: 3065 6164 6638 6637 3262 6163 6235 6234 0eadf8f72bacb5b4\n-0015d600: 3162 3735 3062 6561 6563 6130 3434 3422 1b750beaeca0444\"\n-0015d610: 2074 6974 6c65 3d22 5374 6174 7573 2061 title=\"Status a\n-0015d620: 6e64 2065 7272 6f72 2063 6f64 6573 2061 nd error codes a\n-0015d630: 7265 2069 6e74 2076 616c 7565 732c 2061 re int values, a\n-0015d640: 207a 6572 6f20 7661 6c75 6520 6f72 2023 zero value or #\n-0015d650: 534f 4150 5f4f 4b20 2830 2920 6d65 616e SOAP_OK (0) mean\n-0015d660: 7320 6e6f 2065 7272 6f72 2c2e 2e2e 223e s no error,...\">\n-0015d670: 736f 6170 5f73 7461 7475 733c 2f61 3e3c soap_status<\n-0015d680: 2f63 6f64 653e 2065 7272 6f72 2063 6f64 /code> error cod\n-0015d690: 652e 2054 6865 2062 7569 6c74 2d69 6e20 e. The built-in \n-0015d6a0: 6675 6e63 7469 6f6e 2061 7373 6967 6e65 function assigne\n-0015d6b0: 6420 746f 203c 636f 6465 3e3c 6120 636c d to soa\n-0015d780: 703a 3a66 7075 743c 2f61 3e3c 2f63 6f64 p::fput is the intern\n-0015d7a0: 616c 2073 7461 7469 6320 6675 6e63 7469 al static functi\n-0015d7b0: 6f6e 203c 636f 6465 3e68 7474 705f 7075 on http_pu\n-0015d7c0: 743c 2f63 6f64 653e 2074 6861 7420 7265 t that re\n-0015d7d0: 7475 726e 7320 7468 6520 3c63 6f64 653e turns the \n-0015d7e0: 2353 4f41 505f 5055 545f 4d45 5448 4f44 #SOAP_PUT_METHOD\n-0015d7f0: 3c2f 636f 6465 3e20 6572 726f 722e 3c2f error..

    .\n-0015d830: 6670 6174 6368 3c2f 6833 3e0a 3c70 3e3c fpatch

    .

    <\n-0015d840: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (\n-0015d910: 736f 6170 3a3a 6670 6174 6368 3c2f 613e soap::fpatch\n-0015d920: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s\n-0015d930: 6f61 7029 3c2f 636f 6465 3e3c 2f70 3e0a oap)

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

    This callback\n-0015d950: 2069 7320 6361 6c6c 6564 2062 7920 7468 is called by th\n-0015d960: 6520 7365 7276 6963 6520 6469 7370 6174 e service dispat\n-0015d970: 6368 6572 2077 6865 6e20 616e 2048 5454 cher when an HTT\n-0015d980: 5020 5041 5443 4820 7265 7175 6573 7420 P PATCH request \n-0015d990: 6973 2070 656e 6469 6e67 2e20 5265 6465 is pending. Rede\n-0015d9a0: 6669 6e65 2074 6869 7320 6361 6c6c 6261 fine this callba\n-0015d9b0: 636b 2074 6f20 7265 7370 6f6e 6420 746f ck to respond to\n-0015d9c0: 2048 5454 5020 5041 5443 4820 7265 7175 HTTP PATCH requ\n-0015d9d0: 6573 7473 2c20 7365 6520 7468 6520 3c63 ests, see the http_post<\n-0015da70: 2f61 3e3c 2f63 6f64 653e 2048 5454 5020 /a> HTTP \n-0015da80: 504f 5354 2070 6c75 6769 6e20 666f 7220 POST plugin for \n-0015da90: 6d6f 7265 2064 6574 6169 6c73 2e20 5265 more details. Re\n-0015daa0: 7475 726e 7320 3c63 6f64 653e 2353 4f41 turns #SOA\n-0015dab0: 505f 4f4b 3c2f 636f 6465 3e20 6f72 2061 P_OK or a\n-0015dac0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_sta\n-0015db80: 7475 733c 2f61 3e3c 2f63 6f64 653e 2065 tus e\n-0015db90: 7272 6f72 2063 6f64 652e 2054 6865 2062 rror code. The b\n-0015dba0: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function\n-0015dbb0: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to soap::f\n-0015dc90: 7061 7463 683c 2f61 3e3c 2f63 6f64 653e patch\n-0015dca0: 2069 7320 7468 6520 696e 7465 726e 616c is the internal\n-0015dcb0: 2073 7461 7469 6320 6675 6e63 7469 6f6e static function\n-0015dcc0: 203c 636f 6465 3e68 7474 705f 7061 7463 http_patc\n-0015dcd0: 683c 2f63 6f64 653e 2074 6861 7420 7265 h that re\n-0015dce0: 7475 726e 7320 7468 6520 3c63 6f64 653e turns the \n-0015dcf0: 2353 4f41 505f 5041 5443 485f 4d45 5448 #SOAP_PATCH_METH\n-0015dd00: 4f44 3c2f 636f 6465 3e20 6572 726f 722e OD error.\n-0015dd10: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .fdel

    .

    <\n-0015dd50: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (\n-0015de20: 736f 6170 3a3a 6664 656c 3c2f 613e 2928 soap::fdel)(\n-0015de30: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n-0015de40: 7029 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 p)

    .This callback i\n-0015de60: 7320 6361 6c6c 6564 2062 7920 7468 6520 s called by the \n-0015de70: 7365 7276 6963 6520 6469 7370 6174 6368 service dispatch\n-0015de80: 6572 2077 6865 6e20 616e 2048 5454 5020 er when an HTTP \n-0015de90: 4445 4c45 5445 2072 6571 7565 7374 2069 DELETE request i\n-0015dea0: 7320 7065 6e64 696e 672e 2052 6564 6566 s pending. Redef\n-0015deb0: 696e 6520 7468 6973 2063 616c 6c62 6163 ine this callbac\n-0015dec0: 6b20 746f 2072 6573 706f 6e64 2074 6f20 k to respond to \n-0015ded0: 4854 5450 2044 454c 4554 4520 7265 7175 HTTP DELETE requ\n-0015dee0: 6573 7473 2c20 7365 6520 7468 6520 3c63 ests, see the http_post<\n-0015df80: 2f61 3e3c 2f63 6f64 653e 2048 5454 5020 /a> HTTP \n-0015df90: 504f 5354 2070 6c75 6769 6e20 666f 7220 POST plugin for \n-0015dfa0: 6d6f 7265 2064 6574 6169 6c73 2e20 5265 more details. Re\n-0015dfb0: 7475 726e 7320 3c63 6f64 653e 2353 4f41 turns #SOA\n-0015dfc0: 505f 4f4b 3c2f 636f 6465 3e20 6f72 2061 P_OK or a\n-0015dfd0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_sta\n-0015e090: 7475 733c 2f61 3e3c 2f63 6f64 653e 2028 tus (\n-0015e0a0: 696e 7429 2065 7272 6f72 2063 6f64 652e int) error code.\n-0015e0b0: 2054 6865 2062 7569 6c74 2d69 6e20 6675 The built-in fu\n-0015e0c0: 6e63 7469 6f6e 2061 7373 6967 6e65 6420 nction assigned \n-0015e0d0: 746f 203c 636f 6465 3e3c 6120 636c 6173 to s\n-0015e1a0: 6f61 703a 3a66 6465 6c3c 2f61 3e3c 2f63 oap::fdel is the inte\n-0015e1c0: 726e 616c 2073 7461 7469 6320 6675 6e63 rnal static func\n-0015e1d0: 7469 6f6e 203c 636f 6465 3e68 7474 705f tion http_\n-0015e1e0: 6465 6c3c 2f63 6f64 653e 2074 6861 7420 del that \n-0015e1f0: 7265 7475 726e 7320 7468 6520 3c63 6f64 returns the #SOAP_DEL_METH\n-0015e210: 4f44 3c2f 636f 6465 3e20 6572 726f 722e OD error.\n-0015e220: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .fopt

    .

    <\n-0015e260: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (\n-0015e330: 736f 6170 3a3a 666f 7074 3c2f 613e 2928 soap::fopt)(\n-0015e340: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n-0015e350: 7029 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 p)

    .Called by the s\n-0015e370: 6572 7669 6365 2064 6973 7061 7463 6865 ervice dispatche\n-0015e380: 7220 7768 656e 2061 6e20 4854 5450 204f r when an HTTP O\n-0015e390: 5054 494f 4e20 7265 7175 6573 7420 6973 PTION request is\n-0015e3a0: 2070 656e 6469 6e67 2e20 5265 6465 6669 pending. Redefi\n-0015e3b0: 6e65 2074 6869 7320 6361 6c6c 6261 636b ne this callback\n-0015e3c0: 2074 6f20 7265 7370 6f6e 6420 746f 2048 to respond to H\n-0015e3d0: 5454 5020 4f50 5449 4f4e 2072 6571 7565 TTP OPTION reque\n-0015e3e0: 7374 732c 2073 6565 2074 6865 203c 636f sts, see the http_post HTTP P\n-0015e490: 4f53 5420 706c 7567 696e 2066 6f72 206d OST plugin for m\n-0015e4a0: 6f72 6520 6465 7461 696c 732e 2052 6574 ore details. Ret\n-0015e4b0: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP\n-0015e4c0: 5f4f 4b3c 2f63 6f64 653e 206f 7220 6120 _OK or a \n-0015e4d0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat\n-0015e590: 7573 3c2f 613e 3c2f 636f 6465 3e20 2869 us (i\n-0015e5a0: 6e74 2920 6572 726f 7220 636f 6465 2e20 nt) error code. \n-0015e5b0: 5468 6520 6275 696c 742d 696e 2066 756e The built-in fun\n-0015e5c0: 6374 696f 6e20 6173 7369 676e 6564 2074 ction assigned t\n-0015e5d0: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o so\n-0015e6a0: 6170 3a3a 666f 7074 3c2f 613e 3c2f 636f ap::fopt is the inter\n-0015e6c0: 6e61 6c20 7374 6174 6963 2066 756e 6374 nal static funct\n-0015e6d0: 696f 6e20 3c63 6f64 653e 6874 7470 5f32 ion http_2\n-0015e6e0: 3030 3c2f 636f 6465 3e20 7468 6174 2072 00 that r\n-0015e6f0: 6574 7572 6e73 2048 5454 5020 3230 3020 eturns HTTP 200 \n-0015e700: 4f4b 2e3c 2f70 3e0a 3c68 333e 3c61 2063 OK.

    .

    \n-0015e730: 3c2f 613e 0a66 6865 6164 3c2f 6833 3e0a .fhead

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

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

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

    This callback\n-0015e850: 2069 7320 6361 6c6c 6564 2062 7920 7468 is called by th\n-0015e860: 6520 7365 7276 6963 6520 6469 7370 6174 e service dispat\n-0015e870: 6368 6572 2077 6865 6e20 616e 2048 5454 cher when an HTT\n-0015e880: 5020 4845 4144 2072 6571 7565 7374 2069 P HEAD request i\n-0015e890: 7320 7065 6e64 696e 672e 2052 6564 6566 s pending. Redef\n-0015e8a0: 696e 6520 7468 6973 2063 616c 6c62 6163 ine this callbac\n-0015e8b0: 6b20 746f 2072 6573 706f 6e64 2074 6f20 k to respond to \n-0015e8c0: 4854 5450 2048 4541 4420 7265 7175 6573 HTTP HEAD reques\n-0015e8d0: 7473 206d 6f72 6520 7370 6563 6966 6963 ts more specific\n-0015e8e0: 616c 6c79 2e20 5265 7475 726e 7320 3c63 ally. Returns #SOAP_OK or a <\n-0015e910: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0015e920: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-0015e930: 5f65 7272 6f72 732e 6874 6d6c 2367 6163 _errors.html#gac\n-0015e940: 3065 6164 6638 6637 3262 6163 6235 6234 0eadf8f72bacb5b4\n-0015e950: 3162 3735 3062 6561 6563 6130 3434 3422 1b750beaeca0444\"\n-0015e960: 2074 6974 6c65 3d22 5374 6174 7573 2061 title=\"Status a\n-0015e970: 6e64 2065 7272 6f72 2063 6f64 6573 2061 nd error codes a\n-0015e980: 7265 2069 6e74 2076 616c 7565 732c 2061 re int values, a\n-0015e990: 207a 6572 6f20 7661 6c75 6520 6f72 2023 zero value or #\n-0015e9a0: 534f 4150 5f4f 4b20 2830 2920 6d65 616e SOAP_OK (0) mean\n-0015e9b0: 7320 6e6f 2065 7272 6f72 2c2e 2e2e 223e s no error,...\">\n-0015e9c0: 736f 6170 5f73 7461 7475 733c 2f61 3e3c soap_status<\n-0015e9d0: 2f63 6f64 653e 2028 696e 7429 2065 7272 /code> (int) err\n-0015e9e0: 6f72 2063 6f64 652e 2054 6865 2062 7569 or code. The bui\n-0015e9f0: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2061 lt-in function a\n-0015ea00: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to soap::fhead<\n-0015eae0: 2f61 3e3c 2f63 6f64 653e 2069 7320 7468 /a> is th\n-0015eaf0: 6520 696e 7465 726e 616c 2073 7461 7469 e internal stati\n-0015eb00: 6320 6675 6e63 7469 6f6e 203c 636f 6465 c function http_200\n-0015eb20: 2074 6861 7420 7265 7475 726e 7320 4854 that returns HT\n-0015eb30: 5450 2032 3030 204f 4b2e 3c2f 703e 0a3c TP 200 OK.

    .<\n-0015eb40: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.ffor\n-0015eb70: 6d3c 2f68 333e 0a3c 703e 3c63 6f64 653e m

    .

    \n-0015eb80: 696e 7420 283c 6120 636c 6173 733d 2265 int (soap:\n-0015ec50: 3a66 666f 726d 3c2f 613e 2928 7374 7275 :fform)(stru\n-0015ec60: 6374 2073 6f61 7020 2a73 6f61 7029 3c2f ct soap *soap)

    .

    Thi\n-0015ec80: 7320 6361 6c6c 6261 636b 2069 7320 6361 s callback is ca\n-0015ec90: 6c6c 6564 2062 7920 7468 6520 4854 5450 lled by the HTTP\n-0015eca0: 2046 4f52 4d20 6861 6e64 6c65 7220 706c FORM handler pl\n-0015ecb0: 7567 696e 2074 6f20 7061 7273 6520 4854 ugin to parse HT\n-0015ecc0: 4d4c 2066 6f72 6d73 2072 6563 6569 7665 ML forms receive\n-0015ecd0: 6420 7769 7468 2048 5454 5020 504f 5354 d with HTTP POST\n-0015ece0: 2061 6e64 2050 5554 2072 6571 7565 7374 and PUT request\n-0015ecf0: 732c 2073 6565 2074 6865 203c 636f 6465 s, see the ;:http_form HTTP FORM pl\n-0015ed20: 7567 696e 2066 6f72 206d 6f72 6520 6465 ugin for more de\n-0015ed30: 7461 696c 732e 2054 6865 2048 5454 5020 tails. The HTTP \n-0015ed40: 626f 6479 2077 6974 6820 7468 6520 666f body with the fo\n-0015ed50: 726d 2064 6174 6120 7368 6f75 6c64 2062 rm data should b\n-0015ed60: 6520 7061 7273 6564 2062 7920 7468 6973 e parsed by this\n-0015ed70: 2063 616c 6c62 6163 6b2c 206f 7468 6572 callback, other\n-0015ed80: 7769 7365 2048 5454 5020 6b65 6570 2d61 wise HTTP keep-a\n-0015ed90: 6c69 7665 206d 6573 7361 6765 7320 7769 live messages wi\n-0015eda0: 6c6c 2065 6e64 2075 7020 6f75 7420 6f66 ll end up out of\n-0015edb0: 2073 796e 6320 6173 2061 2072 6573 756c sync as a resul\n-0015edc0: 7420 6f66 2074 6865 2063 7572 7265 6e74 t of the current\n-0015edd0: 2070 6f73 6974 696f 6e20 6e6f 7420 6265 position not be\n-0015ede0: 696e 6720 6164 7661 6e63 6564 2074 6f20 ing advanced to \n-0015edf0: 7468 6520 656e 6420 6f66 2074 6865 2048 the end of the H\n-0015ee00: 5454 5020 626f 6479 2e20 5265 7475 726e TTP body. Return\n-0015ee10: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK\n-0015ee20: 3c2f 636f 6465 3e20 6f72 2061 203c 636f or a soap_status<\n-0015eef0: 2f61 3e3c 2f63 6f64 653e 2028 696e 7429 /a> (int)\n-0015ef00: 2065 7272 6f72 2063 6f64 652e 204e 6f20 error code. No \n-0015ef10: 6275 696c 742d 696e 2066 756e 6374 696f built-in functio\n-0015ef20: 6e20 6973 2061 7373 6967 6e65 6420 746f n is assigned to\n-0015ef30: 203c 636f 6465 3e3c 6120 636c 6173 733d soa\n-0015f000: 703a 3a66 666f 726d 3c2f 613e 3c2f 636f p::fform.

    .

    .fheader.

    int \n-0015f060: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap::fhe\n-0015f130: 6164 6572 3c2f 613e 2928 7374 7275 6374 ader)(struct\n-0015f140: 2073 6f61 7020 2a73 6f61 7029 3c2f 636f soap *soap)

    .

    This \n-0015f160: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call\n-0015f170: 6564 2069 6d6d 6564 6961 7465 6c79 2061 ed immediately a\n-0015f180: 6674 6572 2070 6172 7369 6e67 2061 2053 fter parsing a S\n-0015f190: 4f41 5020 4865 6164 6572 2069 6e74 6f20 OAP Header into \n-0015f1a0: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap::header struct\n-0015f280: 7572 652e 2054 6865 2053 4f41 5020 4865 ure. The SOAP He\n-0015f290: 6164 6572 2073 7472 7563 7475 7265 203c ader structure <\n-0015f2a0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n-0015f360: 703a 3a68 6561 6465 723c 2f61 3e3c 2f63 p::header can be insp\n-0015f380: 6563 7465 6420 6279 2074 6869 7320 6675 ected by this fu\n-0015f390: 6e63 7469 6f6e 2061 6e64 2076 6572 6966 nction and verif\n-0015f3a0: 6965 6420 6f72 2072 656a 6563 7465 6420 ied or rejected \n-0015f3b0: 6265 666f 7265 2074 6865 2072 6573 7420 before the rest \n-0015f3c0: 6f66 2074 6865 206d 6573 7361 6765 2077 of the message w\n-0015f3d0: 6974 6820 7468 6520 534f 4150 2042 6f64 ith the SOAP Bod\n-0015f3e0: 7920 6973 2063 6f6e 7375 6d65 642e 2052 y is consumed. R\n-0015f3f0: 6574 7572 6e73 203c 636f 6465 3e23 534f eturns #SO\n-0015f400: 4150 5f4f 4b3c 2f63 6f64 653e 206f 7220 AP_OK or \n-0015f410: 6120 3c63 6f64 653e 3c61 2063 6c61 7373 a soap_st\n-0015f4d0: 6174 7573 3c2f 613e 3c2f 636f 6465 3e20 atus \n-0015f4e0: 2869 6e74 2920 6572 726f 7220 636f 6465 (int) error code\n-0015f4f0: 2e20 4e6f 2062 7569 6c74 2d69 6e20 6675 . No built-in fu\n-0015f500: 6e63 7469 6f6e 2069 7320 6173 7369 676e nction is assign\n-0015f510: 6564 2074 6f20 3c63 6f64 653e 3c61 2063 ed to soap::fheader<\n-0015f5f0: 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 3e0a /a>.

    .\n-0015f600: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .fig\n-0015f630: 6e6f 7265 3c2f 6833 3e0a 3c70 3e3c 636f nore

    .

    int (so\n-0015f710: 6170 3a3a 6669 676e 6f72 653c 2f61 3e29 ap::fignore)\n-0015f720: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n-0015f730: 6170 2c20 636f 6e73 7420 6368 6172 202a ap, const char *\n-0015f740: 7461 6729 3c2f 636f 6465 3e3c 2f70 3e0a tag)

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

    This callback\n-0015f760: 2069 7320 6361 6c6c 6564 2077 6865 6e20 is called when \n-0015f770: 616e 2075 6e72 6563 6f67 6e69 7a65 6420 an unrecognized \n-0015f780: 584d 4c20 656c 656d 656e 7420 7761 7320 XML element was \n-0015f790: 656e 636f 756e 7465 7265 6420 6f6e 2074 encountered on t\n-0015f7a0: 6865 2069 6e70 7574 2074 6861 7420 636f he input that co\n-0015f7b0: 756c 6420 6265 2069 676e 6f72 6564 2064 uld be ignored d\n-0015f7c0: 6570 656e 6469 6e67 206f 6e20 736f 6d65 epending on some\n-0015f7d0: 2073 7065 6369 6669 6564 206c 6f67 6963 specified logic\n-0015f7e0: 2e20 5468 6520 3c63 6f64 653e 7461 673c . The tag<\n-0015f7f0: 2f63 6f64 653e 2070 6172 616d 6574 6572 /code> parameter\n-0015f800: 2069 7320 7468 6520 6f66 6665 6e64 696e is the offendin\n-0015f810: 6720 584d 4c20 656c 656d 656e 7420 7461 g XML element ta\n-0015f820: 6720 6e61 6d65 2073 7472 696e 672e 2054 g name string. T\n-0015f830: 6865 2063 616c 6c62 6163 6b20 7368 6f75 he callback shou\n-0015f840: 6c64 2072 6574 7572 6e20 3c63 6f64 653e ld return \n-0015f850: 2353 4f41 505f 4f4b 3c2f 636f 6465 3e20 #SOAP_OK \n-0015f860: 746f 2069 676e 6f72 6520 7468 6520 656c to ignore the el\n-0015f870: 656d 656e 7420 6f72 2072 6574 7572 6e20 ement or return \n-0015f880: 616e 203c 636f 6465 3e3c 6120 636c 6173 an soap_s\n-0015f940: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus\n-0015f950: 2065 7272 6f72 2063 6f64 6520 7375 6368 error code such\n-0015f960: 2061 7320 3c63 6f64 653e 2353 4f41 505f as #SOAP_\n-0015f970: 5441 475f 4d49 534d 4154 4348 3c2f 636f TAG_MISMATCH to trigger a\n-0015f990: 2076 616c 6964 6174 696f 6e20 6572 726f validation erro\n-0015f9a0: 722e 2054 6869 7320 6361 6c6c 6261 636b r. This callback\n-0015f9b0: 2061 6c73 6f20 6f76 6572 7269 6465 7320 also overrides \n-0015f9c0: 3c63 6f64 653e 6d75 7374 556e 6465 7273 mustUnders\n-0015f9d0: 7461 6e64 3c2f 636f 6465 3e20 6174 7472 tand attr\n-0015f9e0: 6962 7574 6573 206f 6e20 756e 7265 636f ibutes on unreco\n-0015f9f0: 676e 697a 6564 2053 4f41 5020 4865 6164 gnized SOAP Head\n-0015fa00: 6572 2065 6c65 6d65 6e74 7320 7468 6174 er elements that\n-0015fa10: 206e 6f72 6d61 6c6c 7920 7261 6973 6520 normally raise \n-0015fa20: 6661 756c 7473 2e20 4974 2069 7320 7374 faults. It is st\n-0015fa30: 726f 6e67 6c79 2072 6563 6f6d 6d65 6e64 rongly recommend\n-0015fa40: 6564 2074 6861 7420 7468 6520 6361 6c6c ed that the call\n-0015fa50: 6261 636b 2072 6574 7572 6e73 203c 636f back returns #SOAP_MUSTUND\n-0015fa70: 4552 5354 414e 443c 2f63 6f64 653e 2077 ERSTAND w\n-0015fa80: 6865 6e20 3c63 6f64 653e 3c61 2063 6c61 hen soap::mustUnde\n-0015fb50: 7273 7461 6e64 3c2f 613e 3c2f 636f 6465 rstand != 0. Returns #SOAP_OK or a s\n-0015fc50: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status (int) erro\n-0015fc70: 7220 636f 6465 2e20 4e6f 2062 7569 6c74 r code. No built\n-0015fc80: 2d69 6e20 6675 6e63 7469 6f6e 2069 7320 -in function is \n-0015fc90: 6173 7369 676e 6564 2074 6f20 3c63 6f64 assigned to soap::fi\n-0015fd70: 676e 6f72 653c 2f61 3e3c 2f63 6f64 653e gnore\n-0015fd80: 2e3c 2f70 3e0a 3c68 333e 3c61 2063 6c61 .

    .

    .fsvalidate.

    int \n-0015fdd0: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap::fsv\n-0015fe70: 616c 6964 6174 653c 2f61 3e29 2873 7472 alidate)(str\n-0015fe80: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n-0015fe90: 636f 6e73 7420 6368 6172 202a 7061 7474 const char *patt\n-0015fea0: 6572 6e2c 2063 6f6e 7374 2063 6861 7220 ern, const char \n-0015feb0: 2a73 7472 696e 6729 3c2f 636f 6465 3e3c *string)<\n-0015fec0: 2f70 3e0a 3c70 3e54 6869 7320 6361 6c6c /p>.

    This call\n-0015fed0: 6261 636b 2069 7320 6361 6c6c 6564 2074 back is called t\n-0015fee0: 6f20 7661 6c69 6461 7465 2061 2073 7472 o validate a str\n-0015fef0: 696e 6720 6167 6169 6e73 7420 616e 2058 ing against an X\n-0015ff00: 4d4c 2072 6567 6578 2070 6174 7465 726e ML regex pattern\n-0015ff10: 2e20 5061 7474 6572 6e73 2075 7365 2058 . Patterns use X\n-0015ff20: 4d4c 2073 6368 656d 6120 7265 6765 7820 ML schema regex \n-0015ff30: 7379 6e74 6178 2e20 5468 6973 2063 616c syntax. This cal\n-0015ff40: 6c62 6163 6b20 616c 6c6f 7773 2075 7365 lback allows use\n-0015ff50: 722d 6465 6669 6e65 6420 7061 7474 6572 r-defined patter\n-0015ff60: 6e20 7661 6c69 6461 7469 6f6e 2074 6861 n validation tha\n-0015ff70: 7420 6973 206e 6f72 6d61 6c6c 7920 6469 t is normally di\n-0015ff80: 7361 626c 6564 2e20 5265 7475 726e 7320 sabled. Returns \n-0015ff90: 3c63 6f64 653e 2353 4f41 505f 4f4b 3c2f #SOAP_OK when the s\n-0015ffb0: 7472 696e 6720 6d61 7463 6865 7320 7468 tring matches th\n-0015ffc0: 6520 7061 7474 6572 6e20 6f72 203c 636f e pattern or #SOAP_TYPE when the st\n-0015fff0: 7269 6e67 2064 6f65 7320 6e6f 7420 6d61 ring does not ma\n-00160000: 7463 682e 204e 6f20 6275 696c 742d 696e tch. No built-in\n-00160010: 2066 756e 6374 696f 6e20 6973 2061 7373 function is ass\n-00160020: 6967 6e65 6420 746f 203c 636f 6465 3e3c igned to <\n-00160030: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00160040: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00160050: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n-00160060: 6761 3661 3565 3239 6238 3630 6432 3866 ga6a5e29b860d28f\n-00160070: 3835 3563 3864 3961 3637 6330 3936 6433 855c8d9a67c096d3\n-00160080: 3131 2220 7469 746c 653d 2243 616c 6c62 11\" title=\"Callb\n-00160090: 6163 6b20 746f 2076 616c 6964 6174 6520 ack to validate \n-001600a0: 7374 7269 6e67 7320 6167 6169 6e73 7420 strings against \n-001600b0: 584d 4c20 7265 6765 7820 7061 7474 6572 XML regex patter\n-001600c0: 6e73 2e22 3e73 6f61 703a 3a66 7376 616c ns.\">soap::fsval\n-001600d0: 6964 6174 653c 2f61 3e3c 2f63 6f64 653e idate\n-001600e0: 2e3c 2f70 3e0a 3c68 333e 3c61 2063 6c61 .

    .

    .fwvalidate.

    int \n-00160130: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap\n-001601d0: 3a3a 6677 7661 6c69 6461 7465 3c2f 613e ::fwvalidate\n-001601e0: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s\n-001601f0: 6f61 702c 2063 6f6e 7374 2063 6861 7220 oap, const char \n-00160200: 2a70 6174 7465 726e 2c20 636f 6e73 7420 *pattern, const \n-00160210: 7763 6861 725f 7420 2a73 7472 696e 6729 wchar_t *string)\n-00160220: 3c2f 636f 6465 3e20 5468 6973 2063 616c This cal\n-00160230: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n-00160240: 746f 2076 616c 6964 6174 6520 6120 7769 to validate a wi\n-00160250: 6465 2073 7472 696e 6720 6167 6169 6e73 de string agains\n-00160260: 7420 616e 2058 4d4c 2072 6567 6578 2070 t an XML regex p\n-00160270: 6174 7465 726e 2e20 5061 7474 6572 6e73 attern. Patterns\n-00160280: 2075 7365 2058 4d4c 2073 6368 656d 6120 use XML schema \n-00160290: 7265 6765 7820 7379 6e74 6178 2e20 5468 regex syntax. Th\n-001602a0: 6973 2063 616c 6c62 6163 6b20 616c 6c6f is callback allo\n-001602b0: 7773 2075 7365 722d 6465 6669 6e65 6420 ws user-defined \n-001602c0: 7061 7474 6572 6e20 7661 6c69 6461 7469 pattern validati\n-001602d0: 6f6e 2074 6861 7420 6973 206e 6f72 6d61 on that is norma\n-001602e0: 6c6c 7920 6469 7361 626c 6564 2e20 5265 lly disabled. Re\n-001602f0: 7475 726e 7320 3c63 6f64 653e 2353 4f41 turns #SOA\n-00160300: 505f 4f4b 3c2f 636f 6465 3e20 7768 656e P_OK when\n-00160310: 2074 6865 2073 7472 696e 6720 6d61 7463 the string matc\n-00160320: 6865 7320 7468 6520 7061 7474 6572 6e20 hes the pattern \n-00160330: 6f72 203c 636f 6465 3e23 534f 4150 5f54 or #SOAP_T\n-00160340: 5950 453c 2f63 6f64 653e 2077 6865 6e20 YPE when \n-00160350: 7468 6520 7374 7269 6e67 2064 6f65 7320 the string does \n-00160360: 6e6f 7420 6d61 7463 682e 204e 6f20 6275 not match. No bu\n-00160370: 696c 742d 696e 2066 756e 6374 696f 6e20 ilt-in function \n-00160380: 6973 2061 7373 6967 6e65 6420 746f 203c is assigned to <\n-00160390: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>\n-00160430: 736f 6170 3a3a 6677 7661 6c69 6461 7465 soap::fwvalidate\n-00160440: 3c2f 613e 3c2f 636f 6465 3e2e 3c2f 703e .

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

    .fs\n-00160480: 6574 6572 726f 723c 2f68 333e 0a3c 703e eterror

    .

    \n-00160490: 3c63 6f64 653e 766f 6964 2028 3c61 2063 void (so\n-00160540: 6170 3a3a 6673 6574 6572 726f 723c 2f61 ap::fseterror)(struct soap *\n-00160560: 736f 6170 2c20 636f 6e73 7420 6368 6172 soap, const char\n-00160570: 202a 2a63 6f64 652c 2063 6f6e 7374 2063 **code, const c\n-00160580: 6861 7220 2a2a 7374 7269 6e67 293c 2f63 har **string)

    .

    This\n-001605a0: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal\n-001605b0: 6c65 6420 6279 2074 6865 2065 6e67 696e led by the engin\n-001605c0: 6520 7768 656e 2061 6e20 6572 726f 7220 e when an error \n-001605d0: 6973 2072 6169 7365 6420 746f 2061 6c6c is raised to all\n-001605e0: 6f77 2069 6e73 7065 6374 696f 6e20 6f72 ow inspection or\n-001605f0: 206f 7665 7272 6964 696e 6720 6f66 2074 overriding of t\n-00160600: 6865 2066 6175 6c74 2063 6f64 6520 6f72 he fault code or\n-00160610: 2066 6175 6c74 2073 7472 696e 6720 6d65 fault string me\n-00160620: 7373 6167 6573 2062 6566 6f72 6520 7468 ssages before th\n-00160630: 6520 6572 726f 7220 6973 2072 6570 6f72 e error is repor\n-00160640: 7465 6420 6f72 2074 7261 6e73 6d69 7474 ted or transmitt\n-00160650: 6564 2e20 4e6f 2062 7569 6c74 2d69 6e20 ed. No built-in \n-00160660: 6675 6e63 7469 6f6e 2069 7320 6173 7369 function is assi\n-00160670: 676e 6564 2074 6f20 3c63 6f64 653e 3c61 gned to \n-00160720: 736f 6170 3a3a 6673 6574 6572 726f 723c soap::fseterror<\n-00160730: 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 3e0a /a>.

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

    .fop\n-00160770: 656e 3c2f 6833 3e0a 3c70 3e3c 636f 6465 en

    .

    SOAP_SOCKET (soap::f\n-00160830: 6f70 656e 3c2f 613e 2928 7374 7275 6374 open)(struct\n-00160840: 2073 6f61 7020 2a73 6f61 702c 2063 6f6e soap *soap, con\n-00160850: 7374 2063 6861 7220 2a65 6e64 706f 696e st char *endpoin\n-00160860: 742c 2063 6f6e 7374 2063 6861 7220 2a68 t, const char *h\n-00160870: 6f73 742c 2069 6e74 2070 6f72 7429 3c2f ost, int port)

    .

    Thi\n-00160890: 7320 6361 6c6c 6261 636b 2069 7320 6361 s callback is ca\n-001608a0: 6c6c 6564 2062 7920 7468 6520 656e 6769 lled by the engi\n-001608b0: 6e65 2061 7420 7468 6520 636c 6965 6e74 ne at the client\n-001608c0: 2d73 6964 6520 6279 203c 636f 6465 3e3c -side by <\n-001608d0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001608e0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-001608f0: 5f69 6f2e 6874 6d6c 2367 6135 6338 3765 _io.html#ga5c87e\n-00160900: 3964 3061 3433 6665 3138 6363 3334 3963 9d0a43fe18cc349c\n-00160910: 3732 3466 3139 3866 3634 6122 2074 6974 724f198f64a\" tit\n-00160920: 6c65 3d22 436f 6e6e 6563 7420 746f 2061 le=\"Connect to a\n-00160930: 2073 6572 7665 7220 7573 696e 6720 4854 server using HT\n-00160940: 5450 2050 4f53 542e 223e 736f 6170 5f63 TP POST.\">soap_c\n-00160950: 6f6e 6e65 6374 3c2f 613e 3c2f 636f 6465 onnect or soap_conne\n-001609e0: 6374 5f63 6f6d 6d61 6e64 3c2f 613e 3c2f ct_command to open a \n-00160a00: 5443 5020 6f72 2055 4450 2063 6f6e 6e65 TCP or UDP conne\n-00160a10: 6374 696f 6e20 746f 2061 2073 6572 7665 ction to a serve\n-00160a20: 7220 7370 6563 6966 6965 6420 6174 2061 r specified at a\n-00160a30: 6e20 656e 6470 6f69 6e74 2e20 5061 7261 n endpoint. Para\n-00160a40: 6d65 7465 7273 203c 636f 6465 3e68 6f73 meters hos\n-00160a50: 743c 2f63 6f64 653e 2061 6e64 203c 636f t and port a\n-00160a70: 7265 206d 6963 726f 2d70 6172 7365 6420 re micro-parsed \n-00160a80: 6672 6f6d 203c 636f 6465 3e65 6e64 706f from endpo\n-00160a90: 696e 743c 2f63 6f64 653e 2062 6566 6f72 int befor\n-00160aa0: 6520 6265 696e 6720 7061 7373 6564 2074 e being passed t\n-00160ab0: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o soap::fopen. Retur\n-00160b70: 6e73 2061 2076 616c 6964 2073 6f63 6b65 ns a valid socke\n-00160b80: 7420 6f72 203c 636f 6465 3e23 534f 4150 t or #SOAP\n-00160b90: 5f49 4e56 414c 4944 5f53 4f43 4b45 543c _INVALID_SOCKET<\n-00160ba0: 2f63 6f64 653e 2077 6974 6820 6120 3c63 /code> with a soap::\n-00160c60: 6572 726f 723c 2f61 3e3c 2f63 6f64 653e error\n-00160c70: 2073 6574 2074 6f20 6120 3c63 6f64 653e set to a \n-00160c80: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_status\n-00160d40: 3c2f 636f 6465 3e20 2869 6e74 2920 6572 (int) er\n-00160d50: 726f 7220 636f 6465 2061 6e64 203c 636f ror code and soap::errnum<\n-00160df0: 2f61 3e3c 2f63 6f64 653e 2073 6574 2074 /a> set t\n-00160e00: 6f20 3c63 6f64 653e 6572 726e 6f3c 2f63 o errno of the conn\n-00160e20: 6563 7469 6f6e 2066 6169 6c75 7265 2e20 ection failure. \n-00160e30: 5468 6520 6275 696c 742d 696e 2066 756e The built-in fun\n-00160e40: 6374 696f 6e20 6173 7369 676e 6564 2074 ction assigned t\n-00160e50: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o soap::fopen is tcp_connect.

    .

    <\n-00160f30: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n-00160f40: 2069 643d 2261 7574 6f74 6f63 5f6d 6434 id=\"autotoc_md4\n-00160f50: 3622 3e3c 2f61 3e0a 6661 6363 6570 743c 6\">.faccept<\n-00160f60: 2f68 333e 0a3c 703e 3c63 6f64 653e 534f /h3>.

    SO\n-00160f70: 4150 5f53 4f43 4b45 5420 283c 6120 636c AP_SOCKET (soap::fac\n-00161030: 6365 7074 3c2f 613e 2928 7374 7275 6374 cept)(struct\n-00161040: 2073 6f61 7020 2a73 6f61 702c 2053 4f41 soap *soap, SOA\n-00161050: 505f 534f 434b 4554 2073 2c20 7374 7275 P_SOCKET s, stru\n-00161060: 6374 2073 6f63 6b61 6464 7220 2a61 2c20 ct sockaddr *a, \n-00161070: 696e 7420 2a6e 293c 2f63 6f64 653e 3c2f int *n).

    This callb\n-00161090: 6163 6b20 6973 2063 616c 6c65 6420 6279 ack is called by\n-001610a0: 203c 636f 6465 3e3c 6120 636c 6173 733d \n-00161120: 736f 6170 5f61 6363 6570 743c 2f61 3e3c soap_accept<\n-00161130: 2f63 6f64 653e 2028 6f72 2074 6865 2043 /code> (or the C\n-00161140: 2b2b 2073 6572 7669 6365 2063 6c61 7373 ++ service class\n-00161150: 203c 636f 6465 3e61 6363 6570 743c 2f63 accept method) to \n-00161170: 7761 6974 2066 6f72 2061 6e64 2061 6363 wait for and acc\n-00161180: 6570 7420 6120 736f 636b 6574 2063 6f6e ept a socket con\n-00161190: 6e65 6374 696f 6e20 7265 7175 6573 7465 nection requeste\n-001611a0: 6420 6279 2061 2063 6c69 656e 742e 2052 d by a client. R\n-001611b0: 6574 7572 6e73 2061 2076 616c 6964 2073 eturns a valid s\n-001611c0: 6f63 6b65 7420 6f72 203c 636f 6465 3e23 ocket or #\n-001611d0: 534f 4150 5f49 4e56 414c 4944 5f53 4f43 SOAP_INVALID_SOC\n-001611e0: 4b45 543c 2f63 6f64 653e 2077 6865 6e20 KET when \n-001611f0: 616e 2065 7272 6f72 206f 6363 7572 7265 an error occurre\n-00161200: 6420 616e 6420 7365 7473 203c 636f 6465 d and sets soap::err\n-001612c0: 6f72 3c2f 613e 3c2f 636f 6465 3e20 746f or to\n-001612d0: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s\n-00161390: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus\n-001613a0: 2076 616c 7565 2e20 5468 6520 6275 696c value. The buil\n-001613b0: 742d 696e 2066 756e 6374 696f 6e20 6173 t-in function as\n-001613c0: 7369 676e 6564 2074 6f20 3c63 6f64 653e signed to \n-001613d0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n-00161480: 3a3a 6661 6363 6570 743c 2f61 3e3c 2f63 ::faccept is tc\n-001614a0: 705f 6163 6365 7074 3c2f 636f 6465 3e2e p_accept.\n-001614b0: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .fclose

    .int (soa\n-00161590: 703a 3a66 636c 6f73 653c 2f61 3e29 2873 p::fclose)(s\n-001615a0: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-001615b0: 293c 2f63 6f64 653e 3c2f 703e 0a3c 703e )

    .

    \n-001615c0: 5468 6973 2063 616c 6c62 6163 6b20 6973 This callback is\n-001615d0: 2063 616c 6c65 6420 6279 2074 6865 2065 called by the e\n-001615e0: 6e67 696e 6520 6174 2074 6865 2063 6c69 ngine at the cli\n-001615f0: 656e 742d 7369 6465 2074 6f20 636c 6f73 ent-side to clos\n-00161600: 6520 7468 6520 6375 7272 656e 7420 736f e the current so\n-00161610: 636b 6574 2063 6f6e 6e65 6374 696f 6e20 cket connection \n-00161620: 6265 666f 7265 2061 206e 6577 2073 6f63 before a new soc\n-00161630: 6b65 7420 636f 6e6e 6563 7469 6f6e 2069 ket connection i\n-00161640: 7320 6573 7461 626c 6973 6865 642e 2054 s established. T\n-00161650: 6869 7320 6361 6c6c 6261 636b 206d 6179 his callback may\n-00161660: 2062 6520 6361 6c6c 6564 206d 756c 7469 be called multi\n-00161670: 706c 6520 7469 6d65 7320 2865 2e67 2e20 ple times (e.g. \n-00161680: 6279 2074 6865 2065 6e67 696e 6520 616e by the engine an\n-00161690: 6420 6279 2070 6c75 6769 6e73 2920 746f d by plugins) to\n-001616a0: 2063 6c6f 7365 2074 6865 2073 616d 6520 close the same \n-001616b0: 736f 636b 6574 203c 636f 6465 3e3c 6120 socket soap::socke\n-00161780: 743c 2f61 3e3c 2f63 6f64 653e 2e20 4368 t. Ch\n-00161790: 6563 6b73 2069 6e74 6572 6e61 6c6c 7920 ecks internally \n-001617a0: 6966 203c 636f 6465 3e3c 6120 636c 6173 if soap::socket == #SOAP_INVALID_\n-00161890: 534f 434b 4554 3c2f 636f 6465 3e20 6265 SOCKET be\n-001618a0: 666f 7265 2063 6c6f 7369 6e67 2c20 7768 fore closing, wh\n-001618b0: 6963 6820 6d65 616e 7320 7468 6174 2074 ich means that t\n-001618c0: 6865 2073 6f63 6b65 7420 7761 7320 616c he socket was al\n-001618d0: 7265 6164 7920 636c 6f73 6564 2e20 5265 ready closed. Re\n-001618e0: 7475 726e 7320 3c63 6f64 653e 2353 4f41 turns #SOA\n-001618f0: 505f 4f4b 3c2f 636f 6465 3e20 6f72 2061 P_OK or a\n-00161900: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_sta\n-001619c0: 7475 733c 2f61 3e3c 2f63 6f64 653e 2028 tus (\n-001619d0: 696e 7429 2065 7272 6f72 2063 6f64 652e int) error code.\n-001619e0: 2054 6865 2062 7569 6c74 2d69 6e20 6675 The built-in fu\n-001619f0: 6e63 7469 6f6e 2061 7373 6967 6e65 6420 nction assigned \n-00161a00: 746f 203c 636f 6465 3e3c 6120 636c 6173 to soap::\n-00161aa0: 6663 6c6f 7365 3c2f 613e 3c2f 636f 6465 fclose is tcp_d\n-00161ac0: 6973 636f 6e6e 6563 743c 2f63 6f64 653e isconnect\n-00161ad0: 2e3c 2f70 3e0a 3c68 333e 3c61 2063 6c61 .

    .

    .fresolve

    \n-00161b10: 0a3c 703e 3c63 6f64 653e 696e 7420 283c .

    int (<\n-00161b20: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00161b30: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00161b40: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n-00161b50: 6761 3061 6538 3030 6661 3630 6335 6536 ga0ae800fa60c5e6\n-00161b60: 3561 3836 3765 3564 3065 3363 6537 3232 5a867e5d0e3ce722\n-00161b70: 3365 2220 7469 746c 653d 2243 616c 6c62 3e\" title=\"Callb\n-00161b80: 6163 6b20 7468 6174 2072 6573 6f6c 7665 ack that resolve\n-00161b90: 7320 6120 686f 7374 206e 616d 6520 6279 s a host name by\n-00161ba0: 2061 6464 7265 7373 2074 7261 6e73 6c61 address transla\n-00161bb0: 7469 6f6e 2e22 3e73 6f61 703a 3a66 7265 tion.\">soap::fre\n-00161bc0: 736f 6c76 653c 2f61 3e29 2873 7472 7563 solve)(struc\n-00161bd0: 7420 736f 6170 202a 736f 6170 2c20 636f t soap *soap, co\n-00161be0: 6e73 7420 6368 6172 202a 6164 6472 2c20 nst char *addr, \n-00161bf0: 7374 7275 6374 2069 6e5f 6164 6472 202a struct in_addr *\n-00161c00: 696e 6164 6472 293c 2f63 6f64 653e 3c2f inaddr).

    This callb\n-00161c20: 6163 6b20 6973 2063 616c 6c65 6420 6279 ack is called by\n-00161c30: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_bin\n-00161cb0: 643c 2f61 3e3c 2f63 6f64 653e 2028 6f72 d (or\n-00161cc0: 2074 6865 2043 2b2b 2073 6572 7669 6365 the C++ service\n-00161cd0: 2063 6c61 7373 203c 636f 6465 3e62 696e class bin\n-00161ce0: 643c 2f63 6f64 653e 206d 6574 686f 6429 d method)\n-00161cf0: 2061 7420 7468 6520 7365 7276 6572 2d73 at the server-s\n-00161d00: 6964 6520 616e 6420 6279 203c 636f 6465 ide and by soap\n-00161d90: 5f63 6f6e 6e65 6374 3c2f 613e 3c2f 636f _connect or soap_con\n-00161e20: 6e65 6374 5f63 6f6d 6d61 6e64 3c2f 613e nect_command\n-00161e30: 3c2f 636f 6465 3e20 6174 2074 6865 2063 at the c\n-00161e40: 6c69 656e 742d 7369 6465 2077 6974 6820 lient-side with \n-00161e50: 6120 686f 7374 203c 636f 6465 3e6e 616d a host nam\n-00161e60: 653c 2f63 6f64 653e 2070 6172 616d 6574 e paramet\n-00161e70: 6572 2074 6f20 7265 736f 6c76 6520 746f er to resolve to\n-00161e80: 2061 6464 7265 7373 203c 636f 6465 3e69 address i\n-00161e90: 6e61 6464 723c 2f63 6f64 653e 2062 7920 naddr by \n-00161ea0: 6164 6472 6573 7320 7472 616e 736c 6174 address translat\n-00161eb0: 696f 6e2e 2057 6865 6e20 7375 6363 6573 ion. When succes\n-00161ec0: 7366 756c 2073 6574 7320 7061 7261 6d65 sful sets parame\n-00161ed0: 7465 7220 3c63 6f64 653e 696e 6164 6472 ter inaddr\n-00161ee0: 3c2f 636f 6465 3e20 616e 6420 7265 7475 and retu\n-00161ef0: 726e 7320 3c63 6f64 653e 2353 4f41 505f rns #SOAP_\n-00161f00: 4f4b 3c2f 636f 6465 3e20 6f72 2061 203c OK or a <\n-00161f10: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_statu\n-00161fd0: 733c 2f61 3e3c 2f63 6f64 653e 2028 696e s (in\n-00161fe0: 7429 2065 7272 6f72 2063 6f64 652e 2054 t) error code. T\n-00161ff0: 6865 2062 7569 6c74 2d69 6e20 6675 6e63 he built-in func\n-00162000: 7469 6f6e 2061 7373 6967 6e65 6420 746f tion assigned to\n-00162010: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n-001620b0: 6f61 703a 3a66 7265 736f 6c76 653c 2f61 oap::fresolve is tcp_gethost.

    .

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

    in\n-00162130: 7420 283c 6120 636c 6173 733d 2265 6c22 t (s\n-001621d0: 6f61 703a 3a66 636f 6e6e 6563 743c 2f61 oap::fconnect)(struct soap *\n-001621f0: 736f 6170 2c20 636f 6e73 7420 6368 6172 soap, const char\n-00162200: 202a 656e 6470 6f69 6e74 2c20 636f 6e73 *endpoint, cons\n-00162210: 7420 6368 6172 202a 686f 7374 2c20 696e t char *host, in\n-00162220: 7420 706f 7274 293c 2f63 6f64 653e 3c2f t port).

    This callb\n-00162240: 6163 6b20 6973 2063 616c 6c65 6420 6279 ack is called by\n-00162250: 2074 6865 2065 6e67 696e 6520 746f 206f the engine to o\n-00162260: 7074 696f 6e61 6c6c 7920 6f76 6572 7269 ptionally overri\n-00162270: 6465 2063 6c69 656e 742d 7369 6465 2063 de client-side c\n-00162280: 6f6e 6e65 6374 696e 672e 2054 6865 2070 onnecting. The p\n-00162290: 6172 616d 6574 6572 7320 3c63 6f64 653e arameters \n-001622a0: 686f 7374 3c2f 636f 6465 3e20 616e 6420 host and \n-001622b0: 3c63 6f64 653e 706f 7274 3c2f 636f 6465 port were micro-par\n-001622d0: 7365 6420 6672 6f6d 2074 6865 203c 636f sed from the endpoint prior to pass\n-00162300: 696e 6720 7468 656d 2074 6f20 7468 6973 ing them to this\n-00162310: 2063 616c 6c62 6163 6b2e 2052 6574 7572 callback. Retur\n-00162320: 6e73 203c 636f 6465 3e23 534f 4150 5f4f ns #SOAP_O\n-00162330: 4b3c 2f63 6f64 653e 206f 7220 6120 3c63 K or a soap_status\n-00162400: 3c2f 613e 3c2f 636f 6465 3e20 2869 6e74 (int\n-00162410: 2920 6572 726f 7220 636f 6465 2e20 4e6f ) error code. No\n-00162420: 2062 7569 6c74 2d69 6e20 6675 6e63 7469 built-in functi\n-00162430: 6f6e 2069 7320 6173 7369 676e 6564 2074 on is assigned t\n-00162440: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o soap::fconne\n-001624f0: 6374 3c2f 613e 3c2f 636f 6465 3e2e 3c2f ct..

    .\n-00162530: 6664 6973 636f 6e6e 6563 743c 2f68 333e fdisconnect

    \n-00162540: 0a3c 703e 3c63 6f64 653e 696e 7420 283c .

    int (<\n-00162550: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00162560: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00162570: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n-00162580: 6761 3264 6531 3934 3037 3566 3634 3564 ga2de194075f645d\n-00162590: 3737 6331 3566 3738 6335 3263 6132 3438 77c15f78c52ca248\n-001625a0: 3538 2220 7469 746c 653d 2243 616c 6c62 58\" title=\"Callb\n-001625b0: 6163 6b20 7468 6174 2065 7865 6375 7465 ack that execute\n-001625c0: 7320 6469 7363 6f6e 6e65 6374 206c 6f67 s disconnect log\n-001625d0: 6963 2062 6566 6f72 6520 636c 6f73 696e ic before closin\n-001625e0: 672e 223e 736f 6170 3a3a 6664 6973 636f g.\">soap::fdisco\n-001625f0: 6e6e 6563 743c 2f61 3e29 2873 7472 7563 nnect)(struc\n-00162600: 7420 736f 6170 202a 736f 6170 293c 2f63 t soap *soap)

    .

    This\n-00162620: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal\n-00162630: 6c65 6420 6279 2074 6865 2065 6e67 696e led by the engin\n-00162640: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap_\n-001626c0: 636c 6f73 6573 6f63 6b3c 2f61 3e3c 2f63 closesock before the \n-001626e0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fcl\n-00162780: 6f73 653c 2f61 3e3c 2f63 6f64 653e 2063 ose c\n-00162790: 616c 6c62 6163 6b20 6973 2063 616c 6c65 allback is calle\n-001627a0: 6420 746f 2073 6875 7464 6f77 6e2f 6469 d to shutdown/di\n-001627b0: 7363 6f6e 6e65 6374 2e20 5265 7475 726e sconnect. Return\n-001627c0: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK\n-001627d0: 3c2f 636f 6465 3e20 6f72 2061 203c 636f or a soap_status<\n-001628a0: 2f61 3e3c 2f63 6f64 653e 2028 696e 7429 /a> (int)\n-001628b0: 2065 7272 6f72 2063 6f64 652e 204e 6f20 error code. No \n-001628c0: 6275 696c 742d 696e 2066 756e 6374 696f built-in functio\n-001628d0: 6e20 6973 2061 7373 6967 6e65 6420 746f n is assigned to\n-001628e0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap\n-00162980: 3a3a 6664 6973 636f 6e6e 6563 743c 2f61 ::fdisconnect.

    ..fclos\n-001629d0: 6573 6f63 6b65 743c 2f68 333e 0a3c 703e esocket

    .

    \n-001629e0: 3c63 6f64 653e 696e 7420 283c 6120 636c int (soa\n-00162a70: 703a 3a66 636c 6f73 6573 6f63 6b65 743c p::fclosesocket<\n-00162a80: 2f61 3e29 2873 7472 7563 7420 736f 6170 /a>)(struct soap\n-00162a90: 202a 736f 6170 2c20 534f 4150 5f53 4f43 *soap, SOAP_SOC\n-00162aa0: 4b45 5420 736f 636b 293c 2f63 6f64 653e KET sock)\n-00162ab0: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal\n-00162ac0: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n-00162ad0: 746f 2063 6c6f 7365 2061 2073 6f63 6b65 to close a socke\n-00162ae0: 7420 6279 2074 6865 2065 6e67 696e 652e t by the engine.\n-00162af0: 2052 6574 7572 6e73 203c 636f 6465 3e23 Returns #\n-00162b00: 534f 4150 5f4f 4b3c 2f63 6f64 653e 206f SOAP_OK o\n-00162b10: 7220 6120 3c63 6f64 653e 3c61 2063 6c61 r a soap_\n-00162bd0: 7374 6174 7573 3c2f 613e 3c2f 636f 6465 status (int) error co\n-00162bf0: 6465 2e20 5468 6520 6275 696c 742d 696e de. The built-in\n-00162c00: 2066 756e 6374 696f 6e20 6173 7369 676e function assign\n-00162c10: 6564 2074 6f20 3c63 6f64 653e 3c61 2063 ed to so\n-00162ca0: 6170 3a3a 6663 6c6f 7365 736f 636b 6574 ap::fclosesocket\n-00162cb0: 3c2f 613e 3c2f 636f 6465 3e20 6973 203c is <\n-00162cc0: 636f 6465 3e74 6370 5f63 6c6f 7365 736f code>tcp_closeso\n-00162cd0: 636b 6574 3c2f 636f 6465 3e2e 3c2f 703e cket.

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

    .fs\n-00162d10: 6875 7464 6f77 6e73 6f63 6b65 743c 2f68 hutdownsocket.

    int \n-00162d30: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap::fsh\n-00162dc0: 7574 646f 776e 736f 636b 6574 3c2f 613e utdownsocket\n-00162dd0: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s\n-00162de0: 6f61 702c 2053 4f41 505f 534f 434b 4554 oap, SOAP_SOCKET\n-00162df0: 2073 6f63 6b2c 2069 6e74 2068 6f77 293c sock, int how)<\n-00162e00: 2f63 6f64 653e 3c2f 703e 0a3c 703e 5468 /code>

    .

    Th\n-00162e10: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c\n-00162e20: 616c 6c65 6420 746f 2073 6875 7420 646f alled to shut do\n-00162e30: 776e 2061 2073 6f63 6b65 7420 6279 2074 wn a socket by t\n-00162e40: 6865 2065 6e67 696e 652e 2052 6574 7572 he engine. Retur\n-00162e50: 6e73 203c 636f 6465 3e23 534f 4150 5f4f ns #SOAP_O\n-00162e60: 4b3c 2f63 6f64 653e 206f 7220 6120 3c63 K or a soap_status\n-00162f30: 3c2f 613e 3c2f 636f 6465 3e20 2869 6e74 (int\n-00162f40: 2920 6572 726f 7220 636f 6465 2e20 5468 ) error code. Th\n-00162f50: 6520 6275 696c 742d 696e 2066 756e 6374 e built-in funct\n-00162f60: 696f 6e20 6173 7369 676e 6564 2074 6f20 ion assigned to \n-00162f70: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap\n-00163000: 3a3a 6673 6875 7464 6f77 6e73 6f63 6b65 ::fshutdownsocke\n-00163010: 743c 2f61 3e3c 2f63 6f64 653e 2069 7320 t is \n-00163020: 3c63 6f64 653e 7463 705f 7368 7574 646f tcp_shutdo\n-00163030: 776e 736f 636b 6574 3c2f 636f 6465 3e2e wnsocket.\n-00163040: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .fpoll

    .

    \n-00163080: 3c63 6f64 653e 696e 7420 283c 6120 636c int (soap::fpo\n-00163150: 6c6c 3c2f 613e 2928 7374 7275 6374 2073 ll)(struct s\n-00163160: 6f61 7020 2a73 6f61 7029 3c2f 636f 6465 oap *soap)

    .

    This ca\n-00163180: 6c6c 6261 636b 2069 7320 6361 6c6c 6564 llback is called\n-00163190: 2062 7920 7468 6520 656e 6769 6e65 2074 by the engine t\n-001631a0: 6f20 7761 6974 2066 6f72 2061 6374 6976 o wait for activ\n-001631b0: 6974 7920 6f6e 2074 6865 203c 636f 6465 ity on the soap::s\n-00163280: 6f63 6b65 743c 2f61 3e3c 2f63 6f64 653e ocket\n-00163290: 206f 7220 3c63 6f64 653e 3c61 2063 6c61 or soap::master socket\n-00163370: 2075 7369 6e67 203c 636f 6465 3e70 6f6c using pol\n-00163380: 6c3c 2f63 6f64 653e 206f 7220 3c63 6f64 l or select.\n-001633a0: 2054 696d 6573 206f 7574 2077 6865 6e20 Times out when \n-001633b0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n-00163460: 6170 3a3a 7365 6e64 5f74 696d 656f 7574 ap::send_timeout\n-00163470: 3c2f 613e 3c2f 636f 6465 3e20 6f72 203c or <\n-00163480: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>\n-00163530: 736f 6170 3a3a 7265 6376 5f74 696d 656f soap::recv_timeo\n-00163540: 7574 3c2f 613e 3c2f 636f 6465 3e20 6172 ut ar\n-00163550: 6520 6e6f 6e7a 6572 6f2e 2052 6574 7572 e nonzero. Retur\n-00163560: 6e73 203c 636f 6465 3e23 534f 4150 5f4f ns #SOAP_O\n-00163570: 4b3c 2f63 6f64 653e 206f 7220 6120 3c63 K or a soap_status\n-00163640: 3c2f 613e 3c2f 636f 6465 3e20 2869 6e74 (int\n-00163650: 2920 6572 726f 7220 636f 6465 2e20 5468 ) error code. Th\n-00163660: 6520 6275 696c 742d 696e 2066 756e 6374 e built-in funct\n-00163670: 696f 6e20 6173 7369 676e 6564 2074 6f20 ion assigned to \n-00163680: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fpoll is soap_poll.

    .

    \n-001637a0: 3c2f 613e 0a66 7265 6376 3c2f 6833 3e0a .frecv

    .\n-001637b0: 3c70 3e3c 636f 6465 3e73 697a 655f 7420

    size_t \n-001637c0: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap::\n-00163860: 6672 6563 763c 2f61 3e29 2873 7472 7563 frecv)(struc\n-00163870: 7420 736f 6170 202a 736f 6170 2c20 6368 t soap *soap, ch\n-00163880: 6172 202a 6275 662c 2073 697a 655f 7420 ar *buf, size_t \n-00163890: 6c65 6e29 3c2f 636f 6465 3e3c 2f70 3e0a len)

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

    This callback\n-001638b0: 2069 7320 6361 6c6c 6564 2062 7920 7468 is called by th\n-001638c0: 6520 656e 6769 6e65 2074 6f20 7265 6365 e engine to rece\n-001638d0: 6976 6520 286f 7220 7265 6164 2920 6461 ive (or read) da\n-001638e0: 7461 2069 6e74 6f20 6120 7370 6563 6966 ta into a specif\n-001638f0: 6965 6420 6275 6666 6572 203c 636f 6465 ied buffer buf and \n-00163910: 3c63 6f64 653e 6c65 6e3c 2f63 6f64 653e len\n-00163920: 2e20 5468 6520 736f 7572 6365 2066 6f72 . The source for\n-00163930: 2074 6865 2064 6174 6120 746f 2072 6561 the data to rea\n-00163940: 6420 6279 2074 6869 7320 6361 6c6c 6261 d by this callba\n-00163950: 636b 2069 7320 3c63 6f64 653e 3c61 2063 ck is soap::is\n-00163a20: 3c2f 636f 6465 3e20 7768 656e 206e 6f6e when non\n-00163a30: 2d4e 554c 4c2c 203c 636f 6465 3e3c 6120 -NULL, soap::socke\n-00163b00: 743c 2f61 3e3c 2f63 6f64 653e 2077 6865 t whe\n-00163b10: 6e20 7661 6c69 642c 206f 7220 3c63 6f64 n valid, or soap::\n-00163be0: 7265 6376 6664 3c2f 613e 3c2f 636f 6465 recvfd. Returns #SOAP_OK\n-00163c10: 206f 7220 6120 3c63 6f64 653e 3c61 2063 or a soa\n-00163cd0: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status (int) error \n-00163cf0: 636f 6465 2e20 5468 6520 6275 696c 742d code. The built-\n-00163d00: 696e 2066 756e 6374 696f 6e20 6173 7369 in function assi\n-00163d10: 676e 6564 2074 6f20 3c63 6f64 653e 3c61 gned to soap::fre\n-00163dc0: 6376 3c2f 613e 3c2f 636f 6465 3e20 6973 cv is\n-00163dd0: 203c 636f 6465 3e66 7265 6376 3c2f 636f frecv.

    .

    .fsend

    \n-00163e20: 0a3c 703e 3c63 6f64 653e 696e 7420 283c .

    int (<\n-00163e30: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00163e40: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-00163e50: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n-00163e60: 6761 6664 3532 6238 3036 3535 6534 6631 gafd52b80655e4f1\n-00163e70: 3032 3165 6464 3663 3535 6238 6466 6564 021edd6c55b8dfed\n-00163e80: 6666 2220 7469 746c 653d 2243 616c 6c62 ff\" title=\"Callb\n-00163e90: 6163 6b20 7468 6174 2073 656e 6473 2074 ack that sends t\n-00163ea0: 6865 2067 6976 656e 2062 7974 6573 206f he given bytes o\n-00163eb0: 6620 6461 7461 2e22 3e73 6f61 703a 3a66 f data.\">soap::f\n-00163ec0: 7365 6e64 3c2f 613e 2928 7374 7275 6374 send)(struct\n-00163ed0: 2073 6f61 7020 2a73 6f61 702c 2063 6f6e soap *soap, con\n-00163ee0: 7374 2063 6861 7220 2a62 7566 2c20 7369 st char *buf, si\n-00163ef0: 7a65 5f74 206c 656e 293c 2f63 6f64 653e ze_t len)\n-00163f00: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal\n-00163f10: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n-00163f20: 6279 2074 6865 2065 6e67 696e 6520 746f by the engine to\n-00163f30: 2073 656e 6420 286f 7220 7772 6974 6529 send (or write)\n-00163f40: 2064 6174 6120 7370 6563 6966 6965 6420 data specified \n-00163f50: 6279 203c 636f 6465 3e64 6174 613c 2f63 by data bytes of le\n-00163f70: 6e67 7468 203c 636f 6465 3e6c 656e 3c2f ngth len. The sink \n-00163f90: 666f 7220 7468 6520 6461 7461 2074 6f20 for the data to \n-00163fa0: 6265 2073 656e 7420 746f 2069 7320 7479 be sent to is ty\n-00163fb0: 7069 6361 6c6c 7920 3c63 6f64 653e 3c61 pically soap::sock\n-00164080: 6574 3c2f 613e 3c2f 636f 6465 3e2c 203c et, <\n-00164090: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n-00164150: 703a 3a73 656e 6466 643c 2f61 3e3c 2f63 p::sendfd or soap::os. Retur\n-00164240: 6e73 203c 636f 6465 3e23 534f 4150 5f4f ns #SOAP_O\n-00164250: 4b3c 2f63 6f64 653e 206f 7220 6120 3c63 K or a soap_status\n-00164320: 3c2f 613e 3c2f 636f 6465 3e20 2869 6e74 (int\n-00164330: 2920 6572 726f 7220 636f 6465 2e20 5468 ) error code. Th\n-00164340: 6520 6275 696c 742d 696e 2066 756e 6374 e built-in funct\n-00164350: 696f 6e20 6173 7369 676e 6564 2074 6f20 ion assigned to \n-00164360: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 \n-001643f0: 736f 6170 3a3a 6673 656e 643c 2f61 3e3c soap::fsend<\n-00164400: 2f63 6f64 653e 2069 7320 3c63 6f64 653e /code> is \n-00164410: 6673 656e 643c 2f63 6f64 653e 2e3c 2f70 fsend..

    .f\n-00164450: 7365 7276 6572 6c6f 6f70 3c2f 6833 3e0a serverloop

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

    int (soap::fserve\n-00164540: 6c6f 6f70 3c2f 613e 2928 7374 7275 6374 loop)(struct\n-00164550: 2073 6f61 7020 2a73 6f61 7029 3c2f 636f soap *soap)

    .

    This \n-00164570: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call\n-00164580: 6564 2061 6674 6572 2065 6163 6820 7375 ed after each su\n-00164590: 6363 6573 7366 756c 2063 6f6d 706c 6574 ccessful complet\n-001645a0: 696f 6e20 6f66 2061 2073 6572 7665 7220 ion of a server \n-001645b0: 6f70 6572 6174 696f 6e20 696e 2074 6865 operation in the\n-001645c0: 2073 6572 7665 7220 6c6f 6f70 2e20 4578 server loop. Ex\n-001645d0: 6563 7574 6573 2069 6d6d 6564 6961 7465 ecutes immediate\n-001645e0: 6c79 2061 6674 6572 2073 656e 6469 6e67 ly after sending\n-001645f0: 2074 6865 2072 6573 706f 6e73 6520 746f the response to\n-00164600: 2061 2063 6c69 656e 7420 616e 6420 6265 a client and be\n-00164610: 666f 7265 2074 6865 206e 6578 7420 6b65 fore the next ke\n-00164620: 6570 2d61 6c69 7665 2073 6572 7665 7220 ep-alive server \n-00164630: 6c6f 6f70 2069 7465 7261 7469 6f6e 2077 loop iteration w\n-00164640: 6865 6e20 656e 6162 6c65 6420 7769 7468 hen enabled with\n-00164650: 203c 636f 6465 3e23 534f 4150 5f49 4f5f #SOAP_IO_\n-00164660: 4b45 4550 414c 4956 453c 2f63 6f64 653e KEEPALIVE\n-00164670: 2e20 5468 6973 2063 616c 6c62 6163 6b20 . This callback \n-00164680: 6361 6e20 6265 2075 7365 6420 746f 2072 can be used to r\n-00164690: 6563 6c61 696d 2072 6573 6f75 7263 6573 eclaim resources\n-001646a0: 2069 6e20 7468 6520 6b65 6570 2d61 6c69 in the keep-ali\n-001646b0: 7665 2073 6572 7665 7220 6c6f 6f70 2c20 ve server loop, \n-001646c0: 666f 7220 6578 616d 706c 6520 6d61 6e61 for example mana\n-001646d0: 6765 6420 6d65 6d6f 7279 2063 616e 2062 ged memory can b\n-001646e0: 6520 7265 636c 6169 6d65 6420 6279 2063 e reclaimed by c\n-001646f0: 616c 6c69 6e67 203c 636f 6465 3e3c 6120 alling soap\n-001647b0: 5f64 6573 7472 6f79 3c2f 613e 3c2f 636f _destroy and soap_end in that or\n-001648b0: 6465 7220 616e 6420 616c 6c20 6465 7365 der and all dese\n-001648c0: 7269 616c 697a 6564 2061 6e64 206f 7468 rialized and oth\n-001648d0: 6572 2064 796e 616d 6963 616c 6c79 2d61 er dynamically-a\n-001648e0: 6c6c 6f63 6174 6564 2064 6174 6120 6d61 llocated data ma\n-001648f0: 6e61 6765 6420 6279 2074 6865 2063 6f6e naged by the con\n-00164900: 7465 7874 2077 696c 6c20 6265 2064 6561 text will be dea\n-00164910: 6c6c 6f63 6174 6564 2e20 5265 7475 726e llocated. Return\n-00164920: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK\n-00164930: 3c2f 636f 6465 3e20 6f72 2061 203c 636f or a soap_status<\n-00164a00: 2f61 3e3c 2f63 6f64 653e 2028 696e 7429 /a> (int)\n-00164a10: 2065 7272 6f72 2063 6f64 652e 204e 6f20 error code. No \n-00164a20: 6275 696c 742d 696e 2066 756e 6374 696f built-in functio\n-00164a30: 6e20 6973 2061 7373 6967 6e65 6420 746f n is assigned to\n-00164a40: 203c 636f 6465 3e3c 6120 636c 6173 733d soa\n-00164b10: 703a 3a66 7365 7276 656c 6f6f 703c 2f61 p::fserveloop.

    ..fmall\n-00164b60: 6f63 3c2f 6833 3e0a 3c70 3e3c 636f 6465 oc

    .

    void (soap::fmalloc\n-00164c20: 3c2f 613e 2928 7374 7275 6374 2073 6f61 )(struct soa\n-00164c30: 7020 2a73 6f61 702c 2073 697a 655f 7420 p *soap, size_t \n-00164c40: 7369 7a65 293c 2f63 6f64 653e 3c2f 703e size)

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

    This callbac\n-00164c60: 6b20 6361 6e20 6265 2075 7365 6420 746f k can be used to\n-00164c70: 206f 7665 7272 6964 6520 6d65 6d6f 7279 override memory\n-00164c80: 2061 6c6c 6f63 6174 696f 6e20 616e 6420 allocation and \n-00164c90: 6d61 6e61 6765 6d65 6e74 2064 6f6e 6520 management done \n-00164ca0: 6279 203c 636f 6465 3e3c 6120 636c 6173 by soap_\n-00164d50: 6d61 6c6c 6f63 3c2f 613e 3c2f 636f 6465 malloc in C. Memory a\n-00164d70: 6c6c 6f63 6174 6564 2076 6961 2074 6869 llocated via thi\n-00164d80: 7320 6361 6c6c 6261 636b 2077 696c 6c20 s callback will \n-00164d90: 6e6f 7420 6265 206d 616e 6167 6564 2061 not be managed a\n-00164da0: 6e64 206e 6f74 2062 6520 6175 746f 6d61 nd not be automa\n-00164db0: 7469 6361 6c6c 7920 7265 6c65 6173 6564 tically released\n-00164dc0: 2062 7920 7468 6520 656e 6769 6e65 2e20 by the engine. \n-00164dd0: 496e 7374 6561 642c 2074 6865 2061 7070 Instead, the app\n-00164de0: 6c69 6361 7469 6f6e 2075 7369 6e67 2074 lication using t\n-00164df0: 6869 7320 6361 6c6c 6261 636b 2073 686f his callback sho\n-00164e00: 756c 6420 7265 6c65 6173 6520 616c 6c6f uld release allo\n-00164e10: 6361 7465 6420 6d65 6d6f 7279 2e20 416c cated memory. Al\n-00164e20: 6c20 616c 6c6f 6361 7469 6f6e 7320 646f l allocations do\n-00164e30: 6e65 2062 7920 3c63 6f64 653e 3c61 2063 ne by so\n-00164ee0: 6170 5f6d 616c 6c6f 633c 2f61 3e3c 2f63 ap_malloc are replace\n-00164f00: 6420 7769 7468 2061 2063 616c 6c20 746f d with a call to\n-00164f10: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::fmalloc\n-00164fc0: 3c2f 613e 3c2f 636f 6465 3e2e 2048 6f77 . How\n-00164fd0: 6576 6572 2c20 6e6f 206f 7468 6572 2061 ever, no other a\n-00164fe0: 6c6c 6f63 6174 696f 6e73 2c20 7375 6368 llocations, such\n-00164ff0: 2061 7320 3c63 6f64 653e 3c61 2063 6c61 as soap_new and s\n-001650a0: 6f61 705f 6e65 775f 543c 2f63 6f64 653e oap_new_T\n-001650b0: 2066 6f72 2043 2b2b 2063 6c61 7373 6573 for C++ classes\n-001650c0: 203c 636f 6465 3e54 3c2f 636f 6465 3e20 T \n-001650d0: 6172 6520 6166 6665 6374 6564 2c20 6265 are affected, be\n-001650e0: 6361 7573 6520 6f62 6a65 6374 7320 6172 cause objects ar\n-001650f0: 6520 616c 6c6f 6361 7465 6420 6469 6666 e allocated diff\n-00165100: 6572 656e 746c 792e 2054 6869 7320 6361 erently. This ca\n-00165110: 6c6c 6261 636b 2069 7320 7468 6572 6566 llback is theref\n-00165120: 6f72 6520 6e6f 7420 7573 6566 756c 2066 ore not useful f\n-00165130: 6f72 2043 2b2b 2061 7070 6c69 6361 7469 or C++ applicati\n-00165140: 6f6e 732e 2052 6574 7572 6e73 2061 2070 ons. Returns a p\n-00165150: 6f69 6e74 6572 2074 6f20 6479 6e61 6d69 ointer to dynami\n-00165160: 6361 6c6c 7920 616c 6c6f 6361 7465 6420 cally allocated \n-00165170: 6d65 6d6f 7279 206f 7220 4e55 4c4c 206f memory or NULL o\n-00165180: 6e20 6661 696c 7572 6520 746f 2061 6c6c n failure to all\n-00165190: 6f63 6174 652e 204e 6f20 6275 696c 742d ocate. No built-\n-001651a0: 696e 2066 756e 6374 696f 6e20 6973 2061 in function is a\n-001651b0: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to soa\n-00165260: 703a 3a66 6d61 6c6c 6f63 3c2f 613e 3c2f p::fmalloc.

    .
    Warni\n-001652a0: 6e67 3c2f 6474 3e3c 6464 3e44 6570 7265 ng
    Depre\n-001652b0: 6361 7465 6420 7369 6e63 6520 322e 382e cated since 2.8.\n-001652c0: 3732 2e20 4465 6669 6e65 203c 636f 6465 72. Define #SOAP_MALLOC and #\n-001652f0: 534f 4150 5f46 5245 453c 2f63 6f64 653e SOAP_FREE\n-00165300: 2069 6e73 7465 6164 2e3c 2f64 643e 3c2f instead.
    .

    \n-00165340: 0a75 7365 7220 7661 7269 6162 6c65 3c2f .user variable.

    A v\n-00165360: 6f69 642a 203c 6120 636c 6173 733d 2265 oid* soa\n-00165420: 703a 3a75 7365 723c 2f61 3e3c 2f63 6f64 p::user variable is a\n-00165440: 7661 696c 6162 6c65 2074 6f20 7061 7373 vailable to pass\n-00165450: 2075 7365 722d 6465 6669 6e65 6420 6461 user-defined da\n-00165460: 7461 2074 6f20 7468 6520 6361 6c6c 6261 ta to the callba\n-00165470: 636b 732e 3c2f 703e 0a3c 6833 3e3c 6120 cks.

    .

    .Examples.

    The follo\n-001654c0: 7769 6e67 2065 7861 6d70 6c65 2075 7365 wing example use\n-001654d0: 7320 492f 4f20 6361 6c6c 6261 636b 7320 s I/O callbacks \n-001654e0: 666f 7220 6375 7374 6f6d 697a 6564 2073 for customized s\n-001654f0: 6572 6961 6c69 7a61 7469 6f6e 206f 6620 erialization of \n-00165500: 6461 7461 2069 6e74 6f20 6120 6669 7865 data into a fixe\n-00165510: 642d 7369 7a65 2062 7566 6665 7220 616e d-size buffer an\n-00165520: 6420 6465 7365 7269 616c 697a 6174 696f d deserializatio\n-00165530: 6e20 6261 636b 2069 6e74 6f20 6120 6461 n back into a da\n-00165540: 7461 2073 7472 7563 7475 7265 3a3c 2f70 ta structure:.

    char \n-001655a0: 6275 665b 3130 3030 305d 3b20 3c73 7061 buf[10000]; // XML buffer \n-001655d0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001655f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int len1 = 0; \n-00165620: 2020 3c73 7061 6e20 636c 6173 733d 2263 // #char\n-00165640: 7320 7772 6974 7465 6e20 3c2f 7370 616e s written
    .
    int l\n-00165690: 656e 3220 3d20 303b 2020 2020 3c73 7061 en2 = 0; // #chars read\n-001656c0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-001656d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001656e0: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >

    .
    // mysend: put \n-00165720: 584d 4c20 696e 2062 7566 5b5d 203c 2f73 XML in buf[]
    .
    int mysend(s\n-00165790: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n-00165800: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00165810: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n-00165840: 3c2f 7370 616e 3e20 2a73 2c20 3c73 7061 *s, size_t n)
    .\n-00165890: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    if \n-001658d0: 286c 656e 3120 2b20 6e20 2667 743b 203c (len1 + n > <\n-001658e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001658f0: 6f72 6422 3e73 697a 656f 663c 2f73 7061 ord\">sizeof(buf))
    .\n-00165910: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00165940: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_EOF; \n-001659b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    strcp\n-001659d0: 7928 6275 6620 2b20 6c65 6e31 2c20 7329 y(buf + len1, s)\n-001659e0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    len\n-00165a00: 3120 2b3d 206e 3b20 3c2f 6469 763e 0a3c 1 += n;
    .<\n-00165a10: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00165a20: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret\n-00165a40: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn S\n-00165aa0: 4f41 505f 4f4b 3c2f 613e 3b20 3c2f 6469 OAP_OK; .
    }
    .\n-00165ae0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-00165b10: 2f2f 206d 7972 6563 763a 2067 6574 2058 // myrecv: get X\n-00165b20: 4d4c 2066 726f 6d20 6275 665b 5d20 3c2f ML from buf[]
    .size_t myrecv(struct\n-00165ba0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-00165bd0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, cha\n-00165c20: 723c 2f73 7061 6e3e 202a 732c 203c 7370 r *s, size_t n)
    .<\n-00165c60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00165c70: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    if\n-00165cb0: 2028 6c65 6e32 202b 206e 2026 6774 3b20 (len2 + n > \n-00165cc0: 6c65 6e31 2920 3c2f 6469 763e 0a3c 6469 len1)
    . \n-00165ce0: 2020 206e 203d 206c 656e 3120 2d20 6c65 n = len1 - le\n-00165cf0: 6e32 3b20 3c2f 6469 763e 0a3c 6469 7620 n2;
    .
    s\n-00165d10: 7472 6e63 7079 2873 2c20 6275 6620 2b20 trncpy(s, buf + \n-00165d20: 6c65 6e32 2c20 6e29 3b20 3c2f 6469 763e len2, n);
    \n-00165d30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    len2 += n; \n-00165d50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return n;
    .}\n-00165db0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..
    le\n-00166050: 6e31 203d 206c 656e 3220 3d20 303b 2020 n1 = len2 = 0; \n-00166060: 2020 203c 7370 616e 2063 6c61 7373 3d22 // rese\n-00166080: 7420 6275 6666 6572 2070 6f69 6e74 6572 t buffer pointer\n-00166090: 7320 3c2f 7370 616e 3e3c 2f64 6976 3e0a s
    .\n-001660a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    p.name = "J\n-001660e0: 6f68 6e20 446f 6526 7175 6f74 3b3c 2f73 ohn Doe";
    . \n-00166110: 2070 2e61 6765 203d 2032 353b 203c 2f64 p.age = 25; .
    s\n-00166160: 6f61 703c 2f61 3e2e 3c61 2063 6c61 7373 oap.f\n-001661c0: 7365 6e64 3c2f 613e 203d 206d 7973 656e send = mysen\n-001661d0: 643b 203c 7370 616e 2063 6c61 7373 3d22 d; // assi\n-001661f0: 676e 2063 616c 6c62 6163 6b20 3c2f 7370 gn callback
    .
    soap.frecv =\n-001662b0: 206d 7972 6563 763b 203c 7370 616e 2063 myrecv; /\n-001662d0: 2f20 6173 7369 676e 2063 616c 6c62 6163 / assign callbac\n-001662e0: 6b20 3c2f 7370 616e 3e3c 2f64 6976 3e0a k
    .\n-001662f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if\n-00166320: 3c2f 7370 616e 3e20 2873 6f61 705f 7772 (soap_wr\n-00166330: 6974 655f 6e73 5f5f 7065 7273 6f6e 2826 ite_ns__person(&\n-00166340: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n-00166370: 2f61 3e2c 2026 616d 703b 7029 293c 2f64 /a>, &p)).
    {
    .\n-001663a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_pr\n-00166410: 696e 745f 6661 756c 743c 2f61 3e28 2661 int_fault(&a\n-00166420: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, stdout); .
    exit(E\n-00166480: 5849 545f 4641 494c 5552 4529 3b20 3c2f XIT_FAILURE); .
    } .
    \n-001664e0: 6966 3c2f 7370 616e 3e20 2873 6f61 705f if (soap_\n-001664f0: 7265 6164 5f6e 735f 5f50 6572 736f 6e28 read_ns__Person(\n-00166500: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n-00166530: 3c2f 613e 2c20 2661 6d70 3b70 2929 3c2f , &p)).
    {
    \n-00166560: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_p\n-001665d0: 7269 6e74 5f66 6175 6c74 3c2f 613e 2826 rint_fault(&\n-001665e0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n-00166610: 2f61 3e2c 2073 7464 6f75 7429 3b20 3c2f /a>, stdout); .
    exit(\n-00166640: 4558 4954 5f46 4149 4c55 5245 293b 203c EXIT_FAILURE); <\n-00166650: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } .
    soap\n-001666e0: 5f64 6573 7472 6f79 3c2f 613e 2826 616d _destroy(&am\n-001666f0: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
    ..<\n-001667e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001667f0: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_don\n-00166850: 653c 2f61 3e28 2661 6d70 3b3c 6120 636c e(&soap);.
    }
    .Definition:<\n-00166a40: 2f62 3e20 7374 6473 6f61 7032 2e68 3a34 /b> stdsoap2.h:4\n-00166a50: 3630 373c 2f64 6976 3e3c 2f64 6976 3e0a 607
    .\n-00166a60: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    in\n-00166b40: 7428 2a20 6673 656e 6429 2873 7472 7563 t(* fsend)(struc\n-00166b50: 7420 736f 6170 202a 736f 6170 2c20 636f t soap *soap, co\n-00166b60: 6e73 7420 6368 6172 202a 6461 7461 2c20 nst char *data, \n-00166b70: 7369 7a65 5f74 206c 656e 293c 2f64 6976 size_t len)
    Callback tha\n-00166ba0: 7420 7365 6e64 7320 7468 6520 6769 7665 t sends the give\n-00166bb0: 6e20 6279 7465 7320 6f66 2064 6174 612e n bytes of data.\n-00166bc0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n-00166be0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-00166bf0: 6f61 7032 2e68 3a34 3632 303c 2f64 6976 oap2.h:4620
    .
    <\n-00166c20: 703e 4120 6669 7865 642d 7369 7a65 2062 p>A fixed-size b\n-00166c30: 7566 6665 7220 746f 2073 746f 7265 2074 uffer to store t\n-00166c40: 6865 206f 7574 626f 756e 6420 6d65 7373 he outbound mess\n-00166c50: 6167 6520 7365 6e74 2069 7320 6e6f 7420 age sent is not \n-00166c60: 666c 6578 6962 6c65 2074 6f20 6861 6e64 flexible to hand\n-00166c70: 6c65 206c 6172 6765 2063 6f6e 7465 6e74 le large content\n-00166c80: 2e20 546f 2073 746f 7265 2074 6865 206d . To store the m\n-00166c90: 6573 7361 6765 2069 6e20 616e 2065 7870 essage in an exp\n-00166ca0: 616e 6469 6e67 2062 7566 6665 723a 3c2f anding buffer:.
    struct b\n-00166d00: 7566 6665 7220 3c2f 6469 763e 0a3c 6469 uffer
    .{\n-00166d20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    size_t len;
    .<\n-00166d70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00166d80: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > siz\n-00166da0: 655f 743c 2f73 7061 6e3e 206d 6178 3b20 e_t max; \n-00166db0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    char\n-00166df0: 202a 6275 663b 203c 2f64 6976 3e0a 3c64 *buf;
    .\n-00166e10: 7d3b 203c 2f64 6976 3e0a 3c64 6976 2063 };
    .
    .
    \n-00166e60: 696e 743c 2f73 7061 6e3e 206d 6169 6e28 int main(\n-00166e70: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    str\n-00166ec0: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap soap; .
    str\n-00166f60: 7563 7420 3c2f 7370 616e 3e6e 735f 5f70 uct ns__p\n-00166f70: 6572 736f 6e20 703b 203c 2f64 6976 3e0a erson p;
    .\n-00166f80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct\n-00166fb0: 203c 2f73 7061 6e3e 6275 6666 6572 202a buffer *\n-00166fc0: 6820 3d20 6d61 6c6c 6f63 283c 7370 616e h = malloc(sizeof(<\n-00166ff0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00167000: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct buffer)); .
    h->le\n-00167040: 6e20 3d20 303b 203c 2f64 6976 3e0a 3c64 n = 0;
    .\n-00167060: 2020 682d 2667 743b 6d61 7820 3d20 303b h->max = 0;\n-00167070: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    h-&g\n-00167090: 743b 6275 6620 3d20 4e55 4c4c 3b20 3c2f t;buf = NULL; .\n-001671c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap\n-00167200: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .us\n-00167250: 6572 3c2f 613e 203d 2028 3c73 7061 6e20 er = (void*\n-00167280: 2968 3b20 3c73 7061 6e20 636c 6173 733d )h; // pas\n-001672a0: 7320 6275 6666 6572 2061 7320 6120 6861 s buffer as a ha\n-001672b0: 6e64 6c65 2074 6f20 7468 6520 6361 6c6c ndle to the call\n-001672c0: 6261 636b 203c 2f73 7061 6e3e 3c2f 6469 back .
    so\n-00167310: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.fs\n-00167370: 656e 643c 2f61 3e20 3d20 6d79 7365 6e64 end = mysend\n-00167380: 3b20 203c 7370 616e 2063 6c61 7373 3d22 ; // assi\n-001673a0: 676e 2063 616c 6c62 6163 6b20 3c2f 7370 gn callback
    .
    if (soap_write_ns\n-00167400: 5f5f 7065 7273 6f6e 2826 616d 703b 3c61 __person(&soap, &\n-00167440: 616d 703b 7029 293c 2f64 6976 3e0a 3c64 amp;p))
    .\n-00167460: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n-00167480: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_print_fa\n-001674e0: 756c 743c 2f61 3e28 2661 6d70 3b3c 6120 ult(&soap, st\n-00167520: 646f 7574 293b 203c 2f64 6976 3e0a 3c64 dout);
    .\n-00167540: 2020 2020 6578 6974 2845 5849 545f 4641 exit(EXIT_FA\n-00167550: 494c 5552 4529 3b20 3c2f 6469 763e 0a3c ILURE);
    .<\n-00167560: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00167570: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    . \n-00167590: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (h->len) \n-001675c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    ... // use h->\n-00167620: 6275 665b 302e 2e68 2d26 6774 3b6c 656e buf[0..h->len\n-00167630: 2d31 5d20 636f 6e74 656e 7420 3c2f 7370 -1] content
    .
    \n-00167660: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // then cl\n-00167680: 6561 6e75 703a 203c 2f73 7061 6e3e 3c2f eanup: .
    h->\n-001676b0: 3b6c 656e 203d 2030 3b20 3c2f 6469 763e ;len = 0;
    \n-001676c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    h->max\n-001676e0: 203d 2030 3b20 3c2f 6469 763e 0a3c 6469 = 0;
    . \n-00167700: 2020 2066 7265 6528 682d 2667 743b 6275 free(h->bu\n-00167710: 6629 3b20 3c2f 6469 763e 0a3c 6469 7620 f);
    .
    \n-00167730: 2068 2d26 6774 3b62 7566 203d 204e 554c h->buf = NUL\n-00167740: 4c3b 203c 2f64 6976 3e0a 3c64 6976 2063 L;
    .
    } \n-00167760: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..<\n-00167820: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00167830: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_end\n-00167890: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap); .
    soap\n-00167940: 5f64 6f6e 653c 2f61 3e28 2661 6d70 3b3c _done(&<\n-00167950: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00167960: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00167970: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n-00167980: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    .int mysend(\n-00167a10: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n-00167a50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00167a60: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00167a70: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-00167a80: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-00167ac0: 723c 2f73 7061 6e3e 202a 732c 203c 7370 r *s, size_t n)
    .<\n-00167b00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00167b10: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    struct buffer *h = (struct buffer*)soap->user;\n-00167c10: 203c 7370 616e 2063 6c61 7373 3d22 636f // get bu\n-00167c30: 6666 6572 2074 6872 6f75 6768 2068 616e ffer through han\n-00167c40: 646c 6520 3c2f 7370 616e 3e3c 2f64 6976 dle .
    \n-00167c80: 696e 743c 2f73 7061 6e3e 206d 203d 2068 int m = h\n-00167c90: 2d26 6774 3b6d 6178 2c20 6b20 3d20 682d ->max, k = h-\n-00167ca0: 2667 743b 6c65 6e20 2b20 6e3b 203c 2f64 >len + n; .
    //\n-00167ce0: 206e 6565 6420 746f 2069 6e63 7265 6173 need to increas\n-00167cf0: 6520 7370 6163 653f 203c 2f73 7061 6e3e e space? \n-00167d00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (m\n-00167d20: 203d 3d20 3029 203c 2f64 6976 3e0a 3c64 == 0)
    .\n-00167d40: 2020 2020 6d20 3d20 3130 3234 3b20 3c2f m = 1024; .
    else <\n-00167d90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    while (k >= m) <\n-00167de0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    m \n-00167e00: 2a3d 2032 3b20 3c2f 6469 763e 0a3c 6469 *= 2;
    . \n-00167e20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (m != h->\n-00167e50: 3b6d 6178 2920 3c2f 6469 763e 0a3c 6469 ;max)
    . \n-00167e70: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    <\n-00167e90: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00167ea0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *buf = mall\n-00167ec0: 6f63 286d 293b 203c 2f64 6976 3e0a 3c64 oc(m);
    .\n-00167ee0: 2020 2020 6d65 6d63 7079 2862 7566 2c20 memcpy(buf, \n-00167ef0: 682d 2667 743b 6275 662c 2068 2d26 6774 h->buf, h->\n-00167f00: 3b6c 656e 293b 203c 2f64 6976 3e0a 3c64 ;len);
    .\n-00167f20: 2020 2020 682d 2667 743b 6d61 7820 3d20 h->max = \n-00167f30: 6d3b 203c 2f64 6976 3e0a 3c64 6976 2063 m;
    .
    \n-00167f50: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (h->buf) \n-00167f80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    f\n-00167fa0: 7265 6528 682d 2667 743b 6275 6629 3b20 ree(h->buf); \n-00167fb0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    h-&\n-00167fd0: 6774 3b62 7566 203d 2062 7566 3b20 3c2f gt;buf = buf; .
    } .
    memcpy(h-&\n-00168020: 6774 3b62 7566 202b 2068 2d26 6774 3b6c gt;buf + h->l\n-00168030: 656e 2c20 732c 206e 293b 203c 2f64 6976 en, s, n); .
    h->len \n-00168060: 2b3d 206e 3b20 3c2f 6469 763e 0a3c 6469 += n;
    . \n-00168080: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-001680a0: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA\n-00168100: 505f 4f4b 3c2f 613e 3b20 3c2f 6469 763e P_OK;
    \n-00168110: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .

    The \n-00168670: 636c 6965 6e74 2070 726f 6772 616d 2069 client program i\n-00168680: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

    .
    <\n-001686b0: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n-001686c0: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n-001686d0: 6465 2026 7175 6f74 3b73 6f61 7048 2e68 de "soapH.h\n-001686e0: 2671 756f 743b 3c2f 7370 616e 3e20 3c2f " .
    #include "\n-00168730: 3b6e 732e 6e73 6d61 7026 7175 6f74 3b3c ;ns.nsmap"<\n-00168740: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n-00168760: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    SOAP\n-001687d0: 5f53 4f43 4b45 543c 2f61 3e20 6d79 6f70 _SOCKET myop\n-001687e0: 656e 283c 7370 616e 2063 6c61 7373 3d22 en(struct<\n-00168800: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n-00168830: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n-00168860: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, c\n-00168880: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *endpoint, const \n-001688e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *host, int port)
    .<\n-00168940: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00168950: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    if\n-00168990: 2028 7374 726e 636d 7028 656e 6470 6f69 (strncmp(endpoi\n-001689a0: 6e74 2c20 3c73 7061 6e20 636c 6173 733d nt, \n-001689c0: 2671 756f 743b 6669 6c65 3a26 7175 6f74 "file:"\n-001689d0: 3b3c 2f73 7061 6e3e 2c20 3529 2920 3c2f ;, 5)) .
    {
    \n-00168a00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    printf("\n-00168a40: 4669 6c65 206e 616d 6520 6578 7065 6374 File name expect\n-00168a50: 6564 5c6e 2671 756f 743b 3c2f 7370 616e ed\\n");
    .
    \n-00168a80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-00168aa0: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOAP_\n-00168b00: 494e 5641 4c49 445f 534f 434b 4554 3c2f INVALID_SOCKET;
    .
    }\n-00168b30: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    if \n-00168b70: 2828 3c61 2063 6c61 7373 3d22 636f 6465 ((soap->s\n-00168bf0: 656e 6466 643c 2f61 3e20 3d20 3c61 2063 endfd = soap->\n-00168c30: 3c61 2063 6c61 7373 3d22 636f 6465 2220 recvfd<\n-00168c80: 2f61 3e20 3d20 6f70 656e 2868 6f73 742c /a> = open(host,\n-00168c90: 204f 5f52 4457 527c 4f5f 4352 4541 542c O_RDWR|O_CREAT,\n-00168ca0: 2053 5f49 5755 5352 7c53 5f49 5255 5352 S_IWUSR|S_IRUSR\n-00168cb0: 2929 2026 6c74 3b20 3029 203c 2f64 6976 )) < 0) .
    return \n-00168d00: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_INVALID_S\n-00168d60: 4f43 4b45 543c 2f61 3e3b 203c 2f64 6976 OCKET; .
    \n-00168da0: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return soap-&g\n-00168de0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;sendf\n-00168e30: 643c 2f61 3e3b 203c 2f64 6976 3e0a 3c64 d;
    .\n-00168e50: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    .
    v\n-00168ea0: 6f69 643c 2f73 7061 6e3e 206d 7963 6c6f oid myclo\n-00168eb0: 7365 283c 7370 616e 2063 6c61 7373 3d22 se(struct<\n-00168ed0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n-00168f00: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n-00168f30: 6f61 703c 2f61 3e29 203c 2f64 6976 3e0a oap)
    .\n-00168f40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    if (soap->\n-00169010: 7365 6e64 6664 3c2f 613e 2026 6774 3b20 sendfd > \n-00169020: 3229 2020 3c73 7061 6e20 636c 6173 733d 2) // sti\n-00169040: 6c6c 206f 7065 6e3f 203c 2f73 7061 6e3e ll open? \n-00169050: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    clo\n-00169070: 7365 283c 6120 636c 6173 733d 2263 6f64 se(soap->\n-001690f0: 7365 6e64 6664 3c2f 613e 293b 203c 7370 sendfd); // then close\n-00169120: 2069 7420 3c2f 7370 616e 3e3c 2f64 6976 it .
    soa\n-00169170: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->recvfd = \n-001691d0: 303b 2020 2020 2020 3c73 7061 6e20 636c 0; //\n-001691f0: 2073 6574 2062 6163 6b20 746f 2073 7464 set back to std\n-00169200: 696e 203c 2f73 7061 6e3e 3c2f 6469 763e in
    \n-00169210: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap\n-00169250: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->sendfd = 1\n-001692b0: 3b20 2020 2020 203c 7370 616e 2063 6c61 ; // \n-001692d0: 7365 7420 6261 636b 2074 6f20 7374 646f set back to stdo\n-001692e0: 7574 203c 2f73 7061 6e3e 3c2f 6469 763e ut
    \n-001692f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . <\n-00169320: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int myp\n-00169360: 6f73 7428 3c73 7061 6e20 636c 6173 733d ost(struct\n-00169380: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n-001693b0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n-001693e0: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, \n-00169400: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *endpoint, const\n-00169460: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-00169480: 2f73 7061 6e3e 202a 686f 7374 2c20 3c73 /span> *host, const\n-001694b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-001694d0: 2f73 7061 6e3e 202a 7061 7468 2c20 3c73 /span> *path, const\n-00169500: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-00169520: 2f73 7061 6e3e 202a 6163 7469 6f6e 2c20 /span> *action, \n-00169530: 3c61 2063 6c61 7373 3d22 636f 6465 2220 ULONG64 co\n-00169590: 756e 7429 203c 2f64 6976 3e0a 3c64 6976 unt)
    .{<\n-001695b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return soap_send(\n-00169650: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-00169680: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-001696a0: 6f74 3b43 7573 746f 6d2d 6765 6e65 7261 ot;Custom-genera\n-001696b0: 7465 6420 6669 6c65 5c6e 2671 756f 743b ted file\\n"\n-001696c0: 3c2f 7370 616e 3e29 3b20 3c73 7061 6e20 ); \n-001696e0: 2f2f 2077 7269 7465 7320 746f 2073 6f61 // writes to soa\n-001696f0: 702d 2667 743b 7365 6e64 6664 203c 2f73 p->sendfd
    .
    } <\n-00169720: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .\n-00169740: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int<\n-00169770: 2f73 7061 6e3e 206d 7970 6172 7365 283c /span> myparse(<\n-00169780: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00169790: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n-00169800: 2f61 3e29 203c 2f64 6976 3e0a 3c64 6976 /a>)
    .{<\n-00169820: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char \n-00169860: 6275 665b 3235 365d 3b20 3c2f 6469 763e buf[256];
    \n-00169870: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-001698a0: 663c 2f73 7061 6e3e 2028 6c73 6565 6b28 f (lseek(\n-001698b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n-001698e0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >rec\n-00169930: 7666 643c 2f61 3e2c 2030 2c20 5345 454b vfd, 0, SEEK\n-00169940: 5f53 4554 2920 266c 743b 2030 207c 7c20 _SET) < 0 || \n-00169950: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n-001699a0: 736f 6170 5f67 6574 6c69 6e65 3c2f 613e soap_getline\n-001699b0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001699e0: 2c20 6275 662c 2032 3536 2929 203c 7370 , buf, 256)) // go to begi\n-00169a10: 6e20 616e 6420 736b 6970 2063 7573 746f n and skip custo\n-00169a20: 6d20 6865 6164 6572 203c 2f73 7061 6e3e m header \n-00169a30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..\n-00169af0: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n-00169b10: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn SO\n-00169b70: 4150 5f4f 4b3c 2f61 3e3b 203c 2f64 6976 AP_OK; .
    }
    . \n-00169bb0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ma\n-00169bf0: 696e 2829 203c 2f64 6976 3e0a 3c64 6976 in()
    .{<\n-00169c10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-00169c40: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap soap; <\n-00169cb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-00169ce0: 7374 7275 6374 203c 2f73 7061 6e3e 6e73 struct ns\n-00169cf0: 5f5f 7465 7374 2072 3b20 3c2f 6469 763e __test r;
    \n-00169d00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struc\n-00169d30: 7420 3c2f 7370 616e 3e6e 735f 5f70 6572 t ns__per\n-00169d40: 736f 6e20 703b 203c 2f64 6976 3e0a 3c64 son p;
    .\n-00169d60: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_init\n-00169dc0: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap);.
    p.name = <\n-00169e20: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-00169e30: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-00169e40: 3b4a 6f68 6e20 446f 6526 7175 6f74 3b3c ;John Doe"<\n-00169e50: 2f73 7061 6e3e 3b20 3c2f 6469 763e 0a3c /span>;
    .<\n-00169e60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00169e70: 3e20 2070 2e61 6765 203d 2039 393b 203c > p.age = 99; <\n-00169e80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap.fopen = myo\n-00169f30: 7065 6e3b 2020 203c 7370 616e 2063 6c61 pen; // \n-00169f50: 7573 6520 6375 7374 6f6d 206f 7065 6e20 use custom open \n-00169f60: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-00169f80: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap.fpost = mypost; <\n-0016a020: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0016a030: 656e 7422 3e2f 2f20 7573 6520 6375 7374 ent\">// use cust\n-0016a040: 6f6d 2070 6f73 7420 3c2f 7370 616e 3e3c om post <\n-0016a050: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap.fparse = my\n-0016a100: 7061 7273 653b 203c 7370 616e 2063 6c61 parse; // \n-0016a120: 7573 6520 6375 7374 6f6d 2072 6573 706f use custom respo\n-0016a130: 6e73 6520 7061 7273 6572 203c 2f73 7061 nse parser
    .
    soap.fclose =\n-0016a1f0: 206d 7963 6c6f 7365 3b20 3c73 7061 6e20 myclose; \n-0016a210: 2f2f 2075 7365 2063 7573 746f 6d20 636c // use custom cl\n-0016a220: 6f73 6520 3c2f 7370 616e 3e3c 2f64 6976 ose .
    soap_call_\n-0016a250: 6e73 5f5f 7465 7374 2826 616d 703b 3c61 ns__test(&soap, <\n-0016a290: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-0016a2a0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-0016a2b0: 3b66 696c 653a 2f2f 7465 7374 2e78 6d6c ;file://test.xml\n-0016a2c0: 2671 756f 743b 3c2f 7370 616e 3e2c 203c ", <\n-0016a2d0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-0016a2e0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-0016a2f0: 3b26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 ;", \n-0016a300: 702c 2072 293b 203c 2f64 6976 3e0a 3c64 p, r);
    .\n-0016a320: 2020 3c73 7061 6e20 636c 6173 733d 226b if (so\n-0016a370: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.\n-0016a3c0: 6572 726f 723c 2f61 3e29 203c 2f64 6976 error) .
    {
    .\n-0016a400: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap_prin\n-0016a460: 745f 6661 756c 743c 2f61 3e28 2661 6d70 t_fault(&\n-0016a470: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-0016a4a0: 2c20 7374 646f 7574 293b 203c 2f64 6976 , stdout); .
    exit(EXI\n-0016a4d0: 545f 4641 494c 5552 4529 3b20 3c2f 6469 T_FAILURE); .
    }
    .\n-0016a500: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_de\n-0016a570: 7374 726f 793c 2f61 3e28 2661 6d70 3b3c stroy(&<\n-0016a580: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016a590: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0016a5a0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n-0016a5b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-0016a620: 736f 6170 5f65 6e64 3c2f 613e 2826 616d soap_end(&am\n-0016a630: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
    ..<\n-0016a720: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016a730: 3e7d 3c2f 6469 763e 0a3c 6469 7620 636c >}
    .
    \n-0016a790: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    so\n-0016a7f0: 6170 3a3a 6670 6f73 743c 2f61 3e3c 2f64 ap::fpost
    int(* fpo\n-0016a820: 7374 2928 7374 7275 6374 2073 6f61 7020 st)(struct soap \n-0016a830: 2a73 6f61 702c 2063 6f6e 7374 2063 6861 *soap, const cha\n-0016a840: 7220 2a65 6e64 706f 696e 742c 2063 6f6e r *endpoint, con\n-0016a850: 7374 2063 6861 7220 2a68 6f73 742c 2069 st char *host, i\n-0016a860: 6e74 2070 6f72 742c 2063 6f6e 7374 2063 nt port, const c\n-0016a870: 6861 7220 2a70 6174 682c 2063 6f6e 7374 har *path, const\n-0016a880: 2063 6861 7220 2a61 6374 696f 6e2c 2055 char *action, U\n-0016a890: 4c4f 4e47 3634 2063 6f75 6e74 293c 2f64 LONG64 count)
    Callback t\n-0016a8c0: 6861 7420 706f 7075 6c61 7465 7320 616e hat populates an\n-0016a8d0: 6420 7468 656e 2073 656e 6473 2048 5454 d then sends HTT\n-0016a8e0: 5020 6865 6164 6572 7320 6672 6f6d 2074 P headers from t\n-0016a8f0: 6865 2063 6c69 656e 742d 7369 6465 2074 he client-side t\n-0016a900: 6f20 6120 636f 6e6e 6563 7465 6420 4854 o a connected HT\n-0016a910: 5450 2073 6572 7665 722e 3c2f 6469 763e TP server.
    \n-0016a920: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n-0016a940: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-0016a950: 3a34 3232 303c 2f64 6976 3e3c 2f64 6976 :4220
    .
    int(* fparse)(s\n-0016aa50: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-0016aa60: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Callba\n-0016aa80: 636b 2074 6861 7420 7265 6164 7320 616e ck that reads an\n-0016aa90: 6420 7061 7273 6573 2048 5454 5020 616e d parses HTTP an\n-0016aaa0: 6420 4d49 4d45 2068 6561 6465 7273 2e3c d MIME headers.<\n-0016aab0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n-0016aad0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n-0016aae0: 6170 322e 683a 3432 3530 3c2f 6469 763e ap2.h:4250
    \n-0016aaf0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    so\n-0016aba0: 6170 5f67 6574 6c69 6e65 3c2f 613e 3c2f ap_getline
    int soap\n-0016abd0: 5f67 6574 6c69 6e65 2873 7472 7563 7420 _getline(struct \n-0016abe0: 736f 6170 202a 736f 6170 2c20 6368 6172 soap *soap, char\n-0016abf0: 202a 6275 662c 2069 6e74 206c 656e 293c *buf, int len)<\n-0016ac00: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Get a he\n-0016ac20: 6164 6572 206c 696e 652e 3c2f 6469 763e ader line.
    \n-0016ac30: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    SOAP 1.1/1.2 RP\n-0016ac60: 4320 656e 636f 6469 6e67 2073 7065 6369 C encoding speci\n-0016ac70: 6669 6573 2074 6861 7420 534f 4150 2f58 fies that SOAP/X\n-0016ac80: 4d4c 2065 6c65 6d65 6e74 7320 6d61 7920 ML elements may \n-0016ac90: 6265 2069 676e 6f72 6564 2077 6865 6e20 be ignored when \n-0016aca0: 7072 6573 656e 7420 696e 2061 2053 4f41 present in a SOA\n-0016acb0: 5020 7061 796c 6f61 6420 6f6e 2074 6865 P payload on the\n-0016acc0: 2072 6563 6569 7669 6e67 2073 6964 652e receiving side.\n-0016acd0: 2048 6f77 6576 6572 2c20 646f 6375 6d65 However, docume\n-0016ace0: 6e74 2f6c 6974 6572 616c 2073 7479 6c65 nt/literal style\n-0016acf0: 206d 6573 7361 6769 6e67 2076 616c 6964 messaging valid\n-0016ad00: 6174 6573 2058 4d4c 206d 6573 7361 6765 ates XML message\n-0016ad10: 7320 616e 6420 6578 7472 6120 656c 656d s and extra elem\n-0016ad20: 656e 7473 2063 616e 6e6f 7420 6a75 7374 ents cannot just\n-0016ad30: 2062 6520 6967 6e6f 7265 6420 6173 2073 be ignored as s\n-0016ad40: 7563 682e 2057 6974 6820 534f 4150 2064 uch. With SOAP d\n-0016ad50: 6f63 756d 656e 742f 6c69 7465 7261 6c20 ocument/literal \n-0016ad60: 7374 796c 6520 6974 2069 7320 7265 636f style it is reco\n-0016ad70: 6d6d 656e 6465 6420 746f 2065 6e61 626c mmended to enabl\n-0016ad80: 6520 7468 6520 3c63 6f64 653e 2353 4f41 e the #SOA\n-0016ad90: 505f 584d 4c5f 5354 5249 4354 3c2f 636f P_XML_STRICT mode flag. W\n-0016adb0: 6974 6820 534f 4150 2052 5043 2065 6e63 ith SOAP RPC enc\n-0016adc0: 6f64 696e 672c 2074 6865 2065 6e67 696e oding, the engin\n-0016add0: 6520 6967 6e6f 7265 7320 584d 4c20 656c e ignores XML el\n-0016ade0: 656d 656e 7473 2074 6861 7420 6172 6520 ements that are \n-0016adf0: 756e 6b6e 6f77 6e20 6279 2064 6566 6175 unknown by defau\n-0016ae00: 6c74 2c20 756e 6c65 7373 2074 6865 2058 lt, unless the X\n-0016ae10: 4d4c 2061 7474 7269 6275 7465 203c 656d ML attribute mustUnder\n-0016ae30: 7374 616e 643d 2274 7275 6522 3c2f 636f stand=\"true\" is pres\n-0016ae50: 656e 7420 696e 2074 6865 2058 4d4c 2065 ent in the XML e\n-0016ae60: 6c65 6d65 6e74 2e20 4974 206d 6179 2062 lement. It may b\n-0016ae70: 6520 756e 6465 7369 7261 626c 6520 666f e undesirable fo\n-0016ae80: 7220 656c 656d 656e 7473 2074 6f20 6265 r elements to be\n-0016ae90: 2069 676e 6f72 6564 2077 6865 6e20 7468 ignored when th\n-0016aea0: 6520 6f75 7463 6f6d 6520 6f66 2074 6865 e outcome of the\n-0016aeb0: 206f 6d69 7373 696f 6e20 6973 2075 6e63 omission is unc\n-0016aec0: 6572 7461 696e 2e20 5468 6520 3c63 6f64 ertain. The soap::fi\n-0016afa0: 676e 6f72 653c 2f61 3e3c 2f63 6f64 653e gnore\n-0016afb0: 2063 616c 6c62 6163 6b20 6361 6e20 6265 callback can be\n-0016afc0: 2073 6574 2074 6f20 6120 6675 6e63 7469 set to a functi\n-0016afd0: 6f6e 2074 6861 7420 7265 7475 726e 7320 on that returns \n-0016afe0: 3c63 6f64 653e 2353 4f41 505f 4f4b 3c2f #SOAP_OK in case th\n-0016b000: 6520 656c 656d 656e 7420 6361 6e20 6265 e element can be\n-0016b010: 2073 6166 656c 7920 6967 6e6f 7265 642c safely ignored,\n-0016b020: 206f 7220 3c63 6f64 653e 2353 4f41 505f or #SOAP_\n-0016b030: 4d55 5354 554e 4445 5253 5441 4e44 3c2f MUSTUNDERSTAND to throw a\n-0016b050: 6e20 6578 6365 7074 696f 6e2c 206f 7220 n exception, or \n-0016b060: 746f 2070 6572 666f 726d 2073 6f6d 6520 to perform some \n-0016b070: 6170 706c 6963 6174 696f 6e2d 7370 6563 application-spec\n-0016b080: 6966 6963 2061 6374 696f 6e2e 2046 6f72 ific action. For\n-0016b090: 2065 7861 6d70 6c65 2c20 746f 2074 6872 example, to thr\n-0016b0a0: 6f77 2061 6e20 6578 6365 7074 696f 6e20 ow an exception \n-0016b0b0: 6173 2073 6f6f 6e20 6173 2061 6e20 756e as soon as an un\n-0016b0c0: 6b6e 6f77 6e20 656c 656d 656e 7420 6973 known element is\n-0016b0d0: 2065 6e63 6f75 6e74 6572 6564 206f 6e20 encountered on \n-0016b0e0: 7468 6520 696e 7075 742c 2075 7365 3a3c the input, use:<\n-0016b0f0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
    int\n-0016b140: 206d 6169 6e28 293c 2f64 6976 3e0a 3c64 main()
    .\n-0016b160: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    struct \n-0016b1a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-0016b1d0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-0016b200: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_new\n-0016b260: 3c2f 613e 2829 3b3c 2f64 6976 3e0a 3c64 ();
    .\n-0016b280: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->fig\n-0016b310: 6e6f 7265 3c2f 613e 203d 206d 7969 676e nore = myign\n-0016b320: 6f72 653b 203c 2f64 6976 3e0a 3c64 6976 ore;
    . \n-0016b340: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // soa\n-0016b360: 705f 6361 6c6c 5f6e 735f 5f77 6562 6d65 p_call_ns__webme\n-0016b370: 7468 6f64 2873 6f61 702c 202e 2e2e 2920 thod(soap, ...) \n-0016b380: 6f72 2073 6f61 705f 7365 7276 6528 736f or soap_serve(so\n-0016b390: 6170 2920 3c2f 7370 616e 3e3c 2f64 6976 ap) .
    }
    . <\n-0016b3d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int myi\n-0016b410: 676e 6f72 6528 3c73 7061 6e20 636c 6173 gnore(stru\n-0016b430: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, const <\n-0016b4c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0016b4d0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *tag) .
    {
    . \n-0016b520: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-0016b540: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP\n-0016b5a0: 5f4d 5553 5455 4e44 4552 5354 414e 443c _MUSTUNDERSTAND<\n-0016b5b0: 2f61 3e3b 203c 7370 616e 2063 6c61 7373 /a>; // ne\n-0016b5d0: 7665 7220 736b 6970 2065 6c65 6d65 6e74 ver skip element\n-0016b5e0: 7320 2873 6563 7572 6529 203c 2f73 7061 s (secure)
    .
    } .
    \n-0016b6e0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    int(* fignor\n-0016b700: 6529 2873 7472 7563 7420 736f 6170 202a e)(struct soap *\n-0016b710: 736f 6170 2c20 636f 6e73 7420 6368 6172 soap, const char\n-0016b720: 202a 7461 6729 3c2f 6469 763e 3c64 6976 *tag)
    C\n-0016b740: 616c 6c62 6163 6b20 746f 2063 6174 6368 allback to catch\n-0016b750: 2075 6e72 6563 6f67 6e69 7a65 6420 584d unrecognized XM\n-0016b760: 4c20 656c 656d 656e 7473 2061 6e64 206f L elements and o\n-0016b770: 7665 7272 6964 6573 2023 534f 4150 5f58 verrides #SOAP_X\n-0016b780: 4d4c 5f53 5452 4943 5420 7661 6c69 6461 ML_STRICT valida\n-0016b790: 7469 6f6e 2065 7272 6f72 7320 666f 7220 tion errors for \n-0016b7a0: 7468 6573 2e2e 2e3c 2f64 6976 3e3c 6469 thes...
    \n-0016b7c0: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:44\n-0016b7e0: 3433 3c2f 6469 763e 3c2f 6469 763e 0a3c 43
    .<\n-0016b7f0: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-0016b800: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n-0016b810: 705f 5f65 7272 6f72 735f 6874 6d6c 5f67 p__errors_html_g\n-0016b820: 6136 6536 3834 3966 3532 6533 3634 3166 a6e6849f52e3641f\n-0016b830: 6662 6134 3433 6466 3636 3864 3535 3136 fba443df668d5516\n-0016b840: 3822 3e3c 6469 7620 636c 6173 733d 2274 8\">
    #\n-0016b8d0: 6465 6669 6e65 2053 4f41 505f 4d55 5354 define SOAP_MUST\n-0016b8e0: 554e 4445 5253 5441 4e44 3c2f 6469 763e UNDERSTAND
    \n-0016b8f0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    A soap_status\n-0016b910: 2065 7272 6f72 2063 6f64 653a 2061 6e20 error code: an \n-0016b920: 584d 4c20 656c 656d 656e 7420 6973 2070 XML element is p\n-0016b930: 7265 7365 6e74 2077 6974 6820 6120 6d75 resent with a mu\n-0016b940: 7374 556e 6465 7273 7461 6e64 2061 7474 stUnderstand att\n-0016b950: 7269 6275 7465 2077 6869 6368 206d 7573 ribute which mus\n-0016b960: 7420 6265 2075 6e64 2e2e 2e3c 2f64 6976 t be und...
    Definitio\n-0016b990: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n-0016b9a0: 683a 3234 3930 3c2f 6469 763e 3c2f 6469 h:2490
    .

    To \n-0016b9d0: 7365 6c65 6374 6976 656c 7920 7468 726f selectively thro\n-0016b9e0: 7720 616e 2065 7863 6570 7469 6f6e 2077 w an exception w\n-0016b9f0: 6865 6e20 3c65 6d3e 3c63 6f64 653e 6d75 hen mu\n-0016ba00: 7374 556e 6465 7273 7461 6e64 3d22 7472 stUnderstand=\"tr\n-0016ba10: 7565 223c 2f63 6f64 653e 3c2f 656d 3e20 ue\" \n-0016ba20: 534f 4150 2048 6561 6465 7220 656c 656d SOAP Header elem\n-0016ba30: 656e 7420 6973 2065 6e63 6f75 6e74 6572 ent is encounter\n-0016ba40: 6564 206f 7220 7768 656e 2061 6e20 756e ed or when an un\n-0016ba50: 6b6e 6f77 6e20 656c 656d 656e 7420 6973 known element is\n-0016ba60: 2065 6e63 6f75 6e74 6572 6564 2065 7863 encountered exc\n-0016ba70: 6570 7420 666f 7220 656c 656d 656e 7420 ept for element \n-0016ba80: 3c65 6d3e 3c63 6f64 653e 6e73 3a78 797a ns:xyz\n-0016ba90: 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 7573 , us\n-0016baa0: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    <\n-0016bad0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0016bae0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int main()
    \n-0016bb00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n-0016bb30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0016bb40: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap *soap<\n-0016bbb0: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_\n-0016bc10: 6e65 773c 2f61 3e28 293b 3c2f 6469 763e new();
    \n-0016bc20: 0a3c 6469 7620 636c 6173 733d 226c 696e .. \n-0016bcf0: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // so\n-0016bd10: 6170 5f63 616c 6c5f 6e73 5f5f 7765 626d ap_call_ns__webm\n-0016bd20: 6574 686f 6428 736f 6170 2c20 2e2e 2e29 ethod(soap, ...)\n-0016bd30: 206f 7220 736f 6170 5f73 6572 7665 2873 or soap_serve(s\n-0016bd40: 6f61 7029 203c 2f73 7061 6e3e 3c2f 6469 oap) .
    }
    . \n-0016bd80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ig\n-0016bdc0: 6e6f 7265 283c 7370 616e 2063 6c61 7373 nore(struc\n-0016bde0: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n-0016be10: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, const char *tag)
    \n-0016bea0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n-0016bed0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0016bee0: 656e 7422 3e2f 2f20 646f 206e 6f74 2069 ent\">// do not i\n-0016bef0: 676e 6f72 6520 6d75 7374 556e 6465 7273 gnore mustUnders\n-0016bf00: 7461 6e64 3d26 7175 6f74 3b74 7275 6526 tand="true&\n-0016bf10: 7175 6f74 3b20 3c2f 7370 616e 3e3c 2f64 quot; .
    if (!soap-&g\n-0016bf90: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;mustU\n-0016bfe0: 6e64 6572 7374 616e 643c 2f61 3e29 3c2f nderstand).
    {
    \n-0016c010: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // \n-0016c040: 7461 6773 2026 6c74 3b6e 733a 736f 6d65 tags <ns:some\n-0016c050: 456c 656d 656e 7426 6774 3b20 6361 6e20 Element> can \n-0016c060: 6265 2073 6166 656c 7920 6967 6e6f 7265 be safely ignore\n-0016c070: 643c 2f73 7061 6e3e 3c2f 6469 763e 0a3c d
    .<\n-0016c080: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016c090: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n-0016c0b0: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (soap\n-0016c110: 5f6d 6174 6368 5f74 6167 3c2f 613e 283c _match_tag(<\n-0016c120: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016c130: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0016c140: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-0016c150: 7461 672c 203c 7370 616e 2063 6c61 7373 tag, "ns:someEl\n-0016c180: 656d 656e 7426 7175 6f74 3b3c 2f73 7061 ement") == SOAP_\n-0016c1f0: 4f4b 3c2f 613e 293c 2f64 6976 3e0a 3c64 OK)
    .\n-0016c210: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n-0016c230: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_OK;.
    }
    \n-0016c2c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    r\n-0016c2f0: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_MUSTUNDERS\n-0016c360: 5441 4e44 3c2f 613e 3b20 3c2f 6469 763e TAND;
    \n-0016c370: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    .
    str\n-0016c3d0: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct Namespac\n-0016c410: 653c 2f61 3e20 3c61 2063 6c61 7373 3d22 e nam\n-0016c470: 6573 7061 6365 733c 2f61 3e5b 5d20 3d20 espaces[] = \n-0016c480: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-0016c4a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    { "SOAP-EN\n-0016c4e0: 5626 7175 6f74 3b3c 2f73 7061 6e3e 2c20 V", \n-0016c4f0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-0016c510: 743b 6874 7470 3a2f 2f73 6368 656d 6173 t;http://schemas\n-0016c520: 2e78 6d6c 736f 6170 2e6f 7267 2f73 6f61 .xmlsoap.org/soa\n-0016c530: 702f 656e 7665 6c6f 7065 2f26 7175 6f74 p/envelope/"\n-0016c540: 3b3c 2f73 7061 6e3e 207d 2c20 3c2f 6469 ; }, .
    { "SOAP-\n-0016c590: 454e 4326 7175 6f74 3b3c 2f73 7061 6e3e ENC"\n-0016c5a0: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n-0016c5c0: 756f 743b 6874 7470 3a2f 2f73 6368 656d uot;http://schem\n-0016c5d0: 6173 2e78 6d6c 736f 6170 2e6f 7267 2f73 as.xmlsoap.org/s\n-0016c5e0: 6f61 702f 656e 636f 6469 6e67 2f26 7175 oap/encoding/&qu\n-0016c5f0: 6f74 3b3c 2f73 7061 6e3e 207d 2c20 3c2f ot; }, .
    { "xsi\n-0016c640: 2671 756f 743b 3c2f 7370 616e 3e2c 2020 ", \n-0016c650: 2020 2020 3c73 7061 6e20 636c 6173 733d \n-0016c670: 2671 756f 743b 6874 7470 3a2f 2f77 7777 "http://www\n-0016c680: 2e77 332e 6f72 672f 3230 3031 2f58 4d4c .w3.org/2001/XML\n-0016c690: 5363 6865 6d61 2d69 6e73 7461 6e63 6526 Schema-instance&\n-0016c6a0: 7175 6f74 3b3c 2f73 7061 6e3e 207d 2c20 quot; }, \n-0016c6b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    { "x\n-0016c6f0: 7364 2671 756f 743b 3c2f 7370 616e 3e2c sd",\n-0016c700: 2020 2020 2020 3c73 7061 6e20 636c 6173 "http://w\n-0016c730: 7777 2e77 332e 6f72 672f 3230 3031 2f58 ww.w3.org/2001/X\n-0016c740: 4d4c 5363 6865 6d61 2671 756f 743b 3c2f MLSchema" },
    .\n-0016c760: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    { "ns"\n-0016c7a0: 3c2f 7370 616e 3e2c 2020 2020 2020 203c , <\n-0016c7b0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-0016c7c0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-0016c7d0: 3b73 6f6d 652d 5552 4926 7175 6f74 3b3c ;some-URI"<\n-0016c7e0: 2f73 7061 6e3e 7d2c 203c 7370 616e 2063 /span>}, /\n-0016c800: 2f20 6269 6e64 7320 2671 756f 743b 6e73 / binds "ns\n-0016c810: 2671 756f 743b 206e 616d 6573 7061 6365 " namespace\n-0016c820: 2070 7265 6669 7820 746f 2073 6368 656d prefix to schem\n-0016c830: 6120 5552 493c 2f73 7061 6e3e 3c2f 6469 a URI.
    { NULL, N\n-0016c860: 554c 4c7d 203c 2f64 6976 3e0a 3c64 6976 ULL}
    .];\n-0016c880: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-0016c8d0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 short mustUnde\n-0016c960: 7273 7461 6e64 3c2f 6469 763e 3c64 6976 rstand
    T\n-0016c980: 6865 2073 6f61 703a 3a6d 7573 7455 6e64 he soap::mustUnd\n-0016c990: 6572 7374 616e 6420 666c 6167 2069 7320 erstand flag is \n-0016c9a0: 7365 7420 7768 656e 2061 2053 4f41 5020 set when a SOAP \n-0016c9b0: 4865 6164 6572 2065 6c65 6d65 6e74 2063 Header element c\n-0016c9c0: 6172 7269 6573 2061 2053 4f41 502d 454e arries a SOAP-EN\n-0016c9d0: 563a 6d75 7374 556e 6465 7273 7461 6e64 V:mustUnderstand\n-0016c9e0: 2061 7474 2e2e 2e3c 2f64 6976 3e3c 6469 att...
    \n-0016ca00: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:29\n-0016ca20: 3631 3c2f 6469 763e 3c2f 6469 763e 0a3c 61
    .<\n-0016ca30: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    Functio\n-0016ca50: 6e20 3c63 6f64 653e 3c61 2063 6c61 7373 n soap_matc\n-0016cad0: 685f 7461 673c 2f61 3e3c 2f63 6f64 653e h_tag\n-0016cae0: 2063 6f6d 7061 7265 7320 7477 6f20 7461 compares two ta\n-0016caf0: 6773 2e20 5468 6520 7468 6972 6420 7061 gs. The third pa\n-0016cb00: 7261 6d65 7465 7220 6d61 7920 6265 2061 rameter may be a\n-0016cb10: 2070 6174 7465 726e 2077 6865 7265 203c pattern where <\n-0016cb20: 636f 6465 3e2a 3c2f 636f 6465 3e20 6973 code>* is\n-0016cb30: 2061 2077 696c 6463 6172 6420 616e 6420 a wildcard and \n-0016cb40: 3c63 6f64 653e 2d3c 2f63 6f64 653e 2069 - i\n-0016cb50: 7320 6120 7369 6e67 6c65 2063 6861 7261 s a single chara\n-0016cb60: 6374 6572 2077 696c 6463 6172 642e 2053 cter wildcard. S\n-0016cb70: 6f20 666f 7220 6578 616d 706c 6520 3c63 o for example soap_match_t\n-0016cb90: 6167 2873 6f61 702c 2074 6167 2c20 226e ag(soap, tag, \"n\n-0016cba0: 733a 2a22 293c 2f63 6f64 653e 2077 696c s:*\") wil\n-0016cbb0: 6c20 6d61 7463 6820 616e 7920 656c 656d l match any elem\n-0016cbc0: 656e 7420 696e 206e 616d 6573 7061 6365 ent in namespace\n-0016cbd0: 203c 636f 6465 3e6e 733c 2f63 6f64 653e ns\n-0016cbe0: 206f 7220 7768 656e 206e 6f20 6e61 6d65 or when no name\n-0016cbf0: 7370 6163 6520 7072 6566 6978 2069 7320 space prefix is \n-0016cc00: 7072 6573 656e 7420 696e 2074 6865 2058 present in the X\n-0016cc10: 4d4c 206d 6573 7361 6765 2e3c 2f70 3e0a ML message.

    .\n-0016cc20: 3c70 3e54 6865 2063 616c 6c62 6163 6b20

    The callback \n-0016cc30: 6361 6e20 616c 736f 2062 6520 7573 6564 can also be used\n-0016cc40: 2074 6f20 6b65 6570 2074 7261 636b 206f to keep track o\n-0016cc50: 6620 756e 6b6e 6f77 6e20 656c 656d 656e f unknown elemen\n-0016cc60: 7473 2069 6e20 616e 2069 6e74 6572 6e61 ts in an interna\n-0016cc70: 6c20 6461 7461 2073 7472 7563 7475 7265 l data structure\n-0016cc80: 2073 7563 6820 6173 2061 206c 6973 743a such as a list:\n-0016cc90: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    struct Unknown
    .\n-0016ccf0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    char *tag;
    \n-0016cd50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struc\n-0016cd80: 7420 3c2f 7370 616e 3e55 6e6b 6e6f 776e t Unknown\n-0016cd90: 202a 6e65 7874 3b20 3c2f 6469 763e 0a3c *next;
    .<\n-0016cda0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016cdb0: 3e7d 3b20 3c2f 6469 763e 0a3c 6469 7620 >};
    .
    int myignore(struct <\n-0016ce20: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016ce30: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0016ce40: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-0016ce50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-0016ce80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch\n-0016cec0: 6172 3c2f 7370 616e 3e20 2a74 6167 2920 ar *tag) \n-0016ced0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-0016cef0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    c\n-0016cf20: 6861 723c 2f73 7061 6e3e 202a 7320 3d20 har *s = \n-0016cf30: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (char<\n-0016cf50: 2f73 7061 6e3e 2a29 3c61 2063 6c61 7373 /span>*)soa\n-0016cfb0: 705f 6d61 6c6c 6f63 3c2f 613e 283c 6120 p_malloc(soap, st\n-0016cff0: 726c 656e 2874 6167 292b 3129 3b20 3c2f rlen(tag)+1); .
    s\n-0016d030: 7472 7563 7420 3c2f 7370 616e 3e55 6e6b truct Unk\n-0016d040: 6e6f 776e 202a 7520 3d20 283c 7370 616e nown *u = (struct U\n-0016d070: 6e6b 6e6f 776e 2a29 3c61 2063 6c61 7373 nknown*)soa\n-0016d0d0: 705f 6d61 6c6c 6f63 3c2f 613e 283c 6120 p_malloc(soap, sizeof(struct Unknown));\n-0016d160: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    if \n-0016d1a0: 2873 2026 616d 703b 2661 6d70 3b20 7529 (s && u)\n-0016d1b0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    strcpy\n-0016d1f0: 2873 2c20 7461 6729 3b20 3c2f 6469 763e (s, tag);
    \n-0016d200: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    u->tag\n-0016d220: 203d 2073 3b20 3c2f 6469 763e 0a3c 6469 = s;
    . \n-0016d240: 2020 2075 2d26 6774 3b6e 6578 7420 3d20 u->next = \n-0016d250: 756c 6973 743b 203c 2f64 6976 3e0a 3c64 ulist;
    .\n-0016d270: 2020 2020 756c 6973 7420 3d20 753b 203c ulist = u; <\n-0016d280: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } .
    }
    .\n-0016d2d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int m\n-0016d310: 6169 6e28 293c 2f64 6976 3e0a 3c64 6976 ain()
    .{<\n-0016d330: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-0016d360: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap *<\n-0016d3a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016d3b0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0016d3c0: 6874 6d6c 2361 3734 3066 3837 3630 6636 html#a740f8760f6\n-0016d3d0: 6565 3463 3635 3834 6532 3563 3631 3266 ee4c6584e25c612f\n-0016d3e0: 3538 3564 3730 223e 736f 6170 3c2f 613e 585d70\">soap\n-0016d3f0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    struct Unknown *ulist \n-0016d440: 3d20 4e55 4c4c 3b20 3c2f 6469 763e 0a3c = NULL;
    .<\n-0016d450: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016d460: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_ini\n-0016d4c0: 743c 2f61 3e28 2661 6d70 3b3c 6120 636c t(&soap); ..\n-0016d5d0: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // s\n-0016d5f0: 6f61 705f 6361 6c6c 5f6e 735f 5f77 6562 oap_call_ns__web\n-0016d600: 6d65 7468 6f64 2873 6f61 702c 202e 2e2e method(soap, ...\n-0016d610: 2920 6f72 2073 6f61 705f 7365 7276 6528 ) or soap_serve(\n-0016d620: 736f 6170 2920 3c2f 7370 616e 3e3c 2f64 soap) .
    ... // print the l\n-0016d670: 6973 7420 6f66 2075 6e6b 6e6f 776e 2065 ist of unknown e\n-0016d680: 6c65 6d65 6e74 7320 7374 6f72 6564 2069 lements stored i\n-0016d690: 6e20 756c 6973 743c 2f73 7061 6e3e 3c2f n ulist.. \n-0016d770: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_end(&so\n-0016d800: 6170 3c2f 613e 293b 3c2f 6469 763e 0a3c ap);
    .<\n-0016d810: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016d820: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_don\n-0016d880: 653c 2f61 3e28 2661 6d70 3b3c 6120 636c e(&soap);.
    }
    .

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

    .

    .How to handle \n-0016d960: 4854 5450 2033 3037 2074 656d 706f 7261 HTTP 307 tempora\n-0016d970: 7279 2072 6564 6972 6563 743c 2f68 323e ry redirect

    \n-0016d980: 0a3c 703e 5468 6520 636c 6965 6e74 2d73 .

    The client-s\n-0016d990: 6964 6520 6861 6e64 6c69 6e67 206f 6620 ide handling of \n-0016d9a0: 4854 5450 2033 3037 2063 6f64 6520 2254 HTTP 307 code \"T\n-0016d9b0: 656d 706f 7261 7279 2052 6564 6972 6563 emporary Redirec\n-0016d9c0: 7422 2061 6e64 2061 6e79 206f 6620 7468 t\" and any of th\n-0016d9d0: 6520 7265 6469 7265 6374 2063 6f64 6573 e redirect codes\n-0016d9e0: 2033 3031 2c20 3330 322c 2061 6e64 2033 301, 302, and 3\n-0016d9f0: 3033 2061 7265 206e 6f74 2061 7574 6f6d 03 are not autom\n-0016da00: 6174 6564 2e20 436c 6965 6e74 2061 7070 ated. Client app\n-0016da10: 6c69 6361 7469 6f6e 2064 6576 656c 6f70 lication develop\n-0016da20: 6572 7320 6d61 7920 7761 6e74 2074 6f20 ers may want to \n-0016da30: 636f 6e73 6964 6572 2061 6464 696e 6720 consider adding \n-0016da40: 6120 6665 7720 6c69 6e65 7320 6f66 2063 a few lines of c\n-0016da50: 6f64 6520 746f 2073 7570 706f 7274 2072 ode to support r\n-0016da60: 6564 6972 6563 7473 2e20 4974 2077 6173 edirects. It was\n-0016da70: 2064 6563 6964 6564 206e 6f74 2074 6f20 decided not to \n-0016da80: 6175 746f 6d61 7469 6361 6c6c 7920 7375 automatically su\n-0016da90: 7070 6f72 7420 7265 6469 7265 6374 7320 pport redirects \n-0016daa0: 666f 7220 7468 6520 666f 6c6c 6f77 696e for the followin\n-0016dab0: 6720 7265 6173 6f6e 733a 3c2f 703e 0a3c g reasons:

    .<\n-0016dac0: 756c 3e0a 3c6c 693e 5265 6469 7265 6374 ul>.
  • Redirect\n-0016dad0: 696e 6720 6120 7365 6375 7265 2048 5454 ing a secure HTT\n-0016dae0: 5053 2061 6464 7265 7373 2074 6f20 6120 PS address to a \n-0016daf0: 6e6f 6e2d 7365 6375 7265 2048 5454 5020 non-secure HTTP \n-0016db00: 6164 6472 6573 7320 7669 6120 3330 3720 address via 307 \n-0016db10: 6372 6561 7465 7320 6120 7365 6375 7269 creates a securi\n-0016db20: 7479 2076 756c 6e65 7261 6269 6c69 7479 ty vulnerability\n-0016db30: 2e3c 2f6c 693e 0a3c 6c69 3e43 7963 6c69 .
  • .
  • Cycli\n-0016db40: 6320 7265 6469 7265 6374 7320 6d75 7374 c redirects must\n-0016db50: 2062 6520 6465 7465 6374 6564 2028 652e be detected (e.\n-0016db60: 672e 2061 6c6c 6f77 696e 6720 6f6e 6c79 g. allowing only\n-0016db70: 2061 206c 696d 6974 6564 206e 756d 6265 a limited numbe\n-0016db80: 7220 6f66 2072 6564 6972 6563 7420 6c65 r of redirect le\n-0016db90: 7665 6c73 292e 3c2f 6c69 3e0a 3c6c 693e vels).
  • .
  • \n-0016dba0: 5265 6469 7265 6374 696e 6720 4854 5450 Redirecting HTTP\n-0016dbb0: 2050 4f53 5420 7769 6c6c 2072 6573 756c POST will resul\n-0016dbc0: 7420 696e 2072 652d 7365 7269 616c 697a t in re-serializ\n-0016dbd0: 6174 696f 6e20 616e 6420 7265 2d70 6f73 ation and re-pos\n-0016dbe0: 7420 6f66 2074 6865 2065 6e74 6972 6520 t of the entire \n-0016dbf0: 534f 4150 2072 6571 7565 7374 2e20 5468 SOAP request. Th\n-0016dc00: 6520 534f 4150 2072 6571 7565 7374 206d e SOAP request m\n-0016dc10: 6573 7361 6765 206d 7573 7420 6265 2072 essage must be r\n-0016dc20: 652d 706f 7374 6564 2069 6e20 6974 7320 e-posted in its \n-0016dc30: 656e 7469 7265 7479 2077 6865 6e20 7265 entirety when re\n-0016dc40: 2d69 7373 7569 6e67 2074 6865 2053 4f41 -issuing the SOA\n-0016dc50: 5020 6f70 6572 6174 696f 6e20 746f 2061 P operation to a\n-0016dc60: 206e 6577 2061 6464 7265 7373 2e3c 2f6c new address...

    To i\n-0016dc80: 6d70 6c65 6d65 6e74 2063 6c69 656e 742d mplement client-\n-0016dc90: 7369 6465 2033 3037 2072 6564 6972 6563 side 307 redirec\n-0016dca0: 742c 2061 6464 2074 6865 2066 6f6c 6c6f t, add the follo\n-0016dcb0: 7769 6e67 206c 696e 6573 206f 6620 636f wing lines of co\n-0016dcc0: 6465 3a3c 2f70 3e0a 3c64 6976 2063 6c61 de:

    .
    \n-0016dcf0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-0016dd30: 723c 2f73 7061 6e3e 202a 656e 6470 6f69 r *endpoi\n-0016dd40: 6e74 203d 204e 554c 4c3b 203c 7370 616e nt = NULL; // use default \n-0016dd70: 656e 6470 6f69 6e74 2067 6976 656e 2069 endpoint given i\n-0016dd80: 6e20 5753 444c 206f 7220 7370 6563 6966 n WSDL or specif\n-0016dd90: 7920 6f6e 6520 6865 7265 3c2f 7370 616e y one here
    .
    int r\n-0016dde0: 6564 6972 6563 7473 203d 2031 303b 2020 edirects = 10; \n-0016ddf0: 2020 2020 2020 2020 3c73 7061 6e20 636c //\n-0016de10: 206d 6178 2072 6564 6972 6563 7420 636f max redirect co\n-0016de20: 756e 7420 3c2f 7370 616e 3e3c 2f64 6976 unt .
    wh\n-0016de60: 696c 653c 2f73 7061 6e3e 2028 7265 6469 ile (redi\n-0016de70: 7265 6374 732d 2d29 203c 2f64 6976 3e0a rects--)
    .\n-0016de80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    if (soap_call_ns1\n-0016dee0: 5f5f 6d79 4d65 7468 6f64 283c 6120 636c __myMethod(soap, endp\n-0016df20: 6f69 6e74 2c20 2e2e 2e29 2920 3c2f 6469 oint, ...)) .
    {
    .<\n-0016df50: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016df60: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n-0016df80: 663c 2f73 7061 6e3e 2028 283c 6120 636c f ((soap-><\n-0016dfc0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016dfd0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0016dfe0: 6874 6d6c 2361 6238 3566 3564 3432 3730 html#ab85f5d4270\n-0016dff0: 3239 3633 6431 3365 6135 3430 6264 3938 2963d13ea540bd98\n-0016e000: 3736 6536 6432 223e 6572 726f 723c 2f61 76e6d2\">error >= 301 &\n-0016e020: 3b26 616d 703b 203c 6120 636c 6173 733d ;& so\n-0016e050: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->error &l\n-0016e0b0: 743b 3d20 3330 3329 207c 7c20 3c61 2063 t;= 303) || soap->\n-0016e0f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 error == 307) .
    {
    .\n-0016e170: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    endpoint\n-0016e190: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_str\n-0016e1f0: 6475 703c 2f61 3e28 3c61 2063 6c61 7373 dup(s\n-0016e220: 6f61 703c 2f61 3e2c 203c 6120 636c 6173 oap, \n-0016e250: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->endpoint); // en\n-0016e2d0: 6470 6f69 6e74 2066 726f 6d20 4854 5450 dpoint from HTTP\n-0016e2e0: 2033 3031 2c20 3330 322c 2033 3033 2c20 301, 302, 303, \n-0016e2f0: 3330 3720 4c6f 6361 7469 6f6e 2068 6561 307 Location hea\n-0016e300: 6465 7220 3c2f 7370 616e 3e3c 2f64 6976 der .
    }
    .\n-0016e330: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-0016e360: 656c 7365 3c2f 7370 616e 3e20 3c2f 6469 else .
    {
    \n-0016e390: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... // handle err\n-0016e3d0: 6f72 203c 2f73 7061 6e3e 3c2f 6469 763e or
    \n-0016e3e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    break;\n-0016e420: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } \n-0016e440: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    else .
    {
    \n-0016e4c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    break; <\n-0016e500: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0016e510: 656e 7422 3e2f 2f20 616c 6c20 4f4b 206e ent\">// all OK n\n-0016e520: 6f77 3c2f 7370 616e 3e3c 2f64 6976 3e0a ow
    .\n-0016e530: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .}<\n-0016e560: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

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

    .How to im\n-0016e5e0: 706c 656d 656e 7420 4854 5450 2047 4554 plement HTTP GET\n-0016e5f0: 2c20 5055 542c 2061 6e64 2050 4154 4348 , PUT, and PATCH\n-0016e600: 2073 6572 7669 6365 733c 2f68 323e 0a3c services

    .<\n-0016e610: 703e 546f 2069 6d70 6c65 6d65 6e74 2048 p>To implement H\n-0016e620: 5454 5020 4745 5420 7265 7175 6573 7420 TTP GET request \n-0016e630: 7265 7370 6f6e 7365 732c 2064 6566 696e responses, defin\n-0016e640: 6520 7468 6520 3c63 6f64 653e 3c61 2063 e the so\n-0016e710: 6170 3a3a 6667 6574 3c2f 613e 3c2f 636f ap::fget callback fun\n-0016e730: 6374 696f 6e2e 2054 6865 2063 616c 6c62 ction. The callb\n-0016e740: 6163 6b20 6973 2072 6571 7569 7265 6420 ack is required \n-0016e750: 746f 2070 726f 6475 6365 2061 2072 6573 to produce a res\n-0016e760: 706f 6e73 6520 746f 2074 6865 2072 6571 ponse to the req\n-0016e770: 7565 7374 2069 6e20 7465 7874 7561 6c20 uest in textual \n-0016e780: 666f 726d 2c20 7375 6368 2061 7320 6120 form, such as a \n-0016e790: 5765 6220 7061 6765 206f 7220 616e 2058 Web page or an X\n-0016e7a0: 4d4c 206f 7220 4a53 4f4e 2072 6573 706f ML or JSON respo\n-0016e7b0: 6e73 652e 3c2f 703e 0a3c 703e 596f 7520 nse.

    .

    You \n-0016e7c0: 6361 6e20 616c 736f 2075 7365 2074 6865 can also use the\n-0016e7d0: 203c 636f 6465 3e3c 6120 636c 6173 733d http_get\n-0016e860: 3c2f 613e 3c2f 636f 6465 3e20 706c 7567 plug\n-0016e870: 696e 2077 6869 6368 2065 7373 656e 7469 in which essenti\n-0016e880: 616c 6c79 2073 6574 7320 7468 6520 3c63 ally sets the soap::fget\n-0016e960: 3c2f 613e 3c2f 636f 6465 3e20 6361 6c6c call\n-0016e970: 6261 636b 2061 6e64 2061 6c73 6f20 6b65 back and also ke\n-0016e980: 6570 7320 7472 6163 6b20 6f66 2074 6865 eps track of the\n-0016e990: 206e 756d 6265 7220 6f66 2048 5454 5020 number of HTTP \n-0016e9a0: 4745 5420 616e 6420 504f 5354 2072 6571 GET and POST req\n-0016e9b0: 7565 7374 7320 6d61 6465 2061 7420 7468 uests made at th\n-0016e9c0: 6520 7365 7276 6572 2073 6964 652e 3c2f e server side..

    The follow\n-0016e9e0: 696e 6720 6578 616d 706c 6520 7072 6f64 ing example prod\n-0016e9f0: 7563 6573 2061 2057 6562 2070 6167 6520 uces a Web page \n-0016ea00: 7570 6f6e 2061 2048 5454 5020 4745 5420 upon a HTTP GET \n-0016ea10: 7265 7175 6573 7420 2865 2e67 2e20 6672 request (e.g. fr\n-0016ea20: 6f6d 2061 2062 726f 7773 6572 293a 3c2f om a browser):.

    int \n-0016ea80: 6d61 696e 2829 3c2f 6469 763e 0a3c 6469 main()
    .{\n-0016eaa0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct <\n-0016eae0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016eaf0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0016eb00: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-0016eb10: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-0016eb40: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new<\n-0016eba0: 2f61 3e28 293b 203c 2f64 6976 3e0a 3c64 /a>();
    .\n-0016ebc0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->fge\n-0016ec50: 743c 2f61 3e20 3d20 3c61 2063 6c61 7373 t = http_get\n-0016ecb0: 3c2f 613e 3b20 3c2f 6469 763e 0a3c 6469 ;
    . \n-0016ecd0: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... //
    .
    <\n-0016ed10: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016ed20: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-0016ed30: 705f 5f69 6f2e 6874 6d6c 2367 6135 3164 p__io.html#ga51d\n-0016ed40: 6261 3737 3036 6135 3035 3234 3062 6438 ba7706a505240bd8\n-0016ed50: 3933 3563 3062 3238 6534 3139 6422 3e73 935c0b28e419d\">s\n-0016ed60: 6f61 705f 7365 7276 653c 2f61 3e28 3c61 oap_serve(soap); \n-0016eda0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... <\n-0016edc0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0016edd0: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent\">//.
    }
    .<\n-0016ee00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0016ee10: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    int \n-0016ee50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n-0016eea0: 6874 7470 5f67 6574 3c2f 613e 283c 7370 http_get(struct\n-0016eed0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-0016ef00: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap)
    .
    {.
    if (soa\n-0016efe0: 705f 7265 7370 6f6e 7365 3c2f 613e 283c p_response(<\n-0016eff0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0016f000: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0016f010: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-0016f020: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n-0016f070: 534f 4150 5f48 544d 4c3c 2f61 3e29 203c SOAP_HTML) <\n-0016f080: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0016f090: 656e 7422 3e2f 2f20 4854 5450 2072 6573 ent\">// HTTP res\n-0016f0a0: 706f 6e73 6520 6865 6164 6572 2077 6974 ponse header wit\n-0016f0b0: 6820 7465 7874 2f68 746d 6c20 3c2f 7370 h text/html
    .
    |\n-0016f0e0: 7c20 3c61 2063 6c61 7373 3d22 636f 6465 | soap_send(\n-0016f140: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-0016f170: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-0016f190: 6f74 3b26 6c74 3b48 544d 4c26 6774 3b4d ot;<HTML>M\n-0016f1a0: 7920 5765 6220 7365 7276 6572 2069 7320 y Web server is \n-0016f1b0: 6f70 6572 6174 696f 6e61 6c2e 266c 743b operational.<\n-0016f1c0: 2f48 544d 4c26 6774 3b26 7175 6f74 3b3c /HTML>"<\n-0016f1d0: 2f73 7061 6e3e 293c 2f64 6976 3e0a 3c64 /span>)
    .\n-0016f1f0: 2020 207c 7c20 3c61 2063 6c61 7373 3d22 || soap_end_s\n-0016f250: 656e 643c 2f61 3e28 3c61 2063 6c61 7373 end(s\n-0016f280: 6f61 703c 2f61 3e29 293c 2f64 6976 3e0a oap))
    .\n-0016f290: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-0016f2c0: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return so\n-0016f320: 6170 5f63 6c6f 7365 736f 636b 3c2f 613e ap_closesock\n-0016f330: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-0016f360: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    ..\n-0016f440: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    s\n-0016f510: 6f61 703a 3a66 6765 743c 2f61 3e3c 2f64 oap::fget
    int(* fge\n-0016f540: 7429 2873 7472 7563 7420 736f 6170 202a t)(struct soap *\n-0016f550: 736f 6170 293c 2f64 6976 3e3c 6469 7620 soap)
    Ca\n-0016f570: 6c6c 6261 636b 2074 6f20 696d 706c 656d llback to implem\n-0016f580: 656e 7420 6c6f 6769 6320 6174 2074 6865 ent logic at the\n-0016f590: 2073 6572 7665 722d 7369 6465 2074 6f20 server-side to \n-0016f5a0: 7365 7276 6520 7265 7370 6f6e 7365 7320 serve responses \n-0016f5b0: 746f 2048 5454 5020 4745 5420 7265 7175 to HTTP GET requ\n-0016f5c0: 6573 7473 2066 726f 6d20 636c 6965 6e74 ests from client\n-0016f5d0: 732e 3c2f 6469 763e 3c64 6976 2063 6c61 s.
    De\n-0016f5f0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-0016f600: 6473 6f61 7032 2e68 3a34 3333 303c 2f64 dsoap2.h:4330
    .
    soap_response
    int \n-0016f6f0: 736f 6170 5f72 6573 706f 6e73 6528 7374 soap_response(st\n-0016f700: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n-0016f710: 2069 6e74 2073 7461 7475 7329 3c2f 6469 int status)
    Initialize \n-0016f740: 7468 6520 636f 6e74 6578 7420 666f 7220 the context for \n-0016f750: 7365 7276 6572 2d73 6964 6520 7365 6e64 server-side send\n-0016f760: 696e 6720 616e 6420 7365 6e64 2061 2048 ing and send a H\n-0016f770: 5454 5020 7265 7370 6f6e 7365 2068 6561 TTP response hea\n-0016f780: 6465 722e 3c2f 6469 763e 3c2f 6469 763e der.
    \n-0016f790: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    \n-0016f850: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    int soap_clo\n-0016f870: 7365 736f 636b 2873 7472 7563 7420 736f sesock(struct so\n-0016f880: 6170 202a 736f 6170 293c 2f64 6976 3e3c ap *soap)
    <\n-0016f890: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-0016f8a0: 223e 436c 6f73 6520 7468 6520 736f 636b \">Close the sock\n-0016f8b0: 6574 2063 6f6e 6e65 6374 696f 6e2e 3c2f et connection.
    .
    <\n-0016f930: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n-0016f940: 726f 7570 5f5f 696f 2e68 746d 6c23 6761 roup__io.html#ga\n-0016f950: 3065 6364 6334 3361 3533 6534 3934 6564 0ecdc43a53e494ed\n-0016f960: 6334 6638 3465 3863 3133 3536 3539 6261 c4f84e8c135659ba\n-0016f970: 223e 6874 7470 5f67 6574 3c2f 613e 3c2f \">http_get
    int http\n-0016f9a0: 5f67 6574 2873 7472 7563 7420 736f 6170 _get(struct soap\n-0016f9b0: 202a 2c20 7374 7275 6374 2073 6f61 705f *, struct soap_\n-0016f9c0: 706c 7567 696e 202a 2c20 766f 6964 202a plugin *, void *\n-0016f9d0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    The HT\n-0016f9f0: 5450 2047 4554 2070 6c75 6769 6e20 7265 TP GET plugin re\n-0016fa00: 6769 7374 7261 7469 6f6e 2066 756e 6374 gistration funct\n-0016fa10: 696f 6e2e 3c2f 6469 763e 3c2f 6469 763e ion.
    \n-0016fa20: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    #\n-0016faf0: 6465 6669 6e65 2053 4f41 505f 4854 4d4c define SOAP_HTML\n-0016fb00: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    A speci\n-0016fb20: 616c 2073 6f61 705f 7374 6174 7573 2065 al soap_status e\n-0016fb30: 7272 6f72 2063 6f64 6520 746f 2073 6967 rror code to sig\n-0016fb40: 6e61 6c20 7468 6174 2061 2063 7573 746f nal that a custo\n-0016fb50: 6d20 4854 5450 2072 6573 706f 6e73 6520 m HTTP response \n-0016fb60: 6973 2070 7265 7365 6e74 2061 6e64 206e is present and n\n-0016fb70: 6f20 4854 5450 2072 6573 706f 6e73 2e2e o HTTP respons..\n-0016fb80: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n-0016fba0: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n-0016fbb0: 736f 6170 322e 683a 3237 3132 3c2f 6469 soap2.h:2712
    .
    <\n-0016fd20: 703e 5468 6520 6578 616d 706c 6520 6265 p>The example be\n-0016fd30: 6c6f 7720 7072 6f64 7563 6573 2061 2057 low produces a W\n-0016fd40: 5344 4c20 6669 6c65 2075 706f 6e20 6120 SDL file upon a \n-0016fd50: 4854 5450 2047 4554 2077 6974 6820 7061 HTTP GET with pa\n-0016fd60: 7468 203c 636f 6465 3e3f 7773 646c 3c2f th ?wsdl:

    .
    int\n-0016fdc0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 http_get\n-0016fe20: 3c2f 613e 283c 7370 616e 2063 6c61 7373 (struc\n-0016fe40: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n-0016fe70: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap) .
    {
    . \n-0016fee0: 4649 4c45 202a 6664 203d 204e 554c 4c3b FILE *fd = NULL;\n-0016fef0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    char\n-0016ff30: 202a 7320 3d20 7374 7263 6872 283c 6120 *s = strchr(soap->\n-0016ff70: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;path, &#\n-0016ffe0: 3339 3b3f 2623 3339 3b3c 2f73 7061 6e3e 39;?'\n-0016fff0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    if (!s || strcmp(\n-00170040: 732c 203c 7370 616e 2063 6c61 7373 3d22 s, &\n-00170060: 7175 6f74 3b3f 7773 646c 2671 756f 743b quot;?wsdl"\n-00170070: 3c2f 7370 616e 3e29 2920 3c2f 6469 763e ))
    \n-00170080: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .<\n-00170130: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00170140: 3e20 2066 6420 3d20 3c61 2063 6c61 7373 > fd = f\n-001701a0: 6f70 656e 3c2f 613e 283c 7370 616e 2063 open("myser\n-001701d0: 7669 6365 2e77 7364 6c26 7175 6f74 3b3c vice.wsdl"<\n-001701e0: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, "rb&quo\n-00170210: 743b 3c2f 7370 616e 3e29 3b20 3c73 7061 t;); // open WSDL f\n-00170240: 696c 6520 746f 2063 6f70 7920 3c2f 7370 ile to copy
    .
    if (!fd)
    .<\n-001702a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001702b0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > r\n-001702d0: 6574 7572 6e3c 2f73 7061 6e3e 2034 3034 eturn 404\n-001702e0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // retur\n-00170300: 6e20 4854 5450 206e 6f74 2066 6f75 6e64 n HTTP not found\n-00170310: 2065 7272 6f72 203c 2f73 7061 6e3e 3c2f error .
    \n-00170360: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->http_conte\n-001703c0: 6e74 3c2f 613e 203d 203c 7370 616e 2063 nt = "text/\n-001703f0: 786d 6c26 7175 6f74 3b3c 2f73 7061 6e3e xml"\n-00170400: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // HTTP \n-00170420: 6865 6164 6572 2077 6974 6820 7465 7874 header with text\n-00170430: 2f78 6d6c 2063 6f6e 7465 6e74 203c 2f73 /xml content
    ..\n-001705e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    . \n-00170610: 2020 3c73 7061 6e20 636c 6173 733d 226b whil\n-00170630: 653c 2f73 7061 6e3e 2028 3129 3c2f 6469 e (1).
    {
    \n-00170660: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    size_t\n-001706a0: 2072 203d 2066 7265 6164 283c 6120 636c r = fread(soap-><\n-001706e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001706f0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00170700: 6874 6d6c 2361 3139 3462 6361 6665 6430 html#a194bcafed0\n-00170710: 6333 6533 3638 6239 3266 3435 3266 6338 c3e368b92f452fc8\n-00170720: 3062 3264 3331 223e 746d 7062 7566 3c2f 0b2d31\">tmpbuf, 1, siz\n-00170750: 656f 663c 2f73 7061 6e3e 283c 6120 636c eof(soap-><\n-00170790: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001707a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001707b0: 6874 6d6c 2361 3139 3462 6361 6665 6430 html#a194bcafed0\n-001707c0: 6333 6533 3638 6239 3266 3435 3266 6338 c3e368b92f452fc8\n-001707d0: 3062 3264 3331 223e 746d 7062 7566 3c2f 0b2d31\">tmpbuf), fd);
    \n-001707f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if (!r\n-00170830: 207c 7c20 3c61 2063 6c61 7373 3d22 636f || soap_send_ra\n-00170890: 773c 2f61 3e28 3c61 2063 6c61 7373 3d22 w(soa\n-001708c0: 703c 2f61 3e2c 203c 6120 636c 6173 733d p, so\n-001708f0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->tmpbuf, \n-00170950: 7229 2920 3c2f 6469 763e 0a3c 6469 7620 r))
    .
    \n-00170970: 2020 2020 203c 7370 616e 2063 6c61 7373 b\n-00170990: 7265 616b 3c2f 7370 616e 3e3b 3c2f 6469 reak;.
    } .
    }
    .\n-001709f0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 fclose<\n-00170a50: 2f61 3e28 6664 293b 203c 2f64 6976 3e0a /a>(fd);
    .\n-00170a60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .\n-00170b20: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n-00170b40: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn soap_c\n-00170ba0: 6c6f 7365 736f 636b 3c2f 613e 283c 6120 losesock(soap);.
    }
    .<\n-00170c00: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-00170c10: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n-00170c20: 705f 5f65 7272 6f72 735f 6874 6d6c 5f67 p__errors_html_g\n-00170c30: 6163 3632 6635 6637 3065 3534 3565 6138 ac62f5f70e545ea8\n-00170c40: 6662 6362 6231 3831 6538 3837 3530 6435 fbcbb181e88750d5\n-00170c50: 3622 3e3c 6469 7620 636c 6173 733d 2274 6\">.
    <\n-00170e20: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n-00170e30: 726f 7570 5f5f 696f 2e68 746d 6c23 6761 roup__io.html#ga\n-00170e40: 3035 6265 3939 3334 3366 3535 3666 6537 05be99343f556fe7\n-00170e50: 3039 3430 3134 3565 3837 3463 6462 3939 0940145e874cdb99\n-00170e60: 223e 534f 4150 5f46 494c 453c 2f61 3e3c \">SOAP_FILE<\n-00170e70: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    #define\n-00170e90: 2053 4f41 505f 4649 4c45 3c2f 6469 763e SOAP_FILE
    \n-00170ea0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    A special soa\n-00170ec0: 705f 7374 6174 7573 2065 7272 6f72 2063 p_status error c\n-00170ed0: 6f64 6520 746f 2073 6967 6e61 6c20 7468 ode to signal th\n-00170ee0: 6174 2061 2063 7573 746f 6d20 6669 6c65 at a custom file\n-00170ef0: 2d62 6173 6564 2048 5454 5020 7265 7370 -based HTTP resp\n-00170f00: 6f6e 7365 2069 7320 7072 6573 656e 7420 onse is present \n-00170f10: 616e 6420 6e6f 2048 2e2e 2e3c 2f64 6976 and no H...
    Definitio\n-00170f40: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n-00170f50: 683a 3237 3139 3c2f 6469 763e 3c2f 6469 h:2719
    .
    soap_s\n-00171010: 656e 645f 7261 773c 2f61 3e3c 2f64 6976 end_raw
    int soap_se\n-00171040: 6e64 5f72 6177 2873 7472 7563 7420 736f nd_raw(struct so\n-00171050: 6170 202a 736f 6170 2c20 636f 6e73 7420 ap *soap, const \n-00171060: 6368 6172 202a 732c 2073 697a 655f 7420 char *s, size_t \n-00171070: 6e29 3c2f 6469 763e 3c64 6976 2063 6c61 n)
    Send \n-00171090: 7261 7720 6279 7465 732e 3c2f 6469 763e raw bytes.
    \n-001710a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-001710f0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    \n-00171140: 736f 6170 3a3a 746d 7062 7566 3c2f 613e soap::tmpbuf\n-00171150: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    char t\n-00171170: 6d70 6275 665b 534f 4150 5f54 4d50 4c45 mpbuf[SOAP_TMPLE\n-00171180: 4e5d 3c2f 6469 763e 3c64 6976 2063 6c61 N]
    Inter\n-001711a0: 6e61 6c20 6275 6666 6572 2074 6f20 686f nal buffer to ho\n-001711b0: 6c64 2074 656d 706f 7261 7279 2073 7472 ld temporary str\n-001711c0: 696e 6773 2073 7563 6820 6173 2073 7472 ings such as str\n-001711d0: 696e 6720 7265 7072 6573 656e 7461 7469 ing representati\n-001711e0: 6f6e 7320 6f66 2070 7269 6d69 7469 7665 ons of primitive\n-001711f0: 2076 616c 7565 732c 2e2e 2e3c 2f64 6976 values,...
    Definitio\n-00171220: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n-00171230: 683a 3431 3939 3c2f 6469 763e 3c2f 6469 h:4199
    .
    \n-001712a0: 3c61 2068 7265 663d 2273 7472 7563 7473 soap\n-001712e0: 3a3a 6874 7470 5f63 6f6e 7465 6e74 3c2f ::http_content
    <\n-001713c0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:298\n-001713e0: 303c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 0
    .

    This exa\n-00171410: 6d70 6c65 2073 686f 7773 2068 6f77 206f mple shows how o\n-00171420: 6e65 2070 7265 6465 7465 726d 696e 6564 ne predetermined\n-00171430: 2066 696c 6520 6973 2073 6572 7665 642e file is served.\n-00171440: 2054 6865 203c 656d 3e3c 636f 6465 3e67 The g\n-00171450: 736f 6170 2f73 616d 706c 6573 2f77 6562 soap/samples/web\n-00171460: 7365 7276 6572 3c2f 636f 6465 3e3c 2f65 server demonstrates \n-00171480: 686f 7720 6669 6c65 7320 7368 6f75 6c64 how files should\n-00171490: 2062 6520 7365 7276 6564 2069 6e20 6765 be served in ge\n-001714a0: 6e65 7261 6c2c 2062 7920 6164 6469 6e67 neral, by adding\n-001714b0: 2074 6865 206e 6563 6573 7361 7279 206c the necessary l\n-001714c0: 6f67 6963 2074 6f20 6164 6420 6d65 6469 ogic to add medi\n-001714d0: 6120 7479 7065 7320 746f 2048 5454 5020 a types to HTTP \n-001714e0: 6865 6164 6572 7320 616e 6420 746f 2072 headers and to r\n-001714f0: 6573 7472 6963 7420 7468 6520 7365 6c65 estrict the sele\n-00171500: 6374 696f 6e20 6f66 2066 696c 6573 2074 ction of files t\n-00171510: 6861 7420 7368 6f75 6c64 2062 6520 7365 hat should be se\n-00171520: 7276 6564 2e3c 2f70 3e0a 3c64 6c20 636c rved.

    .
    Warnin\n-00171550: 673c 2f64 743e 3c64 643e 5768 656e 2073 g
    When s\n-00171560: 6572 7669 6e67 2066 696c 6573 2061 7320 erving files as \n-00171570: 7265 7370 6f6e 7365 7320 746f 2072 6571 responses to req\n-00171580: 7565 7374 732c 2077 6520 6e65 6564 2074 uests, we need t\n-00171590: 6f20 6265 2076 6172 7920 6361 7265 6675 o be vary carefu\n-001715a0: 6c2c 2062 6563 6175 7365 2077 6520 646f l, because we do\n-001715b0: 6e27 7420 7761 6e74 2072 6571 7565 7374 n't want request\n-001715c0: 7320 746f 2073 6e6f 6f70 2061 726f 756e s to snoop aroun\n-001715d0: 6420 696e 2064 6972 6563 746f 7269 6573 d in directories\n-001715e0: 2061 6e64 2073 6572 7665 2066 696c 6573 and serve files\n-001715f0: 2074 6861 7420 7368 6f75 6c64 2062 6520 that should be \n-00171600: 7072 6f74 6563 7465 6420 6672 6f6d 2070 protected from p\n-00171610: 7562 6c69 6320 7669 6577 2e20 5468 6572 ublic view. Ther\n-00171620: 6566 6f72 652c 2077 6865 6e20 6164 6469 efore, when addi\n-00171630: 6e67 206c 6f67 6963 2074 6f20 7365 7276 ng logic to serv\n-00171640: 6520 6669 6c65 732c 2077 6520 6d75 7374 e files, we must\n-00171650: 2072 656a 6563 7420 7265 7175 6573 7420 reject request \n-00171660: 7468 6174 2068 6176 6520 3c63 6f64 653e that have \n-00171670: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::pat\n-00171700: 683c 2f61 3e3c 2f63 6f64 653e 2076 616c h val\n-00171710: 7565 7320 7769 7468 2061 203c 636f 6465 ues with a / or a <\n-00171730: 636f 6465 3e5c 3c2f 636f 6465 3e20 283c code>\\ (<\n-00171740: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n-001717d0: 3a3a 7061 7468 3c2f 613e 3c2f 636f 6465 ::path is a string wi\n-001717f0: 7468 2074 6865 2070 6174 6820 7061 7274 th the path part\n-00171800: 206f 6620 7468 6520 5552 4c2c 2073 7461 of the URL, sta\n-00171810: 7274 696e 6720 7769 7468 2061 203c 636f rting with a /). If\n-00171830: 2074 6865 7365 2061 7265 2061 6c6c 6f77 these are allow\n-00171840: 6564 2c20 7468 656e 2077 6520 6d75 7374 ed, then we must\n-00171850: 2061 7420 6c65 6173 7420 6368 6563 6b20 at least check \n-00171860: 666f 7220 3c63 6f64 653e 2e2e 3c2f 636f for .. in the path \n-00171880: 746f 2061 766f 6964 2072 6571 7565 7374 to avoid request\n-00171890: 2066 726f 6d20 736e 6f6f 7069 6e67 2061 from snooping a\n-001718a0: 726f 756e 6420 696e 2068 6967 6865 7220 round in higher \n-001718b0: 6469 7265 6374 6f72 6965 7320 616c 6c20 directories all \n-001718c0: 7468 6520 7761 7920 7570 2074 6f20 7468 the way up to th\n-001718d0: 6520 726f 6f74 2e3c 2f64 643e 3c2f 646c e root.
    .

    For a one-w\n-001718f0: 6179 2053 4f41 502f 584d 4c20 6d65 7373 ay SOAP/XML mess\n-00171900: 6167 652c 2079 6f75 2063 616e 2061 6c73 age, you can als\n-00171910: 6f20 7265 7475 726e 2061 2053 4f41 502f o return a SOAP/\n-00171920: 584d 4c20 7265 7370 6f6e 7365 3a3c 2f70 XML response:.

    int <\n-00171980: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00171990: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001719a0: 705f 5f69 6f2e 6874 6d6c 2367 6130 6563 p__io.html#ga0ec\n-001719b0: 6463 3433 6135 3365 3439 3465 6463 3466 dc43a53e494edc4f\n-001719c0: 3834 6538 6331 3335 3635 3962 6122 3e68 84e8c135659ba\">h\n-001719d0: 7474 705f 6765 743c 2f61 3e28 3c73 7061 ttp_get(struct \n-00171a00: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-00171a30: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n-00171a60: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    soap_resp\n-00171af0: 6f6e 7365 3c2f 613e 283c 6120 636c 6173 onse(\n-00171b20: 736f 6170 3c2f 613e 2c20 3c61 2063 6c61 soap, SO\n-00171b80: 4150 5f4f 4b3c 2f61 3e29 3b20 3c2f 6469 AP_OK); .
    return s\n-00171bd0: 6f61 705f 7365 6e64 5f6e 7331 5f5f 6d79 oap_send_ns1__my\n-00171be0: 5365 6e64 4d65 7468 6f64 5265 7370 6f6e SendMethodRespon\n-00171bf0: 7365 283c 6120 636c 6173 733d 2263 6f64 se(soap, \n-00171c40: 2671 756f 743b 2671 756f 743b 3c2f 7370 "", NULL, ... p\n-00171c60: 6172 616d 7320 2e2e 2e29 3b20 3c2f 6469 arams ...); .
    }
    .

    where ns1__mySendM\n-00171cc0: 6574 686f 6452 6573 706f 6e73 653c 2f63 ethodResponse is a one-wa\n-00171ce0: 7920 6d65 7373 6167 6520 6465 636c 6172 y message declar\n-00171cf0: 6564 2069 6e20 6120 696e 7465 7266 6163 ed in a interfac\n-00171d00: 6520 6865 6164 6572 2066 696c 6520 6173 e header file as\n-00171d10: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    int ns1__mySendMe\n-00171d70: 7468 6f64 5265 7370 6f6e 7365 282e 2e2e thodResponse(...\n-00171d80: 2070 6172 616d 7320 2e2e 2e2c 203c 7370 params ..., void);
    .

    When a cli\n-00172460: 656e 7420 6f72 2061 2073 6572 7669 6365 ent or a service\n-00172470: 2063 6f6d 6d75 6e69 6361 7465 7320 7769 communicates wi\n-00172480: 7468 2061 6e6f 7468 6572 2063 6c69 656e th another clien\n-00172490: 7420 6f72 2073 6572 7669 6365 2074 6861 t or service tha\n-001724a0: 7420 7375 7070 6f72 7473 206b 6565 7020 t supports keep \n-001724b0: 616c 6976 652c 2074 6865 203c 636f 6465 alive, the s\n-00172570: 6f61 703a 3a6b 6565 705f 616c 6976 653c oap::keep_alive<\n-00172580: 2f61 3e3c 2f63 6f64 653e 2076 6172 6961 /a> varia\n-00172590: 626c 6520 7769 6c6c 2062 6520 7365 7420 ble will be set \n-001725a0: 746f 2031 2c20 6f74 6865 7277 6973 6520 to 1, otherwise \n-001725b0: 6974 2069 7320 7265 7365 7420 746f 2030 it is reset to 0\n-001725c0: 2069 6e64 6963 6174 696e 6720 7468 6174 indicating that\n-001725d0: 2074 6865 206f 7468 6572 2070 6172 7479 the other party\n-001725e0: 2077 616e 7473 2074 6f20 636c 6f73 6520 wants to close \n-001725f0: 7468 6520 636f 6e6e 6563 7469 6f6e 2e20 the connection. \n-00172600: 5468 6520 636f 6e6e 6563 7469 6f6e 206d The connection m\n-00172610: 6179 6265 2074 6572 6d69 6e61 7465 6420 aybe terminated \n-00172620: 6f6e 2065 6974 6865 7220 656e 6420 6265 on either end be\n-00172630: 666f 7265 2074 6865 2063 6f6d 6d75 6e69 fore the communi\n-00172640: 6361 7469 6f6e 2063 6f6d 706c 6574 6564 cation completed\n-00172650: 2c20 666f 7220 6578 616d 706c 6520 7768 , for example wh\n-00172660: 656e 2074 6865 2073 6572 7665 7220 6b65 en the server ke\n-00172670: 6570 2d61 6c69 7665 2063 6f6e 6e65 6374 ep-alive connect\n-00172680: 696f 6e20 6861 7320 7469 6d65 6420 6f75 ion has timed ou\n-00172690: 742e 2054 6869 7320 6d61 7920 6765 6e65 t. This may gene\n-001726a0: 7261 7465 2061 2022 4272 6f6b 656e 2050 rate a \"Broken P\n-001726b0: 6970 6522 2073 6967 6e61 6c20 6f6e 2055 ipe\" signal on U\n-001726c0: 6e69 782f 4c69 6e75 7820 706c 6174 666f nix/Linux platfo\n-001726d0: 726d 732e 2054 6869 7320 7369 676e 616c rms. This signal\n-001726e0: 2063 616e 2062 6520 6361 7567 6874 2077 can be caught w\n-001726f0: 6974 6820 6120 7369 676e 616c 2068 616e ith a signal han\n-00172700: 646c 6572 3a3c 2f70 3e0a 3c64 6976 2063 dler:

    .
    \n-00172720: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    signal(SIGPIPE\n-00172740: 2c20 7369 6770 6970 655f 6861 6e64 6c65 , sigpipe_handle\n-00172750: 293b 3c2f 6469 763e 0a3c 2f64 6976 3e3c );
    .
    <\n-00172760: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-00172770: 3c70 3e77 6865 7265 2c20 666f 7220 6578

    where, for ex\n-00172780: 616d 706c 653a 3c2f 703e 0a3c 6469 7620 ample:

    .
    voi\n-001727d0: 643c 2f73 7061 6e3e 2073 6967 7069 7065 d sigpipe\n-001727e0: 5f68 616e 646c 6528 3c73 7061 6e20 636c _handle(int x) \n-00172810: 7b20 7d3c 2f64 6976 3e0a 3c2f 6469 763e { }
    .
    \n-00172820: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    This sett\n-00172b00: 696e 6720 7769 6c6c 206e 6f74 2067 656e ing will not gen\n-00172b10: 6572 6174 6520 6120 5349 4750 4950 4520 erate a SIGPIPE \n-00172b20: 6275 7420 7265 6164 2f77 7269 7465 206f but read/write o\n-00172b30: 7065 7261 7469 6f6e 7320 7265 7475 726e perations return\n-00172b40: 203c 636f 6465 3e23 534f 4150 5f45 4f46 #SOAP_EOF\n-00172b50: 3c2f 636f 6465 3e20 696e 7374 6561 642e instead.\n-00172b60: 204e 6f74 6520 7468 6174 2057 696e 646f Note that Windo\n-00172b70: 7773 2064 6f65 7320 6e6f 7420 7375 7070 ws does not supp\n-00172b80: 6f72 7420 7369 676e 616c 7320 616e 6420 ort signals and \n-00172b90: 6c61 636b 2074 6865 203c 636f 6465 3e4d lack the M\n-00172ba0: 5347 5f4e 4f53 4947 4e41 4c3c 2f63 6f64 SG_NOSIGNAL flag.

    .

    \n-00172bc0: 4966 2074 6865 2063 6c69 656e 7420 646f If the client do\n-00172bd0: 6573 206e 6f74 2063 6c6f 7365 2074 6865 es not close the\n-00172be0: 2063 6f6e 6e65 6374 696f 6e2c 2074 6865 connection, the\n-00172bf0: 2073 6572 7665 7220 7769 6c6c 2077 6169 server will wai\n-00172c00: 7420 666f 7265 7665 7220 7768 656e 206e t forever when n\n-00172c10: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o soap::recv_ti\n-00172cd0: 6d65 6f75 743c 2f61 3e3c 2f63 6f64 653e meout\n-00172ce0: 2069 7320 7370 6563 6966 6965 642c 2073 is specified, s\n-00172cf0: 6f20 6265 2063 6172 6566 756c 2074 6f20 o be careful to \n-00172d00: 7365 7420 7469 6d65 6f75 7473 2c20 5365 set timeouts, Se\n-00172d10: 6520 5365 6374 696f 6e20 3c61 2063 6c61 e Section Timeout manage\n-00172d50: 6d65 6e74 2066 6f72 206e 6f6e 2d62 6c6f ment for non-blo\n-00172d60: 636b 696e 6720 6f70 6572 6174 696f 6e73 cking operations\n-00172d70: 3c2f 613e 2e20 496e 2061 6464 6974 696f . In additio\n-00172d80: 6e2c 206f 7468 6572 2063 6c69 656e 7473 n, other clients\n-00172d90: 2077 696c 6c20 6265 2064 656e 6965 6420 will be denied \n-00172da0: 7365 7276 6963 6520 6173 206c 6f6e 6720 service as long \n-00172db0: 6173 2061 2063 6c69 656e 7420 6b65 6570 as a client keep\n-00172dc0: 7320 7468 6520 636f 6e6e 6563 7469 6f6e s the connection\n-00172dd0: 2074 6f20 7468 6520 7365 7276 6572 206f to the server o\n-00172de0: 7065 6e2e 2054 6f20 7072 6576 656e 7420 pen. To prevent \n-00172df0: 7468 6973 2066 726f 6d20 6861 7070 656e this from happen\n-00172e00: 696e 672c 2074 6865 2073 6572 7669 6365 ing, the service\n-00172e10: 2073 686f 756c 6420 6265 206d 756c 7469 should be multi\n-00172e20: 2d74 6872 6561 6465 6420 7375 6368 2074 -threaded such t\n-00172e30: 6861 7420 6561 6368 2074 6872 6561 6420 hat each thread \n-00172e40: 6861 6e64 6c65 7320 7468 6520 636c 6965 handles the clie\n-00172e50: 6e74 2063 6f6e 6e65 6374 696f 6e3a 3c2f nt connection:.

    int \n-00172eb0: 6d61 696e 283c 7370 616e 2063 6c61 7373 main(i\n-00172ed0: 6e74 3c2f 7370 616e 3e20 6172 6763 2c20 nt argc, \n-00172ee0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char **argv) .
    {
    .<\n-00172f30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00172f40: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > struct \n-00172f60: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n-00172f90: 6170 3c2f 613e 203c 6120 636c 6173 733d ap so\n-00172fc0: 6170 3c2f 613e 2c20 2a74 736f 6170 3b20 ap, *tsoap; \n-00172fd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-00173040: 5448 5245 4144 5f54 5950 453c 2f61 3e20 THREAD_TYPE \n-00173050: 7469 643b 203c 2f64 6976 3e0a 3c64 6976 tid;
    . \n-00173070: 3c73 7061 6e20 636c 6173 733d 226b 6579 int m, s; .
    soap_\n-00173110: 696e 6974 323c 2f61 3e28 2661 6d70 3b3c init2(&<\n-00173120: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00173130: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00173140: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-00173150: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_IO_KEEPA\n-001731b0: 4c49 5645 3c2f 613e 2c20 3c61 2063 6c61 LIVE, SOA\n-00173210: 505f 494f 5f4b 4545 5041 4c49 5645 3c2f P_IO_KEEPALIVE);
    . \n-00173240: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap.\n-00173270: 3c61 2063 6c61 7373 3d22 636f 6465 2220 max_kee\n-001732c0: 705f 616c 6976 653c 2f61 3e20 3d20 3130 p_alive = 10\n-001732d0: 303b 203c 7370 616e 2063 6c61 7373 3d22 0; // at m\n-001732f0: 6f73 7420 3130 3020 6361 6c6c 7320 7065 ost 100 calls pe\n-00173300: 7220 6b65 6570 2d61 6c69 7665 2073 6573 r keep-alive ses\n-00173310: 7369 6f6e 203c 2f73 7061 6e3e 3c2f 6469 sion ..<\n-00173430: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00173440: 3e20 206d 203d 203c 6120 636c 6173 733d > m = soap_bind\n-001734a0: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap, NULL,\n-001734e0: 2031 3830 3030 2c20 4241 434b 4c4f 4729 18000, BACKLOG)\n-001734f0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // use p\n-00173510: 6f72 7420 3138 3030 3020 6f6e 2074 6865 ort 18000 on the\n-00173520: 2063 7572 7265 6e74 206d 6163 6869 6e65 current machine\n-00173530: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-00173540: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00173550: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n-00173570: 2f73 7061 6e3e 2028 213c 6120 636c 6173 /span> (!soap_\n-001735d0: 7661 6c69 645f 736f 636b 6574 3c2f 613e valid_socket\n-001735e0: 286d 2929 203c 2f64 6976 3e0a 3c64 6976 (m))
    . \n-00173600: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    soap_print_faul\n-00173680: 743c 2f61 3e28 2661 6d70 3b3c 6120 636c t(&soap, stde\n-001736c0: 7272 293b 203c 2f64 6976 3e0a 3c64 6976 rr);
    . \n-001736e0: 2020 6578 6974 2845 5849 545f 4641 494c exit(EXIT_FAIL\n-001736f0: 5552 4529 3b20 3c2f 6469 763e 0a3c 6469 URE);
    . \n-00173710: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    fp\n-00173730: 7269 6e74 6628 7374 6465 7272 2c20 3c73 rintf(stderr, "\n-00173760: 536f 636b 6574 2063 6f6e 6e65 6374 696f Socket connectio\n-00173770: 6e20 7375 6363 6573 7366 756c 2025 645c n successful %d\\\n-00173780: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", \n-00173790: 6d29 3b20 3c2f 6469 763e 0a3c 6469 7620 m);
    .
    <\n-001737b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001737c0: 6f72 6466 6c6f 7722 3e66 6f72 3c2f 7370 ordflow\">for (co\n-00173820: 756e 743c 2f61 3e20 3d20 303b 203c 6120 unt = 0; count \n-00173880: 2667 743b 3d20 303b 203c 6120 636c 6173 >= 0; count++) <\n-001738e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    s\n-00173940: 6f61 703c 2f61 3e2e 3c61 2063 6c61 7373 oap.socket_flags = MSG_NOSIGNAL\n-001739b0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // use t\n-001739d0: 6869 7320 3c2f 7370 616e 3e3c 2f64 6976 his ..
    \n-00173c50: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    \n-00173c70: 6670 7269 6e74 6628 7374 6465 7272 2c20 fprintf(stderr, \n-00173c80: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00173ca0: 743b 4163 6365 7074 2073 6f63 6b65 7420 t;Accept socket \n-00173cb0: 2564 2063 6f6e 6e65 6374 696f 6e20 6672 %d connection fr\n-00173cc0: 6f6d 2049 5020 2564 2e25 642e 2564 2e25 om IP %d.%d.%d.%\n-00173cd0: 645c 6e26 7175 6f74 3b3c 2f73 7061 6e3e d\\n"\n-00173ce0: 2c20 732c 2028 3c73 7061 6e20 636c 6173 , s, (\n-00173d00: 696e 743c 2f73 7061 6e3e 2928 3c61 2063 int)(soap.ip>&\n-00173d90: 6774 3b32 3429 2661 6d70 3b30 7846 462c gt;24)&0xFF,\n-00173da0: 2028 3c73 7061 6e20 636c 6173 733d 226b (int<\n-00173dc0: 2f73 7061 6e3e 2928 3c61 2063 6c61 7373 /span>)(s\n-00173df0: 6f61 703c 2f61 3e2e 3c61 2063 6c61 7373 oap.ip>>1\n-00173e50: 3629 2661 6d70 3b30 7846 462c 2028 3c73 6)&0xFF, (int)(soap<\n-00173eb0: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.ip<\n-00173f00: 2f61 3e26 6774 3b26 6774 3b38 2926 616d /a>>>8)&am\n-00173f10: 703b 3078 4646 2c20 283c 7370 616e 2063 p;0xFF, (int)soap.ip&am\n-00173fc0: 703b 3078 4646 293b 203c 2f64 6976 3e0a p;0xFF);
    .\n-00173fd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    tsoap = \n-00173ff0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_copy(&s\n-00174080: 6f61 703c 2f61 3e29 3b20 3c2f 6469 763e oap);
    \n-00174090: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if (!t\n-001740d0: 736f 6170 293c 2f64 6976 3e0a 3c64 6976 soap)
    . \n-001740f0: 2020 2020 2020 3c61 2063 6c61 7373 3d22 soap_force\n-00174150: 5f63 6c6f 7365 736f 636b 3c2f 613e 2826 _closesock(&\n-00174160: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n-00174190: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    . \n-001741b0: 2020 2020 3c73 7061 6e20 636c 6173 733d el\n-001741d0: 7365 3c2f 7370 616e 3e3c 2f64 6976 3e0a se
    .\n-001741e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    while\n-00174220: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (THREAD_CR\n-00174280: 4541 5445 3c2f 613e 2826 616d 703b 7469 EATE(&ti\n-00174290: 642c 2028 3c73 7061 6e20 636c 6173 733d d, (vo\n-001742b0: 6964 3c2f 7370 616e 3e2a 282a 2928 3c73 id*(*)(void*))process_re\n-001742f0: 7175 6573 742c 2028 3c73 7061 6e20 636c quest, (void*)t\n-00174320: 736f 6170 2929 3c2f 6469 763e 0a3c 6469 soap))
    . \n-00174340: 2020 2020 2020 2020 2073 6c65 6570 2831 sleep(1\n-00174350: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // fail\n-00174370: 6564 2c20 7472 7920 6167 6169 6e3c 2f73 ed, try again
    .
    \n-001743a0: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    <\n-001743c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001743d0: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else i\n-00174400: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (soap.errnum) <\n-00174490: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001744a0: 656e 7422 3e2f 2f20 6163 6365 7074 2066 ent\">// accept f\n-001744b0: 6169 6c65 642c 2074 7279 2061 6761 696e ailed, try again\n-001744c0: 2061 6674 6572 2031 2073 6563 6f6e 643c after 1 second<\n-001744d0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-001744f0: 2020 207b 3c2f 6469 763e 0a3c 6469 7620 {
    .
    \n-00174510: 2020 203c 6120 636c 6173 733d 2263 6f64 soap_print\n-00174570: 5f66 6175 6c74 3c2f 613e 2826 616d 703b _fault(&\n-00174580: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001745b0: 2073 7464 6572 7229 3b20 3c2f 6469 763e stderr);
    \n-001745c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    sleep(1\n-001745e0: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    }\n-00174600: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    else
    .
    {\n-00174660: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    f\n-00174680: 7072 696e 7466 2873 7464 6572 722c 203c printf(stderr, <\n-00174690: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-001746a0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-001746b0: 3b53 6572 7665 7220 7469 6d65 6420 6f75 ;Server timed ou\n-001746c0: 745c 6e26 7175 6f74 3b3c 2f73 7061 6e3e t\\n"\n-001746d0: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    \n-001746f0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 break\n-00174710: 3c2f 7370 616e 3e3b 203c 2f64 6976 3e0a ;
    .\n-00174720: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .<\n-00174740: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00174750: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    . \n-00174770: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n-00174790: 3c2f 7370 616e 3e20 303b 203c 2f64 6976 0; .
    }
    . \n-001747d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    void *\n-00174810: 7072 6f63 6573 735f 7265 7175 6573 7428 process_request(\n-00174820: 3c73 7061 6e20 636c 6173 733d 226b 6579 void *tsoap) .
    {
    .<\n-00174870: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00174880: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > struct \n-001748a0: 3c2f 7370 616e 3e2a 3c61 2063 6c61 7373 *s\n-001748d0: 6f61 703c 2f61 3e20 3d20 283c 7370 616e oap = (struct
    <\n-00174900: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00174910: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00174920: 6874 6d6c 223e 736f 6170 3c2f 613e 2a29 html\">soap*)\n-00174930: 7473 6f61 703b 3c2f 6469 763e 0a3c 6469 tsoap;
    . \n-00174950: 203c 6120 636c 6173 733d 2263 6f64 6522 THREAD_DET\n-001749b0: 4143 483c 2f61 3e28 3c61 2063 6c61 7373 ACH(THR\n-00174a10: 4541 445f 4944 3c2f 613e 293b 203c 2f64 EAD_ID); .
    ((\n-00174a50: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap*)<\n-00174a90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00174aa0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00174ab0: 6874 6d6c 223e 736f 6170 3c2f 613e 292d html\">soap)-\n-00174ac0: 2667 743b 7265 6376 5f74 696d 656f 7574 >recv_timeout\n-00174ad0: 203d 2036 303b 203c 7370 616e 2063 6c61 = 60; // \n-00174af0: 5469 6d65 6f75 7420 6166 7465 7220 3120 Timeout after 1 \n-00174b00: 6d69 6e75 7465 2073 7461 6c6c 206f 6e20 minute stall on \n-00174b10: 7265 6376 203c 2f73 7061 6e3e 3c2f 6469 recv .
    ((s\n-00174b50: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap*)soap)-&\n-00174bc0: 6774 3b73 656e 645f 7469 6d65 6f75 7420 gt;send_timeout \n-00174bd0: 3d20 3130 3b20 3c73 7061 6e20 636c 6173 = 10; // T\n-00174bf0: 696d 656f 7574 2061 6674 6572 2031 3020 imeout after 10 \n-00174c00: 7365 636f 6e64 2073 7461 6c6c 206f 6e20 second stall on \n-00174c10: 7365 6e64 203c 2f73 7061 6e3e 3c2f 6469 send ..<\n-00174cd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00174ce0: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_des\n-00174d40: 7472 6f79 3c2f 613e 283c 6120 636c 6173 troy(\n-00174d70: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); .\n-00174e30: 0a3c 6469 7620 636c 6173 733d 226c 696e .\n-00174ee0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    r\n-00174f10: 6574 7572 6e3c 2f73 7061 6e3e 204e 554c eturn NUL\n-00174f20: 4c3b 203c 2f64 6976 3e0a 3c64 6976 2063 L;
    .
    }.
    soa\n-00174fe0: 703a 3a63 6f75 6e74 3c2f 613e 3c2f 6469 p::count
    ULONG64 co\n-00175010: 756e 743c 2f64 6976 3e3c 6469 7620 636c unt
    Mess\n-00175030: 6167 6520 6c65 6e67 7468 2063 6f75 6e74 age length count\n-00175040: 6572 2076 616c 7565 206f 6620 7468 6520 er value of the \n-00175050: 6d65 7373 6167 6520 7265 6365 6976 6564 message received\n-00175060: 2061 6e64 2063 6f75 6e74 6572 2076 616c and counter val\n-00175070: 7565 206f 6620 7468 6520 4854 5450 2063 ue of the HTTP c\n-00175080: 6f6e 7465 6e74 206c 656e 6774 6820 6865 ontent length he\n-00175090: 612e 2e2e 3c2f 6469 763e 3c64 6976 2063 a...
    \n-001750b0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n-001750c0: 7374 6473 6f61 7032 2e68 3a34 3230 343c stdsoap2.h:4204<\n-001750d0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    soap::accep\n-00175180: 745f 666c 6167 733c 2f61 3e3c 2f64 6976 t_flags
    int accept_\n-001751b0: 666c 6167 733c 2f64 6976 3e3c 6469 7620 flags
    Us\n-001751d0: 6572 2d64 6566 696e 6162 6c65 2073 6574 er-definable set\n-001751e0: 736f 636b 6f70 7420 6c65 7665 6c20 534f sockopt level SO\n-001751f0: 4c5f 534f 434b 4554 2066 6c61 6773 2028 L_SOCKET flags (\n-00175200: 3020 6279 2064 6566 6175 6c74 292c 2077 0 by default), w\n-00175210: 6865 6e20 6e6f 6e7a 6572 6f20 7365 7473 hen nonzero sets\n-00175220: 2074 6865 2073 6f61 703a 3a73 6f63 6b65 the soap::socke\n-00175230: 7420 662e 2e2e 3c2f 6469 763e 3c64 6976 t f...
    <\n-00175250: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:345\n-00175270: 333c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 3
    .

    A client\n-001752a0: 2063 616c 6c20 7769 6c6c 2061 7574 6f6d call will autom\n-001752b0: 6174 6963 616c 6c79 2061 7474 656d 7074 atically attempt\n-001752c0: 2074 6f20 7265 2d65 7374 6162 6c69 7368 to re-establish\n-001752d0: 2061 2063 6f6e 6e65 6374 696f 6e20 746f a connection to\n-001752e0: 2061 2073 6572 7665 7220 7768 656e 2074 a server when t\n-001752f0: 6865 2073 6572 7665 7220 6861 7320 7465 he server has te\n-00175300: 726d 696e 6174 6564 2074 6865 2063 6f6e rminated the con\n-00175310: 6e65 6374 696f 6e20 666f 7220 616e 7920 nection for any \n-00175320: 7265 6173 6f6e 2e20 5468 6973 2077 6179 reason. This way\n-00175330: 2c20 6120 7365 7175 656e 6365 206f 6620 , a sequence of \n-00175340: 6361 6c6c 7320 6361 6e20 6265 206d 6164 calls can be mad\n-00175350: 6520 746f 2074 6865 2073 6572 7665 7220 e to the server \n-00175360: 7768 696c 6520 6b65 6570 696e 6720 7468 while keeping th\n-00175370: 6520 636f 6e6e 6563 7469 6f6e 206f 7065 e connection ope\n-00175380: 6e2e 2043 6c69 656e 7420 7374 7562 2066 n. Client stub f\n-00175390: 756e 6374 696f 6e73 2070 6f6c 6c20 7468 unctions poll th\n-001753a0: 6520 7365 7276 6572 2074 6f20 6368 6563 e server to chec\n-001753b0: 6b20 6966 2074 6865 2063 6f6e 6e65 6374 k if the connect\n-001753c0: 696f 6e20 6973 2073 7469 6c6c 206f 7065 ion is still ope\n-001753d0: 6e2e 2057 6865 6e20 7468 6520 636f 6e6e n. When the conn\n-001753e0: 6563 7469 6f6e 2077 6173 2074 6572 6d69 ection was termi\n-001753f0: 6e61 7465 6420 6279 2074 6865 2073 6572 nated by the ser\n-00175400: 7665 722c 2074 6865 2063 6c69 656e 7420 ver, the client \n-00175410: 7769 6c6c 2061 7574 6f6d 6174 6963 616c will automatical\n-00175420: 6c79 2072 6563 6f6e 6e65 6374 2e20 3c62 ly reconnect. .

    .

    A \n-00175440: 636c 6965 6e74 206d 6179 2063 6c65 6172 client may clear\n-00175450: 2074 6865 203c 636f 6465 3e23 534f 4150 the #SOAP\n-00175460: 5f49 4f5f 4b45 4550 414c 4956 453c 2f63 _IO_KEEPALIVE flag just b\n-00175480: 6566 6f72 6520 7468 6520 6c61 7374 2063 efore the last c\n-00175490: 616c 6c20 746f 2061 2073 6572 7665 7220 all to a server \n-001754a0: 746f 206c 6574 2074 6865 2073 6572 7665 to let the serve\n-001754b0: 7220 6b6e 6f77 2069 7420 7761 6e74 7320 r know it wants \n-001754c0: 746f 2063 6c6f 7365 2074 6865 2063 6f6e to close the con\n-001754d0: 6e65 6374 696f 6e20 6166 7465 7220 7468 nection after th\n-001754e0: 6973 206c 6173 7420 6361 6c6c 2e20 5468 is last call. Th\n-001754f0: 6973 2077 696c 6c20 636c 6f73 6520 7468 is will close th\n-00175500: 6520 736f 636b 6574 2061 6674 6572 2074 e socket after t\n-00175510: 6865 2063 616c 6c20 616e 6420 616c 736f he call and also\n-00175520: 2069 6e66 6f72 6d73 2074 6865 2073 6572 informs the ser\n-00175530: 7665 7220 746f 2067 7261 6365 6675 6c6c ver to gracefull\n-00175540: 7920 636c 6f73 6520 7468 6520 636f 6e6e y close the conn\n-00175550: 6563 7469 6f6e 2e3c 2f70 3e0a 3c70 3e54 ection.

    .

    T\n-00175560: 6865 2063 6c69 656e 742d 7369 6465 2063 he client-side c\n-00175570: 616e 2061 6c73 6f20 7365 7420 7468 6520 an also set the \n-00175580: 5443 5020 6b65 6570 2d61 6c69 7665 2073 TCP keep-alive s\n-00175590: 6f63 6b65 7420 7072 6f70 6572 7469 6573 ocket properties\n-001755a0: 2c20 7573 696e 6720 7468 6520 3c63 6f64 , using the soap::\n-00175670: 7463 705f 6b65 6570 5f61 6c69 7665 3c2f tcp_keep_alive flag (\n-00175690: 7365 7420 746f 2031 2074 6f20 656e 6162 set to 1 to enab\n-001756a0: 6c65 292c 203c 636f 6465 3e3c 6120 636c le), soap::\n-00175750: 7463 705f 6b65 6570 5f69 646c 653c 2f61 tcp_keep_idle to set \n-00175770: 7468 6520 3c63 6f64 653e 5443 505f 4b45 the TCP_KE\n-00175780: 4550 4944 4c45 3c2f 636f 6465 3e20 7661 EPIDLE va\n-00175790: 6c75 652c 203c 636f 6465 3e3c 6120 636c lue, soap:\n-00175840: 3a74 6370 5f6b 6565 705f 696e 7476 6c3c :tcp_keep_intvl<\n-00175850: 2f61 3e3c 2f63 6f64 653e 2074 6f20 7365 /a> to se\n-00175860: 7420 7468 6520 3c63 6f64 653e 5443 505f t the TCP_\n-00175870: 4b45 4550 494e 5456 4c3c 2f63 6f64 653e KEEPINTVL\n-00175880: 2076 616c 7565 2c20 616e 6420 3c63 6f64 value, and \n-00175930: 736f 6170 3a3a 7463 705f 6b65 6570 5f63 soap::tcp_keep_c\n-00175940: 6e74 3c2f 613e 3c2f 636f 6465 3e20 746f nt to\n-00175950: 2073 6574 2074 6865 203c 636f 6465 3e54 set the T\n-00175960: 4350 5f4b 4545 5043 4e54 3c2f 636f 6465 CP_KEEPCNT value.

    .

    \n-00175980: 4966 2061 2063 6c69 656e 7420 6973 2069 If a client is i\n-00175990: 6e20 7468 6520 6d69 6464 6c65 206f 6620 n the middle of \n-001759a0: 736f 6170 2063 616c 6c20 7468 6174 206d soap call that m\n-001759b0: 6967 6874 2074 616b 6520 6120 6c6f 6e67 ight take a long\n-001759c0: 2074 696d 6520 616e 6420 7468 6520 7365 time and the se\n-001759d0: 7276 6572 2067 6f65 7320 6177 6179 2f64 rver goes away/d\n-001759e0: 6f77 6e20 7468 6520 6361 6c6c 6572 2064 own the caller d\n-001759f0: 6f65 7320 6e6f 7420 6765 7420 616e 7920 oes not get any \n-00175a00: 6665 6564 6261 636b 2075 6e74 696c 2074 feedback until t\n-00175a10: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap::recv_t\n-00175ad0: 696d 656f 7574 3c2f 613e 3c2f 636f 6465 imeout is reached. En\n-00175af0: 6162 6c69 6e67 2054 4350 206b 6565 7020 abling TCP keep \n-00175b00: 616c 6976 6520 6f6e 2073 7973 7465 6d73 alive on systems\n-00175b10: 2074 6861 7420 7375 7070 6f72 7420 6974 that support it\n-00175b20: 2061 6c6c 6f77 7320 666f 7220 6120 6661 allows for a fa\n-00175b30: 7374 6572 2063 6f6e 6e65 6374 696f 6e20 ster connection \n-00175b40: 7465 6172 646f 776e 2064 6574 6563 7469 teardown detecti\n-00175b50: 6f6e 2066 6f72 2061 7070 6c69 6361 7469 on for applicati\n-00175b60: 6f6e 7320 7468 6174 206e 6565 6420 6974 ons that need it\n-00175b70: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

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

    .

    \n-00175bb0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 <\n-00175bd0: 2f61 3e0a 4854 5450 2063 6875 6e6b 6564 /a>.HTTP chunked\n-00175be0: 2074 7261 6e73 6665 7220 656e 636f 6469 transfer encodi\n-00175bf0: 6e67 3c2f 6832 3e0a 3c70 3e4f 7574 626f ng

    .

    Outbo\n-00175c00: 756e 6420 4854 5450 206d 6573 7361 6765 und HTTP message\n-00175c10: 7320 6172 6520 6e6f 7420 6368 756e 6b65 s are not chunke\n-00175c20: 6420 756e 6c65 7373 2074 6865 203c 636f d unless the #SOAP_IO_CHUN\n-00175c40: 4b3c 2f63 6f64 653e 2066 6c61 6720 6973 K flag is\n-00175c50: 2065 6e61 626c 6564 2e20 4368 756e 6b69 enabled. Chunki\n-00175c60: 6e67 206d 6179 2069 6d70 726f 7665 2074 ng may improve t\n-00175c70: 6865 2073 7065 6564 206f 6620 6d65 7373 he speed of mess\n-00175c80: 6167 6520 7365 6e64 696e 6720 7769 7468 age sending with\n-00175c90: 2048 5454 502c 2062 6563 6175 7365 2074 HTTP, because t\n-00175ca0: 6865 206d 6573 7361 6765 206c 656e 6774 he message lengt\n-00175cb0: 6820 646f 6573 206e 6f74 206e 6565 6420 h does not need \n-00175cc0: 746f 2062 6520 6465 7465 726d 696e 6564 to be determined\n-00175cd0: 2069 6e20 6164 7661 6e63 6520 666f 7220 in advance for \n-00175ce0: 7468 6520 4854 5450 2063 6f6e 7465 6e74 the HTTP content\n-00175cf0: 206c 656e 6774 6820 6865 6164 6572 2e3c length header.<\n-00175d00: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

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

    .

    .HTTP buffered\n-00175d70: 2073 656e 6473 3c2f 6832 3e0a 3c70 3e54 sends

    .

    T\n-00175d80: 6865 2065 6e74 6972 6520 6f75 7462 6f75 he entire outbou\n-00175d90: 6e64 206d 6573 7361 6765 2063 616e 2062 nd message can b\n-00175da0: 6520 7374 6f72 6564 2069 6e20 6120 6275 e stored in a bu\n-00175db0: 6666 6572 2074 6f20 6465 7465 726d 696e ffer to determin\n-00175dc0: 6520 7468 6520 4854 5450 2063 6f6e 7465 e the HTTP conte\n-00175dd0: 6e74 206c 656e 6774 6820 7261 7468 6572 nt length rather\n-00175de0: 2074 6861 6e20 7468 6520 7477 6f2d 7068 than the two-ph\n-00175df0: 6173 6520 656e 636f 6469 6e67 2075 7365 ase encoding use\n-00175e00: 6420 6279 2067 534f 4150 2063 6c69 656e d by gSOAP clien\n-00175e10: 742d 7369 6465 2073 7475 6220 6675 6e63 t-side stub func\n-00175e20: 7469 6f6e 7320 616e 6420 7365 7276 6572 tions and server\n-00175e30: 2d73 6964 6520 736b 656c 6574 6f6e 2066 -side skeleton f\n-00175e40: 756e 6374 696f 6e73 2067 656e 6572 6174 unctions generat\n-00175e50: 6564 2062 7920 736f 6170 6370 7032 2c20 ed by soapcpp2, \n-00175e60: 7768 6963 6820 7065 7266 6f72 6d20 6120 which perform a \n-00175e70: 7365 7061 7261 7465 2070 6173 7320 6f76 separate pass ov\n-00175e80: 6572 2074 6865 2064 6174 6120 746f 2064 er the data to d\n-00175e90: 6574 6572 6d69 6e65 2074 6865 206c 656e etermine the len\n-00175ea0: 6774 6820 6f66 2074 6865 206f 7574 626f gth of the outbo\n-00175eb0: 756e 6420 6d65 7373 6167 652e 2053 6574 und message. Set\n-00175ec0: 7469 6e67 2074 6865 2066 6c61 6720 3c63 ting the flag #SOAP_IO_STO\n-00175ee0: 5245 3c2f 636f 6465 3e20 666f 7220 7468 RE for th\n-00175ef0: 6520 6f75 7470 7574 206d 6f64 6520 7769 e output mode wi\n-00175f00: 6c6c 2062 7566 6665 7220 7468 6520 656e ll buffer the en\n-00175f10: 7469 7265 206d 6573 7361 6765 2e20 5468 tire message. Th\n-00175f20: 6973 206d 6179 206f 7220 6d61 7920 6e6f is may or may no\n-00175f30: 7420 7370 6565 6420 7570 2074 6865 2074 t speed up the t\n-00175f40: 7261 6e73 6d69 7373 696f 6e20 6f66 206d ransmission of m\n-00175f50: 6573 7361 6765 732c 2064 6570 656e 6469 essages, dependi\n-00175f60: 6e67 206f 6e20 7468 6520 636f 6e74 656e ng on the conten\n-00175f70: 742c 2062 7574 206d 6179 2072 6571 7569 t, but may requi\n-00175f80: 7265 2073 6967 6e69 6669 6361 6e74 2073 re significant s\n-00175f90: 746f 7261 6765 2073 7061 6365 2074 6f20 torage space to \n-00175fa0: 686f 6c64 206c 6172 6765 206d 6573 7361 hold large messa\n-00175fb0: 6765 7320 7465 6d70 6f72 6172 696c 792e ges temporarily.\n-00175fc0: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

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

    .

    <\n-00176000: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n-00176010: 2069 643d 2261 7574 6865 6e74 6963 6174 id=\"authenticat\n-00176020: 696f 6e22 3e3c 2f61 3e0a 4854 5450 2061 ion\">.HTTP a\n-00176030: 7574 6865 6e74 6963 6174 696f 6e3c 2f68 uthentication.

    The follow\n-00176050: 696e 6720 7365 6374 696f 6e73 2065 7870 ing sections exp\n-00176060: 6c61 696e 2068 6f77 2074 6f20 6175 7468 lain how to auth\n-00176070: 656e 7469 6361 7465 2077 6974 6820 4854 enticate with HT\n-00176080: 5450 2062 6561 7265 722c 2062 6173 6963 TP bearer, basic\n-00176090: 2c20 6469 6765 7374 2c20 616e 6420 4e54 , digest, and NT\n-001760a0: 4c4d 2e20 5072 6f78 7920 6175 7468 656e LM. Proxy authen\n-001760b0: 7469 6361 7469 6f6e 2069 7320 616c 736f tication is also\n-001760c0: 2063 6f76 6572 6564 2e3c 2f70 3e0a 3c70 covered.

    .You could also \n-001760e0: 7573 6520 7468 6520 5769 6e49 6e65 7420 use the WinInet \n-001760f0: 706c 7567 696e 2061 7661 696c 6162 6c65 plugin available\n-00176100: 2069 6e20 7468 6520 3c65 6d3e 3c63 6f64 in the gsoap/mod_gsoa\n-00176120: 703c 2f63 6f64 653e 3c2f 656d 3e20 6469 p di\n-00176130: 7265 6374 6f72 7920 6f66 2074 6865 2067 rectory of the g\n-00176140: 534f 4150 2073 6f75 7263 6520 636f 6465 SOAP source code\n-00176150: 2070 6163 6b61 6765 2074 6f20 7369 6d70 package to simp\n-00176160: 6c69 6679 2049 6e74 6572 6e65 7420 6163 lify Internet ac\n-00176170: 6365 7373 2066 6f72 2067 534f 4150 2063 cess for gSOAP c\n-00176180: 6c69 656e 7420 6170 706c 6963 6174 696f lient applicatio\n-00176190: 6e73 2061 6e64 2064 6561 6c20 7769 7468 ns and deal with\n-001761a0: 2065 6e63 7279 7074 696f 6e2c 2070 726f encryption, pro\n-001761b0: 7869 6573 2c20 616e 6420 6175 7468 656e xies, and authen\n-001761c0: 7469 6361 7469 6f6e 2c20 7365 6520 7468 tication, see th\n-001761d0: 6520 6753 4f41 5020 3c61 2068 7265 663d e gSOAP \n-00176200: 5769 6e49 6e65 7420 706c 7567 696e 3c2f WinInet plugin documentation\n-00176220: 2e3c 2f70 3e0a 3c70 3e54 6865 2067 534f .

    .

    The gSO\n-00176230: 4150 2043 5552 4c20 706c 7567 696e 2063 AP CURL plugin c\n-00176240: 616e 2061 6c73 6f20 6265 2075 7365 6420 an also be used \n-00176250: 746f 2064 6576 656c 6f70 2067 534f 4150 to develop gSOAP\n-00176260: 2063 6c69 656e 7420 6170 706c 6963 6174 client applicat\n-00176270: 696f 6e73 2061 6e64 2043 5552 4c20 696d ions and CURL im\n-00176280: 706c 656d 656e 7473 2076 6172 696f 7573 plements various\n-00176290: 2048 5454 5020 6175 7468 656e 7469 6361 HTTP authentica\n-001762a0: 7469 6f6e 206d 6574 686f 6473 2c20 7365 tion methods, se\n-001762b0: 6520 7468 6520 6753 4f41 5020 3c61 2068 e the gSOAP CURL plugin\n-001762f0: 2064 6f63 756d 656e 7461 7469 6f6e 2e3c documentation.<\n-00176300: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

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

    .

    .H\n-00176370: 5454 5020 6265 6172 6572 2061 7574 6865 TTP bearer authe\n-00176380: 6e74 6963 6174 696f 6e3c 2f68 333e 0a3c ntication

    .<\n-00176390: 703e 4854 5450 2062 6561 7265 7220 6175 p>HTTP bearer au\n-001763a0: 7468 656e 7469 6361 7469 6f6e 2069 7320 thentication is \n-001763b0: 656e 6162 6c65 6420 6174 2074 6865 2063 enabled at the c\n-001763c0: 6c69 656e 742d 7369 6465 2062 7920 7365 lient-side by se\n-001763d0: 7474 696e 6720 7468 6520 3c63 6f64 653e tting the \n-001763e0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::be\n-001764a0: 6172 6572 3c2f 613e 3c2f 636f 6465 3e20 arer \n-001764b0: 7374 7269 6e67 2074 6f20 7468 6520 6265 string to the be\n-001764c0: 6172 6572 2074 6f6b 656e 3a3c 2f70 3e0a arer token:

    .\n-001764d0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st\n-00176510: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = <\n-00176580: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00176590: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001765a0: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n-001765b0: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68\n-001765c0: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498\n-001765d0: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c\">soap_new\n-001765e0: 2829 3b20 3c2f 6469 763e 0a3c 6469 7620 ();
    .
    soap->\n-00176630: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;bearer\n-00176680: 3c2f 613e 203d 203c 7370 616e 2063 6c61 = "...&quo\n-001766b0: 743b 3c2f 7370 616e 3e3b 203c 2f64 6976 t;; .
    if\n-001766f0: 3c2f 7370 616e 3e20 2873 6f61 705f 6361 (soap_ca\n-00176700: 6c6c 5f6e 735f 5f77 6562 6d65 7468 6f64 ll_ns__webmethod\n-00176710: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-00176740: 2c20 2e2e 2e29 293c 2f64 6976 3e0a 3c64 , ...))
    .\n-00176760: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // e\n-00176780: 7272 6f72 3c2f 7370 616e 3e3c 2f64 6976 rror.
    el\n-001767c0: 7365 3c2f 7370 616e 3e3c 2f64 6976 3e0a se
    .\n-001767d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //\n-00176800: 204f 4b3c 2f73 7061 6e3e 3c2f 6469 763e OK
    \n-00176810: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap::\n-001768b0: 6265 6172 6572 3c2f 613e 3c2f 6469 763e bearer
    \n-001768c0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    const char *\n-001768e0: 2062 6561 7265 723c 2f64 6976 3e3c 6469 bearer
    \n-00176900: 5573 6572 2d64 6566 696e 6162 6c65 2048 User-definable H\n-00176910: 5454 5020 6175 7468 6f72 697a 6174 696f TTP authorizatio\n-00176920: 6e20 6265 6172 6572 2074 6f6b 656e 2076 n bearer token v\n-00176930: 616c 7565 2074 6f20 6265 2073 656e 7420 alue to be sent \n-00176940: 6279 2074 6865 2063 6c69 656e 742c 2073 by the client, s\n-00176950: 6572 7665 7220 7369 6465 2072 6563 6569 erver side recei\n-00176960: 7665 7320 742e 2e2e 3c2f 6469 763e 3c64 ves t...
    Definition:<\n-00176990: 2f62 3e20 7374 6473 6f61 7032 2e68 3a33 /b> stdsoap2.h:3\n-001769a0: 3735 323c 2f64 6976 3e3c 2f64 6976 3e0a 752
    .\n-001769b0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

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

    .\n-00176a30: 0a48 5454 5020 6261 7369 6320 6175 7468 .HTTP basic auth\n-00176a40: 656e 7469 6361 7469 6f6e 3c2f 6833 3e0a entication.\n-00176a50: 3c70 3e48 5454 5020 6261 7369 6320 6175

    HTTP basic au\n-00176a60: 7468 656e 7469 6361 7469 6f6e 2069 7320 thentication is \n-00176a70: 656e 6162 6c65 6420 6174 2074 6865 2063 enabled at the c\n-00176a80: 6c69 656e 742d 7369 6465 2062 7920 7365 lient-side by se\n-00176a90: 7474 696e 6720 7468 6520 3c63 6f64 653e tting the \n-00176aa0: 636f 6e73 7420 6368 6172 2a20 3c61 2063 const char* soap::userid\n-00176b70: 3c2f 613e 3c2f 636f 6465 3e20 616e 6420 and \n-00176b80: 3c63 6f64 653e 636f 6e73 7420 6368 6172 const char\n-00176b90: 2a20 3c61 2063 6c61 7373 3d22 656c 2220 * soap::\n-00176c50: 7061 7373 7764 3c2f 613e 3c2f 636f 6465 passwd strings to a u\n-00176c70: 7365 726e 616d 6520 616e 6420 7061 7373 sername and pass\n-00176c80: 776f 7264 2c20 7265 7370 6563 7469 7665 word, respective\n-00176c90: 6c79 2e20 4120 7365 7276 6572 206d 6179 ly. A server may\n-00176ca0: 2072 6571 7565 7374 2075 7365 7220 6175 request user au\n-00176cb0: 7468 656e 7469 6361 7469 6f6e 2061 6e64 thentication and\n-00176cc0: 2064 656e 6965 7320 6163 6365 7373 2028 denies access (\n-00176cd0: 4854 5450 2034 3031 2065 7272 6f72 2920 HTTP 401 error) \n-00176ce0: 7768 656e 2074 6865 2063 6c69 656e 7420 when the client \n-00176cf0: 7472 6965 7320 746f 2063 6f6e 6e65 6374 tries to connect\n-00176d00: 2077 6974 686f 7574 2048 5454 5020 6175 without HTTP au\n-00176d10: 7468 656e 7469 6361 7469 6f6e 2028 6f72 thentication (or\n-00176d20: 2077 6974 6820 7468 6520 7772 6f6e 6720 with the wrong \n-00176d30: 6175 7468 656e 7469 6361 7469 6f6e 2069 authentication i\n-00176d40: 6e66 6f72 6d61 7469 6f6e 292e 3c2f 703e nformation).

    \n-00176d50: 0a3c 703e 4261 7369 6320 6175 7468 656e .

    Basic authen\n-00176d60: 7469 6361 7469 6f6e 2073 686f 756c 6420 tication should \n-00176d70: 6f6e 6c79 2062 6520 7573 6564 206f 7665 only be used ove\n-00176d80: 7220 4854 5450 532c 2062 6563 6175 7365 r HTTPS, because\n-00176d90: 2074 6865 2063 7265 6465 6e74 6961 6c73 the credentials\n-00176da0: 2061 7265 2073 656e 7420 696e 2074 6865 are sent in the\n-00176db0: 2063 6c65 6172 2077 6974 6820 4854 5450 clear with HTTP\n-00176dc0: 2e20 5365 6520 5365 6374 696f 6e20 3c61 . See Section The H\n-00176e00: 5454 5020 6469 6765 7374 2061 7574 6865 TTP digest authe\n-00176e10: 6e74 6963 6174 696f 6e20 706c 7567 696e ntication plugin\n-00176e20: 3c2f 613e 2074 6f20 7573 6520 7468 6520 to use the \n-00176e30: 4854 5450 2064 6967 6573 7420 706c 7567 HTTP digest plug\n-00176e40: 696e 2074 6861 7420 6973 2073 6166 6520 in that is safe \n-00176e50: 666f 7220 6175 7468 656e 7469 6361 7469 for authenticati\n-00176e60: 6f6e 206f 7665 7220 4854 5450 2e3c 2f70 on over HTTP..

    Here is an \n-00176e80: 6578 616d 706c 6520 636c 6965 6e74 2063 example client c\n-00176e90: 6f64 6520 6672 6167 6d65 6e74 2074 6f20 ode fragment to \n-00176ea0: 7365 7420 7468 6520 4854 5450 2061 7574 set the HTTP aut\n-00176eb0: 6865 6e74 6963 6174 696f 6e20 7573 6572 hentication user\n-00176ec0: 6e61 6d65 2061 6e64 2070 6173 7377 6f72 name and passwor\n-00176ed0: 643a 3c2f 703e 0a3c 6469 7620 636c 6173 d:

    .
    <\n-00176f00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00176f10: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap *soap<\n-00176f80: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_\n-00176fe0: 6e65 773c 2f61 3e28 293b 203c 2f64 6976 new(); .
    soap<\n-00177030: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->userid = "\n-001770b0: 6775 6573 7426 7175 6f74 3b3c 2f73 7061 guest";
    .
    soap->\n-00177110: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;passwd\n-00177160: 3c2f 613e 203d 203c 7370 616e 2063 6c61 = "visit&q\n-00177190: 756f 743b 3c2f 7370 616e 3e3b 203c 2f64 uot;; .
    \n-001771d0: 6966 3c2f 7370 616e 3e20 2873 6f61 705f if (soap_\n-001771e0: 6361 6c6c 5f6e 735f 5f77 6562 6d65 7468 call_ns__webmeth\n-001771f0: 6f64 283c 6120 636c 6173 733d 2263 6f64 od(soap, ...))
    .\n-00177230: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //\n-00177260: 2065 7272 6f72 3c2f 7370 616e 3e3c 2f64 error.
    \n-001772a0: 656c 7365 3c2f 7370 616e 3e3c 2f64 6976 else.
    ... \n-001772e0: 2f2f 2073 7563 6365 7373 3c2f 7370 616e // success
    .
    const\n-001773c0: 2063 6861 7220 2a20 7061 7373 7764 3c2f char * passwd
    User-defi\n-001773f0: 6e61 626c 6520 4854 5450 2061 6e64 204e nable HTTP and N\n-00177400: 544c 4d20 6175 7468 6f72 697a 6174 696f TLM authorizatio\n-00177410: 6e20 7061 7373 776f 7264 2073 7472 696e n password strin\n-00177420: 6720 7265 7175 6972 6564 2066 6f72 2048 g required for H\n-00177430: 5454 5020 6261 7369 6320 616e 6420 4e54 TTP basic and NT\n-00177440: 4c4d 2061 7574 6865 6e74 6963 2e2e 2e3c LM authentic...<\n-00177450: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n-00177470: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n-00177480: 6170 322e 683a 3338 3237 3c2f 6469 763e ap2.h:3827
    \n-00177490: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-001774e0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    \n-00177530: 736f 6170 3a3a 7573 6572 6964 3c2f 613e soap::userid\n-00177540: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    const \n-00177560: 6368 6172 202a 2075 7365 7269 643c 2f64 char * userid
    User-defin\n-00177590: 6162 6c65 2048 5454 5020 616e 6420 4e54 able HTTP and NT\n-001775a0: 4c4d 2061 7574 686f 7269 7a61 7469 6f6e LM authorization\n-001775b0: 2075 7365 7220 6964 2073 7472 696e 6720 user id string \n-001775c0: 666f 7220 4854 5450 2062 6173 6963 2061 for HTTP basic a\n-001775d0: 6e64 204e 544c 4d20 6175 7468 656e 7469 nd NTLM authenti\n-001775e0: 6361 7469 6f6e 2062 7920 742e 2e2e 3c2f cation by t...
    Defini\n-00177610: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n-00177620: 7032 2e68 3a33 3832 323c 2f64 6976 3e3c p2.h:3822
    <\n-00177630: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n-00177650: 4120 636c 6965 6e74 2053 4f41 5020 7265 A client SOAP re\n-00177660: 7175 6573 7420 7769 6c6c 2068 6176 6520 quest will have \n-00177670: 7468 6520 666f 6c6c 6f77 696e 6720 4854 the following HT\n-00177680: 5450 2068 6561 6465 723a 203c 2f70 3e3c TP header:

    <\n-00177690: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n-001776a0: 656e 7422 3e50 4f53 5420 2f58 5858 2048 ent\">POST /XXX H\n-001776b0: 5454 502f 312e 3120 0a48 6f73 743a 2059 TTP/1.1 .Host: Y\n-001776c0: 5959 200a 5573 6572 2d41 6765 6e74 3a20 YY .User-Agent: \n-001776d0: 6753 4f41 502f 322e 3820 0a43 6f6e 7465 gSOAP/2.8 .Conte\n-001776e0: 6e74 2d54 7970 653a 2074 6578 742f 786d nt-Type: text/xm\n-001776f0: 6c3b 2063 6861 7273 6574 3d75 7466 2d38 l; charset=utf-8\n-00177700: 200a 436f 6e74 656e 742d 4c65 6e67 7468 .Content-Length\n-00177710: 3a20 5a5a 5a20 0a41 7574 686f 7269 7a61 : ZZZ .Authoriza\n-00177720: 7469 6f6e 3a20 4261 7369 6320 5a33 566c tion: Basic Z3Vl\n-00177730: 6333 5136 5a33 566c 6333 513d 200a 3c2f c3Q6Z3Vlc3Q= .

    A client\n-00177750: 206d 7573 7420 7365 7420 7468 6520 3c63 must set the const char* \n-00177770: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::us\n-00177830: 6572 6964 3c2f 613e 3c2f 636f 6465 3e20 erid \n-00177840: 616e 6420 3c63 6f64 653e 636f 6e73 7420 and const \n-00177850: 6368 6172 2a20 3c61 2063 6c61 7373 3d22 char* so\n-00177910: 6170 3a3a 7061 7373 7764 3c2f 613e 3c2f ap::passwd strings fo\n-00177930: 7220 6561 6368 2063 616c 6c20 7468 6174 r each call that\n-00177940: 2072 6571 7569 7265 7320 636c 6965 6e74 requires client\n-00177950: 2061 7574 6865 6e74 6963 6174 696f 6e2e authentication.\n-00177960: 2054 6865 2073 7472 696e 6773 2061 7265 The strings are\n-00177970: 2072 6573 6574 2061 6674 6572 2065 6163 reset after eac\n-00177980: 6820 7375 6363 6573 7366 756c 206f 7220 h successful or \n-00177990: 756e 7375 6363 6573 7366 756c 2063 616c unsuccessful cal\n-001779a0: 6c2e 3c2f 703e 0a3c 703e 5768 656e 2070 l.

    .

    When p\n-001779b0: 7265 7365 6e74 2c20 7468 6520 3c63 6f64 resent, the WWW-Authentica\n-001779d0: 7465 3c2f 636f 6465 3e20 4854 5450 2068 te HTTP h\n-001779e0: 6561 6465 7220 7265 7475 726e 6564 2062 eader returned b\n-001779f0: 7920 7468 6520 7365 7276 6572 2077 6974 y the server wit\n-00177a00: 6820 7468 6520 6175 7468 656e 7469 6361 h the authentica\n-00177a10: 7469 6f6e 2072 6561 6c6d 2069 7320 7374 tion realm is st\n-00177a20: 6f72 6564 2069 6e20 7468 6520 7468 6520 ored in the the \n-00177a30: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n-00177af0: 6170 3a3a 6175 7468 7265 616c 6d3c 2f61 ap::authrealm string.\n-00177b10: 2054 6869 7320 6973 2075 7365 6675 6c20 This is useful \n-00177b20: 666f 7220 636c 6965 6e74 7320 746f 2075 for clients to u\n-00177b30: 7365 2074 6869 7320 646f 6d61 696e 2069 se this domain i\n-00177b40: 6e66 6f72 6d61 7469 6f6e 2074 6f20 7265 nformation to re\n-00177b50: 7370 6f6e 6420 746f 2061 7574 6865 6e74 spond to authent\n-00177b60: 6963 6174 696f 6e20 7265 7175 6573 7473 ication requests\n-00177b70: 2e3c 2f70 3e0a 3c70 3e41 2073 7461 6e64 .

    .

    A stand\n-00177b80: 2d61 6c6f 6e65 2067 534f 4150 2057 6562 -alone gSOAP Web\n-00177b90: 2053 6572 7669 6365 2061 7070 6c69 6361 Service applica\n-00177ba0: 7469 6f6e 2063 616e 2065 6e66 6f72 6365 tion can enforce\n-00177bb0: 2048 5454 5020 6175 7468 656e 7469 6361 HTTP authentica\n-00177bc0: 7469 6f6e 206f 6e20 636c 6965 6e74 7320 tion on clients \n-00177bd0: 6279 2063 6865 636b 696e 6720 7468 6520 by checking the \n-00177be0: 3c63 6f64 653e 636f 6e73 7420 6368 6172 const char\n-00177bf0: 2a20 3c61 2063 6c61 7373 3d22 656c 2220 * soap::\n-00177cb0: 7573 6572 6964 3c2f 613e 3c2f 636f 6465 userid and cons\n-00177cd0: 7420 6368 6172 2a20 3c61 2063 6c61 7373 t char* \n-00177d90: 736f 6170 3a3a 7061 7373 7764 3c2f 613e soap::passwd\n-00177da0: 3c2f 636f 6465 3e20 7374 7269 6e67 732e strings.\n-00177db0: 2054 6865 7365 2073 7472 696e 6773 2061 These strings a\n-00177dc0: 7265 2073 6574 2077 6865 6e20 6120 636c re set when a cl\n-00177dd0: 6965 6e74 2072 6571 7565 7374 2063 6f6e ient request con\n-00177de0: 7461 696e 7320 4854 5450 2061 7574 6865 tains HTTP authe\n-00177df0: 6e74 6963 6174 696f 6e20 6865 6164 6572 ntication header\n-00177e00: 732e 2054 6865 2073 7472 696e 6773 2073 s. The strings s\n-00177e10: 686f 756c 6420 6265 2063 6865 636b 6564 hould be checked\n-00177e20: 2069 6e20 6561 6368 2073 6572 7669 6365 in each service\n-00177e30: 206d 6574 686f 6420 2874 6861 7420 7265 method (that re\n-00177e40: 7175 6972 6573 2061 7574 6865 6e74 6963 quires authentic\n-00177e50: 6174 696f 6e20 746f 2065 7865 6375 7465 ation to execute\n-00177e60: 292e 3c2f 703e 0a3c 703e 4865 7265 2069 ).

    .

    Here i\n-00177e70: 7320 616e 2065 7861 6d70 6c65 2073 6572 s an example ser\n-00177e80: 7669 6365 206d 6574 686f 6420 696d 706c vice method impl\n-00177e90: 656d 656e 7461 7469 6f6e 2074 6861 7420 ementation that \n-00177ea0: 656e 666f 7263 6564 2063 6c69 656e 7420 enforced client \n-00177eb0: 6175 7468 656e 7469 6361 7469 6f6e 3a3c authentication:<\n-00177ec0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    int\n-00177f10: 206e 735f 5f77 6562 6d65 7468 6f64 283c ns__webmethod(<\n-00177f20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00177f30: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n-00177fa0: 2f61 3e2c 202e 2e2e 2920 3c2f 6469 763e /a>, ...)
    \n-00177fb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    <\n-00177fe0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00177ff0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (!soap\n-00178030: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->userid.
    || !soap->\n-001780e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 passwd<\n-00178130: 2f61 3e3c 2f64 6976 3e0a 3c64 6976 2063 /a>
    .
    |\n-00178150: 7c20 7374 7263 6d70 283c 6120 636c 6173 | strcmp(\n-00178180: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->userid\n-001781e0: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n-00178200: 756f 743b 6775 6573 7426 7175 6f74 3b3c uot;guest"<\n-00178210: 2f73 7061 6e3e 293c 2f64 6976 3e0a 3c64 /span>)
    .\n-00178230: 2020 207c 7c20 7374 7263 6d70 283c 6120 || strcmp(soap->\n-00178270: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;passwd\n-001782c0: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , "visit&qu\n-001782f0: 6f74 3b3c 2f73 7061 6e3e 2929 203c 2f64 ot;)) .
    {
    .\n-00178320: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soa\n-00178360: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->authrealm\n-001783c0: 203d 203c 7370 616e 2063 6c61 7373 3d22 = &\n-001783e0: 7175 6f74 3b2e 2e2e 2671 756f 743b 3c2f quot;..."; // \n-00178410: 646f 6d61 696e 2072 6561 6c6d 2061 6363 domain realm acc\n-00178420: 6573 7365 6420 286f 7074 696f 6e61 6c2c essed (optional,\n-00178430: 204e 554c 4c20 746f 206f 6d69 7429 3c2f NULL to omit)
    . \n-00178460: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n-00178480: 726e 3c2f 7370 616e 3e20 3430 313b 203c rn 401; <\n-00178490: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }.
    ... \n-001784e0: 2f2f 2077 6562 6d65 7468 6f64 206c 6f67 // webmethod log\n-001784f0: 6963 3c2f 7370 616e 3e3c 2f64 6976 3e0a ic
    .\n-00178500: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re\n-00178530: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn \n-00178590: 534f 4150 5f4f 4b3c 2f61 3e3b 3c2f 6469 SOAP_OK;.
    }
    .<\n-00178670: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-00178680: 6922 3e63 6f6e 7374 2063 6861 7220 2a20 i\">const char * \n-00178690: 6175 7468 7265 616c 6d3c 2f64 6976 3e3c authrealm
    <\n-001786a0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-001786b0: 223e 5468 6520 4854 5450 2061 6e64 204e \">The HTTP and N\n-001786c0: 544c 4d20 6175 7468 6f72 697a 6174 696f TLM authorizatio\n-001786d0: 6e20 7265 616c 6d2f 646f 6d61 696e 2073 n realm/domain s\n-001786e0: 7472 696e 6720 7265 6365 6976 6564 2062 tring received b\n-001786f0: 7920 7468 6520 636c 6965 6e74 2077 6974 y the client wit\n-00178700: 6820 7468 6520 5757 572d 4175 7468 656e h the WWW-Authen\n-00178710: 7469 6361 7465 202e 2e2e 3c2f 6469 763e ticate ...
    \n-00178720: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n-00178740: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-00178750: 3a33 3833 323c 2f64 6976 3e3c 2f64 6976 :3832
    .

    When\n-00178780: 2074 6865 2061 7574 6865 6e74 6963 6174 the authenticat\n-00178790: 696f 6e20 6661 696c 732c 2074 6865 2073 ion fails, the s\n-001787a0: 6572 7669 6365 2072 6573 706f 6e73 6520 ervice response \n-001787b0: 7769 7468 2061 2053 4f41 5020 4661 756c with a SOAP Faul\n-001787c0: 7420 6d65 7373 6167 6520 616e 6420 6120 t message and a \n-001787d0: 4854 5450 2065 7272 6f72 2063 6f64 6520 HTTP error code \n-001787e0: 2234 3031 2055 6e61 7574 686f 7269 7a65 \"401 Unauthorize\n-001787f0: 6422 2e20 5468 6520 4854 5450 2065 7272 d\". The HTTP err\n-00178800: 6f72 2063 6f64 6573 2061 7265 2064 6573 or codes are des\n-00178810: 6372 6962 6564 2069 6e20 5365 6374 696f cribed in Sectio\n-00178820: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n Run-t\n-00178850: 696d 6520 6572 726f 7220 636f 6465 733c ime error codes<\n-00178860: 2f61 3e20 2e3c 2f70 3e0a 3c70 3e54 6f20 /a> .

    .

    To \n-00178870: 7265 7475 726e 2061 206e 6f6e 2d53 4f41 return a non-SOA\n-00178880: 5020 6572 726f 722c 2075 7365 3a3c 2f70 P error, use:.

    return soap_send_empt\n-00178940: 795f 7265 7370 6f6e 7365 3c2f 613e 283c y_response(<\n-00178950: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00178960: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00178970: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-00178980: 3430 3129 3b20 3c2f 6469 763e 0a3c 2f64 401);
    .

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

    .

    .HTT\n-00178a10: 5020 4e54 4c4d 2061 7574 6865 6e74 6963 P NTLM authentic\n-00178a20: 6174 696f 6e3c 2f68 333e 0a3c 703e 4854 ation

    .

    HT\n-00178a30: 5450 204e 544c 4d20 6175 7468 656e 7469 TP NTLM authenti\n-00178a40: 6361 7469 6f6e 2069 7320 656e 6162 6c65 cation is enable\n-00178a50: 6420 6174 2074 6865 2063 6c69 656e 742d d at the client-\n-00178a60: 7369 6465 2062 7920 696e 7374 616c 6c69 side by installi\n-00178a70: 6e67 203c 636f 6465 3e6c 6962 6e74 6c6d ng libntlm\n-00178a80: 3c2f 636f 6465 3e20 6672 6f6d 203c 6120 from http://www.\n-00178ac0: 6e6f 6e67 6e75 2e6f 7267 2f6c 6962 6e74 nongnu.org/libnt\n-00178ad0: 6c6d 3c2f 613e 2061 6e64 2063 6f6d 7069 lm and compi\n-00178ae0: 6c69 6e67 2061 6c6c 2070 726f 6a65 6374 ling all project\n-00178af0: 2073 6f75 7263 6520 636f 6465 7320 7769 source codes wi\n-00178b00: 7468 2074 6865 2063 6f6d 7069 6c65 2d74 th the compile-t\n-00178b10: 696d 6520 666c 6167 203c 636f 6465 3e23 ime flag #\n-00178b20: 5749 5448 5f4e 544c 4d3c 2f63 6f64 653e WITH_NTLM\n-00178b30: 2e3c 2f70 3e0a 3c70 3e49 6e20 796f 7572 .

    .

    In your\n-00178b40: 2061 7070 6c69 6361 7469 6f6e 2063 6f64 application cod\n-00178b50: 6520 7365 7420 7468 6520 3c63 6f64 653e e set the \n-00178b60: 636f 6e73 7420 6368 6172 2a20 3c61 2063 const char* soap::userid\n-00178c30: 3c2f 613e 3c2f 636f 6465 3e20 616e 6420 and \n-00178c40: 3c63 6f64 653e 636f 6e73 7420 6368 6172 const char\n-00178c50: 2a20 3c61 2063 6c61 7373 3d22 656c 2220 * soap::\n-00178d10: 7061 7373 7764 3c2f 613e 3c2f 636f 6465 passwd strings to a u\n-00178d30: 7365 726e 616d 6520 616e 6420 7061 7373 sername and pass\n-00178d40: 776f 7264 2e20 4120 7365 7276 6572 206d word. A server m\n-00178d50: 6179 2072 6571 7565 7374 204e 544c 4d20 ay request NTLM \n-00178d60: 6175 7468 656e 7469 6361 7469 6f6e 2061 authentication a\n-00178d70: 6e64 2064 656e 6965 7320 6163 6365 7373 nd denies access\n-00178d80: 2028 4854 5450 2034 3031 2061 7574 6865 (HTTP 401 authe\n-00178d90: 6e74 6963 6174 696f 6e20 7265 7175 6972 ntication requir\n-00178da0: 6564 206f 7220 4854 5450 2034 3037 2048 ed or HTTP 407 H\n-00178db0: 5454 5020 7072 6f78 7920 6175 7468 656e TTP proxy authen\n-00178dc0: 7469 6361 7469 6f6e 2072 6571 7569 7265 tication require\n-00178dd0: 6429 2077 6865 6e20 7468 6520 636c 6965 d) when the clie\n-00178de0: 6e74 2074 7269 6573 2074 6f20 636f 6e6e nt tries to conn\n-00178df0: 6563 7420 7769 7468 6f75 7420 4854 5450 ect without HTTP\n-00178e00: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n-00178e10: 286f 7220 7769 7468 2074 6865 2077 726f (or with the wro\n-00178e20: 6e67 2061 7574 6865 6e74 6963 6174 696f ng authenticatio\n-00178e30: 6e20 696e 666f 726d 6174 696f 6e29 2e3c n information).<\n-00178e40: 2f70 3e0a 3c70 3e48 6572 6520 6973 2061 /p>.

    Here is a\n-00178e50: 6e20 6578 616d 706c 6520 636c 6965 6e74 n example client\n-00178e60: 2063 6f64 6520 6672 6167 6d65 6e74 2074 code fragment t\n-00178e70: 6f20 7365 7420 7468 6520 4e54 4c4d 2061 o set the NTLM a\n-00178e80: 7574 6865 6e74 6963 6174 696f 6e20 7573 uthentication us\n-00178e90: 6572 6e61 6d65 2061 6e64 2070 6173 7377 ername and passw\n-00178ea0: 6f72 643a 3c2f 703e 0a3c 6469 7620 636c ord:

    ..<\n-00179040: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00179050: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_call_ns\n-00179070: 5f5f 7765 626d 6574 686f 6428 3c61 2063 __webmethod(soap, ...\n-001790b0: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    {.
    if (soap->\n-00179140: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;error<\n-00179190: 2f61 3e20 3d3d 2034 3031 2920 3c2f 6469 /a> == 401) .
    {
    .<\n-001791c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001791d0: 3e20 2020 203c 6120 636c 6173 733d 2263 >
    soap\n-00179200: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->userid = <\n-00179260: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-00179270: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-00179280: 3b5a 6170 686f 6426 7175 6f74 3b3c 2f73 ;Zaphod";
    . \n-001792b0: 2020 203c 6120 636c 6173 733d 2263 6f64 soap->\n-00179330: 7061 7373 7764 3c2f 613e 203d 203c 7370 passwd = "B\n-00179360: 6565 626c 6562 726f 7826 7175 6f74 3b3c eeblebrox"<\n-00179370: 2f73 7061 6e3e 3b20 3c2f 6469 763e 0a3c /span>;
    .<\n-00179380: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00179390: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n-001793b0: 663c 2f73 7061 6e3e 2028 736f 6170 5f63 f (soap_c\n-001793c0: 616c 6c5f 6e73 5f5f 7765 626d 6574 686f all_ns__webmetho\n-001793d0: 6428 3c61 2063 6c61 7373 3d22 636f 6465 d(soap, ...))
    .\n-00179410: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... // error
    .
    else
    .
    \n-001794b0: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // s\n-001794d0: 7563 6365 7373 3c2f 7370 616e 3e3c 2f64 uccess.
    }
    .\n-00179500: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    \n-00179520: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    Whe\n-0017a500: 6e20 7468 6520 6175 7468 656e 7469 6361 n the authentica\n-0017a510: 7469 6f6e 2066 6169 6c73 2028 7374 6167 tion fails (stag\n-0017a520: 6520 3120 616e 6420 3229 2c20 7468 6520 e 1 and 2), the \n-0017a530: 7365 7276 6963 6520 7265 7370 6f6e 7365 service response\n-0017a540: 2077 6974 6820 4854 5450 2065 7272 6f72 with HTTP error\n-0017a550: 2063 6f64 6520 2234 3031 2055 6e61 7574 code \"401 Unaut\n-0017a560: 686f 7269 7a65 6422 2061 6e64 203c 636f horized\" and soap::e\n-0017a620: 7272 6f72 3c2f 613e 3c2f 636f 6465 3e20 rror \n-0017a630: 6973 2073 6574 2074 6f20 4854 5450 2063 is set to HTTP c\n-0017a640: 6f64 6520 3430 312e 3c2f 703e 0a3c 703e ode 401.

    .

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

    .HTTP \n-0017a6c0: 7072 6f78 7920 4e54 4c4d 2061 7574 6865 proxy NTLM authe\n-0017a6d0: 6e74 6963 6174 696f 6e3c 2f68 333e 0a3c ntication

    .<\n-0017a6e0: 703e 466f 7220 4854 5450 2034 3037 2050 p>For HTTP 407 P\n-0017a6f0: 726f 7879 2041 7574 6865 6e74 6963 6174 roxy Authenticat\n-0017a700: 696f 6e20 5265 7175 6972 6564 2073 6574 ion Required set\n-0017a710: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap::\n-0017a7d0: 7072 6f78 795f 7573 6572 6964 3c2f 613e proxy_userid\n-0017a7e0: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and soap::proxy_pa\n-0017a8b0: 7373 7764 3c2f 613e 3c2f 636f 6465 3e3a sswd
    :\n-0017a8c0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    struct soap\n-0017a940: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap = soap_ne\n-0017a9d0: 7731 3c2f 613e 283c 6120 636c 6173 733d w1(SOAP_I\n-0017aa30: 4f5f 4b45 4550 414c 4956 453c 2f61 3e29 O_KEEPALIVE)\n-0017aa40: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap-><\n-0017aa90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0017aaa0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0017aab0: 6874 6d6c 2361 6331 3732 6264 3930 3139 html#ac172bd9019\n-0017aac0: 6166 6565 6262 3336 3335 6233 6139 6637 afeebb3635b3a9f7\n-0017aad0: 3261 3931 3031 223e 7072 6f78 795f 686f 2a9101\">proxy_ho\n-0017aae0: 7374 3c2f 613e 203d 203c 7370 616e 2063 st = "...&q\n-0017ab10: 756f 743b 3c2f 7370 616e 3e3b 203c 2f64 uot;; ..\n-0017abd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .{\n-0017ac70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (\n-0017acb0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n-0017ace0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >err\n-0017ad30: 6f72 3c2f 613e 203d 3d20 3430 3729 203c or == 407) <\n-0017ad40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    s\n-0017ada0: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->proxy_useri\n-0017ae00: 643c 2f61 3e20 3d20 3c73 7061 6e20 636c d = "Zaphod\n-0017ae30: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n-0017ae40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap->\n-0017ae90: 3c61 2063 6c61 7373 3d22 636f 6465 2220 proxy_p\n-0017aee0: 6173 7377 643c 2f61 3e20 3d20 3c73 7061 asswd = "Be\n-0017af10: 6562 6c65 6272 6f78 2671 756f 743b 3c2f eblebrox";
    .\n-0017af40: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap<\n-0017af70: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->authrealm =\n-0017afd0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-0017aff0: 6f74 3b55 7273 612d 4d69 6e6f 7226 7175 ot;Ursa-Minor&qu\n-0017b000: 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 ot;; .
    if (so\n-0017b050: 6170 5f63 616c 6c5f 6e73 5f5f 7765 626d ap_call_ns__webm\n-0017b060: 6574 686f 6428 3c61 2063 6c61 7373 3d22 ethod(soa\n-0017b090: 703c 2f61 3e2c 202e 2e2e 2929 203c 2f64 p, ...)) .
    ... \n-0017b0c0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // error
    . \n-0017b100: 2020 3c73 7061 6e20 636c 6173 733d 226b else\n-0017b120: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-0017b140: 2020 2020 2020 2e2e 2e20 3c73 7061 6e20 ... \n-0017b160: 2f2f 2073 7563 6365 7373 3c2f 7370 616e // success
    .
    i\n-0017b240: 6e74 2070 726f 7879 5f70 6f72 743c 2f64 nt proxy_port
    User-defin\n-0017b270: 6162 6c65 2070 726f 7879 2070 6f72 7420 able proxy port \n-0017b280: 7768 6963 6820 7368 6f75 6c64 2062 6520 which should be \n-0017b290: 7365 7420 746f 2063 6f6e 6e65 6374 2074 set to connect t\n-0017b2a0: 6872 6f75 6768 2061 6e20 4854 5450 2070 hrough an HTTP p\n-0017b2b0: 726f 7879 2028 7468 6520 7661 6c75 6520 roxy (the value \n-0017b2c0: 6973 2038 3038 3020 6279 202e 2e2e 3c2f is 8080 by ...
    Defini\n-0017b2f0: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n-0017b300: 7032 2e68 3a33 3930 363c 2f64 6976 3e3c p2.h:3906
    <\n-0017b310: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n-0017b360: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n-0017b370: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n-0017b3b0: 6f61 703a 3a70 726f 7879 5f75 7365 7269 oap::proxy_useri\n-0017b3c0: 643c 2f61 3e3c 2f64 6976 3e3c 6469 7620 d
    c\n-0017b3e0: 6f6e 7374 2063 6861 7220 2a20 7072 6f78 onst char * prox\n-0017b3f0: 795f 7573 6572 6964 3c2f 6469 763e 3c64 y_userid
    User-definable \n-0017b420: 7072 6f78 7920 6175 7468 6f72 697a 6174 proxy authorizat\n-0017b430: 696f 6e20 7573 6572 2069 6420 7374 7269 ion user id stri\n-0017b440: 6e67 2074 6f20 6175 7468 656e 7469 6361 ng to authentica\n-0017b450: 7465 2061 6e64 2063 6f6e 6e65 6374 2074 te and connect t\n-0017b460: 6f20 616e 2048 5454 5020 7072 6f78 792e o an HTTP proxy.\n-0017b470: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n-0017b490: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-0017b4a0: 6f61 7032 2e68 3a33 3931 313c 2f64 6976 oap2.h:3911
    .
    c\n-0017b580: 6f6e 7374 2063 6861 7220 2a20 7072 6f78 onst char * prox\n-0017b590: 795f 686f 7374 3c2f 6469 763e 3c64 6976 y_host
    U\n-0017b5b0: 7365 722d 6465 6669 6e61 626c 6520 7072 ser-definable pr\n-0017b5c0: 6f78 7920 686f 7374 206e 616d 6520 7374 oxy host name st\n-0017b5d0: 7269 6e67 2077 6869 6368 2073 686f 756c ring which shoul\n-0017b5e0: 6420 6265 2073 6574 2074 6f20 636f 6e6e d be set to conn\n-0017b5f0: 6563 7420 7468 726f 7567 6820 616e 2048 ect through an H\n-0017b600: 5454 5020 7072 6f78 792e 3c2f 6469 763e TTP proxy.
    \n-0017b610: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n-0017b630: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-0017b640: 3a33 3930 313c 2f64 6976 3e3c 2f64 6976 :3901
    .
    <\n-0017b6b0: 6120 6872 6566 3d22 7374 7275 6374 736f a href=\"structso\n-0017b6c0: 6170 2e68 746d 6c23 6164 3735 6134 6162 ap.html#ad75a4ab\n-0017b6d0: 6531 3139 6131 6137 3461 3236 6430 3634 e119a1a74a26d064\n-0017b6e0: 3031 6661 3131 6333 6122 3e73 6f61 703a 01fa11c3a\">soap:\n-0017b6f0: 3a70 726f 7879 5f70 6173 7377 643c 2f61 :proxy_passwd
    const\n-0017b720: 2063 6861 7220 2a20 7072 6f78 795f 7061 char * proxy_pa\n-0017b730: 7373 7764 3c2f 6469 763e 3c64 6976 2063 sswd
    Use\n-0017b750: 722d 6465 6669 6e61 626c 6520 7072 6f78 r-definable prox\n-0017b760: 7920 6175 7468 6f72 697a 6174 696f 6e20 y authorization \n-0017b770: 7061 7373 776f 7264 2073 7472 696e 6720 password string \n-0017b780: 746f 2061 7574 6865 6e74 6963 6174 6520 to authenticate \n-0017b790: 616e 6420 636f 6e6e 6563 7420 746f 2061 and connect to a\n-0017b7a0: 6e20 4854 5450 2070 726f 7879 2e3c 2f64 n HTTP proxy.
    Definit\n-0017b7d0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n-0017b7e0: 322e 683a 3339 3136 3c2f 6469 763e 3c2f 2.h:3916
    .

    T\n-0017b810: 6f20 6176 6f69 6420 7468 6520 6f76 6572 o avoid the over\n-0017b820: 6865 6164 206f 6620 7468 6520 6669 7273 head of the firs\n-0017b830: 7420 7265 6a65 6374 6564 2063 616c 6c2c t rejected call,\n-0017b840: 2075 7365 3a3c 2f70 3e0a 3c64 6976 2063 use:

    .
    \n-0017b860: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .\n-0017b9e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n-0017ba10: 2667 743b 3c61 2063 6c61 7373 3d22 636f >pro\n-0017ba60: 7879 5f68 6f73 743c 2f61 3e20 3d20 3c73 xy_host = "\n-0017ba90: 2e2e 2e26 7175 6f74 3b3c 2f73 7061 6e3e ..."\n-0017baa0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap-><\n-0017baf0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0017bb00: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0017bb10: 6874 6d6c 2361 3033 3735 3534 6664 3263 html#a037554fd2c\n-0017bb20: 6635 3466 6239 6136 6435 3332 3662 3131 f54fb9a6d5326b11\n-0017bb30: 6338 6666 6130 223e 7072 6f78 795f 706f c8ffa0\">proxy_po\n-0017bb40: 7274 3c2f 613e 203d 202e 2e2e 3b20 3c2f rt = ...; .
    so\n-0017bb90: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->proxy_userid\n-0017bbf0: 3c2f 613e 203d 203c 7370 616e 2063 6c61 = "Zaphod&\n-0017bc20: 7175 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f quot;; .
    so\n-0017bc70: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->proxy_passwd\n-0017bcd0: 3c2f 613e 203d 203c 7370 616e 2063 6c61 = "Beebleb\n-0017bd00: 726f 7826 7175 6f74 3b3c 2f73 7061 6e3e rox"\n-0017bd10: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap-><\n-0017bd60: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0017bd70: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0017bd80: 6874 6d6c 2361 3864 6265 3537 6435 3966 html#a8dbe57d59f\n-0017bd90: 3638 3364 3939 3330 3561 3434 6234 6437 683d99305a44b4d7\n-0017bda0: 3933 3962 6664 223e 6175 7468 7265 616c 939bfd\">authreal\n-0017bdb0: 6d3c 2f61 3e20 3d20 3c73 7061 6e20 636c m = "Ursa-M\n-0017bde0: 696e 6f72 2671 756f 743b 3c2f 7370 616e inor";
    .
    soap->\n-0017be40: 3c61 2063 6c61 7373 3d22 636f 6465 2220 ntlm_ch\n-0017be90: 616c 6c65 6e67 653c 2f61 3e20 3d20 3c73 allenge = "\n-0017bec0: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n-0017bed0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (soa\n-0017bf10: 705f 6361 6c6c 5f6e 735f 5f77 6562 6d65 p_call_ns__webme\n-0017bf20: 7468 6f64 283c 6120 636c 6173 733d 2263 thod(soap\n-0017bf50: 3c2f 613e 2c20 2e2e 2e29 2920 3c2f 6469 , ...)) .
    ... // error\n-0017bfa0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    else.
    ... // success
    .

    A client S\n-0017c880: 4f41 5020 7265 7175 6573 7420 7769 6c6c OAP request will\n-0017c890: 2068 6176 6520 7468 6520 666f 6c6c 6f77 have the follow\n-0017c8a0: 696e 6720 4854 5450 2068 6561 6465 723a ing HTTP header:\n-0017c8b0: 203c 2f70 3e3c 7072 6520 636c 6173 733d

    POST \n-0017c8d0: 2f58 5858 2048 5454 502f 312e 3120 0a48  /XXX HTTP/1.1 .H\n-0017c8e0: 6f73 743a 2059 5959 200a 5573 6572 2d41  ost: YYY .User-A\n-0017c8f0: 6765 6e74 3a20 6753 4f41 502f 322e 3820  gent: gSOAP/2.8 \n-0017c900: 0a43 6f6e 7465 6e74 2d54 7970 653a 2074  .Content-Type: t\n-0017c910: 6578 742f 786d 6c3b 2063 6861 7273 6574  ext/xml; charset\n-0017c920: 3d75 7466 2d38 200a 436f 6e74 656e 742d  =utf-8 .Content-\n-0017c930: 4c65 6e67 7468 3a20 5a5a 5a20 0a50 726f  Length: ZZZ .Pro\n-0017c940: 7879 2d41 7574 686f 7269 7a61 7469 6f6e  xy-Authorization\n-0017c950: 3a20 4261 7369 6320 5a33 566c 6333 5136  : Basic Z3Vlc3Q6\n-0017c960: 5a33 566c 6333 513d 200a 3c2f 7072 653e  Z3Vlc3Q= .
    \n-0017c970: 3c70 3e20 5768 656e 2058 2d46 6f72 7761

    When X-Forwa\n-0017c980: 7264 6564 2d46 6f72 2068 6561 6465 7273 rded-For headers\n-0017c990: 2061 7265 2072 6574 7572 6e65 6420 6279 are returned by\n-0017c9a0: 2074 6865 2070 726f 7879 2c20 7468 6520 the proxy, the \n-0017c9b0: 6865 6164 6572 2063 616e 2062 6520 6163 header can be ac\n-0017c9c0: 6365 7373 6564 2069 6e20 7468 6520 3c63 cessed in the soap:\n-0017ca60: 3a70 726f 7879 5f66 726f 6d3c 2f61 3e3c :proxy_from<\n-0017ca70: 2f63 6f64 653e 2073 7472 696e 672e 3c2f /code> string..

    The CONNEC\n-0017ca90: 5420 6d65 7468 6f64 2069 7320 7573 6564 T method is used\n-0017caa0: 2066 6f72 2048 5454 5020 7072 6f78 7920 for HTTP proxy \n-0017cab0: 6175 7468 656e 7469 6361 7469 6f6e 3a20 authentication: \n-0017cac0: 3c2f 703e 3c70 7265 2063 6c61 7373 3d22

    CONNEC\n-0017cae0: 5420 7365 7276 6572 2e65 7861 6d70 6c65  T server.example\n-0017caf0: 2e63 6f6d 3a38 3020 4854 5450 2f31 2e31  .com:80 HTTP/1.1\n-0017cb00: 0a3c 2f70 7265 3e3c 703e 2049 6e20 736f  .

    In so\n-0017cb10: 6d65 2063 6173 6573 2c20 796f 7520 7769 me cases, you wi\n-0017cb20: 6c6c 206e 6f74 6963 6520 7468 6174 2074 ll notice that t\n-0017cb30: 6865 2048 6f73 7420 4854 5450 2068 6561 he Host HTTP hea\n-0017cb40: 6465 7220 7573 6573 2074 6865 2043 4f4e der uses the CON\n-0017cb50: 4e45 4354 2070 726f 746f 636f 6c3a 203c NECT protocol: <\n-0017cb60: 2f70 3e3c 7072 6520 636c 6173 733d 2266 /p>

    CONNECT\n-0017cb80: 2073 6572 7665 722e 6578 616d 706c 652e   server.example.\n-0017cb90: 636f 6d3a 3830 2048 5454 502f 312e 3120  com:80 HTTP/1.1 \n-0017cba0: 0a48 6f73 743a 2073 6572 7665 722e 6578  .Host: server.ex\n-0017cbb0: 616d 706c 652e 636f 6d3a 3830 0a3c 2f70  ample.com:80.

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

    .

    .P\n-0017cc20: 6572 666f 726d 616e 6365 2069 6d70 726f erformance impro\n-0017cc30: 7665 6d65 6e74 2074 6970 733c 2f68 323e vement tips

    \n-0017cc40: 0a3c 703e 4865 7265 2061 7265 2073 6f6d .

    Here are som\n-0017cc50: 6520 7469 7073 2079 6f75 2063 616e 2075 e tips you can u\n-0017cc60: 7365 2074 6f20 7370 6565 6420 7570 2067 se to speed up g\n-0017cc70: 534f 4150 2e20 5468 6520 6465 6661 756c SOAP. The defaul\n-0017cc80: 7420 7365 7474 696e 6773 2061 7265 2063 t settings are c\n-0017cc90: 686f 7365 6e20 746f 206d 6178 696d 697a hosen to maximiz\n-0017cca0: 6520 706f 7274 6162 696c 6974 7920 616e e portability an\n-0017ccb0: 6420 636f 6d70 6174 6962 696c 6974 792e d compatibility.\n-0017ccc0: 2054 6865 2073 6574 7469 6e67 7320 6361 The settings ca\n-0017ccd0: 6e20 6265 2074 7765 616b 6564 2074 6f20 n be tweaked to \n-0017cce0: 6f70 7469 6d69 7a65 2074 6865 2070 6572 optimize the per\n-0017ccf0: 666f 726d 616e 6365 2061 7320 666f 6c6c formance as foll\n-0017cd00: 6f77 733a 3c2f 703e 0a3c 756c 3e0a 3c6c ows:

    .
      .Increase the b\n-0017cd20: 7566 6665 7220 7369 7a65 203c 636f 6465 uffer size #SOAP_BUFLEN by changing\n-0017cd50: 2074 6865 203c 636f 6465 3e23 534f 4150 the #SOAP\n-0017cd60: 5f42 5546 4c45 4e3c 2f63 6f64 653e 206d _BUFLEN m\n-0017cd70: 6163 726f 2069 6e20 3c65 6d3e 3c63 6f64 acro in gsoap/stdsoap2\n-0017cd90: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2e20 .h. \n-0017cda0: 5573 6520 6275 6666 6572 2073 697a 6520 Use buffer size \n-0017cdb0: 325e 3138 3d32 3632 3134 3420 666f 7220 2^18=262144 for \n-0017cdc0: 6578 616d 706c 652e 3c2f 6c69 3e0a 3c6c example..Use HTTP keep-\n-0017cde0: 616c 6976 6520 6174 2074 6865 2063 6c69 alive at the cli\n-0017cdf0: 656e 742d 7369 6465 2c20 7365 6520 5365 ent-side, see Se\n-0017ce00: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction \n-0017ce30: 5443 5020 616e 6420 4854 5450 206b 6565 TCP and HTTP kee\n-0017ce40: 702d 616c 6976 653c 2f61 3e20 2c20 7768 p-alive , wh\n-0017ce50: 656e 2074 6865 2063 6c69 656e 7420 6e65 en the client ne\n-0017ce60: 6564 7320 746f 206d 616b 6520 6120 7365 eds to make a se\n-0017ce70: 7269 6573 206f 6620 6361 6c6c 7320 746f ries of calls to\n-0017ce80: 2074 6865 2073 616d 6520 7365 7276 6572 the same server\n-0017ce90: 2e20 5365 7276 6572 2d73 6964 6520 6b65 . Server-side ke\n-0017cea0: 6570 2d61 6c69 7665 2073 7570 706f 7274 ep-alive support\n-0017ceb0: 2063 616e 2067 7265 6174 6c79 2069 6d70 can greatly imp\n-0017cec0: 726f 7665 2070 6572 666f 726d 616e 6365 rove performance\n-0017ced0: 206f 6620 626f 7468 2063 6c69 656e 7420 of both client \n-0017cee0: 616e 6420 7365 7276 6572 2e20 4275 7420 and server. But \n-0017cef0: 6265 2061 7761 7265 2074 6861 7420 636c be aware that cl\n-0017cf00: 6965 6e74 7320 616e 6420 7365 7276 6963 ients and servic\n-0017cf10: 6573 2075 6e64 6572 2055 6e69 782f 4c69 es under Unix/Li\n-0017cf20: 6e75 7820 7265 7175 6972 6520 7369 676e nux require sign\n-0017cf30: 616c 2068 616e 646c 6572 7320 746f 2063 al handlers to c\n-0017cf40: 6174 6368 2064 726f 7070 6564 2063 6f6e atch dropped con\n-0017cf50: 6e65 6374 696f 6e73 2e3c 2f6c 693e 0a3c nections..<\n-0017cf60: 6c69 3e55 7365 2048 5454 5020 6368 756e li>Use HTTP chun\n-0017cf70: 6b65 6420 7472 616e 7366 6572 732c 2073 ked transfers, s\n-0017cf80: 6565 2053 6563 7469 6f6e 203c 6120 636c ee Section HTTP chunked \n-0017cfc0: 7472 616e 7366 6572 2065 6e63 6f64 696e transfer encodin\n-0017cfd0: 673c 2f61 3e20 2e3c 2f6c 693e 0a3c 6c69 g ..Do not use gzip\n-0017cff0: 2063 6f6d 7072 6573 7369 6f6e 2c20 7369 compression, si\n-0017d000: 6e63 6520 7468 6520 6f76 6572 6865 6164 nce the overhead\n-0017d010: 206f 6620 636f 6d70 7265 7373 696f 6e20 of compression \n-0017d020: 6973 2074 7970 6963 616c 6c79 2068 6967 is typically hig\n-0017d030: 6865 7220 7468 616e 2074 6865 2062 616e her than the ban\n-0017d040: 6477 6964 7468 2067 6169 6e73 2e3c 2f6c dwidth gains..
    • Set the <\n-0017d060: 636f 6465 3e23 534f 4150 5f58 4d4c 5f54 code>#SOAP_XML_T\n-0017d070: 5245 453c 2f63 6f64 653e 2066 6c61 6720 REE flag \n-0017d080: 746f 2064 6973 6162 6c65 2069 642d 7265 to disable id-re\n-0017d090: 6620 6d75 6c74 692d 7265 6620 6f62 6a65 f multi-ref obje\n-0017d0a0: 6374 2073 6572 6961 6c69 7a61 7469 6f6e ct serialization\n-0017d0b0: 2e20 5468 6973 2062 6f6f 7374 7320 7065 . This boosts pe\n-0017d0c0: 7266 6f72 6d61 6e63 6520 7369 676e 6966 rformance signif\n-0017d0d0: 6963 616e 746c 7920 616e 6420 776f 726b icantly and work\n-0017d0e0: 7320 7769 7468 2053 4f41 5020 646f 6375 s with SOAP docu\n-0017d0f0: 6d65 6e74 2f6c 6974 6572 616c 2073 7479 ment/literal sty\n-0017d100: 6c65 2028 692e 652e 206e 6f20 6964 2d72 le (i.e. no id-r\n-0017d110: 6566 2067 7261 7068 2073 6572 6961 6c69 ef graph seriali\n-0017d120: 7a61 7469 6f6e 2061 7320 7265 7175 6972 zation as requir\n-0017d130: 6564 2077 6974 6820 534f 4150 2065 6e63 ed with SOAP enc\n-0017d140: 6f64 696e 6720 7374 796c 6529 2e20 446f oding style). Do\n-0017d150: 206e 6f74 2075 7365 2074 6869 7320 666f not use this fo\n-0017d160: 7220 534f 4150 2052 5043 2065 6e63 6f64 r SOAP RPC encod\n-0017d170: 6564 206d 6573 7361 6769 6e67 2e3c 2f6c ed messaging..
    • Compile <\n-0017d190: 656d 3e3c 636f 6465 3e67 736f 6170 2f73 em>gsoap/s\n-0017d1a0: 7464 736f 6170 322e 633c 2f63 6f64 653e tdsoap2.c\n-0017d1b0: 3c2f 656d 3e20 616e 6420 3c65 6d3e 3c63 and gsoap/stdsoa\n-0017d1d0: 7032 2e63 7070 3c2f 636f 6465 3e3c 2f65 p2.cpp and all other\n-0017d1f0: 2073 6f75 7263 6520 636f 6465 7320 7769 source codes wi\n-0017d200: 7468 2074 6865 2063 6f6d 7069 6c65 2074 th the compile t\n-0017d210: 696d 6520 666c 6167 203c 636f 6465 3e23 ime flag #\n-0017d220: 5749 5448 5f4e 4f49 4452 4546 3c2f 636f WITH_NOIDREF to improve p\n-0017d240: 6572 666f 726d 616e 6365 2065 7665 6e20 erformance even \n-0017d250: 6265 7474 6572 2062 7920 7065 726d 616e better by perman\n-0017d260: 656e 746c 7920 6469 7361 626c 696e 6720 ently disabling \n-0017d270: 6964 2d72 6566 206d 756c 7469 2d72 6566 id-ref multi-ref\n-0017d280: 206f 626a 6563 7420 7365 7269 616c 697a object serializ\n-0017d290: 6174 696f 6e2e 2044 6f20 6e6f 7420 7573 ation. Do not us\n-0017d2a0: 6520 7468 6973 2066 6f72 2053 4f41 5020 e this for SOAP \n-0017d2b0: 5250 4320 656e 636f 6465 6420 6d65 7373 RPC encoded mess\n-0017d2c0: 6167 696e 672e 3c2f 6c69 3e0a 3c6c 693e aging.
    • .
    • \n-0017d2d0: 446f 206e 6f74 2075 7365 2044 4542 5547 Do not use DEBUG\n-0017d2e0: 206d 6f64 652c 2073 696e 6365 2074 6865 mode, since the\n-0017d2f0: 206f 7665 7268 6561 6420 6f66 206c 6f67 overhead of log\n-0017d300: 6769 6e67 2069 7320 7369 676e 6966 6963 ging is signific\n-0017d310: 616e 742e 3c2f 6c69 3e0a 3c2f 756c 3e0a ant.
    • .
    .\n-0017d320: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

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

    .

    .Saf\n-0017d380: 6574 7920 6775 6172 6473 3c2f 6832 3e0a ety guards

    .\n-0017d390: 3c70 3e54 6865 2066 6f6c 6c6f 7769 6e67

    The following\n-0017d3a0: 2073 6574 7469 6e67 7320 6172 6520 696d settings are im\n-0017d3b0: 706f 7274 616e 7420 746f 2065 6e73 7572 portant to ensur\n-0017d3c0: 6520 7468 6174 2058 4d4c 206d 6573 7361 e that XML messa\n-0017d3d0: 6769 6e67 2069 7320 7361 6665 2062 7920 ging is safe by \n-0017d3e0: 6465 6669 6e69 6e67 2072 6561 736f 6e61 defining reasona\n-0017d3f0: 626c 6520 584d 4c20 6d65 7373 6167 6520 ble XML message \n-0017d400: 7265 7374 7269 6374 696f 6e73 2e20 416c restrictions. Al\n-0017d410: 736f 206d 6573 7361 6769 6e67 2074 696d so messaging tim\n-0017d420: 656f 7574 7320 7368 6f75 6c64 2062 6520 eouts should be \n-0017d430: 7365 7420 6173 2065 7870 6c61 696e 6564 set as explained\n-0017d440: 2069 6e20 5365 6374 696f 6e20 3c61 2063 in Section Timeout mana\n-0017d480: 6765 6d65 6e74 2066 6f72 206e 6f6e 2d62 gement for non-b\n-0017d490: 6c6f 636b 696e 6720 6f70 6572 6174 696f locking operatio\n-0017d4a0: 6e73 3c2f 613e 2e3c 2f70 3e0a 3c70 3e54 ns.

    .

    T\n-0017d4b0: 6865 2058 4d4c 2070 6172 7365 7220 6973 he XML parser is\n-0017d4c0: 2063 6f6e 6669 6775 7265 6420 746f 2072 configured to r\n-0017d4d0: 6573 7472 6963 7420 7468 6520 584d 4c20 estrict the XML \n-0017d4e0: 6e65 7374 696e 6720 6465 7074 6820 6c65 nesting depth le\n-0017d4f0: 7665 6c20 746f 203c 636f 6465 3e23 534f vel to #SO\n-0017d500: 4150 5f4d 4158 4c45 5645 4c3c 2f63 6f64 AP_MAXLEVEL and restricts\n-0017d520: 2074 6865 2072 6570 6561 7465 6420 6f63 the repeated oc\n-0017d530: 6375 7272 656e 6365 206f 6620 656c 656d currence of elem\n-0017d540: 656e 7473 2074 6861 7420 6172 6520 6465 ents that are de\n-0017d550: 7365 7269 616c 697a 6564 2069 6e74 6f20 serialized into \n-0017d560: 6172 7261 7973 2061 6e64 2063 6f6e 7461 arrays and conta\n-0017d570: 696e 6572 7320 6279 203c 636f 6465 3e23 iners by #\n-0017d580: 534f 4150 5f4d 4158 4f43 4355 5253 3c2f SOAP_MAXOCCURS. These mac\n-0017d5a0: 726f 7320 6361 6e20 6265 2063 6861 6e67 ros can be chang\n-0017d5b0: 6564 2c20 6275 7420 796f 7520 6361 6e20 ed, but you can \n-0017d5c0: 616c 736f 2063 6861 6e67 6520 7468 6520 also change the \n-0017d5d0: 666f 6c6c 6f77 696e 6720 636f 6e74 6578 following contex\n-0017d5e0: 7420 6174 7472 6962 7574 6573 2061 7420 t attributes at \n-0017d5f0: 7275 6e2d 7469 6d65 2c20 652e 672e 2074 run-time, e.g. t\n-0017d600: 6f20 656e 6861 6e63 6520 7468 6520 7361 o enhance the sa\n-0017d610: 6665 7479 2066 6f72 2073 7065 6369 6669 fety for specifi\n-0017d620: 6320 7365 7276 6963 6520 616e 642f 6f72 c service and/or\n-0017d630: 2063 6c69 656e 7420 6f70 6572 6174 696f client operatio\n-0017d640: 6e73 3a3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 ns:

    .

    With \n-00182bd0: 474e 5554 4c53 3a20 3c2f 703e 3c70 7265 GNUTLS:

    c++ -DWITH_GN\n-00182c00: 5554 4c53 202d 6f20 6d79 7072 6f67 206d UTLS -o myprog m\n-00182c10: 7970 726f 672e 6370 7020 7374 6473 6f61 yprog.cpp stdsoa\n-00182c20: 7032 2e63 7070 2073 6f61 7043 2e63 7070 p2.cpp soapC.cpp\n-00182c30: 2073 6f61 7053 6572 7665 722e 6370 7020 soapServer.cpp \n-00182c40: 2d6c 676e 7574 6c73 202d 6c67 6372 7970 -lgnutls -lgcryp\n-00182c50: 7420 2d6c 6770 672d 6572 726f 720a 3c2f t -lgpg-error.

    SSL supp\n-00182c70: 6f72 7420 666f 7220 7374 616e 642d 616c ort for stand-al\n-00182c80: 6f6e 6520 6753 4f41 5020 5765 6220 7365 one gSOAP Web se\n-00182c90: 7276 6963 6573 2069 7320 656e 6162 6c65 rvices is enable\n-00182ca0: 6420 6279 2063 616c 6c69 6e67 203c 636f d by calling soap_ssl_ac\n-00182d30: 6365 7074 3c2f 613e 3c2f 636f 6465 3e20 cept \n-00182d40: 746f 2070 6572 666f 726d 2074 6865 2053 to perform the S\n-00182d50: 534c 2f54 4c53 2068 616e 6473 6861 6b65 SL/TLS handshake\n-00182d60: 2061 6674 6572 203c 636f 6465 3e3c 6120 after soap_accep\n-00182df0: 743c 2f61 3e3c 2f63 6f64 653e 2e20 496e t. In\n-00182e00: 2061 6464 6974 696f 6e2c 2061 206b 6579 addition, a key\n-00182e10: 2066 696c 652c 2061 2043 4120 6669 6c65 file, a CA file\n-00182e20: 2028 6f72 2070 6174 6820 746f 2063 6572 (or path to cer\n-00182e30: 7469 6669 6361 7465 7329 2c20 4448 2066 tificates), DH f\n-00182e40: 696c 6520 2869 6620 5253 4120 6973 206e ile (if RSA is n\n-00182e50: 6f74 2075 7365 6429 2c20 616e 6420 7061 ot used), and pa\n-00182e60: 7373 776f 7264 206e 6565 6420 746f 2062 ssword need to b\n-00182e70: 6520 7375 7070 6c69 6564 2e20 496e 7374 e supplied. Inst\n-00182e80: 7275 6374 696f 6e73 206f 6e20 686f 7720 ructions on how \n-00182e90: 746f 2064 6f20 7468 6973 2063 616e 2062 to do this can b\n-00182ea0: 6520 666f 756e 6420 696e 2074 6865 204f e found in the O\n-00182eb0: 7065 6e53 534c 2064 6f63 756d 656e 7461 penSSL documenta\n-00182ec0: 7469 6f6e 203c 6120 6872 6566 3d22 6874 tion http://www\n-00182ef0: 2e6f 7065 6e73 736c 2e6f 7267 3c2f 613e .openssl.org\n-00182f00: 2e20 5365 6520 616c 736f 2053 6563 7469 . See also Secti\n-00182f10: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on SSL certi\n-00182f40: 6669 6361 7465 7320 616e 6420 6b65 7920 ficates and key \n-00182f50: 6669 6c65 733c 2f61 3e20 2e3c 2f70 3e0a files .

    .\n-00182f60: 3c70 3e4c 6574 2773 2074 616b 6520 6120

    Let's take a \n-00182f70: 6c6f 6f6b 2061 7420 616e 2065 7861 6d70 look at an examp\n-00182f80: 6c65 2053 534c 2073 6563 7572 6520 6d75 le SSL secure mu\n-00182f90: 6c74 692d 7468 7265 6164 6564 2073 7461 lti-threaded sta\n-00182fa0: 6e64 2d61 6c6f 6e65 2053 4f41 5020 5765 nd-alone SOAP We\n-00182fb0: 6220 5365 7276 6963 653a 3c2f 703e 0a3c b Service:

    .<\n-00182fc0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-00182fd0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    int main\n-00183010: 2829 203c 2f64 6976 3e0a 3c64 6976 2063 ()
    .
    {.
    SOAP_S\n-001830a0: 4f43 4b45 543c 2f61 3e20 6d2c 2073 3b20 OCKET m, s; \n-001830b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-00183120: 5448 5245 4144 5f54 5950 453c 2f61 3e20 THREAD_TYPE \n-00183130: 7469 643b 203c 2f64 6976 3e0a 3c64 6976 tid;
    . \n-00183150: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n-001831a0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *so\n-001831f0: 6170 3c2f 613e 2c20 2a74 736f 6170 3b20 ap, *tsoap; \n-00183200: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap\n-00183270: 5f73 736c 5f69 6e69 743c 2f61 3e28 293b _ssl_init();\n-00183280: 203c 7370 616e 2063 6c61 7373 3d22 636f /* init O\n-001832a0: 7065 6e53 534c 2028 736b 6970 7069 6e67 penSSL (skipping\n-001832b0: 2074 6869 7320 6f72 2063 616c 6c69 6e67 this or calling\n-001832c0: 206d 756c 7469 706c 6520 7469 6d65 7320 multiple times \n-001832d0: 6973 204f 4b2c 2073 696e 6365 2074 6865 is OK, since the\n-001832e0: 2065 6e67 696e 6520 7769 6c6c 2069 6e69 engine will ini\n-001832f0: 7420 5353 4c20 6175 746f 6d61 7469 6361 t SSL automatica\n-00183300: 6c6c 7929 202a 2f3c 2f73 7061 6e3e 3c2f lly) */.
    /\n-00183340: 2a20 736f 6170 5f73 736c 5f6e 6f69 6e69 * soap_ssl_noini\n-00183350: 7428 293b 202a 2f3c 2f73 7061 6e3e 203c t(); */ <\n-00183360: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00183370: 656e 7422 3e2f 2a20 646f 206e 6f74 2069 ent\">/* do not i\n-00183380: 6e69 7420 4f70 656e 5353 4c20 2869 6620 nit OpenSSL (if \n-00183390: 5353 4c20 6973 2061 6c72 6561 6479 2069 SSL is already i\n-001833a0: 6e69 7469 616c 697a 6564 2065 6c73 6577 nitialized elsew\n-001833b0: 6865 7265 2069 6e20 7468 6973 2061 7070 here in this app\n-001833c0: 6c69 6361 7469 6f6e 2920 2a2f 3c2f 7370 lication) */
    .
    if (CRYPTO_threa\n-00183470: 645f 7365 7475 703c 2f61 3e28 2929 203c d_setup()) <\n-00183480: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00183490: 656e 7422 3e2f 2a20 4f70 656e 5353 4c20 ent\">/* OpenSSL \n-001834a0: 7468 7265 6164 206d 7574 6578 2073 6574 thread mutex set\n-001834b0: 7570 202a 2f3c 2f73 7061 6e3e 3c2f 6469 up */.
    {
    .<\n-001834e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001834f0: 3e20 2020 2066 7072 696e 7466 2873 7464 > fprintf(std\n-00183500: 6572 722c 203c 7370 616e 2063 6c61 7373 err, "Cannot se\n-00183530: 7475 7020 7468 7265 6164 206d 7574 6578 tup thread mutex\n-00183540: 5c6e 2671 756f 743b 3c2f 7370 616e 3e29 \\n")\n-00183550: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    e\n-00183570: 7869 7428 4558 4954 5f46 4149 4c55 5245 xit(EXIT_FAILURE\n-00183580: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    } \n-001835a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap = soap_new()\n-00183650: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    if\n-00183690: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap_ssl_serv\n-001836f0: 6572 5f63 6f6e 7465 7874 3c2f 613e 283c er_context(<\n-00183700: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00183710: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00183720: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-00183730: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..
    \n-001837d0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-001837f0: 6f74 3b73 6572 7665 722e 7065 6d26 7175 ot;server.pem&qu\n-00183800: 6f74 3b3c 2f73 7061 6e3e 2c20 2020 2020 ot;, \n-00183810: 203c 7370 616e 2063 6c61 7373 3d22 636f /* keyfil\n-00183830: 653a 2072 6571 7569 7265 6420 7768 656e e: required when\n-00183840: 2073 6572 7665 7220 6d75 7374 2061 7574 server must aut\n-00183850: 6865 6e74 6963 6174 6520 746f 2063 6c69 henticate to cli\n-00183860: 656e 7473 2028 7365 6520 5353 4c20 646f ents (see SSL do\n-00183870: 6373 206f 6e20 686f 7720 746f 206f 6274 cs on how to obt\n-00183880: 6169 6e20 7468 6973 2066 696c 6529 202a ain this file) *\n-00183890: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    .\n-001838a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    "password\n-001838e0: 2671 756f 743b 3c2f 7370 616e 3e2c 2020 ", \n-001838f0: 2020 2020 2020 3c73 7061 6e20 636c 6173 /* p\n-00183910: 6173 7377 6f72 6420 746f 2072 6561 6420 assword to read \n-00183920: 7468 6520 6b65 7920 6669 6c65 2028 6e6f the key file (no\n-00183930: 7420 7573 6564 2077 6974 6820 474e 5554 t used with GNUT\n-00183940: 4c53 2920 2a2f 3c2f 7370 616e 3e20 3c2f LS) */ .
    "cac\n-00183990: 6572 742e 7065 6d26 7175 6f74 3b3c 2f73 ert.pem", /* optional cac\n-001839d0: 6572 7420 6669 6c65 2074 6f20 7374 6f72 ert file to stor\n-001839e0: 6520 7472 7573 7465 6420 6365 7274 6966 e trusted certif\n-001839f0: 6963 6174 6573 202a 2f3c 2f73 7061 6e3e icates */\n-00183a00: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    NU\n-00183a20: 4c4c 2c20 2020 2020 2020 2020 2020 2020 LL, \n-00183a30: 203c 7370 616e 2063 6c61 7373 3d22 636f /* option\n-00183a50: 616c 2063 6170 6174 6820 746f 2064 6972 al capath to dir\n-00183a60: 6563 746f 7279 2077 6974 6820 7472 7573 ectory with trus\n-00183a70: 7465 6420 6365 7274 6966 6963 6174 6573 ted certificates\n-00183a80: 202a 2f3c 2f73 7061 6e3e 203c 2f64 6976 */ .
    "dh512.\n-00183ad0: 7065 6d26 7175 6f74 3b3c 2f73 7061 6e3e pem"\n-00183ae0: 2c20 2020 2020 2020 3c73 7061 6e20 636c , /*\n-00183b00: 2044 4820 6669 6c65 206e 616d 6520 6f72 DH file name or\n-00183b10: 2044 4820 6b65 7920 6c65 6e20 6269 7473 DH key len bits\n-00183b20: 2028 6d69 6e69 6d75 6d20 6973 2035 3132 (minimum is 512\n-00183b30: 2c20 652e 672e 2026 7175 6f74 3b35 3132 , e.g. "512\n-00183b40: 2671 756f 743b 2920 746f 2067 656e 6572 ") to gener\n-00183b50: 6174 6520 4448 2070 6172 616d 2c20 6966 ate DH param, if\n-00183b60: 204e 554c 4c20 7573 6520 5253 4120 2a2f NULL use RSA */\n-00183b70: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n-00183b80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00183b90: 3e20 2020 204e 554c 4c2c 2020 2020 2020 > NULL, \n-00183ba0: 2020 2020 2020 2020 3c73 7061 6e20 636c /*\n-00183bc0: 2069 6620 7261 6e64 6669 6c65 213d 4e55 if randfile!=NU\n-00183bd0: 4c4c 3a20 7573 6520 6120 6669 6c65 2077 LL: use a file w\n-00183be0: 6974 6820 7261 6e64 6f6d 2064 6174 6120 ith random data \n-00183bf0: 746f 2073 6565 6420 7261 6e64 6f6d 6e65 to seed randomne\n-00183c00: 7373 202a 2f3c 2f73 7061 6e3e 2020 3c2f ss */ .
    NULL \n-00183c30: 2020 2020 2020 2020 2020 2020 2020 3c73 /* optional \n-00183c60: 7365 7276 6572 2069 6465 6e74 6966 6963 server identific\n-00183c70: 6174 696f 6e20 746f 2065 6e61 626c 6520 ation to enable \n-00183c80: 5353 4c20 7365 7373 696f 6e20 6361 6368 SSL session cach\n-00183c90: 696e 6720 746f 2073 7065 6564 2075 7020 ing to speed up \n-00183ca0: 544c 5320 286d 7573 7420 6265 2061 2075 TLS (must be a u\n-00183cb0: 6e69 7175 6520 6e61 6d65 2920 2a2f 3c2f nique name) */
    . \n-00183ce0: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    {<\n-00183d00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n-00183d70: 6f61 705f 7072 696e 745f 6661 756c 743c oap_print_fault<\n-00183d80: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n-00183db0: 2f61 3e2c 2073 7464 6572 7229 3b20 3c2f /a>, stderr); .
    exit(\n-00183de0: 4558 4954 5f46 4149 4c55 5245 293b 203c EXIT_FAILURE); <\n-00183df0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } .
    m = soap_\n-00183e80: 6269 6e64 3c2f 613e 283c 6120 636c 6173 bind(\n-00183eb0: 736f 6170 3c2f 613e 2c20 4e55 4c4c 2c20 soap, NULL, \n-00183ec0: 3138 3030 302c 2042 4143 4b4c 4f47 293b 18000, BACKLOG);\n-00183ed0: 203c 7370 616e 2063 6c61 7373 3d22 636f /* use po\n-00183ef0: 7274 2031 3830 3030 202a 2f3c 2f73 7061 rt 18000 */
    .
    if\n-00183f40: 2028 213c 6120 636c 6173 733d 2263 6f64 (!soap_valid_\n-00183fa0: 736f 636b 6574 3c2f 613e 286d 2929 203c socket(m)) <\n-00183fb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    soap_\n-00184040: 7072 696e 745f 6661 756c 743c 2f61 3e28 print_fault(\n-00184050: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-00184080: 2073 7464 6572 7229 3b20 3c2f 6469 763e stderr);
    \n-00184090: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    exit(EXIT\n-001840b0: 5f46 4149 4c55 5245 293b 203c 2f64 6976 _FAILURE); .
    }
    .<\n-001840e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001840f0: 3e20 2066 7072 696e 7466 2873 7464 6572 > fprintf(stder\n-00184100: 722c 203c 7370 616e 2063 6c61 7373 3d22 r, &\n-00184120: 7175 6f74 3b53 6f63 6b65 7420 636f 6e6e quot;Socket conn\n-00184130: 6563 7469 6f6e 2073 7563 6365 7373 6675 ection successfu\n-00184140: 6c3a 206d 6173 7465 7220 736f 636b 6574 l: master socket\n-00184150: 203d 2025 645c 6e26 7175 6f74 3b3c 2f73 = %d\\n", m);
    \n-00184170: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    w\n-001841a0: 6869 6c65 3c2f 7370 616e 3e20 2831 293c hile (1)<\n-001841b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    s = soap\n-00184240: 5f61 6363 6570 743c 2f61 3e28 3c61 2063 _accept(soap); .
    fprin\n-001842a0: 7466 2873 7464 6572 722c 203c 7370 616e tf(stderr, "Soc\n-001842d0: 6b65 7420 636f 6e6e 6563 7469 6f6e 2073 ket connection s\n-001842e0: 7563 6365 7373 6675 6c3a 2073 6c61 7665 uccessful: slave\n-001842f0: 2073 6f63 6b65 7420 3d20 2564 5c6e 2671 socket = %d\\n&q\n-00184300: 756f 743b 3c2f 7370 616e 3e2c 2073 293b uot;, s);\n-00184310: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    if (!soap_valid\n-001843b0: 5f73 6f63 6b65 743c 2f61 3e28 7329 2920 _socket(s)) \n-001843c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    if\n-00184420: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap->e\n-001844a0: 7272 6e75 6d3c 2f61 3e29 203c 7370 616e rrnum) /* accept faile\n-001844d0: 642c 2074 7279 2061 6761 696e 2061 6674 d, try again aft\n-001844e0: 6572 2031 2073 6563 6f6e 6420 2a2f 3c2f er 1 second */
    . \n-00184510: 2020 2020 7b3c 2f64 6976 3e0a 3c64 6976 {
    . \n-00184530: 2020 2020 2020 3c61 2063 6c61 7373 3d22 soap_pr\n-00184590: 696e 745f 6661 756c 743c 2f61 3e28 3c61 int_fault(soap, s\n-001845d0: 7464 6572 7229 3b20 3c2f 6469 763e 0a3c tderr);
    .<\n-001845e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001845f0: 3e20 2020 2020 2020 2073 6c65 6570 2831 > sleep(1\n-00184600: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    \n-00184620: 2020 203c 7370 616e 2063 6c61 7373 3d22 con\n-00184640: 7469 6e75 653c 2f73 7061 6e3e 3b20 3c73 tinue; /* retry */<\n-00184670: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-00184690: 2020 2020 207d 3c2f 6469 763e 0a3c 6469 }
    . \n-001846b0: 2020 2020 2066 7072 696e 7466 2873 7464 fprintf(std\n-001846c0: 6572 722c 203c 7370 616e 2063 6c61 7373 err, "Server ti\n-001846f0: 6d65 6420 6f75 745c 6e26 7175 6f74 3b3c med out\\n"<\n-00184700: 2f73 7061 6e3e 293b 3c2f 6469 763e 0a3c /span>);
    .<\n-00184710: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00184720: 3e20 2020 2020 203c 7370 616e 2063 6c61 > break; <\n-00184750: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } ..\n-00184840: 2020 2020 3c73 7061 6e20 636c 6173 733d if\n-00184860: 3c2f 7370 616e 3e20 2821 7473 6f61 7029 (!tsoap)\n-00184870: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .\n-00184930: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    else.
    while (THREAD_C\n-00184a10: 5245 4154 453c 2f61 3e28 2661 6d70 3b74 REATE(&t\n-00184a20: 6964 2c20 283c 7370 616e 2063 6c61 7373 id, (v\n-00184a40: 6f69 643c 2f73 7061 6e3e 2a28 2a29 283c oid*(*)(<\n-00184a50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00184a60: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void*))&proc\n-00184a80: 6573 735f 7265 7175 6573 742c 2028 3c73 ess_request, (void*)tsoap)).
    sle\n-00184ae0: 6570 2831 293b 203c 7370 616e 2063 6c61 ep(1); /* \n-00184b00: 6661 696c 6564 2c20 7472 7920 6167 6169 failed, try agai\n-00184b10: 6e20 2a2f 3c2f 7370 616e 3e3c 2f64 6976 n */.
    }
    .<\n-00184b40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00184b50: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_fre\n-00184bb0: 653c 2f61 3e28 3c61 2063 6c61 7373 3d22 e(soa\n-00184be0: 703c 2f61 3e29 3b20 3c73 7061 6e20 636c p); /*\n-00184c00: 2064 6561 6c6c 6f63 6174 6573 2053 534c deallocates SSL\n-00184c10: 2063 6f6e 7465 7874 202a 2f3c 2f73 7061 context */
    .
    CR\n-00184c90: 5950 544f 5f74 6872 6561 645f 636c 6561 YPTO_thread_clea\n-00184ca0: 6e75 703c 2f61 3e28 293b 203c 7370 616e nup(); /* OpenSSL thre\n-00184cd0: 6164 206d 7574 6578 2063 6c65 616e 7570 ad mutex cleanup\n-00184ce0: 202a 2f3c 2f73 7061 6e3e 3c2f 6469 763e */
    \n-00184cf0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    r\n-00184d20: 6574 7572 6e3c 2f73 7061 6e3e 2030 3b20 eturn 0; \n-00184d30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    .<\n-00184d80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-00184d90: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void *process_re\n-00184db0: 7175 6573 7428 3c73 7061 6e20 636c 6173 quest(\n-00184dd0: 766f 6964 3c2f 7370 616e 3e20 2a74 736f void *tso\n-00184de0: 6170 2920 3c2f 6469 763e 0a3c 6469 7620 ap)
    .
    {.
    s\n-00184e30: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap = \n-00184ea0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap\n-00184ef0: 3c2f 613e 2a29 7473 6f61 703b 3c2f 6469 *)tsoap;.
    THRE\n-00184f70: 4144 5f44 4554 4143 483c 2f61 3e28 3c61 AD_DETACH(THREAD_ID\n-00184fe0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .\n-001850c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_p\n-00185130: 7269 6e74 5f66 6175 6c74 3c2f 613e 283c rint_fault(<\n-00185140: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00185150: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00185160: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-00185170: 7374 6465 7272 293b 203c 2f64 6976 3e0a stderr);
    .\n-00185180: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    el\n-001851b0: 7365 3c2f 7370 616e 3e20 3c2f 6469 763e se
    \n-001851c0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..<\n-00185270: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00185280: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_des\n-001852e0: 7472 6f79 3c2f 613e 283c 6120 636c 6173 troy(\n-00185310: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); .\n-001853d0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..\n-00185480: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re\n-001854b0: 7475 726e 3c2f 7370 616e 3e20 4e55 4c4c turn NULL\n-001854c0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    }.
    int soap_ssl_se\n-001855d0: 7276 6572 5f63 6f6e 7465 7874 2873 7472 rver_context(str\n-001855e0: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n-001855f0: 736f 6170 5f73 736c 5f66 6c61 6773 2066 soap_ssl_flags f\n-00185600: 6c61 6773 2c20 636f 6e73 7420 6368 6172 lags, const char\n-00185610: 202a 6b65 7966 696c 652c 2063 6f6e 7374 *keyfile, const\n-00185620: 2063 6861 7220 2a70 6173 7377 6f72 642c char *password,\n-00185630: 2063 6f6e 7374 2063 6861 7220 2a63 6166 const char *caf\n-00185640: 696c 652c 2063 6f6e 7374 2063 6861 7220 ile, const char \n-00185650: 2a63 6170 6174 682c 2063 6f6e 7374 2063 *capath, const c\n-00185660: 6861 7220 2a64 6866 696c 652c 2063 6f6e har *dhfile, con\n-00185670: 7374 2063 6861 7220 2a72 616e 6466 696c st char *randfil\n-00185680: 652c 2063 6f6e 7374 2063 6861 7220 2a73 e, const char *s\n-00185690: 6964 293c 2f64 6976 3e3c 6469 7620 636c id)
    Init\n-001856b0: 6961 6c69 7a65 2074 6865 2073 6572 7665 ialize the serve\n-001856c0: 722d 7369 6465 2053 534c 2f54 4c53 2063 r-side SSL/TLS c\n-001856d0: 6f6e 7465 7874 2e3c 2f64 6976 3e3c 2f64 ontext.
    .
    soa\n-00185790: 705f 7373 6c5f 696e 6974 3c2f 613e 3c2f p_ssl_init
    void soa\n-001857c0: 705f 7373 6c5f 696e 6974 2876 6f69 6429 p_ssl_init(void)\n-001857d0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Initial\n-001857f0: 697a 6520 7468 6520 5353 4c2f 544c 5320 ize the SSL/TLS \n-00185800: 6c69 6272 6172 792e 3c2f 6469 763e 3c2f library.
    .
    .
    \n-00185a90: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    int CRYPTO_t\n-00185ab0: 6872 6561 645f 636c 6561 6e75 7028 293c hread_cleanup()<\n-00185ac0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Cleanup \n-00185ae0: 6675 6e63 7469 6f6e 2066 6f72 204f 7065 function for Ope\n-00185af0: 6e53 534c 2076 6572 7369 6f6e 7320 7072 nSSL versions pr\n-00185b00: 696f 7220 746f 2031 2e31 2e31 2e3c 2f64 ior to 1.1.1.
    .
    <\n-00185b80: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n-00185b90: 726f 7570 5f5f 7373 6c2e 6874 6d6c 2367 roup__ssl.html#g\n-00185ba0: 6139 3930 3038 3365 6666 6135 6438 6564 a990083effa5d8ed\n-00185bb0: 3933 3166 6437 3564 6332 3633 3061 3263 931fd75dc2630a2c\n-00185bc0: 6322 3e73 6f61 705f 7373 6c5f 6163 6365 c\">soap_ssl_acce\n-00185bd0: 7074 3c2f 613e 3c2f 6469 763e 3c64 6976 pt
    \n-00185bf0: 696e 7420 736f 6170 5f73 736c 5f61 6363 int soap_ssl_acc\n-00185c00: 6570 7428 7374 7275 6374 2073 6f61 7020 ept(struct soap \n-00185c10: 2a73 6f61 7029 3c2f 6469 763e 3c64 6976 *soap)
    A\n-00185c30: 6363 6570 7420 5353 4c2f 544c 5320 636f ccept SSL/TLS co\n-00185c40: 6e6e 6563 7469 6f6e 2e3c 2f64 6976 3e3c nnection.
    <\n-00185c50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-00185d30: 696e 7420 4352 5950 544f 5f74 6872 6561 int CRYPTO_threa\n-00185d40: 645f 7365 7475 7028 293c 2f64 6976 3e3c d_setup()
    <\n-00185d50: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-00185d60: 223e 5365 7475 7020 6675 6e63 7469 6f6e \">Setup function\n-00185d70: 2066 6f72 204f 7065 6e53 534c 2076 6572 for OpenSSL ver\n-00185d80: 7369 6f6e 7320 7072 696f 7220 746f 2031 sions prior to 1\n-00185d90: 2e31 2e31 2074 6f20 7365 7420 6c6f 636b .1.1 to set lock\n-00185da0: 7320 666f 7220 6d75 6c74 692d 7468 7265 s for multi-thre\n-00185db0: 6164 6564 2053 534c 2f54 4c53 2061 7070 aded SSL/TLS app\n-00185dc0: 6c69 6361 7469 6f2e 2e2e 3c2f 6469 763e licatio...
    \n-00185dd0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    The so\n-00185e80: 6170 5f73 736c 5f73 6572 7665 725f 636f ap_ssl_server_co\n-00185e90: 6e74 6578 743c 2f61 3e3c 2f63 6f64 653e ntext\n-00185ea0: 2066 756e 6374 696f 6e20 696e 6974 6961 function initia\n-00185eb0: 6c69 7a65 7320 7468 6520 7365 7276 6572 lizes the server\n-00185ec0: 2d73 6964 6520 5353 4c20 636f 6e74 6578 -side SSL contex\n-00185ed0: 742e 2054 6865 203c 656d 3e3c 636f 6465 t. The server.pem key file\n-00185f00: 2069 7320 7468 6520 7365 7276 6572 2773 is the server's\n-00185f10: 2070 7269 7661 7465 206b 6579 2063 6f6e private key con\n-00185f20: 6361 7465 6e61 7465 6420 7769 7468 2069 catenated with i\n-00185f30: 7473 2063 6572 7469 6669 6361 7465 2e20 ts certificate. \n-00185f40: 5468 6520 3c65 6d3e 3c63 6f64 653e 6361 The ca\n-00185f50: 6365 7274 2e70 656d 3c2f 636f 6465 3e3c cert.pem<\n-00185f60: 2f65 6d3e 2069 7320 7573 6564 2074 6f20 /em> is used to \n-00185f70: 6175 7468 656e 7469 6361 7465 2063 6c69 authenticate cli\n-00185f80: 656e 7473 2061 6e64 2063 6f6e 7461 696e ents and contain\n-00185f90: 7320 7468 6520 636c 6965 6e74 2063 6572 s the client cer\n-00185fa0: 7469 6669 6361 7465 732e 2041 6c74 6572 tificates. Alter\n-00185fb0: 6e61 7469 7665 6c79 2061 2064 6972 6563 natively a direc\n-00185fc0: 746f 7279 206e 616d 6520 6361 6e20 6265 tory name can be\n-00185fd0: 2073 7065 6369 6669 6564 2e20 5468 6973 specified. This\n-00185fe0: 2064 6972 6563 746f 7279 2069 7320 6173 directory is as\n-00185ff0: 7375 6d65 6420 746f 2063 6f6e 7461 696e sumed to contain\n-00186000: 2074 6865 2063 6572 7469 6669 6361 7465 the certificate\n-00186010: 732e 2054 6865 203c 656d 3e3c 636f 6465 s. The dh512.pem file spec\n-00186040: 6966 6965 7320 7468 6174 2044 4820 7769 ifies that DH wi\n-00186050: 6c6c 2062 6520 7573 6564 2066 6f72 206b ll be used for k\n-00186060: 6579 2061 6772 6565 6d65 6e74 2069 6e73 ey agreement ins\n-00186070: 7465 6164 206f 6620 5253 412e 2041 206e tead of RSA. A n\n-00186080: 756d 6572 6963 2076 616c 7565 2067 7265 umeric value gre\n-00186090: 6174 6572 2074 6861 6e20 3531 3220 6361 ater than 512 ca\n-001860a0: 6e20 6265 2070 726f 7669 6465 6420 696e n be provided in\n-001860b0: 7374 6561 6420 6173 2061 2073 7472 696e stead as a strin\n-001860c0: 6720 636f 6e73 7461 6e74 2028 652e 672e g constant (e.g.\n-001860d0: 203c 636f 6465 3e22 3531 3222 3c2f 636f \"512\") to allow th\n-001860f0: 6520 656e 6769 6e65 2074 6f20 6765 6e65 e engine to gene\n-00186100: 7261 7465 2074 6865 2044 4820 7061 7261 rate the DH para\n-00186110: 6d65 7465 7273 206f 6e20 7468 6520 666c meters on the fl\n-00186120: 7920 2874 6869 7320 6361 6e20 7461 6b65 y (this can take\n-00186130: 2061 2077 6869 6c65 2920 7261 7468 6572 a while) rather\n-00186140: 2074 6861 6e20 7265 7472 6965 7669 6e67 than retrieving\n-00186150: 2074 6865 6d20 6672 6f6d 2061 2066 696c them from a fil\n-00186160: 652e 2054 6865 2072 616e 6466 696c 6520 e. The randfile \n-00186170: 656e 7472 7920 6361 6e20 6265 2075 7365 entry can be use\n-00186180: 6420 746f 2073 6565 6420 7468 6520 5052 d to seed the PR\n-00186190: 4e47 2e20 5468 6520 6c61 7374 2065 6e74 NG. The last ent\n-001861a0: 7279 2065 6e61 626c 6520 7365 7276 6572 ry enable server\n-001861b0: 2d73 6964 6520 7365 7373 696f 6e20 6361 -side session ca\n-001861c0: 6368 696e 6720 746f 2073 7065 6564 2075 ching to speed u\n-001861d0: 7020 544c 532e 2041 2075 6e69 7175 6520 p TLS. A unique \n-001861e0: 7365 7276 6572 206e 616d 6520 6973 2072 server name is r\n-001861f0: 6571 7569 7265 642e 3c2f 703e 0a3c 703e equired.

    .

    \n-00186200: 596f 7520 6361 6e20 7370 6563 6966 7920 You can specify \n-00186210: 6120 6369 7068 6572 206c 6973 7420 746f a cipher list to\n-00186220: 2075 7365 2077 6974 6820 544c 5376 312e use with TLSv1.\n-00186230: 3220 616e 6420 6265 6c6f 7720 7769 7468 2 and below with\n-00186240: 203c 636f 6465 3e53 534c 5f43 5458 5f73 SSL_CTX_s\n-00186250: 6574 5f63 6970 6865 725f 6c69 7374 2873 et_cipher_list(s\n-00186260: 6f61 702d 2667 743b 6374 782c 2022 2e2e oap->ctx, \"..\n-00186270: 2e22 293c 2f63 6f64 653e 2077 6865 7265 .\") where\n-00186280: 203c 636f 6465 3e73 6f61 702d 2667 743b soap->\n-00186290: 6374 783c 2f63 6f64 653e 2069 7320 7468 ctx is th\n-001862a0: 6520 5353 4c20 636f 6e74 6578 7420 6372 e SSL context cr\n-001862b0: 6561 7465 6420 6279 203c 636f 6465 3e3c eated by <\n-001862c0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001862d0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-001862e0: 5f73 736c 2e68 746d 6c23 6761 3334 3932 _ssl.html#ga3492\n-001862f0: 3436 3563 6464 3861 6137 3166 6537 3436 465cdd8aa71fe746\n-00186300: 3139 3964 3338 3432 6361 6337 2220 7469 199d3842cac7\" ti\n-00186310: 746c 653d 2249 6e69 7469 616c 697a 6520 tle=\"Initialize \n-00186320: 7468 6520 7365 7276 6572 2d73 6964 6520 the server-side \n-00186330: 5353 4c2f 544c 5320 636f 6e74 6578 742e SSL/TLS context.\n-00186340: 223e 736f 6170 5f73 736c 5f73 6572 7665 \">soap_ssl_serve\n-00186350: 725f 636f 6e74 6578 7428 293c 2f61 3e3c r_context()<\n-00186360: 2f63 6f64 653e 2e20 4c69 6b65 7769 7365 /code>. Likewise\n-00186370: 2c20 7573 6520 3c63 6f64 653e 5353 4c5f , use SSL_\n-00186380: 4354 585f 7365 745f 6369 7068 6572 7375 CTX_set_ciphersu\n-00186390: 6974 6573 2873 6f61 702d 2667 743b 6374 ites(soap->ct\n-001863a0: 782c 2022 2e2e 2e22 293c 2f63 6f64 653e x, \"...\")\n-001863b0: 2074 6f20 636f 6e66 6967 7572 6520 7468 to configure th\n-001863c0: 6520 6176 6169 6c61 626c 6520 544c 5376 e available TLSv\n-001863d0: 312e 3320 6369 7068 6572 7375 6974 6573 1.3 ciphersuites\n-001863e0: 2e3c 2f70 3e0a 3c70 3e57 6520 7265 6665 .

    .

    We refe\n-001863f0: 7220 746f 2074 6865 204f 7065 6e53 534c r to the OpenSSL\n-00186400: 2064 6f63 756d 656e 7461 7469 6f6e 2061 documentation a\n-00186410: 6e64 206d 616e 7561 6c20 7061 6765 7320 nd manual pages \n-00186420: 6f66 203c 636f 6465 3e53 534c 5f43 5458 of SSL_CTX\n-00186430: 5f73 6574 5f63 6970 6865 725f 6c69 7374 _set_cipher_list\n-00186440: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and SSL_CTX_set_ci\n-00186460: 7068 6572 7375 6974 6573 3c2f 636f 6465 phersuites for details on\n-00186480: 2074 6865 206c 6174 6573 7420 6369 7068 the latest ciph\n-00186490: 6572 206c 6973 7473 2061 6e64 2073 7569 er lists and sui\n-001864a0: 7465 7320 6176 6169 6c61 626c 6520 746f tes available to\n-001864b0: 2075 7365 2e3c 2f70 3e0a 3c70 3e54 6865 use.

    .

    The\n-001864c0: 2047 4e55 544c 5320 6d75 7465 7820 6c6f GNUTLS mutex lo\n-001864d0: 636b 2073 6574 7570 2069 7320 6175 746f ck setup is auto\n-001864e0: 6d61 7469 6361 6c6c 7920 7065 7266 6f72 matically perfor\n-001864f0: 6d65 6420 696e 2074 6865 2065 6e67 696e med in the engin\n-00186500: 652c 2062 7574 206f 6e6c 7920 7768 656e e, but only when\n-00186510: 2050 4f53 4958 2074 6872 6561 6473 2061 POSIX threads a\n-00186520: 7265 2064 6574 6563 7465 6420 616e 6420 re detected and \n-00186530: 6176 6169 6c61 626c 652e 3c2f 703e 0a3c available.

    .<\n-00186540: 703e 416c 6c20 4f70 656e 5353 4c20 7665 p>All OpenSSL ve\n-00186550: 7273 696f 6e73 2070 7269 6f72 2074 6f20 rsions prior to \n-00186560: 312e 312e 3020 7265 7175 6972 6520 6d75 1.1.0 require mu\n-00186570: 7465 7820 6c6f 636b 7320 746f 2062 6520 tex locks to be \n-00186580: 6578 706c 6963 6974 6c79 2073 6574 2075 explicitly set u\n-00186590: 7020 696e 2079 6f75 7220 636f 6465 2066 p in your code f\n-001865a0: 6f72 206d 756c 7469 2d74 6872 6561 6465 or multi-threade\n-001865b0: 6420 6170 706c 6963 6174 696f 6e73 2062 d applications b\n-001865c0: 7920 6361 6c6c 696e 6720 3c63 6f64 653e y calling \n-001865d0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 \n-00186690: 4352 5950 544f 5f74 6872 6561 645f 7365 CRYPTO_thread_se\n-001866a0: 7475 7028 293c 2f61 3e3c 2f63 6f64 653e tup()\n-001866b0: 2061 6e64 203c 636f 6465 3e3c 6120 636c and CRYPTO_t\n-00186750: 6872 6561 645f 636c 6561 6e75 7028 293c hread_cleanup()<\n-00186760: 2f61 3e3c 2f63 6f64 653e 2061 7320 7761 /a> as wa\n-00186770: 7320 7368 6f77 6e20 696e 2074 6865 2063 s shown in the c\n-00186780: 6f64 6520 6162 6f76 652e 204f 7065 6e53 ode above. OpenS\n-00186790: 534c 2031 2e31 2e30 2061 6e64 2067 7265 SL 1.1.0 and gre\n-001867a0: 6174 6572 2064 6f65 7320 6e6f 7420 7265 ater does not re\n-001867b0: 7175 6972 6520 7468 6573 6520 6c6f 636b quire these lock\n-001867c0: 7320 746f 2062 6520 7365 7420 7570 2e20 s to be set up. \n-001867d0: 4966 2079 6f75 2061 7265 206e 6f74 2073 If you are not s\n-001867e0: 7572 6520 7768 6963 6820 7665 7273 696f ure which versio\n-001867f0: 6e20 6f66 204f 7065 6e53 534c 2079 6f75 n of OpenSSL you\n-00186800: 206d 6179 2062 6520 7573 696e 6720 7769 may be using wi\n-00186810: 7468 2079 6f75 7220 6d75 6c74 692d 7468 th your multi-th\n-00186820: 7265 6164 6564 2061 7070 6c69 6361 7469 readed applicati\n-00186830: 6f6e 2c20 7468 656e 2073 6574 2075 7020 on, then set up \n-00186840: 7468 6520 6c6f 636b 732e 3c2f 703e 0a3c the locks.

    .<\n-00186850: 703e 466f 7220 556e 6978 2061 6e64 204c p>For Unix and L\n-00186860: 696e 7578 2c20 6d61 6b65 2073 7572 6520 inux, make sure \n-00186870: 796f 7520 6861 7665 2073 6967 6e61 6c20 you have signal \n-00186880: 6861 6e64 6c65 7273 2073 6574 2069 6e20 handlers set in \n-00186890: 796f 7572 2073 6572 7669 6365 2061 6e64 your service and\n-001868a0: 2f6f 7220 636c 6965 6e74 2061 7070 6c69 /or client appli\n-001868b0: 6361 7469 6f6e 7320 746f 2063 6174 6368 cations to catch\n-001868c0: 2062 726f 6b65 6e20 636f 6e6e 6563 7469 broken connecti\n-001868d0: 6f6e 7320 283c 636f 6465 3e53 4947 5049 ons (SIGPI\n-001868e0: 5045 3c2f 636f 6465 3e29 3a3c 2f70 3e0a PE):

    .\n-001868f0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    .
    <\n-00186c30: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-00186c40: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-00186c50: 3b73 6572 7665 722e 7065 6d26 7175 6f74 ;server.pem"\n-00186c60: 3b3c 2f73 7061 6e3e 2c20 3c2f 6469 763e ;,
    \n-00186c70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    "passwor\n-00186cb0: 6426 7175 6f74 3b3c 2f73 7061 6e3e 2c20 d", \n-00186cc0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    "c\n-00186d00: 6163 6572 742e 7065 6d26 7175 6f74 3b3c acert.pem"<\n-00186d10: 2f73 7061 6e3e 2c20 3c2f 6469 763e 0a3c /span>,
    .<\n-00186d20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00186d30: 3e20 2020 204e 554c 4c2c 203c 2f64 6976 > NULL, .
    "dh512.\n-00186d80: 7065 6d26 7175 6f74 3b3c 2f73 7061 6e3e pem"\n-00186d90: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    N\n-00186db0: 554c 4c2c 203c 2f64 6976 3e0a 3c64 6976 ULL,
    . \n-00186dd0: 2020 4e55 4c4c 2929 203c 2f64 6976 3e0a NULL))
    .\n-00186de0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    soap_print_faul\n-00186e70: 743c 2f61 3e28 2661 6d70 3b3c 6120 636c t(&soap, stde\n-00186eb0: 7272 293b 203c 2f64 6976 3e0a 3c64 6976 rr);
    . \n-00186ed0: 6578 6974 2845 5849 545f 4641 494c 5552 exit(EXIT_FAILUR\n-00186ee0: 4529 3b20 3c2f 6469 763e 0a3c 6469 7620 E);
    .
    }.
    #define SOAP_S\n-00187000: 534c 5f52 4551 5549 5245 5f43 4c49 454e SL_REQUIRE_CLIEN\n-00187010: 545f 4155 5448 454e 5449 4341 5449 4f4e T_AUTHENTICATION\n-00187020: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    soap_ss\n-00187040: 6c5f 666c 6167 7320 666c 6167 2066 6f72 l_flags flag for\n-00187050: 2073 6572 7665 7273 2074 6f20 7265 7175 servers to requ\n-00187060: 6972 6520 636c 6965 6e74 7320 746f 2061 ire clients to a\n-00187070: 7574 6865 6e74 6963 6174 6520 746f 2073 uthenticate to s\n-00187080: 6572 7665 7273 2064 7572 696e 6720 7468 ervers during th\n-00187090: 6520 4854 5450 5320 6861 6e64 7368 2e2e e HTTPS handsh..\n-001870a0: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n-001870c0: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n-001870d0: 736f 6170 322e 683a 3538 3534 3c2f 6469 soap2.h:5854
    .
    <\n-001870f0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-00187100: 3c70 3e54 6869 7320 7265 7175 6972 6573

    This requires\n-00187110: 2065 6163 6820 636c 6965 6e74 2074 6f20 each client to \n-00187120: 6175 7468 656e 7469 6361 7465 2077 6974 authenticate wit\n-00187130: 6820 6974 7320 6365 7274 6966 6963 6174 h its certificat\n-00187140: 652c 2069 6e20 6164 6469 7469 6f6e 2066 e, in addition f\n-00187150: 6f72 2074 6865 2073 6572 7665 7220 746f or the server to\n-00187160: 2061 7574 6865 6e74 6963 6174 6520 746f authenticate to\n-00187170: 2074 6865 2063 6c69 656e 742e 3c2f 703e the client.

    \n-00187180: 0a3c 703e 5369 6e63 6520 7265 6c65 6173 .

    Since releas\n-00187190: 6520 7665 7273 696f 6e20 322e 382e 3230 e version 2.8.20\n-001871a0: 2c20 5353 4c20 7633 2069 7320 6469 7361 , SSL v3 is disa\n-001871b0: 626c 6564 2e20 546f 2065 6e61 626c 6520 bled. To enable \n-001871c0: 5353 4c20 7633 2074 6f67 6574 6865 7220 SSL v3 together \n-001871d0: 7769 7468 2054 4c53 2031 2e30 2061 6e64 with TLS 1.0 and\n-001871e0: 2068 6967 6865 722c 2075 7365 203c 636f higher, use #SOAP_SSLv3_T\n-00187200: 4c53 7631 3c2f 636f 6465 3e20 7769 7468 LSv1 with\n-00187210: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_s\n-001872a0: 736c 5f73 6572 7665 725f 636f 6e74 6578 sl_server_contex\n-001872b0: 743c 2f61 3e3c 2f63 6f64 653e 2e20 546f t. To\n-001872c0: 2075 7365 2054 4c53 2031 2e31 2061 6e64 use TLS 1.1 and\n-001872d0: 2031 2e32 2075 7365 203c 636f 6465 3e53 1.2 use S\n-001872e0: 4f41 505f 544c 5376 315f 3120 7c20 534f OAP_TLSv1_1 | SO\n-001872f0: 4150 5f54 4c53 7631 5f32 3c2f 636f 6465 AP_TLSv1_2. To use TLS 1.\n-00187310: 3220 6f6e 6c79 2075 7365 203c 636f 6465 2 only use #SOAP_TLSv1_2. To use SS\n-00187340: 4c20 7633 206f 6e6c 7920 7573 6520 3c63 L v3 only use #SOAP_SSLv3<\n-00187360: 2f63 6f64 653e 2e3c 2f70 3e0a 3c70 3e54 /code>.

    .

    T\n-00187370: 6865 203c 636f 6465 3e63 6163 6572 743c he cacert<\n-00187380: 2f63 6f64 653e 2066 696c 6520 616e 6420 /code> file and \n-00187390: 3c63 6f64 653e 6361 7061 7468 3c2f 636f capath are optional\n-001873b0: 2e20 4569 7468 6572 206f 6e65 2063 616e . Either one can\n-001873c0: 2062 6520 7370 6563 6966 6965 6420 7768 be specified wh\n-001873d0: 656e 2063 6c69 656e 7473 206d 7573 7420 en clients must \n-001873e0: 7275 6e20 6f6e 206e 6f6e 2d74 7275 7374 run on non-trust\n-001873f0: 6564 2073 7973 7465 6d73 2028 3c63 6f64 ed systems (capath \n-00187410: 6973 206e 6f74 2075 7365 6420 7769 7468 is not used with\n-00187420: 2047 4e55 544c 5329 2e20 5765 2077 616e GNUTLS). We wan\n-00187430: 7420 746f 2061 766f 6964 2073 746f 7269 t to avoid stori\n-00187440: 6e67 2074 7275 7374 6564 2063 6572 7469 ng trusted certi\n-00187450: 6669 6361 7465 7320 696e 2074 6865 2064 ficates in the d\n-00187460: 6566 6175 6c74 206c 6f63 6174 696f 6e20 efault location \n-00187470: 6f6e 2074 6865 2066 696c 6520 7379 7374 on the file syst\n-00187480: 656d 2077 6865 6e20 7468 6174 2069 7320 em when that is \n-00187490: 6e6f 7420 7365 6375 7265 2e20 5468 6572 not secure. Ther\n-001874a0: 6566 6f72 652c 2061 2066 6c61 7420 3c65 efore, a flat cacert.p\n-001874c0: 656d 3c2f 636f 6465 3e3c 2f65 6d3e 2066 em f\n-001874d0: 696c 6520 6f72 2064 6972 6563 746f 7279 ile or directory\n-001874e0: 2063 616e 2062 6520 7370 6563 6966 6965 can be specifie\n-001874f0: 6420 746f 2073 746f 7265 2074 7275 7374 d to store trust\n-00187500: 6564 2063 6572 7469 6669 6361 7465 732e ed certificates.\n-00187510: 3c2f 703e 0a3c 703e 5468 6520 6753 4f41

    .

    The gSOA\n-00187520: 5020 7061 636b 6167 6520 696e 636c 7564 P package includ\n-00187530: 6573 2061 203c 656d 3e3c 636f 6465 3e63 es a c\n-00187540: 6163 6572 7473 2e70 656d 3c2f 636f 6465 acerts.pem file with\n-00187560: 2074 6865 2063 6572 7469 6669 6361 7465 the certificate\n-00187570: 7320 6f66 2061 6c6c 2063 6572 7469 6669 s of all certifi\n-00187580: 6361 7465 2061 7574 686f 7269 7469 6573 cate authorities\n-00187590: 2e20 596f 7520 6361 6e20 7573 6520 7468 . You can use th\n-001875a0: 6973 2066 696c 6520 746f 2076 6572 6966 is file to verif\n-001875b0: 7920 7468 6520 6175 7468 656e 7469 6361 y the authentica\n-001875c0: 7469 6f6e 206f 6620 7365 7276 6572 7320 tion of servers \n-001875d0: 7468 6174 2070 726f 7669 6465 2063 6572 that provide cer\n-001875e0: 7469 6669 6361 7465 7320 6973 7375 6564 tificates issued\n-001875f0: 2062 7920 7468 6573 6520 4341 732e 3c2f by these CAs..

    The cacert.pem, \n-00187630: 3c63 6f64 653e 636c 6965 6e74 2e70 656d client.pem\n-00187640: 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 616e , an\n-00187650: 6420 3c65 6d3e 3c63 6f64 653e 7365 7276 d serv\n-00187660: 6572 2e70 656d 3c2f 636f 6465 3e3c 2f65 er.pem files in the \n-00187680: 6753 4f41 5020 7061 636b 6167 6520 6172 gSOAP package ar\n-00187690: 6520 6578 616d 706c 6573 206f 6620 7365 e examples of se\n-001876a0: 6c66 2d73 6967 6e65 6420 6365 7274 6966 lf-signed certif\n-001876b0: 6963 6174 6573 2e20 5468 6520 3c65 6d3e icates. The \n-001876c0: 3c63 6f64 653e 636c 6965 6e74 2e70 656d client.pem\n-001876d0: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 6e64 and\n-001876e0: 203c 656d 3e3c 636f 6465 3e73 6572 7665 serve\n-001876f0: 722e 7065 6d3c 2f63 6f64 653e 3c2f 656d r.pem contain the cl\n-00187710: 6965 6e74 2f73 6572 7665 7220 7072 6976 ient/server priv\n-00187720: 6174 6520 6b65 7920 636f 6e63 6174 656e ate key concaten\n-00187730: 6174 6564 2077 6974 6820 7468 6520 6365 ated with the ce\n-00187740: 7274 6966 6963 6174 652e 2054 6865 206b rtificate. The k\n-00187750: 6579 6669 6c65 7320 283c 656d 3e3c 636f eyfiles (client.pem and server.p\n-00187790: 656d 3c2f 636f 6465 3e3c 2f65 6d3e 2920 em) \n-001877a0: 6172 6520 6372 6561 7465 6420 6279 2063 are created by c\n-001877b0: 6f6e 6361 7465 6e61 7469 6e67 2074 6865 oncatenating the\n-001877c0: 2070 7269 7661 7465 206b 6579 2050 454d private key PEM\n-001877d0: 2077 6974 6820 7468 6520 6365 7274 6966 with the certif\n-001877e0: 6963 6174 6520 5045 4d2e 2054 6865 206b icate PEM. The k\n-001877f0: 6579 6669 6c65 2073 686f 756c 6420 6e6f eyfile should no\n-00187800: 7420 6265 2073 6861 7265 6420 7769 7468 t be shared with\n-00187810: 2061 6e79 2070 6172 7479 2e20 5769 7468 any party. With\n-00187820: 204f 7065 6e53 534c 2c20 796f 7520 6361 OpenSSL, you ca\n-00187830: 6e20 656e 6372 7970 7420 7468 6520 6b65 n encrypt the ke\n-00187840: 7966 696c 6573 2077 6974 6820 6120 7061 yfiles with a pa\n-00187850: 7373 776f 7264 2074 6f20 6f66 6665 7220 ssword to offer \n-00187860: 736f 6d65 2070 726f 7465 6374 696f 6e20 some protection \n-00187870: 616e 6420 7468 6520 7061 7373 776f 7264 and the password\n-00187880: 2069 7320 7573 6564 2069 6e20 7468 6520 is used in the \n-00187890: 636c 6965 6e74 2f73 6572 7665 7220 636f client/server co\n-001878a0: 6465 2074 6f20 7265 6164 2074 6865 206b de to read the k\n-001878b0: 6579 6669 6c65 2e20 474e 5554 4c53 2064 eyfile. GNUTLS d\n-001878c0: 6f65 7320 6e6f 7420 7375 7070 6f72 7420 oes not support \n-001878d0: 7468 6973 2066 6561 7475 7265 2061 6e64 this feature and\n-001878e0: 2063 616e 6e6f 7420 656e 6372 7970 7420 cannot encrypt \n-001878f0: 6f72 2064 6563 7279 7074 2061 206b 6579 or decrypt a key\n-00187900: 6669 6c65 2e3c 2f70 3e0a 3c64 6c20 636c file.

    .
    Warnin\n-00187930: 673c 2f64 743e 3c64 643e 4974 2069 7320 g
    It is \n-00187940: 696d 706f 7274 616e 7420 7468 6174 2074 important that t\n-00187950: 6865 203c 636f 6465 3e23 5749 5448 5f4f he #WITH_O\n-00187960: 5045 4e53 534c 3c2f 636f 6465 3e20 6d61 PENSSL ma\n-00187970: 6372 6f20 6d75 7374 2062 6520 636f 6e73 cro must be cons\n-00187980: 6973 7465 6e74 6c79 2064 6566 696e 6564 istently defined\n-00187990: 2074 6f20 636f 6d70 696c 6520 7468 6520 to compile the \n-001879a0: 736f 7572 6365 732c 2073 7563 6820 6173 sources, such as\n-001879b0: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n-001879c0: 2f73 7464 736f 6170 322e 6370 703c 2f63 /stdsoap2.cpp, <\n-001879e0: 636f 6465 3e73 6f61 7043 2e63 7070 3c2f code>soapC.cpp, \n-00187a00: 3c63 6f64 653e 736f 6170 436c 6965 6e74 soapClient\n-00187a10: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp\n-00187a20: 2c20 3c65 6d3e 3c63 6f64 653e 736f 6170 , soap\n-00187a30: 5365 7276 6572 2e63 7070 3c2f 636f 6465 Server.cpp, and all \n-00187a50: 6170 706c 6963 6174 696f 6e20 736f 7572 application sour\n-00187a60: 6365 7320 7468 6174 2069 6e63 6c75 6465 ces that include\n-00187a70: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n-00187a80: 2f73 7464 736f 6170 322e 683c 2f63 6f64 /stdsoap2.h or <\n-00187aa0: 636f 6465 3e73 6f61 7048 2e68 3c2f 636f code>soapH.h. If the\n-00187ac0: 206d 6163 726f 7320 6172 6520 6e6f 7420 macros are not \n-00187ad0: 636f 6e73 6973 7465 6e74 6c79 2075 7365 consistently use\n-00187ae0: 642c 2074 6865 2061 7070 6c69 6361 7469 d, the applicati\n-00187af0: 6f6e 2077 696c 6c20 6372 6173 6820 6475 on will crash du\n-00187b00: 6520 746f 2061 206d 6973 6d61 7463 6865 e to a mismatche\n-00187b10: 7320 696e 2074 6865 2064 6563 6c61 7261 s in the declara\n-00187b20: 7469 6f6e 2061 6e64 2061 6363 6573 7320 tion and access \n-00187b30: 6f66 2074 6865 203c 636f 6465 3e3c 6120 of the soap context\n-00187ba0: 2e3c 2f64 643e 3c2f 646c 3e0a 3c70 3e53 .
    .

    S\n-00187bb0: 6565 2061 6c73 6f20 4150 4920 646f 6375 ee also API docu\n-00187bc0: 6d65 6e74 6174 696f 6e20 4d6f 6475 6c65 mentation Module\n-00187bd0: 203c 6120 636c 6173 733d 2265 6c22 2068 SSL\n-00187c00: 2f54 4c53 2063 6f6e 7465 7874 2061 6e64 /TLS context and\n-00187c10: 2066 756e 6374 696f 6e73 3c2f 613e 2066 functions f\n-00187c20: 6f72 206d 6f72 6520 6465 7461 696c 7320 or more details \n-00187c30: 6f6e 2074 6865 2053 534c 2f54 4c53 2066 on the SSL/TLS f\n-00187c40: 756e 6374 696f 6e73 2e3c 2f70 3e0a 3c70 unctions.

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

    .Secure clients\n-00187cc0: 2077 6974 6820 4854 5450 533c 2f68 323e with HTTPS

    \n-00187cd0: 0a3c 703e 546f 2075 7469 6c69 7a65 2048 .

    To utilize H\n-00187ce0: 5454 5053 2f53 534c 2c20 796f 7520 6e65 TTPS/SSL, you ne\n-00187cf0: 6564 2074 6f20 696e 7374 616c 6c20 7468 ed to install th\n-00187d00: 6520 4f70 656e 5353 4c20 6c69 6272 6172 e OpenSSL librar\n-00187d10: 7920 6f6e 2079 6f75 7220 706c 6174 666f y on your platfo\n-00187d20: 726d 206f 7220 474e 5554 4c53 2066 6f72 rm or GNUTLS for\n-00187d30: 2061 206c 6967 6874 2d77 6569 6768 7420 a light-weight \n-00187d40: 5353 4c2f 544c 5320 6c69 6272 6172 792e SSL/TLS library.\n-00187d50: 2041 6674 6572 2069 6e73 7461 6c6c 6174 After installat\n-00187d60: 696f 6e2c 2063 6f6d 7069 6c65 2061 6c6c ion, compile all\n-00187d70: 2074 6865 2073 6f75 7263 6573 206f 6620 the sources of \n-00187d80: 796f 7572 2061 7070 6c69 6361 7469 6f6e your application\n-00187d90: 2077 6974 6820 636f 6d70 696c 652d 7469 with compile-ti\n-00187da0: 6d65 2066 6c61 6720 3c63 6f64 653e 2357 me flag #W\n-00187db0: 4954 485f 4f50 454e 5353 4c3c 2f63 6f64 ITH_OPENSSL (or #WI\n-00187dd0: 5448 5f47 4e55 544c 533c 2f63 6f64 653e TH_GNUTLS\n-00187de0: 2077 6865 6e20 7573 696e 6720 474e 5554 when using GNUT\n-00187df0: 4c53 292e 2046 6f72 2065 7861 6d70 6c65 LS). For example\n-00187e00: 206f 6e20 4c69 6e75 783a 203c 2f70 3e3c on Linux:

    <\n-00187e10: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n-00187e20: 656e 7422 3e20 632b 2b20 2d44 5749 5448 ent\"> c++ -DWITH\n-00187e30: 5f4f 5045 4e53 534c 206d 7963 6c69 656e _OPENSSL myclien\n-00187e40: 742e 6370 7020 7374 6473 6f61 702e 6370 t.cpp stdsoap.cp\n-00187e50: 7020 736f 6170 432e 6370 7020 736f 6170 p soapC.cpp soap\n-00187e60: 436c 6965 6e74 2e63 7070 202d 6c73 736c Client.cpp -lssl\n-00187e70: 202d 6c63 7279 7074 6f0a 3c2f 7072 653e -lcrypto.\n-00187e80: 3c70 3e20 6f72 2055 6e69 783a 203c 2f70

    or Unix:

     c++ -DWI\n-00187eb0: 5448 5f4f 5045 4e53 534c 206d 7963 6c69  TH_OPENSSL mycli\n-00187ec0: 656e 742e 6370 7020 7374 6473 6f61 702e  ent.cpp stdsoap.\n-00187ed0: 6370 7020 736f 6170 432e 6370 7020 736f  cpp soapC.cpp so\n-00187ee0: 6170 436c 6965 6e74 2e63 7070 202d 6c78  apClient.cpp -lx\n-00187ef0: 6e65 7420 2d6c 736f 636b 6574 202d 6c6e  net -lsocket -ln\n-00187f00: 736c 202d 6c73 736c 202d 6c63 7279 7074  sl -lssl -lcrypt\n-00187f10: 6f0a 3c2f 7072 653e 3c70 3e20 6f72 2079  o.

    or y\n-00187f20: 6f75 2063 616e 2061 6464 2074 6865 2066 ou can add the f\n-00187f30: 6f6c 6c6f 7769 6e67 206c 696e 6520 746f ollowing line to\n-00187f40: 203c 656d 3e3c 636f 6465 3e73 6f61 7064 soapd\n-00187f50: 6566 732e 683c 2f63 6f64 653e 3c2f 656d efs.h:

    .
    <\n-00187f90: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n-00187fa0: 726f 6365 7373 6f72 223e 2364 6566 696e rocessor\">#defin\n-00187fb0: 6520 5749 5448 5f4f 5045 4e53 534c 3c2f e WITH_OPENSSL
    .

    and compil\n-00187ff0: 6520 7769 7468 2063 6f6d 7069 6c65 2d74 e with compile-t\n-00188000: 696d 6520 666c 6167 203c 636f 6465 3e23 ime flag #\n-00188010: 5749 5448 5f53 4f41 5044 4546 535f 483c WITH_SOAPDEFS_H<\n-00188020: 2f63 6f64 653e 2074 6f20 696e 636c 7564 /code> to includ\n-00188030: 6520 3c65 6d3e 3c63 6f64 653e 736f 6170 e soap\n-00188040: 6465 6673 2e68 3c2f 636f 6465 3e3c 2f65 defs.h in your proje\n-00188060: 6374 2e20 416c 7465 726e 6174 6976 656c ct. Alternativel\n-00188070: 792c 2063 6f6d 7069 6c65 2077 6974 6820 y, compile with \n-00188080: 474e 5554 4c53 3a20 3c2f 703e 3c70 7265 GNUTLS:

    c++ -DWITH_GN\n-001880b0: 5554 4c53 206d 7963 6c69 656e 742e 6370 UTLS myclient.cp\n-001880c0: 7020 7374 6473 6f61 702e 6370 7020 736f p stdsoap.cpp so\n-001880d0: 6170 432e 6370 7020 736f 6170 436c 6965 apC.cpp soapClie\n-001880e0: 6e74 2e63 7070 202d 6c67 6e75 746c 7320 nt.cpp -lgnutls \n-001880f0: 2d6c 6763 7279 7074 202d 6c67 7067 2d65 -lgcrypt -lgpg-e\n-00188100: 7272 6f72 0a3c 2f70 7265 3e3c 703e 4120 rror.

    A \n-00188110: 636c 6965 6e74 2070 726f 6772 616d 2073 client program s\n-00188120: 696d 706c 7920 7573 6573 2074 6865 2070 imply uses the p\n-00188130: 7265 6669 7820 3c65 6d3e 3c63 6f64 653e refix \n-00188140: 6874 7470 733a 3c2f 636f 6465 3e3c 2f65 https: instead of http: in the\n-00188180: 2065 6e64 706f 696e 7420 5552 4c20 6f66 endpoint URL of\n-00188190: 2061 2073 6572 7669 6365 206f 7065 7261 a service opera\n-001881a0: 7469 6f6e 2063 616c 6c20 746f 2061 2057 tion call to a W\n-001881b0: 6562 2053 6572 7669 6365 2074 6f20 7573 eb Service to us\n-001881c0: 6520 656e 6372 7970 7465 6420 7472 616e e encrypted tran\n-001881d0: 7366 6572 7320 2869 6620 7468 6520 7365 sfers (if the se\n-001881e0: 7276 6963 6520 7375 7070 6f72 7473 2048 rvice supports H\n-001881f0: 5454 5053 292e 2059 6f75 206e 6565 6420 TTPS). You need \n-00188200: 746f 2073 7065 6369 6679 2074 6865 2063 to specify the c\n-00188210: 6c69 656e 742d 7369 6465 206b 6579 2066 lient-side key f\n-00188220: 696c 6520 616e 6420 7061 7373 776f 7264 ile and password\n-00188230: 206f 6620 7468 6520 6b65 7966 696c 653a of the keyfile:\n-00188240: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    struct soap\n-001882c0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-001882f0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    soap_\n-00188360: 7373 6c5f 696e 6974 3c2f 613e 2829 3b20 ssl_init(); \n-00188370: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* init Op\n-00188390: 656e 5353 4c20 2873 6b69 7070 696e 6720 enSSL (skipping \n-001883a0: 7468 6973 206f 7220 6361 6c6c 696e 6720 this or calling \n-001883b0: 6d75 6c74 6970 6c65 2074 696d 6573 2069 multiple times i\n-001883c0: 7320 4f4b 2c20 7369 6e63 6520 7468 6520 s OK, since the \n-001883d0: 656e 6769 6e65 2077 696c 6c20 696e 6974 engine will init\n-001883e0: 2053 534c 2061 7574 6f6d 6174 6963 616c SSL automatical\n-001883f0: 6c79 2920 2a2f 3c2f 7370 616e 3e3c 2f64 ly) */.
    /* s\n-00188430: 6f61 705f 7373 6c5f 6e6f 696e 6974 2829 oap_ssl_noinit()\n-00188440: 3b20 2a2f 3c2f 7370 616e 3e20 3c73 7061 ; */ /* do not init\n-00188470: 204f 7065 6e53 534c 2028 6966 2053 534c OpenSSL (if SSL\n-00188480: 2069 7320 616c 7265 6164 7920 696e 6974 is already init\n-00188490: 6961 6c69 7a65 6420 656c 7365 7768 6572 ialized elsewher\n-001884a0: 6520 696e 2074 6869 7320 6170 706c 6963 e in this applic\n-001884b0: 6174 696f 6e29 202a 2f3c 2f73 7061 6e3e ation) */\n-001884c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    so\n-00188530: 6170 5f69 6e69 743c 2f61 3e28 2661 6d70 ap_init(&\n-00188540: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-00188570: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    if (\n-001885b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_ssl_client\n-00188610: 5f63 6f6e 7465 7874 3c2f 613e 2826 616d _context(&am\n-00188620: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap,
    .
    S\n-001886c0: 4f41 505f 5353 4c5f 4445 4641 554c 543c OAP_SSL_DEFAULT<\n-001886d0: 2f61 3e2c 203c 2f64 6976 3e0a 3c64 6976 /a>,
    . \n-001886f0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00188710: 743b 636c 6965 6e74 2e70 656d 2671 756f t;client.pem&quo\n-00188720: 743b 3c2f 7370 616e 3e2c 2020 2020 2020 t;, \n-00188730: 2020 3c73 7061 6e20 636c 6173 733d 2263 /* keyfi\n-00188750: 6c65 3a20 7265 7175 6972 6564 206f 6e6c le: required onl\n-00188760: 7920 7768 656e 2063 6c69 656e 7420 6d75 y when client mu\n-00188770: 7374 2061 7574 6865 6e74 6963 6174 6520 st authenticate \n-00188780: 746f 2073 6572 7665 7220 2873 6565 2053 to server (see S\n-00188790: 534c 2064 6f63 7320 6f6e 2068 6f77 2074 SL docs on how t\n-001887a0: 6f20 6f62 7461 696e 2074 6869 7320 6669 o obtain this fi\n-001887b0: 6c65 2920 2a2f 3c2f 7370 616e 3e20 3c2f le) */ .
    "passw\n-00188800: 6f72 6426 7175 6f74 3b3c 2f73 7061 6e3e ord"\n-00188810: 2c20 2020 2020 2020 2020 203c 7370 616e , /* password to \n-00188840: 7265 6164 2074 6865 206b 6579 2066 696c read the key fil\n-00188850: 6520 286e 6f74 2075 7365 6420 7769 7468 e (not used with\n-00188860: 2047 4e55 544c 5329 202a 2f3c 2f73 7061 GNUTLS) */
    .
    "\n-001888b0: 6361 6365 7274 732e 7065 6d26 7175 6f74 cacerts.pem"\n-001888c0: 3b3c 2f73 7061 6e3e 2c20 2020 2020 2020 ;, \n-001888d0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* cacert \n-001888f0: 6669 6c65 2074 6f20 7374 6f72 6520 7472 file to store tr\n-00188900: 7573 7465 6420 6365 7274 6966 6963 6174 usted certificat\n-00188910: 6573 2028 6e65 6564 6564 2074 6f20 7665 es (needed to ve\n-00188920: 7269 6679 2073 6572 7665 7229 202a 2f3c rify server) */<\n-00188930: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n-00188950: 2020 4e55 4c4c 2c20 2020 2020 2020 2020 NULL, \n-00188960: 2020 2020 2020 203c 7370 616e 2063 6c61 /* \n-00188980: 6361 7061 7468 2074 6f20 6469 7265 6374 capath to direct\n-00188990: 6f72 7920 7769 7468 2074 7275 7374 6564 ory with trusted\n-001889a0: 2063 6572 7469 6669 6361 7465 7320 2a2f certificates */\n-001889b0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n-001889c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001889d0: 3e20 204e 554c 4c20 2020 2020 2020 2020 > NULL \n-001889e0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* if rand\n-00188a00: 6669 6c65 213d 4e55 4c4c 3a20 7573 6520 file!=NULL: use \n-00188a10: 6120 6669 6c65 2077 6974 6820 7261 6e64 a file with rand\n-00188a20: 6f6d 2064 6174 6120 746f 2073 6565 6420 om data to seed \n-00188a30: 7261 6e64 6f6d 6e65 7373 202a 2f3c 2f73 randomness */
    .)\n-00188a60: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    soap_p\n-00188af0: 7269 6e74 5f66 6175 6c74 3c2f 613e 2826 rint_fault(&\n-00188b00: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n-00188b30: 2f61 3e2c 2073 7464 6572 7229 3b20 3c2f /a>, stderr); .
    exit(EX\n-00188b60: 4954 5f46 4149 4c55 5245 293b 203c 2f64 IT_FAILURE); .
    }
    .<\n-00188b90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00188ba0: 3e73 6f61 705f 6361 6c6c 5f6e 735f 5f6d >soap_call_ns__m\n-00188bb0: 796d 6574 686f 6428 2661 6d70 3b3c 6120 ymethod(&
    soap, "\n-00188c10: 6874 7470 733a 2f2f 646f 6d61 696e 2f70 https://domain/p\n-00188c20: 6174 682f 7365 6375 7265 2e63 6769 2671 ath/secure.cgi&q\n-00188c30: 756f 743b 3c2f 7370 616e 3e2c 203c 7370 uot;, "&\n-00188c60: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2e2e quot;, ..\n-00188c70: 2e29 3b3c 2f64 6976 3e0a 3c64 6976 2063 .);
    .
    <\n-00188ce0: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n-00188cf0: 726f 7570 5f5f 7373 6c2e 6874 6d6c 2367 roup__ssl.html#g\n-00188d00: 6132 3639 6337 3733 3262 3163 6461 3964 a269c7732b1cda9d\n-00188d10: 6337 3964 6230 3866 6362 6631 6435 3433 c79db08fcbf1d543\n-00188d20: 3822 3e73 6f61 705f 7373 6c5f 636c 6965 8\">soap_ssl_clie\n-00188d30: 6e74 5f63 6f6e 7465 7874 3c2f 613e 3c2f nt_context
    int soap\n-00188d60: 5f73 736c 5f63 6c69 656e 745f 636f 6e74 _ssl_client_cont\n-00188d70: 6578 7428 7374 7275 6374 2073 6f61 7020 ext(struct soap \n-00188d80: 2a73 6f61 702c 2073 6f61 705f 7373 6c5f *soap, soap_ssl_\n-00188d90: 666c 6167 7320 666c 6167 732c 2063 6f6e flags flags, con\n-00188da0: 7374 2063 6861 7220 2a6b 6579 6669 6c65 st char *keyfile\n-00188db0: 2c20 636f 6e73 7420 6368 6172 202a 7061 , const char *pa\n-00188dc0: 7373 776f 7264 2c20 636f 6e73 7420 6368 ssword, const ch\n-00188dd0: 6172 202a 6361 6669 6c65 2c20 636f 6e73 ar *cafile, cons\n-00188de0: 7420 6368 6172 202a 6361 7061 7468 2c20 t char *capath, \n-00188df0: 636f 6e73 7420 6368 6172 202a 7261 6e64 const char *rand\n-00188e00: 6669 6c65 293c 2f64 6976 3e3c 6469 7620 file)
    In\n-00188e20: 6974 6961 6c69 7a65 2074 6865 2063 6c69 itialize the cli\n-00188e30: 656e 742d 7369 6465 2053 534c 2f54 4c53 ent-side SSL/TLS\n-00188e40: 2063 6f6e 7465 7874 2e3c 2f64 6976 3e3c context.
    <\n-00188e50: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n-00188e70: 4279 2064 6566 6175 6c74 2c20 7365 7276 By default, serv\n-00188e80: 6572 2061 7574 6865 6e74 6963 6174 696f er authenticatio\n-00188e90: 6e20 6973 2065 6e61 626c 6564 2061 6e64 n is enabled and\n-00188ea0: 2074 6865 203c 656d 3e3c 636f 6465 3e63 the c\n-00188eb0: 6163 6572 7473 2e70 656d 3c2f 636f 6465 acerts.pem or \n-00188ed0: 6361 7061 7468 3c2f 636f 6465 3e20 286e capath (n\n-00188ee0: 6f74 2075 7365 6420 7769 7468 2047 4e55 ot used with GNU\n-00188ef0: 544c 5329 206d 7573 7420 6265 2073 6574 TLS) must be set\n-00188f00: 2073 6f20 7468 6174 2074 6865 2043 4120 so that the CA \n-00188f10: 6365 7274 6966 6963 6174 6573 206f 6620 certificates of \n-00188f20: 7468 6520 7365 7276 6572 2873 2920 6172 the server(s) ar\n-00188f30: 6520 6163 6365 7373 6962 6c65 2061 7420 e accessible at \n-00188f40: 7275 6e20 7469 6d65 2e20 5468 6520 3c65 run time. The cacerts.\n-00188f60: 7065 6d3c 2f63 6f64 653e 3c2f 656d 3e20 pem \n-00188f70: 6669 6c65 2069 6e63 6c75 6465 6420 696e file included in\n-00188f80: 2074 6865 2067 534f 4150 2073 6f75 7263 the gSOAP sourc\n-00188f90: 6520 636f 6465 2070 6163 6b61 6765 2063 e code package c\n-00188fa0: 6f6e 7461 696e 7320 7468 6520 6365 7274 ontains the cert\n-00188fb0: 6966 6963 6174 6573 206f 6620 636f 6d6d ificates of comm\n-00188fc0: 6f6e 2043 4173 2e20 5468 6973 2066 696c on CAs. This fil\n-00188fd0: 6520 6d75 7374 2062 6520 7375 7070 6c69 e must be suppli\n-00188fe0: 6564 2077 6974 6820 7468 6520 636c 6965 ed with the clie\n-00188ff0: 6e74 2c20 6966 2073 6572 7665 7220 6175 nt, if server au\n-00189000: 7468 656e 7469 6361 7469 6f6e 2069 7320 thentication is \n-00189010: 7265 7175 6972 6564 2e20 416c 7465 726e required. Altern\n-00189020: 6174 6976 656c 792c 2079 6f75 2063 616e atively, you can\n-00189030: 2075 7365 2074 6865 203c 656d 3e3c 636f use the gsoap/plugin/\n-00189050: 6361 6365 7274 732e 683c 2f63 6f64 653e cacerts.h\n-00189060: 3c2f 656d 3e20 616e 6420 3c65 6d3e 3c63 and gsoap/plugin\n-00189080: 2f63 6163 6572 7473 2e63 3c2f 636f 6465 /cacerts.c code to e\n-001890a0: 6d62 6564 2043 4120 6365 7274 6966 6963 mbed CA certific\n-001890b0: 6174 6573 2069 6e20 796f 7572 2063 6c69 ates in your cli\n-001890c0: 656e 7420 636f 6465 2e3c 2f70 3e0a 3c70 ent code.

    .You can specify\n-001890e0: 2061 2063 6970 6865 7220 6c69 7374 2074 a cipher list t\n-001890f0: 6f20 7573 6520 7769 7468 2054 4c53 7631 o use with TLSv1\n-00189100: 2e32 2061 6e64 2062 656c 6f77 2077 6974 .2 and below wit\n-00189110: 6820 3c63 6f64 653e 5353 4c5f 4354 585f h SSL_CTX_\n-00189120: 7365 745f 6369 7068 6572 5f6c 6973 7428 set_cipher_list(\n-00189130: 736f 6170 2d26 6774 3b63 7478 2c20 222e soap->ctx, \".\n-00189140: 2e2e 2229 3c2f 636f 6465 3e20 7768 6572 ..\") wher\n-00189150: 6520 3c63 6f64 653e 736f 6170 2d26 6774 e soap->\n-00189160: 3b63 7478 3c2f 636f 6465 3e20 6973 2074 ;ctx is t\n-00189170: 6865 2053 534c 2063 6f6e 7465 7874 2063 he SSL context c\n-00189180: 7265 6174 6564 2062 7920 3c63 6f64 653e reated by \n-00189190: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_ssl_clie\n-00189220: 6e74 5f63 6f6e 7465 7874 2829 3c2f 613e nt_context()\n-00189230: 3c2f 636f 6465 3e2e 204c 696b 6577 6973 . Likewis\n-00189240: 652c 2075 7365 203c 636f 6465 3e53 534c e, use SSL\n-00189250: 5f43 5458 5f73 6574 5f63 6970 6865 7273 _CTX_set_ciphers\n-00189260: 7569 7465 7328 736f 6170 2d26 6774 3b63 uites(soap->c\n-00189270: 7478 2c20 222e 2e2e 2229 3c2f 636f 6465 tx, \"...\") to configure t\n-00189290: 6865 2061 7661 696c 6162 6c65 2054 4c53 he available TLS\n-001892a0: 7631 2e33 2063 6970 6865 7273 7569 7465 v1.3 ciphersuite\n-001892b0: 732e 3c2f 703e 0a3c 703e 5765 2072 6566 s.

    .

    We ref\n-001892c0: 6572 2074 6f20 7468 6520 4f70 656e 5353 er to the OpenSS\n-001892d0: 4c20 646f 6375 6d65 6e74 6174 696f 6e20 L documentation \n-001892e0: 616e 6420 6d61 6e75 616c 2070 6167 6573 and manual pages\n-001892f0: 206f 6620 3c63 6f64 653e 5353 4c5f 4354 of SSL_CT\n-00189300: 585f 7365 745f 6369 7068 6572 5f6c 6973 X_set_cipher_lis\n-00189310: 743c 2f63 6f64 653e 2061 6e64 203c 636f t and SSL_CTX_set_c\n-00189330: 6970 6865 7273 7569 7465 733c 2f63 6f64 iphersuites for details o\n-00189350: 6e20 7468 6520 6c61 7465 7374 2063 6970 n the latest cip\n-00189360: 6865 7220 6c69 7374 7320 616e 6420 7375 her lists and su\n-00189370: 6974 6573 2061 7661 696c 6162 6c65 2074 ites available t\n-00189380: 6f20 7573 652e 3c2f 703e 0a3c 703e 4f74 o use.

    .

    Ot\n-00189390: 6865 7220 636c 6965 6e74 2d73 6964 6520 her client-side \n-001893a0: 5353 4c20 6f70 7469 6f6e 7320 6172 6520 SSL options are \n-001893b0: 3c63 6f64 653e 2353 4f41 505f 5353 4c5f #SOAP_SSL_\n-001893c0: 534b 4950 5f48 4f53 545f 4348 4543 4b3c SKIP_HOST_CHECK<\n-001893d0: 2f63 6f64 653e 2074 6f20 736b 6970 2074 /code> to skip t\n-001893e0: 6865 2068 6f73 7420 6e61 6d65 2076 6572 he host name ver\n-001893f0: 6966 6963 6174 696f 6e20 6368 6563 6b20 ification check \n-00189400: 616e 6420 3c63 6f64 653e 2353 4f41 505f and #SOAP_\n-00189410: 5353 4c5f 414c 4c4f 575f 4558 5049 5245 SSL_ALLOW_EXPIRE\n-00189420: 445f 4345 5254 4946 4943 4154 453c 2f63 D_CERTIFICATE to allow co\n-00189440: 6e6e 6563 7469 6e67 2074 6f20 6120 686f nnecting to a ho\n-00189450: 7374 2077 6974 6820 616e 2065 7870 6972 st with an expir\n-00189460: 6564 2063 6572 7469 6669 6361 7465 2e20 ed certificate. \n-00189470: 466f 7220 6578 616d 706c 652c 3c2f 703e For example,

    \n-00189480: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    s\n-001894c0: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap soap;.
    soap_ssl_\n-001895a0: 696e 6974 3c2f 613e 2829 3b20 3c73 7061 init(); /* init OpenSS\n-001895d0: 4c20 2873 6b69 7070 696e 6720 7468 6973 L (skipping this\n-001895e0: 206f 7220 6361 6c6c 696e 6720 6d75 6c74 or calling mult\n-001895f0: 6970 6c65 2074 696d 6573 2069 7320 4f4b iple times is OK\n-00189600: 2c20 7369 6e63 6520 7468 6520 656e 6769 , since the engi\n-00189610: 6e65 2077 696c 6c20 696e 6974 2053 534c ne will init SSL\n-00189620: 2061 7574 6f6d 6174 6963 616c 6c79 2920 automatically) \n-00189630: 2a2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a */
    .\n-00189640: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    /* soap_\n-00189670: 7373 6c5f 6e6f 696e 6974 2829 3b20 2a2f ssl_noinit(); */\n-00189680: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c /*\n-001896a0: 2064 6f20 6e6f 7420 696e 6974 204f 7065 do not init Ope\n-001896b0: 6e53 534c 2028 6966 2053 534c 2069 7320 nSSL (if SSL is \n-001896c0: 616c 7265 6164 7920 696e 6974 6961 6c69 already initiali\n-001896d0: 7a65 6420 656c 7365 7768 6572 6520 696e zed elsewhere in\n-001896e0: 2074 6869 7320 6170 706c 6963 6174 696f this applicatio\n-001896f0: 6e29 202a 2f3c 2f73 7061 6e3e 3c2f 6469 n) */.
    soap_i\n-00189770: 6e69 743c 2f61 3e28 2661 6d70 3b3c 6120 nit(&soap);...\n-00189a50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-00189a80: 2671 756f 743b 636c 6965 6e74 2e70 656d "client.pem\n-00189a90: 2671 756f 743b 3c2f 7370 616e 3e2c 2020 ", \n-00189aa0: 2020 2020 2020 3c73 7061 6e20 636c 6173 /* k\n-00189ac0: 6579 6669 6c65 3a20 7265 7175 6972 6564 eyfile: required\n-00189ad0: 206f 6e6c 7920 7768 656e 2063 6c69 656e only when clien\n-00189ae0: 7420 6d75 7374 2061 7574 6865 6e74 6963 t must authentic\n-00189af0: 6174 6520 746f 2073 6572 7665 7220 2873 ate to server (s\n-00189b00: 6565 2053 534c 2064 6f63 7320 6f6e 2068 ee SSL docs on h\n-00189b10: 6f77 2074 6f20 6f62 7461 696e 2074 6869 ow to obtain thi\n-00189b20: 7320 6669 6c65 2920 2a2f 3c2f 7370 616e s file) */
    .
    "p\n-00189b70: 6173 7377 6f72 6426 7175 6f74 3b3c 2f73 assword", <\n-00189b90: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00189ba0: 656e 7422 3e2f 2a20 7061 7373 776f 7264 ent\">/* password\n-00189bb0: 2074 6f20 7265 6164 2074 6865 206b 6579 to read the key\n-00189bc0: 2066 696c 6520 286e 6f74 2075 7365 6420 file (not used \n-00189bd0: 7769 7468 2047 4e55 544c 5329 202a 2f3c with GNUTLS) */<\n-00189be0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n-00189c00: 2020 3c73 7061 6e20 636c 6173 733d 2273 &q\n-00189c20: 756f 743b 6361 6365 7274 732e 7065 6d26 uot;cacerts.pem&\n-00189c30: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, \n-00189c40: 2020 2020 3c73 7061 6e20 636c 6173 733d /* cac\n-00189c60: 6572 7420 6669 6c65 2074 6f20 7374 6f72 ert file to stor\n-00189c70: 6520 7472 7573 7465 6420 6365 7274 6966 e trusted certif\n-00189c80: 6963 6174 6573 2028 6e65 6564 6564 2074 icates (needed t\n-00189c90: 6f20 7665 7269 6679 2073 6572 7665 7229 o verify server)\n-00189ca0: 202a 2f3c 2f73 7061 6e3e 3c2f 6469 763e */
    \n-00189cb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    NULL, \n-00189cd0: 2020 2020 2020 2020 2020 3c73 7061 6e20 \n-00189cf0: 2f2a 2063 6170 6174 6820 746f 2064 6972 /* capath to dir\n-00189d00: 6563 746f 7279 2077 6974 6820 7472 7573 ectory with trus\n-00189d10: 7465 6420 6365 7274 6966 6963 6174 6573 ted certificates\n-00189d20: 202a 2f3c 2f73 7061 6e3e 203c 2f64 6976 */ .
    NULL \n-00189d50: 2020 203c 7370 616e 2063 6c61 7373 3d22 /* if r\n-00189d70: 616e 6466 696c 6521 3d4e 554c 4c3a 2075 andfile!=NULL: u\n-00189d80: 7365 2061 2066 696c 6520 7769 7468 2072 se a file with r\n-00189d90: 616e 646f 6d20 6461 7461 2074 6f20 7365 andom data to se\n-00189da0: 6564 2072 616e 646f 6d6e 6573 7320 2a2f ed randomness */\n-00189db0: 3c2f 7370 616e 3e20 203c 2f64 6976 3e0a
    .\n-00189dc0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ))
    .{<\n-00189df0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    exit\n-00189ed0: 2845 5849 545f 4641 494c 5552 4529 3b20 (EXIT_FAILURE); \n-00189ee0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    soap_call_ns\n-00189f20: 5f5f 6d79 6d65 7468 6f64 2826 616d 703b __mymethod(&\n-00189f30: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-00189f60: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-00189f80: 6f74 3b68 7474 7073 3a2f 2f64 6f6d 6169 ot;https://domai\n-00189f90: 6e2f 7061 7468 2f73 6563 7572 652e 6367 n/path/secure.cg\n-00189fa0: 6926 7175 6f74 3b3c 2f73 7061 6e3e 2c20 i", \n-00189fb0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-00189fd0: 743b 2671 756f 743b 3c2f 7370 616e 3e2c t;",\n-00189fe0: 202e 2e2e 293b 3c2f 6469 763e 0a3c 6469 ...);
    .SOAP_SSL_S\n-0018a0a0: 4b49 505f 484f 5354 5f43 4845 434b 3c2f KIP_HOST_CHECK
    #def\n-0018a0d0: 696e 6520 534f 4150 5f53 534c 5f53 4b49 ine SOAP_SSL_SKI\n-0018a0e0: 505f 484f 5354 5f43 4845 434b 3c2f 6469 P_HOST_CHECK
    soap_ssl_fl\n-0018a110: 6167 7320 666c 6167 2066 6f72 2063 6c69 ags flag for cli\n-0018a120: 656e 7473 2074 6f20 616c 6c6f 7720 636c ents to allow cl\n-0018a130: 6965 6e74 7320 746f 2073 6b69 7020 636f ients to skip co\n-0018a140: 6d6d 6f6e 206e 616d 6520 6368 6563 6b73 mmon name checks\n-0018a150: 2061 6761 696e 7374 2074 6865 2068 6f73 against the hos\n-0018a160: 7420 6e61 6d65 206f 6620 2e2e 2e3c 2f64 t name of ...
    Definit\n-0018a190: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n-0018a1a0: 322e 683a 3538 3638 3c2f 6469 763e 3c2f 2.h:5868
    .
    #define SOAP_S\n-0018a2b0: 534c 5f52 4551 5549 5245 5f53 4552 5645 SL_REQUIRE_SERVE\n-0018a2c0: 525f 4155 5448 454e 5449 4341 5449 4f4e R_AUTHENTICATION\n-0018a2d0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    soap_ss\n-0018a2f0: 6c5f 666c 6167 7320 666c 6167 2066 6f72 l_flags flag for\n-0018a300: 2063 6c69 656e 7473 2074 6f20 7265 7175 clients to requ\n-0018a310: 6972 6520 7365 7276 6572 7320 746f 2061 ire servers to a\n-0018a320: 7574 6865 6e74 6963 6174 6520 746f 2063 uthenticate to c\n-0018a330: 6c69 656e 7473 2064 7572 696e 6720 7468 lients during th\n-0018a340: 6520 4854 5450 5320 6861 6e64 7368 2e2e e HTTPS handsh..\n-0018a350: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n-0018a370: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n-0018a380: 736f 6170 322e 683a 3538 3632 3c2f 6469 soap2.h:5862
    .
    SOAP_SSL_ALLOW\n-0018a450: 5f45 5850 4952 4544 5f43 4552 5449 4649 _EXPIRED_CERTIFI\n-0018a460: 4341 5445 3c2f 613e 3c2f 6469 763e 3c64 CATE
    #define SOAP_S\n-0018a490: 534c 5f41 4c4c 4f57 5f45 5850 4952 4544 SL_ALLOW_EXPIRED\n-0018a4a0: 5f43 4552 5449 4649 4341 5445 3c2f 6469 _CERTIFICATE
    soap_ssl_fl\n-0018a4d0: 6167 7320 666c 6167 2076 616c 7565 2074 ags flag value t\n-0018a4e0: 6f20 616c 6c6f 7720 7365 6c66 2d73 6967 o allow self-sig\n-0018a4f0: 6e65 6420 616e 6420 6578 7069 7265 6420 ned and expired \n-0018a500: 6365 7274 6966 6963 6174 6573 2061 6e64 certificates and\n-0018a510: 2074 686f 7365 2077 6974 686f 7574 2043 those without C\n-0018a520: 524c 2074 6f20 6265 2075 2e2e 2e3c 2f64 RL to be u...
    Definit\n-0018a550: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n-0018a560: 322e 683a 3538 3332 3c2f 6469 763e 3c2f 2.h:5832
    .

    F\n-0018a590: 6f72 2073 7973 7465 6d73 2062 6173 6564 or systems based\n-0018a5a0: 206f 6e20 4d69 6372 6f73 6f66 7420 7769 on Microsoft wi\n-0018a5b0: 6e64 6f77 732c 2074 6865 2057 696e 496e ndows, the WinIn\n-0018a5c0: 6574 206d 6f64 756c 6520 6361 6e20 6265 et module can be\n-0018a5d0: 2075 7365 6420 696e 7374 6561 642c 2073 used instead, s\n-0018a5e0: 6565 203c 636f 6465 3e6d 6f64 5f67 736f ee mod_gso\n-0018a5f0: 6170 2f67 736f 6170 5f77 696e 2f77 696e ap/gsoap_win/win\n-0018a600: 696e 6574 3c2f 636f 6465 3e2e 3c2f 703e inet.

    \n-0018a610: 0a3c 703e 5369 6e63 6520 7265 6c65 6173 .

    Since releas\n-0018a620: 6520 7665 7273 696f 6e20 322e 382e 3230 e version 2.8.20\n-0018a630: 2053 534c 2076 3320 6973 2064 6973 6162 SSL v3 is disab\n-0018a640: 6c65 642e 2054 6f20 656e 6162 6c65 2053 led. To enable S\n-0018a650: 534c 2076 3320 746f 6765 7468 6572 2077 SL v3 together w\n-0018a660: 6974 6820 544c 5320 312e 3020 616e 6420 ith TLS 1.0 and \n-0018a670: 6869 6768 6572 2c20 7573 6520 3c63 6f64 higher, use #SOAP_SSLv3_TL\n-0018a690: 5376 313c 2f63 6f64 653e 2077 6974 6820 Sv1 with \n-0018a6a0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_ss\n-0018a730: 6c5f 7365 7276 6572 5f63 6f6e 7465 7874 l_server_context\n-0018a740: 3c2f 613e 3c2f 636f 6465 3e2e 2054 6f20 . To \n-0018a750: 7573 6520 544c 5320 312e 3120 616e 6420 use TLS 1.1 and \n-0018a760: 312e 3220 7573 6520 3c63 6f64 653e 534f 1.2 use SO\n-0018a770: 4150 5f54 4c53 7631 5f31 207c 2053 4f41 AP_TLSv1_1 | SOA\n-0018a780: 505f 544c 5376 315f 323c 2f63 6f64 653e P_TLSv1_2\n-0018a790: 2e20 546f 2075 7365 2054 4c53 2031 2e32 . To use TLS 1.2\n-0018a7a0: 206f 6e6c 7920 7573 6520 3c63 6f64 653e only use \n-0018a7b0: 2353 4f41 505f 544c 5376 315f 323c 2f63 #SOAP_TLSv1_2. To use SSL\n-0018a7d0: 2076 3320 6f6e 6c79 2075 7365 203c 636f v3 only use #SOAP_SSLv3.

    .

    To\n-0018a800: 2064 6973 6162 6c65 2073 6572 7665 7220 disable server \n-0018a810: 6175 7468 656e 7469 6361 7469 6f6e 2066 authentication f\n-0018a820: 6f72 2074 6573 7469 6e67 2070 7572 706f or testing purpo\n-0018a830: 7365 732c 2075 7365 2074 6865 2066 6f6c ses, use the fol\n-0018a840: 6c6f 7769 6e67 3a3c 2f70 3e0a 3c64 6976 lowing:

    .
    if\n-0018a890: 3c2f 7370 616e 3e20 283c 6120 636c 6173 (soap_s\n-0018a8f0: 736c 5f63 6c69 656e 745f 636f 6e74 6578 sl_client_contex\n-0018a900: 743c 2f61 3e28 2661 6d70 3b3c 6120 636c t(&soap, ..<\n-0018a9d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0018a9e0: 3e20 204e 554c 4c2c 203c 2f64 6976 3e0a > NULL,
    .\n-0018a9f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    NULL,
    \n-0018aa10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    NULL, .
    NULL, .
    NULL .
    ))
    .<\n-0018aa90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0018aaa0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    ..
    e\n-0018ab80: 7869 7428 4558 4954 5f46 4149 4c55 5245 xit(EXIT_FAILURE\n-0018ab90: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    } .
    SO\n-0018ac60: 4150 5f53 534c 5f4e 4f5f 4155 5448 454e AP_SSL_NO_AUTHEN\n-0018ac70: 5449 4341 5449 4f4e 3c2f 613e 3c2f 6469 TICATION
    #define SO\n-0018aca0: 4150 5f53 534c 5f4e 4f5f 4155 5448 454e AP_SSL_NO_AUTHEN\n-0018acb0: 5449 4341 5449 4f4e 3c2f 6469 763e 3c64 TICATION
    soap_ssl_flags \n-0018ace0: 666c 6167 2076 616c 7565 2074 6f20 6469 flag value to di\n-0018acf0: 7361 626c 6520 6175 7468 656e 7469 6361 sable authentica\n-0018ad00: 7469 6f6e 206f 6620 7468 6520 7065 6572 tion of the peer\n-0018ad10: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n-0018ad30: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-0018ad40: 6f61 7032 2e68 3a35 3834 303c 2f64 6976 oap2.h:5840
    .
    <\n-0018ad70: 703e 5468 6973 2061 6c73 6f20 6173 7375 p>This also assu\n-0018ad80: 6d65 7320 7468 6174 2074 6865 2073 6572 mes that the ser\n-0018ad90: 7665 7220 646f 6573 206e 6f74 2072 6571 ver does not req\n-0018ada0: 7569 7265 2063 6c69 656e 7473 2074 6f20 uire clients to \n-0018adb0: 6175 7468 656e 7469 6361 7465 2028 7468 authenticate (th\n-0018adc0: 6520 6b65 7966 696c 6520 6973 2061 6273 e keyfile is abs\n-0018add0: 656e 7429 2e3c 2f70 3e0a 3c70 3e4d 616b ent).

    .

    Mak\n-0018ade0: 6520 7375 7265 2079 6f75 2068 6176 6520 e sure you have \n-0018adf0: 7369 676e 616c 2068 616e 646c 6572 7320 signal handlers \n-0018ae00: 7365 7420 696e 2079 6f75 7220 6170 706c set in your appl\n-0018ae10: 6963 6174 696f 6e20 746f 2063 6174 6368 ication to catch\n-0018ae20: 2062 726f 6b65 6e20 636f 6e6e 6563 7469 broken connecti\n-0018ae30: 6f6e 7320 283c 636f 6465 3e53 4947 5049 ons (SIGPI\n-0018ae40: 5045 3c2f 636f 6465 3e29 3a3c 2f70 3e0a PE):

    .\n-0018ae50: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    signal(S\n-0018ae80: 4947 5049 5045 2c20 7369 6770 6970 655f IGPIPE, sigpipe_\n-0018ae90: 6861 6e64 6c65 293b 3c2f 6469 763e 0a3c handle);
    .<\n-0018aea0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    where, \n-0018aec0: 666f 7220 6578 616d 706c 653a 3c2f 703e for example:

    \n-0018aed0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    void s\n-0018af20: 6967 7069 7065 5f68 616e 646c 6528 3c73 igpipe_handle(int x) { }
    .\n-0018af60: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d
    Warning
    It is imp\n-0018afb0: 6f72 7461 6e74 2074 6861 7420 7468 6520 ortant that the \n-0018afc0: 3c63 6f64 653e 2357 4954 485f 4f50 454e #WITH_OPEN\n-0018afd0: 5353 4c3c 2f63 6f64 653e 206d 6163 726f SSL macro\n-0018afe0: 2069 7320 636f 6e73 6973 7465 6e74 6c79 is consistently\n-0018aff0: 2064 6566 696e 6564 2074 6f20 636f 6d70 defined to comp\n-0018b000: 696c 6520 7468 6520 736f 7572 6365 732c ile the sources,\n-0018b010: 2073 7563 6820 6173 203c 656d 3e3c 636f such as gsoap/stdsoap\n-0018b030: 322e 6370 703c 2f63 6f64 653e 3c2f 656d 2.cpp, soa\n-0018b050: 7043 2e63 7070 3c2f 636f 6465 3e3c 2f65 pC.cpp, so\n-0018b070: 6170 436c 6965 6e74 2e63 7070 3c2f 636f apClient.cpp, soapServer.c\n-0018b0a0: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 pp, \n-0018b0b0: 616e 6420 616c 6c20 6170 706c 6963 6174 and all applicat\n-0018b0c0: 696f 6e20 736f 7572 6365 7320 7468 6174 ion sources that\n-0018b0d0: 2069 6e63 6c75 6465 203c 656d 3e3c 636f include gsoap/stdsoap\n-0018b0f0: 322e 683c 2f63 6f64 653e 3c2f 656d 3e20 2.h \n-0018b100: 6f72 203c 656d 3e3c 636f 6465 3e73 6f61 or soa\n-0018b110: 7048 2e68 3c2f 636f 6465 3e3c 2f65 6d3e pH.h\n-0018b120: 2e20 4966 2074 6865 206d 6163 726f 7320 . If the macros \n-0018b130: 6172 6520 6e6f 7420 636f 6e73 6973 7465 are not consiste\n-0018b140: 6e74 6c79 2075 7365 642c 2074 6865 2061 ntly used, the a\n-0018b150: 7070 6c69 6361 7469 6f6e 2077 696c 6c20 pplication will \n-0018b160: 6372 6173 6820 6475 6520 746f 2061 206d crash due to a m\n-0018b170: 6973 6d61 7463 6865 7320 696e 2074 6865 ismatches in the\n-0018b180: 2064 6563 6c61 7261 7469 6f6e 2061 6e64 declaration and\n-0018b190: 2061 6363 6573 7320 6f66 2074 6865 203c access of the <\n-0018b1a0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n-0018b200: 2063 6f6e 7465 7874 2e20 416c 7465 726e context. Altern\n-0018b210: 6174 6976 656c 792c 2075 7365 206c 6962 atively, use lib\n-0018b220: 7261 7279 203c 623e 3c63 6f64 653e 2d6c rary -l\n-0018b230: 6773 6f61 7073 736c 3c2f 636f 6465 3e3c gsoapssl<\n-0018b240: 2f62 3e20 6f72 203c 623e 3c63 6f64 653e /b> or \n-0018b250: 2d6c 6773 6f61 7073 736c 2b2b 3c2f 636f -lgsoapssl++ and comp\n-0018b270: 696c 6520 6576 6572 7974 6869 6e67 2065 ile everything e\n-0018b280: 6c73 6520 7769 7468 203c 636f 6465 3e23 lse with #\n-0018b290: 5749 5448 5f4f 5045 4e53 534c 3c2f 636f WITH_OPENSSL.
    .
    .C\n-0018b2b0: 6f6e 6375 7272 656e 7420 636c 6965 6e74 oncurrent client\n-0018b2c0: 2063 616c 6c73 2077 6974 6820 7468 7265 calls with thre\n-0018b2d0: 6164 7320 7368 6f75 6c64 2075 7365 2073 ads should use s\n-0018b2e0: 6570 6172 6174 6520 3c63 6f64 653e 3c61 eparate soap contex\n-0018b350: 7473 2049 6e20 6164 6469 7469 6f6e 2c20 ts In addition, \n-0018b360: 7468 6520 7468 7265 6164 2069 6e69 7469 the thread initi\n-0018b370: 616c 697a 6174 696f 6e20 636f 6465 2064 alization code d\n-0018b380: 6973 6375 7373 6564 2069 6e20 5365 6374 iscussed in Sect\n-0018b390: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion Secure Web ser\n-0018b3d0: 7669 6365 7320 7769 7468 2048 5454 5053 vices with HTTPS\n-0018b3e0: 3c2f 613e 206d 7573 7420 6265 2075 7365 must be use\n-0018b3f0: 6420 746f 2070 726f 7065 726c 7920 7365 d to properly se\n-0018b400: 7475 7020 4f70 656e 5353 4c20 696e 2061 tup OpenSSL in a\n-0018b410: 206d 756c 7469 2d74 6872 6561 6465 6420 multi-threaded \n-0018b420: 636c 6965 6e74 2061 7070 6c69 6361 7469 client applicati\n-0018b430: 6f6e 2e3c 2f64 643e 3c2f 646c 3e0a 3c70 on.
    .See also API do\n-0018b450: 6375 6d65 6e74 6174 696f 6e20 4d6f 6475 cumentation Modu\n-0018b460: 6c65 203c 6120 636c 6173 733d 2265 6c22 le S\n-0018b490: 534c 2f54 4c53 2063 6f6e 7465 7874 2061 SL/TLS context a\n-0018b4a0: 6e64 2066 756e 6374 696f 6e73 3c2f 613e nd functions\n-0018b4b0: 2066 6f72 206d 6f72 6520 6465 7461 696c for more detail\n-0018b4c0: 7320 6f6e 2074 6865 2053 534c 2f54 4c53 s on the SSL/TLS\n-0018b4d0: 2066 756e 6374 696f 6e73 2e3c 2f70 3e0a functions.

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

    You can also \n-0018b4f0: 7573 6520 7468 6520 5769 6e49 6e65 7420 use the WinInet \n-0018b500: 696e 7465 7266 6163 6520 746f 2065 7374 interface to est\n-0018b510: 6162 6c69 7368 2073 6563 7572 6520 4854 ablish secure HT\n-0018b520: 5450 5320 636f 6e6e 6563 7469 6f6e 7320 TPS connections \n-0018b530: 6f6e 2057 696e 646f 7773 206d 6163 6869 on Windows machi\n-0018b540: 6e65 732c 2061 7661 696c 6162 6c65 2069 nes, available i\n-0018b550: 6e20 7468 6520 3c65 6d3e 3c63 6f64 653e n the \n-0018b560: 6773 6f61 702f 6d6f 645f 6773 6f61 703c gsoap/mod_gsoap<\n-0018b570: 2f63 6f64 653e 3c2f 656d 3e20 6469 7265 /code> dire\n-0018b580: 6374 6f72 7920 6f66 2074 6865 2067 534f ctory of the gSO\n-0018b590: 4150 2073 6f75 7263 6520 636f 6465 2070 AP source code p\n-0018b5a0: 6163 6b61 6765 2c20 7365 6520 616c 736f ackage, see also\n-0018b5b0: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section The WinIn\n-0018b5f0: 6574 2070 6c75 6769 6e3c 2f61 3e2e 204f et plugin. O\n-0018b600: 7220 796f 7520 6361 6e20 7573 6520 7468 r you can use th\n-0018b610: 6520 4355 524c 2070 6c75 6769 6e20 746f e CURL plugin to\n-0018b620: 2075 7365 2043 5552 4c20 746f 2065 7374 use CURL to est\n-0018b630: 6162 6c69 7368 2073 6563 7572 6520 4854 ablish secure HT\n-0018b640: 5450 5320 636f 6e6e 6563 7469 6f6e 732c TPS connections,\n-0018b650: 2073 6565 2053 6563 7469 6f6e 203c 6120 see Section The CURL\n-0018b690: 2070 6c75 6769 6e3c 2f61 3e2e 3c2f 703e plugin.

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

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

    .

    .SSL authentica\n-0018b720: 7469 6f6e 2063 616c 6c62 6163 6b73 3c2f tion callbacks.

    The fsslauth\n-0018b750: 2063 616c 6c62 6163 6b20 6675 6e63 7469 callback functi\n-0018b760: 6f6e 2063 6f6e 7472 6f6c 7320 4f70 656e on controls Open\n-0018b770: 5353 4c2f 474e 5554 4c53 2061 7574 6865 SSL/GNUTLS authe\n-0018b780: 6e74 6963 6174 696f 6e20 696e 6974 6961 ntication initia\n-0018b790: 6c69 7a61 7469 6f6e 3a3c 2f70 3e0a 3c75 lization:

    ..
  • int\n-0018b7b0: 2028 3c61 2063 6c61 7373 3d22 656c 2220 (soap:\n-0018b840: 3a66 7373 6c61 7574 683c 2f61 3e29 2873 :fsslauth)(s\n-0018b850: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-0018b860: 293c 2f63 6f64 653e 2054 6869 7320 6361 ) This ca\n-0018b870: 6c6c 6261 636b 2069 7320 6361 6c6c 6564 llback is called\n-0018b880: 2074 6f20 696e 6974 6961 6c69 7a65 2074 to initialize t\n-0018b890: 6865 204f 7065 6e53 534c 206f 7220 474e he OpenSSL or GN\n-0018b8a0: 5554 4c53 2063 6f6e 7465 7874 2066 6f72 UTLS context for\n-0018b8b0: 2048 5454 5053 2063 6f6e 6e65 6374 696f HTTPS connectio\n-0018b8c0: 6e73 2063 6f6e 6669 6775 7265 6420 7769 ns configured wi\n-0018b8d0: 7468 2074 6865 2070 6172 616d 6574 6572 th the parameter\n-0018b8e0: 7320 7061 7373 6564 2074 6f20 3c63 6f64 s passed to soap_ssl_cl\n-0018b980: 6965 6e74 5f63 6f6e 7465 7874 3c2f 613e ient_context\n-0018b990: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and soap_ssl_se\n-0018ba30: 7276 6572 5f63 6f6e 7465 7874 3c2f 613e rver_context\n-0018ba40: 3c2f 636f 6465 3e2e 2052 6574 7572 6e73 . Returns\n-0018ba50: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK<\n-0018ba60: 2f63 6f64 653e 206f 7220 6120 3c63 6f64 /code> or a soap_status (int) \n-0018bb40: 6572 726f 7220 636f 6465 2e20 5468 6520 error code. The \n-0018bb50: 6275 696c 742d 696e 2066 756e 6374 696f built-in functio\n-0018bb60: 6e20 6173 7369 676e 6564 2074 6f20 3c63 n assigned to soa\n-0018bc00: 703a 3a66 7373 6c61 7574 683c 2f61 3e3c p::fsslauth<\n-0018bc10: 2f63 6f64 653e 2069 7320 3c63 6f64 653e /code> is \n-0018bc20: 7373 6c5f 6175 7468 5f69 6e69 743c 2f63 ssl_auth_init.
  • .\n-0018bc40: 0a3c 703e 5468 6520 3c63 6f64 653e 6673 .

    The fs\n-0018bc50: 736c 7665 7269 6679 3c2f 636f 6465 3e20 slverify \n-0018bc60: 6361 6c6c 6261 636b 2066 756e 6374 696f callback functio\n-0018bc70: 6e20 636f 6e74 726f 6c73 204f 7065 6e53 n controls OpenS\n-0018bc80: 534c 2070 6565 7220 6365 7274 6966 6963 SL peer certific\n-0018bc90: 6174 6520 7665 7269 6669 6361 7469 6f6e ate verification\n-0018bca0: 2c20 7669 6120 696e 7465 726e 616c 6c79 , via internally\n-0018bcb0: 2069 6e76 6f6b 696e 6720 3c63 6f64 653e invoking \n-0018bcc0: 5353 4c5f 4354 585f 7365 745f 7665 7269 SSL_CTX_set_veri\n-0018bcd0: 6679 3c2f 636f 6465 3e3a 3c2f 703e 0a3c fy:

    .<\n-0018bce0: 756c 3e0a 3c6c 693e 3c63 6f64 653e 696e ul>.
  • in\n-0018bcf0: 7420 2873 6f61 703a 3a66 7373 7665 7269 t (soap::fssveri\n-0018bd00: 6679 2928 696e 7420 6f6b 2c20 5835 3039 fy)(int ok, X509\n-0018bd10: 5f53 544f 5245 5f43 5458 202a 7374 6f72 _STORE_CTX *stor\n-0018bd20: 653c 2f63 6f64 653e 2054 6869 7320 6361 e This ca\n-0018bd30: 6c6c 6261 636b 2069 7320 6361 6c6c 6564 llback is called\n-0018bd40: 2062 7920 7468 6520 656e 6769 6e65 2074 by the engine t\n-0018bd50: 6f20 6d61 6e61 6765 2074 6865 2076 6572 o manage the ver\n-0018bd60: 6966 6963 6174 696f 6e20 6f66 2074 6865 ification of the\n-0018bd70: 2063 6572 7469 6669 6361 7465 2070 726f certificate pro\n-0018bd80: 7669 6465 6420 6279 2061 2070 6565 722c vided by a peer,\n-0018bd90: 2073 7563 6820 6173 2074 6865 2063 6572 such as the cer\n-0018bda0: 7469 6669 6361 7465 2070 726f 7669 6465 tificate provide\n-0018bdb0: 6420 6279 2061 2073 6572 7665 7220 636f d by a server co\n-0018bdc0: 6e6e 6563 7465 6420 6f76 6572 2048 5454 nnected over HTT\n-0018bdd0: 5053 206f 7220 746f 2076 6572 6966 7920 PS or to verify \n-0018bde0: 7468 6520 6365 7274 6966 6963 6174 6520 the certificate \n-0018bdf0: 696e 636c 7564 6564 2077 6974 6820 6120 included with a \n-0018be00: 5753 2d53 6563 7572 6974 7920 6d65 7373 WS-Security mess\n-0018be10: 6167 652e 2054 6f20 7265 7175 6972 6520 age. To require \n-0018be20: 6365 7274 6966 6963 6174 6520 7665 7269 certificate veri\n-0018be30: 6669 6361 7469 6f6e 206f 6620 6120 7365 fication of a se\n-0018be40: 7276 6572 2063 6f6e 6e65 6374 6564 2076 rver connected v\n-0018be50: 6961 2048 5454 5053 2c20 7573 6520 3c63 ia HTTPS, use soap_ssl_\n-0018bef0: 636c 6965 6e74 5f63 6f6e 7465 7874 3c2f client_context with <\n-0018bf10: 636f 6465 3e23 534f 4150 5f53 534c 5f52 code>#SOAP_SSL_R\n-0018bf20: 4551 5549 5245 5f53 4552 5645 525f 4155 EQUIRE_SERVER_AU\n-0018bf30: 5448 454e 5449 4341 5449 4f4e 3c2f 636f THENTICATION. To require \n-0018bf50: 6365 7274 6966 6963 6174 6520 7665 7269 certificate veri\n-0018bf60: 6669 6361 7469 6f6e 206f 6620 6120 636c fication of a cl\n-0018bf70: 6965 6e74 2063 6f6e 6e65 6374 6564 2074 ient connected t\n-0018bf80: 6f20 6120 7365 7276 6572 2c20 7573 6520 o a server, use \n-0018bf90: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_ss\n-0018c020: 6c5f 7365 7276 6572 5f63 6f6e 7465 7874 l_server_context\n-0018c030: 3c2f 613e 3c2f 636f 6465 3e20 7769 7468 with\n-0018c040: 203c 636f 6465 3e23 534f 4150 5f53 534c #SOAP_SSL\n-0018c050: 5f52 4551 5549 5245 5f43 4c49 454e 545f _REQUIRE_CLIENT_\n-0018c060: 4155 5448 454e 5449 4341 5449 4f4e 3c2f AUTHENTICATION. The ok param\n-0018c090: 6574 6572 206f 6620 7468 6973 2063 616c eter of this cal\n-0018c0a0: 6c62 6163 6b20 696e 6469 6361 7465 7320 lback indicates \n-0018c0b0: 7768 6574 6865 7220 7468 6520 7665 7269 whether the veri\n-0018c0c0: 6669 6361 7469 6f6e 206f 6620 7468 6520 fication of the \n-0018c0d0: 6365 7274 6966 6963 6174 6520 696e 2071 certificate in q\n-0018c0e0: 7565 7374 696f 6e20 7061 7373 6564 2028 uestion passed (\n-0018c0f0: 3c63 6f64 653e 6f6b 3c2f 636f 6465 3e20 ok \n-0018c100: 3d3d 2031 2920 6f72 2066 6169 6c65 6420 == 1) or failed \n-0018c110: 283c 636f 6465 3e6f 6b3c 2f63 6f64 653e (ok\n-0018c120: 203d 3d20 3029 2061 7320 6465 7465 726d == 0) as determ\n-0018c130: 696e 6564 2062 7920 7468 6520 4f70 656e ined by the Open\n-0018c140: 5353 4c20 6c69 6272 6172 7920 6261 7365 SSL library base\n-0018c150: 6420 6f6e 2074 6865 203c 636f 6465 3e3c d on the <\n-0018c160: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0018c170: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-0018c180: 5f73 736c 2e68 746d 6c23 6761 3236 3963 _ssl.html#ga269c\n-0018c190: 3737 3332 6231 6364 6139 6463 3739 6462 7732b1cda9dc79db\n-0018c1a0: 3038 6663 6266 3164 3534 3338 2220 7469 08fcbf1d5438\" ti\n-0018c1b0: 746c 653d 2249 6e69 7469 616c 697a 6520 tle=\"Initialize \n-0018c1c0: 7468 6520 636c 6965 6e74 2d73 6964 6520 the client-side \n-0018c1d0: 5353 4c2f 544c 5320 636f 6e74 6578 742e SSL/TLS context.\n-0018c1e0: 223e 736f 6170 5f73 736c 5f63 6c69 656e \">soap_ssl_clien\n-0018c1f0: 745f 636f 6e74 6578 743c 2f61 3e3c 2f63 t_context or soap_ssl_server\n-0018c2a0: 5f63 6f6e 7465 7874 3c2f 613e 3c2f 636f _context configuratio\n-0018c2c0: 6e2e 2049 6620 7468 6520 6361 6c6c 6261 n. If the callba\n-0018c2d0: 636b 2072 6574 7572 6e73 2031 2074 6865 ck returns 1 the\n-0018c2e0: 6e20 7468 6520 6861 6e64 7368 616b 6520 n the handshake \n-0018c2f0: 6973 2063 6f6e 7469 6e75 6564 2061 6e64 is continued and\n-0018c300: 2074 6865 2063 6f6e 6e65 6374 696f 6e20 the connection \n-0018c310: 6d61 7962 6520 6573 7461 626c 6973 6865 maybe establishe\n-0018c320: 642e 2054 6f20 7265 7475 726e 2031 2077 d. To return 1 w\n-0018c330: 6865 6e20 3c63 6f64 653e 6f6b 3c2f 636f hen ok == 0 require\n-0018c350: 7320 7265 7365 7474 696e 6720 7468 6520 s resetting the \n-0018c360: 6572 726f 7220 7374 6174 6520 7769 7468 error state with\n-0018c370: 203c 636f 6465 3e58 3530 395f 5354 4f52 X509_STOR\n-0018c380: 455f 4354 585f 7365 745f 6572 726f 7228 E_CTX_set_error(\n-0018c390: 7374 6f72 652c 2058 3530 395f 565f 4f4b store, X509_V_OK\n-0018c3a0: 293c 2f63 6f64 653e 2e20 4966 2074 6865 ). If the\n-0018c3b0: 2063 616c 6c62 6163 6b20 7265 7475 726e callback return\n-0018c3c0: 7320 3020 7468 656e 2074 6865 2068 616e s 0 then the han\n-0018c3d0: 6473 6861 6b65 2069 7320 696d 6d65 6469 dshake is immedi\n-0018c3e0: 6174 656c 7920 7465 726d 696e 6174 6564 ately terminated\n-0018c3f0: 2077 6974 6820 2276 6572 6966 6963 6174 with \"verificat\n-0018c400: 696f 6e20 6661 696c 6564 2220 616e 6420 ion failed\" and \n-0018c410: 6120 7665 7269 6669 6361 7469 6f6e 2066 a verification f\n-0018c420: 6169 6c75 7265 2061 6c65 7274 2069 7320 ailure alert is \n-0018c430: 7365 6e74 2074 6f20 7468 6520 7065 6572 sent to the peer\n-0018c440: 2e20 5468 6520 6275 696c 742d 696e 2066 . The built-in f\n-0018c450: 756e 6374 696f 6e20 6173 7369 676e 6564 unction assigned\n-0018c460: 2074 6f20 3c63 6f64 653e 3c61 2063 6c61 to soap::fssl\n-0018c530: 7665 7269 6679 3c2f 613e 3c2f 636f 6465 verify is ssl_v\n-0018c550: 6572 6966 795f 6361 6c6c 6261 636b 3c2f erify_callback or when #SOAP_SSL_AL\n-0018c580: 4c4f 575f 4558 5049 5245 445f 4345 5254 LOW_EXPIRED_CERT\n-0018c590: 4946 4943 4154 453c 2f63 6f64 653e 2069 IFICATE i\n-0018c5a0: 7320 7573 6564 203c 636f 6465 3e73 736c s used ssl\n-0018c5b0: 5f76 6572 6966 795f 6361 6c6c 6261 636b _verify_callback\n-0018c5c0: 5f61 6c6c 6f77 5f65 7870 6972 6564 5f63 _allow_expired_c\n-0018c5d0: 6572 7469 6669 6361 7465 3c2f 636f 6465 ertificate.
  • ...... Back to table \n-0018c610: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents<\n-0018c620: 2f70 3e0a 3c68 323e 3c61 2063 6c61 7373 /p>.

    .SSL cert\n-0018c650: 6966 6963 6174 6573 2061 6e64 206b 6579 ificates and key\n-0018c660: 2066 696c 6573 3c2f 6832 3e0a 3c70 3e54 files

    .

    T\n-0018c670: 6865 2067 534f 4150 2070 6163 6b61 6765 he gSOAP package\n-0018c680: 2069 6e63 6c75 6465 7320 6120 3c65 6d3e includes a \n-0018c690: 3c63 6f64 653e 6361 6365 7274 732e 7065 cacerts.pe\n-0018c6a0: 6d3c 2f63 6f64 653e 3c2f 656d 3e20 6669 m fi\n-0018c6b0: 6c65 2077 6974 6820 7468 6520 6365 7274 le with the cert\n-0018c6c0: 6966 6963 6174 6573 206f 6620 616c 6c20 ificates of all \n-0018c6d0: 6365 7274 6966 6963 6174 6520 6175 7468 certificate auth\n-0018c6e0: 6f72 6974 6965 732e 2059 6f75 2063 616e orities. You can\n-0018c6f0: 2075 7365 2074 6869 7320 6669 6c65 2074 use this file t\n-0018c700: 6f20 7665 7269 6679 2074 6865 2061 7574 o verify the aut\n-0018c710: 6865 6e74 6963 6174 696f 6e20 6f66 2073 hentication of s\n-0018c720: 6572 7665 7273 2074 6861 7420 7072 6f76 ervers that prov\n-0018c730: 6964 6520 6365 7274 6966 6963 6174 6573 ide certificates\n-0018c740: 2069 7373 7565 6420 6279 2074 6865 7365 issued by these\n-0018c750: 2043 4173 2e20 4a75 7374 2073 6574 2074 CAs. Just set t\n-0018c760: 6865 203c 636f 6465 3e63 6166 696c 653c he cafile<\n-0018c770: 2f63 6f64 653e 2070 6172 616d 6574 6572 /code> parameter\n-0018c780: 2074 6f20 7468 6520 6c6f 6361 7469 6f6e to the location\n-0018c790: 206f 6620 7468 6973 2066 696c 6520 6f6e of this file on\n-0018c7a0: 2079 6f75 7220 6669 6c65 2073 7973 7465 your file syste\n-0018c7b0: 6d2e 2054 6865 7265 666f 7265 2c20 7768 m. Therefore, wh\n-0018c7c0: 656e 2079 6f75 206f 6274 6169 6e20 6120 en you obtain a \n-0018c7d0: 6365 7274 6966 6963 6174 6520 7369 676e certificate sign\n-0018c7e0: 6564 2062 7920 6120 7472 7573 7465 6420 ed by a trusted \n-0018c7f0: 4341 2079 6f75 2063 616e 2073 696d 706c CA you can simpl\n-0018c800: 7920 7573 6520 7468 6520 3c65 6d3e 3c63 y use the cacerts.pem<\n-0018c820: 2f63 6f64 653e 3c2f 656d 3e20 6669 6c65 /code> file\n-0018c830: 2074 6f20 6465 7665 6c6f 7020 636c 6965 to develop clie\n-0018c840: 6e74 2061 7070 6c69 6361 7469 6f6e 7320 nt applications \n-0018c850: 7468 6174 2063 616e 2076 6572 6966 7920 that can verify \n-0018c860: 7468 6520 6175 7468 656e 7469 6369 7479 the authenticity\n-0018c870: 206f 6620 796f 7572 2073 6572 7665 722e of your server.\n-0018c880: 3c2f 703e 0a3c 703e 416c 7465 726e 6174

    .

    Alternat\n-0018c890: 6976 656c 792c 2079 6f75 2063 616e 2075 ively, you can u\n-0018c8a0: 7365 2074 6865 203c 656d 3e3c 636f 6465 se the gsoap/plugin/ca\n-0018c8c0: 6365 7274 732e 683c 2f63 6f64 653e 3c2f certs.h and gsoap/plugin/c\n-0018c8f0: 6163 6572 7473 2e63 3c2f 636f 6465 3e3c acerts.c<\n-0018c900: 2f65 6d3e 2063 6f64 6520 746f 2065 6d62 /em> code to emb\n-0018c910: 6564 2043 4120 6365 7274 6966 6963 6174 ed CA certificat\n-0018c920: 6573 2069 6e20 796f 7572 2063 6c69 656e es in your clien\n-0018c930: 7420 636f 6465 2e3c 2f70 3e0a 3c70 3e46 t code.

    .

    F\n-0018c940: 6f72 2073 7973 7465 6d73 2062 6173 6564 or systems based\n-0018c950: 206f 6e20 4d69 6372 6f73 6f66 7420 7769 on Microsoft wi\n-0018c960: 6e64 6f77 732c 2074 6865 2057 696e 496e ndows, the WinIn\n-0018c970: 6574 206d 6f64 756c 6520 6361 6e20 6265 et module can be\n-0018c980: 2075 7365 6420 696e 7374 6561 642c 2073 used instead, s\n-0018c990: 6565 2074 6865 203c 636f 6465 3e52 4541 ee the REA\n-0018c9a0: 444d 452e 7478 743c 2f63 6f64 653e 206c DME.txt l\n-0018c9b0: 6f63 6174 6564 2069 6e20 7468 6520 6753 ocated in the gS\n-0018c9c0: 4f41 5020 736f 7572 6365 2063 6f64 6520 OAP source code \n-0018c9d0: 7061 636b 6167 6520 756e 6465 7220 3c63 package under mod_gsoap/gs\n-0018c9f0: 6f61 705f 7769 6e2f 7769 6e69 6e65 743c oap_win/wininet<\n-0018ca00: 2f63 6f64 653e 2c20 7365 6520 7468 6520 /code>, see the \n-0018ca10: 6753 4f41 5020 3c61 2068 7265 663d 222e gSOAP Wi\n-0018ca40: 6e49 6e65 7420 706c 7567 696e 3c2f 613e nInet plugin\n-0018ca50: 2064 6f63 756d 656e 7461 7469 6f6e 2e3c documentation.<\n-0018ca60: 2f70 3e0a 3c70 3e54 6865 206f 7468 6572 /p>.

    The other\n-0018ca70: 203c 656d 3e3c 636f 6465 3e2e 7065 6d3c .pem<\n-0018ca80: 2f63 6f64 653e 3c2f 656d 3e20 6669 6c65 /code> file\n-0018ca90: 7320 696e 2074 6865 2067 534f 4150 2070 s in the gSOAP p\n-0018caa0: 6163 6b61 6765 2061 7265 2065 7861 6d70 ackage are examp\n-0018cab0: 6c65 7320 6f66 2073 656c 662d 7369 676e les of self-sign\n-0018cac0: 6564 2063 6572 7469 6669 6361 7465 7320 ed certificates \n-0018cad0: 666f 7220 7465 7374 696e 6720 7075 7270 for testing purp\n-0018cae0: 6f73 6573 2028 3c65 6d3e 3c63 6f64 653e oses (\n-0018caf0: 6361 6365 7274 2e70 656d 3c2f 636f 6465 cacert.pem, client.pem, server.pem). The\n-0018cb50: 203c 656d 3e3c 636f 6465 3e63 6c69 656e clien\n-0018cb60: 742e 7065 6d3c 2f63 6f64 653e 3c2f 656d t.pem and \n-0018cb80: 7365 7276 6572 2e70 656d 3c2f 636f 6465 server.pem contain t\n-0018cba0: 6865 2070 7269 7661 7465 206b 6579 2061 he private key a\n-0018cbb0: 6e64 2063 6572 7469 6669 6361 7465 206f nd certificate o\n-0018cbc0: 6620 7468 6520 636c 6965 6e74 206f 7220 f the client or \n-0018cbd0: 7365 7276 6572 2c20 7265 7370 6563 7469 server, respecti\n-0018cbe0: 7665 6c79 2e20 5468 6520 6b65 7966 696c vely. The keyfil\n-0018cbf0: 6573 2028 3c65 6d3e 3c63 6f64 653e 636c es (cl\n-0018cc00: 6965 6e74 2e70 656d 3c2f 636f 6465 3e3c ient.pem<\n-0018cc10: 2f65 6d3e 2061 6e64 203c 656d 3e3c 636f /em> and server.pem) are c\n-0018cc40: 7265 6174 6564 2062 7920 636f 6e63 6174 reated by concat\n-0018cc50: 656e 6174 696e 6720 7468 6520 7072 6976 enating the priv\n-0018cc60: 6174 6520 6b65 7920 5045 4d20 7769 7468 ate key PEM with\n-0018cc70: 2074 6865 2063 6572 7469 6669 6361 7465 the certificate\n-0018cc80: 2050 454d 2e20 5468 6520 6b65 7966 696c PEM. The keyfil\n-0018cc90: 6520 7368 6f75 6c64 206e 6f74 2062 6520 e should not be \n-0018cca0: 7368 6172 6564 2077 6974 6820 616e 7920 shared with any \n-0018ccb0: 7061 7274 792e 2057 6974 6820 4f70 656e party. With Open\n-0018ccc0: 5353 4c2c 2079 6f75 2063 616e 2065 6e63 SSL, you can enc\n-0018ccd0: 7279 7074 2074 6865 206b 6579 6669 6c65 rypt the keyfile\n-0018cce0: 7320 7769 7468 2061 2070 6173 7377 6f72 s with a passwor\n-0018ccf0: 6420 746f 206f 6666 6572 2073 6f6d 6520 d to offer some \n-0018cd00: 7072 6f74 6563 7469 6f6e 2061 6e64 2074 protection and t\n-0018cd10: 6865 2070 6173 7377 6f72 6420 6973 2075 he password is u\n-0018cd20: 7365 6420 696e 2074 6865 2063 6c69 656e sed in the clien\n-0018cd30: 742f 7365 7276 6572 2063 6f64 6520 746f t/server code to\n-0018cd40: 2072 6561 6420 7468 6520 6b65 7966 696c read the keyfil\n-0018cd50: 652e 2047 4e55 544c 5320 646f 6573 206e e. GNUTLS does n\n-0018cd60: 6f74 2073 7570 706f 7274 2074 6869 7320 ot support this \n-0018cd70: 6665 6174 7572 6520 616e 6420 6361 6e6e feature and cann\n-0018cd80: 6f74 2065 6e63 7279 7074 206f 7220 6465 ot encrypt or de\n-0018cd90: 6372 7970 7420 6120 6b65 7966 696c 652e crypt a keyfile.\n-0018cda0: 3c2f 703e 0a3c 703e 596f 7520 6361 6e20

    .

    You can \n-0018cdb0: 616c 736f 2063 7265 6174 6520 796f 7572 also create your\n-0018cdc0: 206f 776e 2073 656c 662d 7369 676e 6564 own self-signed\n-0018cdd0: 2063 6572 7469 6669 6361 7465 732e 2054 certificates. T\n-0018cde0: 6865 7265 2069 7320 6d6f 7265 2074 6861 here is more tha\n-0018cdf0: 6e20 6f6e 6520 7761 7920 746f 2067 656e n one way to gen\n-0018ce00: 6572 6174 6520 7468 6520 6e65 6365 7373 erate the necess\n-0018ce10: 6172 7920 6669 6c65 7320 666f 7220 636c ary files for cl\n-0018ce20: 6965 6e74 7320 616e 6420 7365 7276 6572 ients and server\n-0018ce30: 732e 2053 6565 203c 6120 6872 6566 3d22 s. See http://w\n-0018ce60: 7777 2e6f 7065 6e73 736c 2e6f 7267 3c2f ww.openssl.org for informati\n-0018ce80: 6f6e 206f 6e20 4f70 656e 5353 4c20 616e on on OpenSSL an\n-0018ce90: 6420 3c61 2068 7265 663d 2268 7474 703a d ht\n-0018cec0: 7470 3a2f 2f73 6961 6c2e 6f72 672f 686f tp://sial.org/ho\n-0018ced0: 7774 6f2f 6f70 656e 7373 6c2f 6361 2f3c wto/openssl/ca/<\n-0018cee0: 2f61 3e20 6f6e 2068 6f77 2074 6f20 7365 /a> on how to se\n-0018cef0: 7475 7020 616e 6420 6d61 6e61 6765 2061 tup and manage a\n-0018cf00: 206c 6f63 616c 2043 4120 616e 6420 3c61 local CA and http://sial.or\n-0018cf50: 672f 686f 7774 6f2f 6f70 656e 7373 6c2f g/howto/openssl/\n-0018cf60: 7365 6c66 2d73 6967 6e65 643c 2f61 3e20 self-signed \n-0018cf70: 6f6e 2068 6f77 2074 6f20 7365 7475 7020 on how to setup \n-0018cf80: 7365 6c66 2d73 6967 6e65 6420 7465 7374 self-signed test\n-0018cf90: 2063 6572 7469 6669 6361 7465 732e 3c2f certificates..

    It is poss\n-0018cfb0: 6962 6c65 2074 6f20 636f 6e76 6572 7420 ible to convert \n-0018cfc0: 4949 532d 6765 6e65 7261 7465 6420 6365 IIS-generated ce\n-0018cfd0: 7274 6966 6963 6174 6573 2074 6f20 5045 rtificates to PE\n-0018cfe0: 4d20 666f 726d 6174 2077 6974 6820 7468 M format with th\n-0018cff0: 6520 6f70 656e 7373 6c20 6c69 6272 6172 e openssl librar\n-0018d000: 7920 616e 6420 6f70 656e 7373 6c20 636f y and openssl co\n-0018d010: 6d6d 616e 642d 6c69 6e65 2074 6f6f 6c3a mmand-line tool:\n-0018d020: 203c 2f70 3e3c 7072 6520 636c 6173 733d

    opens\n-0018d040: 736c 2078 3530 3920 2d69 6e20 6d79 6365  sl x509 -in myce\n-0018d050: 7274 2e63 6572 202d 696e 666f 726d 2044  rt.cer -inform D\n-0018d060: 4552 202d 6f75 7420 6d79 6365 7274 2e70  ER -out mycert.p\n-0018d070: 656d 202d 6f75 7466 6f72 6d20 5045 4d0a  em -outform PEM.\n-0018d080: 3c2f 7072 653e 3c70 3e20 5468 6973 2063  

    This c\n-0018d090: 6f6e 7665 7274 7320 7468 6520 4352 542d onverts the CRT-\n-0018d0a0: 666f 726d 6174 7465 6420 6d79 6365 7274 formatted mycert\n-0018d0b0: 2e63 6572 2074 6f20 5045 4d2d 666f 726d .cer to PEM-form\n-0018d0c0: 6174 7465 6420 6d79 6365 7274 2e70 656d atted mycert.pem\n-0018d0d0: 2e3c 2f70 3e0a 3c70 3e48 6572 6520 6973 .

    .

    Here is\n-0018d0e0: 2074 6865 2073 696d 706c 6573 7420 7761 the simplest wa\n-0018d0f0: 7920 746f 2073 6574 7570 2073 656c 662d y to setup self-\n-0018d100: 7369 676e 6564 2063 6572 7469 6669 6361 signed certifica\n-0018d110: 7465 732e 2046 6972 7374 2079 6f75 206e tes. First you n\n-0018d120: 6565 6420 746f 2063 7265 6174 6520 6120 eed to create a \n-0018d130: 7072 6976 6174 6520 4365 7274 6966 6963 private Certific\n-0018d140: 6174 6520 4175 7468 6f72 6974 7920 2843 ate Authority (C\n-0018d150: 4129 2e20 5468 6520 4341 2069 7320 7573 A). The CA is us\n-0018d160: 6564 2069 6e20 5353 4c20 746f 2076 6572 ed in SSL to ver\n-0018d170: 6966 7920 7468 6520 6175 7468 656e 7469 ify the authenti\n-0018d180: 6369 7479 206f 6620 6120 6769 7665 6e20 city of a given \n-0018d190: 6365 7274 6966 6963 6174 652e 2054 6865 certificate. The\n-0018d1a0: 2043 4120 6163 7473 2061 7320 6120 7472 CA acts as a tr\n-0018d1b0: 7573 7465 6420 7468 6972 6420 7061 7274 usted third part\n-0018d1c0: 7920 7768 6f20 6861 7320 6175 7468 656e y who has authen\n-0018d1d0: 7469 6361 7465 6420 7468 6520 7573 6572 ticated the user\n-0018d1e0: 206f 6620 7468 6520 7369 676e 6564 2063 of the signed c\n-0018d1f0: 6572 7469 6669 6361 7465 2061 7320 6265 ertificate as be\n-0018d200: 696e 6720 7768 6f20 7468 6579 2073 6179 ing who they say\n-0018d210: 2e20 5468 6520 6365 7274 6966 6963 6174 . The certificat\n-0018d220: 6520 6973 2073 6967 6e65 6420 6279 2074 e is signed by t\n-0018d230: 6865 2043 412c 2061 6e64 2069 6620 7468 he CA, and if th\n-0018d240: 6520 636c 6965 6e74 2074 7275 7374 7320 e client trusts \n-0018d250: 7468 6520 4341 2c20 6974 2077 696c 6c20 the CA, it will \n-0018d260: 7472 7573 7420 796f 7572 2063 6572 7469 trust your certi\n-0018d270: 6669 6361 7465 2e20 466f 7220 7573 6520 ficate. For use \n-0018d280: 7769 7468 696e 2079 6f75 7220 6f72 6761 within your orga\n-0018d290: 6e69 7a61 7469 6f6e 2c20 6120 7072 6976 nization, a priv\n-0018d2a0: 6174 6520 4341 2077 696c 6c20 7072 6f62 ate CA will prob\n-0018d2b0: 6162 6c79 2073 6572 7665 2079 6f75 7220 ably serve your \n-0018d2c0: 6e65 6564 732e 2048 6f77 6576 6572 2c20 needs. However, \n-0018d2d0: 6966 2079 6f75 2069 6e74 656e 6420 7573 if you intend us\n-0018d2e0: 6520 796f 7572 2063 6572 7469 6669 6361 e your certifica\n-0018d2f0: 7465 7320 666f 7220 6120 7075 626c 6963 tes for a public\n-0018d300: 2073 6572 7669 6365 2c20 796f 7520 7368 service, you sh\n-0018d310: 6f75 6c64 2070 726f 6261 626c 7920 6f62 ould probably ob\n-0018d320: 7461 696e 2061 2063 6572 7469 6669 6361 tain a certifica\n-0018d330: 7465 2066 726f 6d20 6120 6b6e 6f77 6e20 te from a known \n-0018d340: 4341 2e20 496e 2061 6464 6974 696f 6e20 CA. In addition \n-0018d350: 746f 2069 6465 6e74 6966 6963 6174 696f to identificatio\n-0018d360: 6e2c 2079 6f75 7220 6365 7274 6966 6963 n, your certific\n-0018d370: 6174 6520 6973 2061 6c73 6f20 7573 6564 ate is also used\n-0018d380: 2066 6f72 2065 6e63 7279 7074 696f 6e2e for encryption.\n-0018d390: 3c2f 703e 0a3c 703e 4372 6561 7469 6e67

    .

    Creating\n-0018d3a0: 2063 6572 7469 6669 6361 7465 7320 7368 certificates sh\n-0018d3b0: 6f75 6c64 2062 6520 646f 6e65 2074 6872 ould be done thr\n-0018d3c0: 6f75 6768 2061 2043 4120 746f 206f 6274 ough a CA to obt\n-0018d3d0: 6169 6e20 7369 676e 6564 2063 6572 7469 ain signed certi\n-0018d3e0: 6669 6361 7465 732e 2042 7574 2079 6f75 ficates. But you\n-0018d3f0: 2063 616e 2063 7265 6174 6520 796f 7572 can create your\n-0018d400: 206f 776e 2063 6572 7469 6669 6361 7465 own certificate\n-0018d410: 7320 666f 7220 7465 7374 696e 6720 7075 s for testing pu\n-0018d420: 7270 6f73 6573 2061 7320 666f 6c6c 6f77 rposes as follow\n-0018d430: 732e 3c2f 703e 0a3c 756c 3e0a 3c6c 693e s.

    .
      .
    • \n-0018d440: 476f 2074 6f20 7468 6520 4f70 656e 5353 Go to the OpenSS\n-0018d450: 4c20 6269 6e20 6469 7265 6374 6f72 7920 L bin directory \n-0018d460: 283c 636f 6465 3e2f 7573 722f 6c6f 6361 (/usr/loca\n-0018d470: 6c2f 7373 6c3c 2f63 6f64 653e 2062 7920 l/ssl by \n-0018d480: 6465 6661 756c 7420 616e 6420 3c63 6f64 default and /System/Librar\n-0018d4a0: 792f 4f70 656e 5353 4c3c 2f63 6f64 653e y/OpenSSL\n-0018d4b0: 206f 6e20 4d61 6320 4f53 2058 293c 2f6c on Mac OS X).
    • There sho\n-0018d4d0: 756c 6420 6265 2061 2066 696c 6520 6361 uld be a file ca\n-0018d4e0: 6c6c 6564 206f 7065 6e73 736c 2e63 6e66 lled openssl.cnf\n-0018d4f0: 3c2f 6c69 3e0a 3c6c 693e 4372 6561 7465
    • .
    • Create\n-0018d500: 2061 206e 6577 2064 6972 6563 746f 7279 a new directory\n-0018d510: 2069 6e20 796f 7572 2068 6f6d 6520 6163 in your home ac\n-0018d520: 636f 756e 742c 2065 2e67 2e20 2448 4f4d count, e.g. $HOM\n-0018d530: 452f 4341 2c20 616e 6420 636f 7079 2074 E/CA, and copy t\n-0018d540: 6865 206f 7065 6e73 736c 2e63 6e66 2066 he openssl.cnf f\n-0018d550: 696c 6520 746f 2074 6869 7320 6469 7265 ile to this dire\n-0018d560: 6374 6f72 793c 2f6c 693e 0a3c 6c69 3e4d ctory
    • .
    • M\n-0018d570: 6f64 6966 7920 6f70 656e 7373 6c2e 636e odify openssl.cn\n-0018d580: 6620 6279 2063 6861 6e67 696e 6720 7468 f by changing th\n-0018d590: 6520 2764 6972 2720 7661 6c75 6520 746f e 'dir' value to\n-0018d5a0: 2048 4f4d 452f 4341 3c2f 6c69 3e0a 3c6c HOME/CA
    • .Copy the READM\n-0018d5c0: 452e 7478 742c 2072 6f6f 742e 7368 2c20 E.txt, root.sh, \n-0018d5d0: 616e 6420 6365 7274 2e73 6820 7363 7269 and cert.sh scri\n-0018d5e0: 7074 7320 6672 6f6d 2074 6865 2067 534f pts from the gSO\n-0018d5f0: 4150 2073 6f75 7263 6520 636f 6465 2070 AP source code p\n-0018d600: 6163 6b61 6765 206c 6f63 6174 6564 2069 ackage located i\n-0018d610: 6e20 7468 6520 3c65 6d3e 3c63 6f64 653e n the \n-0018d620: 6773 6f61 702f 7361 6d70 6c65 732f 7373 gsoap/samples/ss\n-0018d630: 6c3c 2f63 6f64 653e 3c2f 656d 3e20 6469 l di\n-0018d640: 7265 6374 6f72 7920 746f 2048 4f4d 452f rectory to HOME/\n-0018d650: 4341 3c2f 6c69 3e0a 3c6c 693e 466f 6c6c CA.
    • Foll\n-0018d660: 6f77 2074 6865 2052 4541 444d 452e 7478 ow the README.tx\n-0018d670: 7420 696e 7374 7275 6374 696f 6e73 3c2f t instructions.
    .

    You\n-0018d690: 206e 6f77 2068 6176 6520 6120 7365 6c66 now have a self\n-0018d6a0: 2d73 6967 6e65 6420 4341 2072 6f6f 7420 -signed CA root \n-0018d6b0: 6365 7274 6966 6963 6174 6520 6361 6365 certificate cace\n-0018d6c0: 7274 2e70 656d 2061 6e64 2061 2073 6572 rt.pem and a ser\n-0018d6d0: 7665 722e 7065 6d20 286f 7220 636c 6965 ver.pem (or clie\n-0018d6e0: 6e74 2e70 656d 2920 6365 7274 6966 6963 nt.pem) certific\n-0018d6f0: 6174 6520 696e 2050 454d 2066 6f72 6d61 ate in PEM forma\n-0018d700: 742e 2054 6865 2063 6163 6572 742e 7065 t. The cacert.pe\n-0018d710: 6d20 6365 7274 6966 6963 6174 6520 6973 m certificate is\n-0018d720: 2075 7365 6420 696e 2074 6865 203c 636f used in the cafile\n-0018d740: 2070 6172 616d 6574 6572 206f 6620 7468 parameter of th\n-0018d750: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap_\n-0018d7e0: 7373 6c5f 636c 6965 6e74 5f63 6f6e 7465 ssl_client_conte\n-0018d7f0: 7874 3c2f 613e 3c2f 636f 6465 3e20 286f xt (o\n-0018d800: 7220 3c63 6f64 653e 3c61 2063 6c61 7373 r soap_\n-0018d890: 7373 6c5f 7365 7276 6572 5f63 6f6e 7465 ssl_server_conte\n-0018d8a0: 7874 3c2f 613e 3c2f 636f 6465 3e29 2061 xt) a\n-0018d8b0: 7420 7468 6520 636c 6965 6e74 2028 6f72 t the client (or\n-0018d8c0: 2073 6572 7665 7229 2073 6964 6520 746f server) side to\n-0018d8d0: 2076 6572 6966 7920 7468 6520 6175 7468 verify the auth\n-0018d8e0: 656e 7469 6369 7479 206f 6620 7468 6520 enticity of the \n-0018d8f0: 7065 6572 2e20 596f 7520 6361 6e20 616c peer. You can al\n-0018d900: 736f 2070 726f 7669 6465 2061 2063 6170 so provide a cap\n-0018d910: 6174 6820 7061 7261 6d65 7465 7220 746f ath parameter to\n-0018d920: 2074 6865 7365 2074 7275 7374 6564 2063 these trusted c\n-0018d930: 6572 7469 6669 6361 7465 732e 2054 6865 ertificates. The\n-0018d940: 2073 6572 7665 722e 7065 6d20 286f 7220 server.pem (or \n-0018d950: 636c 6965 6e74 2e70 656d 2920 6d75 7374 client.pem) must\n-0018d960: 2062 6520 7072 6f76 6964 6564 2077 6974 be provided wit\n-0018d970: 6820 7468 6520 3c63 6f64 653e 3c61 2063 h the s\n-0018da00: 6f61 705f 7373 6c5f 7365 7276 6572 5f63 oap_ssl_server_c\n-0018da10: 6f6e 7465 7874 3c2f 613e 3c2f 636f 6465 ontext at the server \n-0018da30: 7369 6465 2028 6f72 203c 636f 6465 3e3c side (or <\n-0018da40: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0018da50: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-0018da60: 5f73 736c 2e68 746d 6c23 6761 3236 3963 _ssl.html#ga269c\n-0018da70: 3737 3332 6231 6364 6139 6463 3739 6462 7732b1cda9dc79db\n-0018da80: 3038 6663 6266 3164 3534 3338 2220 7469 08fcbf1d5438\" ti\n-0018da90: 746c 653d 2249 6e69 7469 616c 697a 6520 tle=\"Initialize \n-0018daa0: 7468 6520 636c 6965 6e74 2d73 6964 6520 the client-side \n-0018dab0: 5353 4c2f 544c 5320 636f 6e74 6578 742e SSL/TLS context.\n-0018dac0: 223e 736f 6170 5f73 736c 5f63 6c69 656e \">soap_ssl_clien\n-0018dad0: 745f 636f 6e74 6578 743c 2f61 3e3c 2f63 t_context at the clie\n-0018daf0: 6e74 2073 6964 6529 2074 6f67 6574 6865 nt side) togethe\n-0018db00: 7220 7769 7468 2074 6865 2070 6173 7377 r with the passw\n-0018db10: 6f72 6420 796f 7520 656e 7465 7265 6420 ord you entered \n-0018db20: 7768 656e 2067 656e 6572 6174 696e 6720 when generating \n-0018db30: 7468 6520 6365 7274 6966 6963 6174 6520 the certificate \n-0018db40: 7573 696e 6720 6365 7274 2e73 6820 746f using cert.sh to\n-0018db50: 2061 6363 6573 7320 7468 6520 6669 6c65 access the file\n-0018db60: 2e20 5468 6573 6520 6365 7274 6966 6963 . These certific\n-0018db70: 6174 6573 206d 7573 7420 6265 2070 7265 ates must be pre\n-0018db80: 7365 6e74 2074 6f20 6772 616e 7420 6175 sent to grant au\n-0018db90: 7468 656e 7469 6361 7469 6f6e 2072 6571 thentication req\n-0018dba0: 7565 7374 7320 6279 2070 6565 7273 2e20 uests by peers. \n-0018dbb0: 496e 2061 6464 6974 696f 6e2c 2074 6865 In addition, the\n-0018dbc0: 2073 6572 7665 722e 7065 6d20 2861 6e64 server.pem (and\n-0018dbd0: 2063 6c69 656e 742e 7065 6d29 2069 6e63 client.pem) inc\n-0018dbe0: 6c75 6465 2074 6865 2068 6f73 7420 6e61 lude the host na\n-0018dbf0: 6d65 206f 6620 7468 6520 6d61 6368 696e me of the machin\n-0018dc00: 6520 6f6e 2077 6869 6368 2074 6865 2061 e on which the a\n-0018dc10: 7070 6c69 6361 7469 6f6e 2072 756e 7320 pplication runs \n-0018dc20: 2865 2e67 2e20 6c6f 6361 6c68 6f73 7429 (e.g. localhost)\n-0018dc30: 2c20 736f 2079 6f75 206e 6565 6420 746f , so you need to\n-0018dc40: 2067 656e 6572 6174 6520 6e65 7720 6365 generate new ce\n-0018dc50: 7274 6966 6963 6174 6573 2077 6865 6e20 rtificates when \n-0018dc60: 6d69 6772 6174 696e 6720 6120 7365 7276 migrating a serv\n-0018dc70: 6572 2028 6f72 2063 6c69 656e 7429 2e3c er (or client).<\n-0018dc80: 2f70 3e0a 3c70 3e46 696e 616c 6c79 2c20 /p>.

    Finally, \n-0018dc90: 796f 7520 6e65 6564 2074 6f20 6765 6e65 you need to gene\n-0018dca0: 7261 7465 2044 6966 6669 652d 4865 6c6d rate Diffie-Helm\n-0018dcb0: 616e 6e20 2844 4829 2070 6172 616d 6574 ann (DH) paramet\n-0018dcc0: 6572 7320 666f 7220 7468 6520 7365 7276 ers for the serv\n-0018dcd0: 6572 2069 6620 796f 7520 7769 7368 2074 er if you wish t\n-0018dce0: 6f20 7573 6520 4448 2069 6e73 7465 6164 o use DH instead\n-0018dcf0: 206f 6620 5253 412e 2054 6865 7265 2061 of RSA. There a\n-0018dd00: 7265 2074 776f 206f 7074 696f 6e73 3a3c re two options:<\n-0018dd10: 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e53 6574 /p>.

      .
    • Set\n-0018dd20: 2074 6865 203c 636f 6465 3e64 6866 696c the dhfil\n-0018dd30: 653c 2f63 6f64 653e 2070 6172 616d 6574 e paramet\n-0018dd40: 6572 2074 6f20 7468 6520 6e75 6d65 7269 er to the numeri\n-0018dd50: 6320 4448 2070 7269 6d65 206c 656e 6774 c DH prime lengt\n-0018dd60: 6820 696e 2062 6974 7320 7265 7175 6972 h in bits requir\n-0018dd70: 6564 2028 666f 7220 6578 616d 706c 6520 ed (for example \n-0018dd80: 2231 3032 3422 2920 746f 206c 6574 2074 \"1024\") to let t\n-0018dd90: 6865 2065 6e67 696e 6520 6765 6e65 7261 he engine genera\n-0018dda0: 7465 2044 4820 7061 7261 6d65 7465 7273 te DH parameters\n-0018ddb0: 2061 7420 696e 6974 6961 6c69 7a61 7469 at initializati\n-0018ddc0: 6f6e 2e20 5468 6973 2063 616e 2062 6520 on. This can be \n-0018ddd0: 7469 6d65 2063 6f6e 7375 6d69 6e67 2e3c time consuming.<\n-0018dde0: 2f6c 693e 0a3c 6c69 3e50 726f 7669 6465 /li>.
    • Provide\n-0018ddf0: 2061 2066 696c 6520 6e61 6d65 2066 6f72 a file name for\n-0018de00: 2074 6865 203c 636f 6465 3e64 6866 696c the dhfil\n-0018de10: 653c 2f63 6f64 653e 2070 6172 616d 6574 e paramet\n-0018de20: 6572 206f 6620 3c63 6f64 653e 3c61 2063 er of s\n-0018deb0: 6f61 705f 7373 6c5f 7365 7276 6572 5f63 oap_ssl_server_c\n-0018dec0: 6f6e 7465 7874 3c2f 613e 3c2f 636f 6465 ontext. The file shou\n-0018dee0: 6c64 2062 6520 6765 6e65 7261 7465 6420 ld be generated \n-0018def0: 6265 666f 7265 6861 6e64 2e20 546f 2064 beforehand. To d\n-0018df00: 6f20 736f 2077 6974 6820 7468 6520 4f70 o so with the Op\n-0018df10: 656e 5353 4c20 636f 6d6d 616e 6420 6c69 enSSL command li\n-0018df20: 6e65 2074 6f6f 6c2c 2075 7365 3a20 3c70 ne tool, use: openssl dhp\n-0018df50: 6172 616d 202d 6f75 7466 6f72 6d20 5045 aram -outform PE\n-0018df60: 4d20 2d6f 7574 2064 682e 7065 6d20 3531 M -out dh.pem 51\n-0018df70: 320a 3c2f 7072 653e 2046 696c 6520 3c65 2. File dh512.pe\n-0018df90: 6d3c 2f63 6f64 653e 3c2f 656d 3e20 6973 m is\n-0018dfa0: 2074 6865 206f 7574 7075 7420 6669 6c65 the output file\n-0018dfb0: 2061 6e64 2035 3132 2069 7320 7468 6520 and 512 is the \n-0018dfc0: 6e75 6d62 6572 206f 6620 6269 7473 2075 number of bits u\n-0018dfd0: 7365 642e 3c2f 6c69 3e0a 3c2f 756c 3e0a sed.
    • .
    .\n-0018dfe0: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

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

    .

    .SSL \n-0018e040: 6861 7264 7761 7265 2061 6363 656c 6572 hardware acceler\n-0018e050: 6174 696f 6e3c 2f68 323e 0a3c 703e 596f ation

    .

    Yo\n-0018e060: 7520 6361 6e20 7370 6563 6966 7920 6120 u can specify a \n-0018e070: 6861 7264 7761 7265 2065 6e67 696e 6520 hardware engine \n-0018e080: 746f 2065 6e61 626c 6520 6861 7264 7761 to enable hardwa\n-0018e090: 7265 2073 7570 706f 7274 2066 6f72 2063 re support for c\n-0018e0a0: 7279 7074 6f67 7261 7068 6963 2061 6363 ryptographic acc\n-0018e0b0: 656c 6572 6174 696f 6e2e 2054 6869 7320 eleration. This \n-0018e0c0: 6361 6e20 6265 2064 6f6e 6520 6f6e 6365 can be done once\n-0018e0d0: 2069 6e20 6120 7365 7276 6572 206f 7220 in a server or \n-0018e0e0: 636c 6965 6e74 2077 6974 6820 7468 6520 client with the \n-0018e0f0: 666f 6c6c 6f77 696e 6720 7374 6174 656d following statem\n-0018e100: 656e 7473 3a3c 2f70 3e0a 3c64 6976 2063 ents:

    .
    \n-0018e120: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    static cons\n-0018e170: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n-0018e1a0: 656e 6769 6e65 203d 203c 7370 616e 2063 engine = "cswif\n-0018e1d0: 7426 7175 6f74 3b3c 2f73 7061 6e3e 3b20 t"; \n-0018e1e0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* engine \n-0018e200: 6e61 6d65 202a 2f3c 2f73 7061 6e3e 203c name */ <\n-0018e210: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int mai\n-0018e250: 6e28 2920 3c2f 6469 763e 0a3c 6469 7620 n()
    .
    {.
    ENGINE \n-0018e290: 2a65 3b20 3c2f 6469 763e 0a3c 6469 7620 *e;
    .
    <\n-0018e2b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-0018e2c0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (!(e = ENGINE\n-0018e2e0: 5f62 795f 6964 2865 6e67 696e 6529 2929 _by_id(engine)))\n-0018e2f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    fp\n-0018e310: 7269 6e74 6628 7374 6465 7272 2c20 3c73 rintf(stderr, "\n-0018e340: 4572 726f 7220 6669 6e64 696e 6720 656e Error finding en\n-0018e350: 6769 6e65 2025 735c 6e26 7175 6f74 3b3c gine %s\\n"<\n-0018e360: 2f73 7061 6e3e 2c20 656e 6769 6e65 293b /span>, engine);\n-0018e370: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    else if (!ENGINE_s\n-0018e3e0: 6574 5f64 6566 6175 6c74 2865 2c20 454e et_default(e, EN\n-0018e3f0: 4749 4e45 5f4d 4554 484f 445f 414c 4c29 GINE_METHOD_ALL)\n-0018e400: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    f\n-0018e420: 7072 696e 7466 2873 7464 6572 722c 203c printf(stderr, <\n-0018e430: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-0018e440: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-0018e450: 3b45 7272 6f72 2075 7369 6e67 2065 6e67 ;Error using eng\n-0018e460: 696e 6520 2573 5c6e 2671 756f 743b 3c2f ine %s\\n", engine); \n-0018e480: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... <\n-0018e4a0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0018e4b0: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent\">//.
    }
    .<\n-0018e4e0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    The fol\n-0018e500: 6c6f 7769 6e67 2074 6162 6c65 206c 6973 lowing table lis\n-0018e510: 7473 2074 6865 206e 616d 6573 206f 6620 ts the names of \n-0018e520: 7468 6520 6861 7264 7761 7265 2061 6e64 the hardware and\n-0018e530: 2073 6f66 7477 6172 6520 656e 6769 6e65 software engine\n-0018e540: 733a 3c2f 703e 0a3c 7461 626c 6520 636c s:

    .

  • method pr\n-001508a0: 6f70 6572 7479 2020 203c 2f74 683e 3c74 operty
    met\n-00150930: 686f 642d 646f 6375 6d65 6e74 6174 696f hod-documentatio\n-00150940: 6e3c 2f63 6f64 653e 2020 203c 2f74 643e n text describin\n-00150980: 6720 7468 6520 7365 7276 6963 6520 6f70 g the service op\n-00150990: 6572 6174 696f 6e20 2020 203c 2f74 643e eration
    \n-001509f0: 6d65 7468 6f64 3c2f 636f 6465 3e20 2020 method \n-00150a00: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 same as a\n-00150a30: 626f 7665 2c20 7368 6f72 7468 616e 6420 bove, shorthand \n-00150a40: 666f 726d 2020 2020 3c2f 7464 3e3c 2f74 form
    meth\n-00150aa0: 6f64 2d61 6374 696f 6e3c 2f63 6f64 653e od-action\n-00150ab0: 2020 203c 2f74 643e 3c74 6420 636c 6173 \n-00150ae0: 2222 3c2f 636f 6465 3e20 6f72 2055 5249 \"\" or URI\n-00150af0: 2053 4f41 5041 6374 696f 6e20 4854 5450 SOAPAction HTTP\n-00150b00: 2068 6561 6465 722c 206f 7220 5552 4c20 header, or URL \n-00150b10: 7175 6572 7920 7374 7269 6e67 2066 6f72 query string for\n-00150b20: 2052 4553 5420 7072 6f74 6f63 6f6c 7320 REST protocols \n-00150b30: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    method-i\n-00150b90: 6e70 7574 2d61 6374 696f 6e3c 2f63 6f64 nput-action \"\" or U\n-00150be0: 5249 2053 4f41 5041 6374 696f 6e20 4854 RI SOAPAction HT\n-00150bf0: 5450 2068 6561 6465 7220 6f66 2073 6572 TP header of ser\n-00150c00: 7669 6365 2072 6571 7565 7374 206d 6573 vice request mes\n-00150c10: 7361 6765 7320 2020 203c 2f74 643e 3c2f sages
    met\n-00150c70: 686f 642d 6f75 7470 7574 2d61 6374 696f hod-output-actio\n-00150c80: 6e3c 2f63 6f64 653e 2020 203c 2f74 643e n \"\" or URI SOAPAct\n-00150cd0: 696f 6e20 4854 5450 2068 6561 6465 7220 ion HTTP header \n-00150ce0: 6f66 2073 6572 7669 6365 2072 6573 706f of service respo\n-00150cf0: 6e73 6520 6d65 7373 6167 6573 2020 2020 nse messages \n-00150d00: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    \"\n-00150da0: 223c 2f63 6f64 653e 206f 7220 5552 4920 \" or URI \n-00150db0: 534f 4150 4163 7469 6f6e 2048 5454 5020 SOAPAction HTTP \n-00150dc0: 6865 6164 6572 206f 6620 7365 7276 6963 header of servic\n-00150dd0: 6520 6661 756c 7420 6d65 7373 6167 6573 e fault messages\n-00150de0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    method-h\n-00150e40: 6561 6465 722d 7061 7274 3c2f 636f 6465 eader-part membe\n-00150e80: 7220 6e61 6d65 206f 6620 7468 6520 3c63 r name of the S\n-00150ef0: 4f41 505f 454e 565f 5f48 6561 6465 723c OAP_ENV__Header<\n-00150f00: 2f61 3e3c 2f63 6f64 653e 2073 7472 7563 /a> struc\n-00150f10: 7420 7573 6564 2069 6e20 534f 4150 2048 t used in SOAP H\n-00150f20: 6561 6465 7220 2020 203c 2f74 643e 3c2f eader
    me\n-00150f80: 7468 6f64 2d69 6e70 7574 2d68 6561 6465 thod-input-heade\n-00150f90: 722d 7061 7274 3c2f 636f 6465 3e20 2020 r-part \n-00150fa0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 member na\n-00150fd0: 6d65 206f 6620 7468 6520 3c63 6f64 653e me of the \n-00150fe0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 SOAP_\n-00151040: 454e 565f 5f48 6561 6465 723c 2f61 3e3c ENV__Header<\n-00151050: 2f63 6f64 653e 2073 7472 7563 7420 7573 /code> struct us\n-00151060: 6564 2069 6e20 534f 4150 2048 6561 6465 ed in SOAP Heade\n-00151070: 7273 206f 6620 7265 7175 6573 7473 2020 rs of requests \n-00151080: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    method-fault ty\n-00151270: 7065 206e 616d 6520 6f66 2061 2073 7472 pe name of a str\n-00151280: 7563 7420 6f72 2063 6c61 7373 206d 656d uct or class mem\n-00151290: 6265 7220 7573 6564 2069 6e20 3c63 6f64 ber used in SOAP_ENV__Deta\n-001512b0: 696c 733c 2f63 6f64 653e 2073 7472 7563 ils struc\n-001512c0: 7420 2020 203c 2f74 643e 3c2f 7472 3e0a t
    method-\n-00151320: 6d69 6d65 2d74 7970 653c 2f63 6f64 653e mime-type\n-00151330: 2020 203c 2f74 643e 3c74 6420 636c 6173 REST c\n-00151360: 6f6e 7465 6e74 2074 7970 6520 6f72 2053 ontent type or S\n-00151370: 4f41 5020 4d49 4d45 2061 7474 6163 686d OAP MIME attachm\n-00151380: 656e 7420 636f 6e74 656e 7420 7479 7065 ent content type\n-00151390: 2873 2920 2020 203c 2f74 643e 3c2f 7472 (s)
    meth\n-001513f0: 6f64 2d69 6e70 7574 2d6d 696d 652d 7479 od-input-mime-ty\n-00151400: 7065 3c2f 636f 6465 3e20 2020 3c2f 7464 pe REST content \n-00151440: 7479 7065 206f 7220 534f 4150 204d 494d type or SOAP MIM\n-00151450: 4520 6174 7461 6368 6d65 6e74 2063 6f6e E attachment con\n-00151460: 7465 6e74 2074 7970 6528 7329 206f 6620 tent type(s) of \n-00151470: 7265 7175 6573 7420 6d65 7373 6167 6520 request message \n-00151480: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    document\n-00151610: 3c2f 636f 6465 3e20 6f72 203c 636f 6465 or rpc <\n-00151630: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    method-encodi\n-00151690: 6e67 3c2f 636f 6465 3e20 2020 3c2f 7464 ng literal\n-001516d0: 3c2f 636f 6465 3e2c 203c 636f 6465 3e65 , e\n-001516e0: 6e63 6f64 6564 3c2f 636f 6465 3e2c 206f ncoded, o\n-001516f0: 7220 6120 6375 7374 6f6d 2055 5249 2066 r a custom URI f\n-00151700: 6f72 2065 6e63 6f64 696e 6753 7479 6c65 or encodingStyle\n-00151710: 206f 6620 6d65 7373 6167 6573 2020 2020 of messages \n-00151720: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    literal, encode\n-001517e0: 643c 2f63 6f64 653e 2c20 6f72 2061 2063 d, or a c\n-001517f0: 7573 746f 6d20 5552 4920 666f 7220 656e ustom URI for en\n-00151800: 636f 6469 6e67 5374 796c 6520 6f66 2072 codingStyle of r\n-00151810: 6573 706f 6e73 6520 6d65 7373 6167 6573 esponse messages\n-00151820: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    method-p\n-00151880: 726f 746f 636f 6c3c 2f63 6f64 653e 2020 rotocol \n-00151890: 203c 2f74 643e 3c74 6420 636c 6173 733d SOAP or \n-001518c0: 5245 5354 2c20 7365 6520 3c61 2063 6c61 REST, see Service d\n-00151900: 6972 6563 7469 7665 733c 2f61 3e20 2020 irectives \n-00151910: 3c2f 7464 3e3c 2f74 723e 0a3c 2f74 6162
    ty\n-00153160: 7065 2070 726f 7065 7274 7920 2020 3c2f pe property value
    type-documenta\n-00153200: 7469 6f6e 3c2f 636f 6465 3e20 2020 3c2f tion text descri\n-00153240: 6269 6e67 2074 6865 2073 6368 656d 6120 bing the schema \n-00153250: 7479 7065 2020 2020 3c2f 7464 3e3c 2f74 type
    typ\n-001532b0: 653c 2f63 6f64 653e 2020 203c 2f74 643e e an alias for t\n-001532f0: 6865 203c 636f 6465 3e74 7970 652d 646f he type-do\n-00153300: 6375 6d65 6e74 6174 696f 6e3c 2f63 6f64 cumentation property
    ......\n-0018e740: 4f70 656e 4253 4420 7375 7070 6f72 7473 OpenBSD supports\n-0018e750: 206b 6572 6e65 6c20 6c65 7665 6c20 6372 kernel level cr\n-0018e760: 7970 746f 6772 6170 6879 2020 2020 3c2f yptography ........<\n-0018e9d0: 636f 6465 3e6e 7572 6f6e 3c2f 636f 6465 code>nuron <\n-0018ea30: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>......\n-0018ebd0: 3c63 6f64 653e 7375 7265 7761 7265 3c2f sureware S\n-0018ec10: 7572 6557 6172 6520 6163 6365 6c65 7261 ureWare accelera\n-0018ec20: 7469 6f6e 2068 6172 6477 6172 6520 2020 tion hardware \n-0018ec30: 3c2f 7464 3e3c 2f74 723e 0a3c 2f74 6162 ..

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

    .

    \n-0018eca0: 0a53 534c 206f 6e20 5769 6e64 6f77 733c .SSL on Windows<\n-0018ecb0: 2f68 323e 0a3c 703e 5365 7420 7468 6520 /h2>.

    Set the \n-0018ecc0: 6675 6c6c 2070 6174 6820 746f 203c 656d full path to libssl.li\n-0018ece0: 623c 2f63 6f64 653e 3c2f 656d 3e20 616e b an\n-0018ecf0: 6420 3c65 6d3e 3c63 6f64 653e 6c69 6263 d libc\n-0018ed00: 7279 7074 6f2e 6c69 623c 2f63 6f64 653e rypto.lib\n-0018ed10: 3c2f 656d 3e20 756e 6465 7220 7468 6520 under the \n-0018ed20: 4d53 5643 2b2b 2022 5072 6f6a 6563 7473 MSVC++ \"Projects\n-0018ed30: 2220 6d65 6e75 2c20 7468 656e 2063 686f \" menu, then cho\n-0018ed40: 6f73 6520 224c 696e 6b22 3a20 224f 626a ose \"Link\": \"Obj\n-0018ed50: 6563 742f 4d6f 6475 6c65 7322 2e20 506c ect/Modules\". Pl\n-0018ed60: 6561 7365 206d 616b 6520 7375 7265 203c ease make sure <\n-0018ed70: 656d 3e3c 636f 6465 3e6c 6962 7373 6c33 em>libssl3\n-0018ed80: 322e 646c 6c3c 2f63 6f64 653e 3c2f 656d 2.dll and \n-0018eda0: 6c69 6265 6179 3332 2e64 6c6c 3c2f 636f libeay32.dll can be \n-0018edc0: 6c6f 6164 6564 2062 7920 796f 7572 2061 loaded by your a\n-0018edd0: 7070 6c69 6361 7469 6f6e 732c 2074 6875 pplications, thu\n-0018ede0: 7320 7468 6579 206d 7573 7420 6265 2069 s they must be i\n-0018edf0: 6e73 7461 6c6c 6564 2070 726f 7065 726c nstalled properl\n-0018ee00: 7920 6f6e 2074 6865 2074 6172 6765 7420 y on the target \n-0018ee10: 6d61 6368 696e 652e 3c2f 703e 0a3c 703e machine.

    .

    \n-0018ee20: 4966 2079 6f75 2772 6520 7573 696e 6720 If you're using \n-0018ee30: 636f 6d70 696c 6174 696f 6e20 7365 7474 compilation sett\n-0018ee40: 696e 6773 2073 7563 6820 6173 203c 636f ings such as /MTd t\n-0018ee60: 6865 6e20 6c69 6e6b 2074 6f20 7468 6520 hen link to the \n-0018ee70: 636f 7272 6563 7420 3c65 6d3e 3c63 6f64 correct libeay32MTd.li\n-0018ee90: 623c 2f63 6f64 653e 3c2f 656d 3e20 616e b an\n-0018eea0: 6420 3c65 6d3e 3c63 6f64 653e 7373 6c65 d ssle\n-0018eeb0: 6179 3332 4d54 642e 6c69 623c 2f63 6f64 ay32MTd.lib librarie\n-0018eed0: 732e 3c2f 703e 0a3c 703e 416c 7465 726e s.

    .

    Altern\n-0018eee0: 6174 6976 656c 792c 2079 6f75 2063 616e atively, you can\n-0018eef0: 2075 7365 2074 6865 2057 696e 496e 6574 use the WinInet\n-0018ef00: 2069 6e74 6572 6661 6365 2066 6f72 2073 interface for s\n-0018ef10: 6563 7572 6520 636f 6e6e 6563 7469 6f6e ecure connection\n-0018ef20: 732c 2061 7661 696c 6162 6c65 2069 6e20 s, available in \n-0018ef30: 7468 6520 3c65 6d3e 3c63 6f64 653e 6773 the gs\n-0018ef40: 6f61 702f 6d6f 645f 6773 6f61 703c 2f63 oap/mod_gsoap direct\n-0018ef60: 6f72 7920 6f66 2074 6865 2067 534f 4150 ory of the gSOAP\n-0018ef70: 2070 6163 6b61 6765 2c20 7365 6520 616c package, see al\n-0018ef80: 736f 2053 6563 7469 6f6e 203c 6120 636c so Section The Win\n-0018efc0: 496e 6574 2070 6c75 6769 6e3c 2f61 3e2e Inet plugin.\n-0018efd0: 204f 7220 796f 7520 6361 6e20 7573 6520 Or you can use \n-0018efe0: 7468 6520 4355 524c 2070 6c75 6769 6e20 the CURL plugin \n-0018eff0: 746f 2075 7365 2043 5552 4c20 666f 7220 to use CURL for \n-0018f000: 7365 6375 7265 2063 6f6e 6e65 6374 696f secure connectio\n-0018f010: 6e73 2c20 7365 6520 5365 6374 696f 6e20 ns, see Section \n-0018f020: 3c61 2063 6c61 7373 3d22 656c 2220 6872 The C\n-0018f050: 5552 4c20 706c 7567 696e 3c2f 613e 2e3c URL plugin.<\n-0018f060: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

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

    .

    .Zlib compr\n-0018f0d0: 6573 7369 6f6e 3c2f 6832 3e0a 3c70 3e54 ession

    .

    T\n-0018f0e0: 6f20 656e 6162 6c65 2064 6566 6c61 7465 o enable deflate\n-0018f0f0: 2061 6e64 2067 7a69 7020 636f 6d70 7265 and gzip compre\n-0018f100: 7373 696f 6e20 7769 7468 205a 6c69 622c ssion with Zlib,\n-0018f110: 2069 6e73 7461 6c6c 205a 6c69 6220 6672 install Zlib fr\n-0018f120: 6f6d 203c 6120 6872 6566 3d22 6874 7470 om http://www.zlib\n-0018f150: 2e6f 7267 3c2f 613e 2069 6620 6e6f 7420 .org if not \n-0018f160: 616c 7265 6164 7920 696e 7374 616c 6c65 already installe\n-0018f170: 6420 6f6e 2079 6f75 7220 7379 7374 656d d on your system\n-0018f180: 2e20 436f 6d70 696c 6520 3c65 6d3e 3c63 . Compile gsoap/stdsoa\n-0018f1a0: 7032 2e63 7070 3c2f 636f 6465 3e3c 2f65 p2.cpp (or gsoap/stdsoap2.\n-0018f1d0: 633c 2f63 6f64 653e 3c2f 656d 3e29 2061 c) a\n-0018f1e0: 6e64 2061 6c6c 2079 6f75 7220 736f 7572 nd all your sour\n-0018f1f0: 6365 7320 7468 6174 2069 6e63 6c75 6465 ces that include\n-0018f200: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n-0018f210: 2f73 7464 736f 6170 322e 683c 2f63 6f64 /stdsoap2.h or <\n-0018f230: 636f 6465 3e73 6f61 7048 2e68 3c2f 636f code>soapH.h with co\n-0018f250: 6d70 696c 652d 7469 6d65 2066 6c61 6720 mpile-time flag \n-0018f260: 3c63 6f64 653e 2357 4954 485f 475a 4950 #WITH_GZIP\n-0018f270: 3c2f 636f 6465 3e20 616e 6420 6c69 6e6b and link\n-0018f280: 2079 6f75 7220 636f 6465 2077 6974 6820 your code with \n-0018f290: 7468 6520 5a6c 6962 206c 6962 7261 7279 the Zlib library\n-0018f2a0: 2c20 652e 672e 203c 623e 3c63 6f64 653e , e.g. \n-0018f2b0: 2d6c 7a3c 2f63 6f64 653e 3c2f 623e 206f -lz o\n-0018f2c0: 6e20 556e 6978 2f4c 696e 7578 2070 6c61 n Unix/Linux pla\n-0018f2d0: 7466 6f72 6d73 2e3c 2f70 3e0a 3c70 3e54 tforms.

    .

    T\n-0018f2e0: 6865 2067 7a69 7020 636f 6d70 7265 7373 he gzip compress\n-0018f2f0: 696f 6e20 6973 206f 7274 686f 676f 6e61 ion is orthogona\n-0018f300: 6c20 746f 2061 6c6c 2074 7261 6e73 706f l to all transpo\n-0018f310: 7274 2065 6e63 6f64 696e 6773 2073 7563 rt encodings suc\n-0018f320: 6820 6173 2048 5454 502c 2053 534c 2c20 h as HTTP, SSL, \n-0018f330: 4449 4d45 2c20 616e 6420 6361 6e20 6265 DIME, and can be\n-0018f340: 2075 7365 6420 7769 7468 206f 7468 6572 used with other\n-0018f350: 2074 7261 6e73 706f 7274 206c 6179 6572 transport layer\n-0018f360: 732e 2059 6f75 2063 616e 2065 7665 6e20 s. You can even \n-0018f370: 7361 7665 2061 6e64 206c 6f61 6420 636f save and load co\n-0018f380: 6d70 7265 7373 6564 2058 4d4c 2064 6174 mpressed XML dat\n-0018f390: 6120 746f 2f66 726f 6d20 6669 6c65 732e a to/from files.\n-0018f3a0: 3c2f 703e 0a3c 703e 5477 6f20 636f 6d70

    .

    Two comp\n-0018f3b0: 7265 7373 696f 6e20 666f 726d 6174 7320 ression formats \n-0018f3c0: 6172 6520 7375 7070 6f72 7465 6420 6279 are supported by\n-0018f3d0: 2074 6865 2065 6e67 696e 653a 2064 6566 the engine: def\n-0018f3e0: 6c61 7465 2061 6e64 2067 7a69 702e 2054 late and gzip. T\n-0018f3f0: 6865 2067 7a69 7020 666f 726d 6174 2069 he gzip format i\n-0018f400: 7320 7573 6564 2062 7920 6465 6661 756c s used by defaul\n-0018f410: 742e 2054 6865 2067 7a69 7020 666f 726d t. The gzip form\n-0018f420: 6174 2068 6173 2073 6576 6572 616c 2062 at has several b\n-0018f430: 656e 6566 6974 7320 6f76 6572 2064 6566 enefits over def\n-0018f440: 6c61 7465 2e20 4669 7273 746c 792c 2074 late. Firstly, t\n-0018f450: 6865 2065 6e67 696e 6520 6175 746f 6d61 he engine automa\n-0018f460: 7469 6361 6c6c 7920 6465 7465 6374 7320 tically detects \n-0018f470: 677a 6970 2063 6f6d 7072 6573 7365 6420 gzip compressed \n-0018f480: 696e 626f 756e 6420 6d65 7373 6167 6573 inbound messages\n-0018f490: 2c20 6576 656e 2077 6974 686f 7574 2048 , even without H\n-0018f4a0: 5454 5020 6865 6164 6572 732c 2062 7920 TTP headers, by \n-0018f4b0: 6368 6563 6b69 6e67 2066 6f72 2074 6865 checking for the\n-0018f4c0: 2070 7265 7365 6e63 6520 6f66 2061 2067 presence of a g\n-0018f4d0: 7a69 7020 6865 6164 6572 2069 6e20 7468 zip header in th\n-0018f4e0: 6520 6d65 7373 6167 6520 636f 6e74 656e e message conten\n-0018f4f0: 742e 2053 6563 6f6e 646c 792c 2067 7a69 t. Secondly, gzi\n-0018f500: 7020 696e 636c 7564 6573 2061 2043 5243 p includes a CRC\n-0018f510: 3332 2063 6865 636b 7375 6d20 746f 2065 32 checksum to e\n-0018f520: 6e73 7572 6520 6d65 7373 6167 6573 2068 nsure messages h\n-0018f530: 6176 6520 6265 656e 2063 6f72 7265 6374 ave been correct\n-0018f540: 6c79 2072 6563 6569 7665 642e 2054 6869 ly received. Thi\n-0018f550: 7264 6c79 2c20 677a 6970 2063 6f6d 7072 rdly, gzip compr\n-0018f560: 6573 7365 6420 636f 6e74 656e 7420 6361 essed content ca\n-0018f570: 6e20 6265 2064 6563 6f6d 7072 6573 7365 n be decompresse\n-0018f580: 6420 7769 7468 206f 7468 6572 2063 6f6d d with other com\n-0018f590: 7072 6573 7369 6f6e 2073 6f66 7477 6172 pression softwar\n-0018f5a0: 652c 2073 6f20 796f 7520 6361 6e20 6465 e, so you can de\n-0018f5b0: 636f 6d70 7265 7373 2058 4d4c 2064 6174 compress XML dat\n-0018f5c0: 6120 7361 7665 6420 6279 2061 2067 534f a saved by a gSO\n-0018f5d0: 4150 2061 7070 6c69 6361 7469 6f6e 2069 AP application i\n-0018f5e0: 6e20 677a 6970 2066 6f72 6d61 742e 3c2f n gzip format..

    Gzip compr\n-0018f600: 6573 7369 6f6e 2069 7320 656e 6162 6c65 ession is enable\n-0018f610: 6420 6279 2063 6f6d 7069 6c69 6e67 2074 d by compiling t\n-0018f620: 6865 2073 6f75 7263 6573 2077 6974 6820 he sources with \n-0018f630: 636f 6d70 696c 652d 7469 6d65 2066 6c61 compile-time fla\n-0018f640: 6720 3c63 6f64 653e 2357 4954 485f 475a g #WITH_GZ\n-0018f650: 4950 3c2f 636f 6465 3e2e 2054 6f20 7472 IP. To tr\n-0018f660: 616e 736d 6974 2067 7a69 7020 636f 6d70 ansmit gzip comp\n-0018f670: 7265 7373 6564 2053 4f41 502f 584d 4c20 ressed SOAP/XML \n-0018f680: 6461 7461 2c20 7365 7420 7468 6520 6f75 data, set the ou\n-0018f690: 7470 7574 206d 6f64 6520 666c 6167 7320 tput mode flags \n-0018f6a0: 746f 203c 636f 6465 3e23 534f 4150 5f45 to #SOAP_E\n-0018f6b0: 4e43 5f5a 4c49 423c 2f63 6f64 653e 2e20 NC_ZLIB. \n-0018f6c0: 466f 7220 6578 616d 706c 653a 3c2f 703e For example:

    \n-0018f6d0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    so\n-0018f750: 6170 5f69 6e69 743c 2f61 3e28 2661 6d70 ap_init(&\n-0018f760: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n-0018f790: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    soap_set_omode<\n-0018f810: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-0018f840: 736f 6170 3c2f 613e 2c20 3c61 2063 6c61 soap, SOA\n-0018f8a0: 505f 454e 435f 5a4c 4942 3c2f 613e 293b P_ENC_ZLIB);\n-0018f8b0: 203c 7370 616e 2063 6c61 7373 3d22 636f // enable\n-0018f8d0: 205a 6c69 6226 2333 393b 7320 677a 6970 Zlib's gzip\n-0018f8e0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-0018f8f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0018f900: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >if (soap_call_\n-0018f930: 6e73 5f5f 6d79 4d65 7468 6f64 2826 616d ns__myMethod(&am\n-0018f940: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, ...))
    .\n-0018f980: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //\n-0018f9b0: 2065 7272 6f72 3c2f 7370 616e 3e3c 2f64 error.
    \n-0018f9f0: 656c 7365 3c2f 7370 616e 3e3c 2f64 6976 else.
    ... \n-0018fa30: 2f2f 2073 7563 6365 7373 3c2f 7370 616e // success
    .
    s\n-0018fab0: 6f61 705f 636c 725f 6f6d 6f64 653c 2f61 oap_clr_omode(&so\n-0018faf0: 6170 3c2f 613e 2c20 3c61 2063 6c61 7373 ap, SOAP_\n-0018fb50: 454e 435f 5a4c 4942 3c2f 613e 293b 203c ENC_ZLIB); <\n-0018fb60: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0018fb70: 656e 7422 3e2f 2f20 6469 7361 626c 6520 ent\">// disable \n-0018fb80: 5a6c 6962 2623 3339 3b73 2067 7a69 7020 Zlib's gzip \n-0018fb90: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .
    SOAP_\n-0018fc50: 454e 435f 5a4c 4942 3c2f 613e 3c2f 6469 ENC_ZLIB
    #define SO\n-0018fc80: 4150 5f45 4e43 5f5a 4c49 423c 2f64 6976 AP_ENC_ZLIB
    soap_mode EN\n-0018fcb0: 4320 6f75 7470 7574 2066 6c61 6720 7661 C output flag va\n-0018fcc0: 6c75 6520 746f 2063 6f6d 7072 6573 7320 lue to compress \n-0018fcd0: 6d65 7373 6167 6573 2073 656e 742c 2072 messages sent, r\n-0018fce0: 6571 7569 7265 7320 7a6c 6962 2065 6e61 equires zlib ena\n-0018fcf0: 626c 6564 2077 6974 6820 636f 6d70 696c bled with compil\n-0018fd00: 652d 7469 6d65 2066 6c2e 2e2e 3c2f 6469 e-time fl...
    Definiti\n-0018fd30: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n-0018fd40: 2e68 3a31 3738 383c 2f64 6976 3e3c 2f64 .h:1788
    .

    Th\n-0018fd70: 6973 2077 696c 6c20 7365 6e64 2061 2063 is will send a c\n-0018fd80: 6f6d 7072 6573 7365 6420 534f 4150 2f58 ompressed SOAP/X\n-0018fd90: 4d4c 2072 6571 7565 7374 2074 6f20 6120 ML request to a \n-0018fda0: 7365 7276 6963 652c 2070 726f 7669 6465 service, provide\n-0018fdb0: 6420 7468 6174 205a 6c69 6220 6973 2069 d that Zlib is i\n-0018fdc0: 6e73 7461 6c6c 6564 2061 6e64 206c 696e nstalled and lin\n-0018fdd0: 6b65 6420 7769 7468 2074 6865 2061 7070 ked with the app\n-0018fde0: 6c69 6361 7469 6f6e 2061 6e64 2074 6865 lication and the\n-0018fdf0: 2063 6f6d 7069 6c65 2d74 696d 6520 666c compile-time fl\n-0018fe00: 6167 203c 636f 6465 3e23 5749 5448 5f47 ag #WITH_G\n-0018fe10: 5a49 503c 2f63 6f64 653e 206f 7074 696f ZIP optio\n-0018fe20: 6e20 7761 7320 7573 6564 2074 6f20 636f n was used to co\n-0018fe30: 6d70 696c 6520 7468 6520 736f 7572 6365 mpile the source\n-0018fe40: 732e 2052 6563 6569 7669 6e67 2063 6f6d s. Receiving com\n-0018fe50: 7072 6573 7365 6420 534f 4150 2f58 4d4c pressed SOAP/XML\n-0018fe60: 206f 7665 7220 4854 5450 2065 6974 6865 over HTTP eithe\n-0018fe70: 7220 696e 2067 7a69 7020 6f72 2064 6566 r in gzip or def\n-0018fe80: 6c61 7465 2066 6f72 6d61 7473 2069 7320 late formats is \n-0018fe90: 6175 746f 6d61 7469 632e 2054 6865 203c automatic. The <\n-0018fea0: 636f 6465 3e23 534f 4150 5f45 4e43 5f5a code>#SOAP_ENC_Z\n-0018feb0: 4c49 423c 2f63 6f64 653e 2066 6c61 6720 LIB flag \n-0018fec0: 646f 6573 206e 6f74 2068 6176 6520 746f does not have to\n-0018fed0: 2062 6520 7365 7420 6174 2074 6865 2073 be set at the s\n-0018fee0: 6572 7665 7220 7369 6465 2074 6f20 6163 erver side to ac\n-0018fef0: 6365 7074 2063 6f6d 7072 6573 7365 6420 cept compressed \n-0018ff00: 6d65 7373 6167 6573 2e20 5265 6164 696e messages. Readin\n-0018ff10: 6720 616e 6420 7265 6365 6976 696e 6720 g and receiving \n-0018ff20: 677a 6970 2063 6f6d 7072 6573 7365 6420 gzip compressed \n-0018ff30: 534f 4150 2f58 4d4c 2077 6974 686f 7574 SOAP/XML without\n-0018ff40: 2048 5454 5020 6865 6164 6572 7320 2865 HTTP headers (e\n-0018ff50: 2e67 2e20 7769 7468 206f 7468 6572 2074 .g. with other t\n-0018ff60: 7261 6e73 706f 7274 2070 726f 746f 636f ransport protoco\n-0018ff70: 6c73 2920 6973 2061 6c73 6f20 6175 746f ls) is also auto\n-0018ff80: 6d61 7469 632e 3c2f 703e 0a3c 703e 546f matic.

    .

    To\n-0018ff90: 2063 6f6e 7472 6f6c 2074 6865 206c 6576 control the lev\n-0018ffa0: 656c 206f 6620 636f 6d70 7265 7373 696f el of compressio\n-0018ffb0: 6e20 666f 7220 6f75 7462 6f75 6e64 206d n for outbound m\n-0018ffc0: 6573 7361 6765 732c 2079 6f75 2063 616e essages, you can\n-0018ffd0: 2073 6574 2074 6865 203c 636f 6465 3e3c set the <\n-0018ffe0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0018fff0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-00190000: 6d6c 2361 3966 6165 3436 3434 3665 6263 ml#a9fae46446ebc\n-00190010: 6231 6135 3134 3137 6632 6330 6331 6462 b1a51417f2c0c1db\n-00190020: 3331 6638 2220 7469 746c 653d 2255 7365 31f8\" title=\"Use\n-00190030: 722d 6465 6669 6e61 626c 6520 636f 6d70 r-definable comp\n-00190040: 7265 7373 696f 6e20 6c65 7665 6c20 666f ression level fo\n-00190050: 7220 677a 6970 2063 6f6d 7072 6573 7369 r gzip compressi\n-00190060: 6f6e 2028 303d 6e6f 6e65 2c20 313d 6661 on (0=none, 1=fa\n-00190070: 7374 2074 6f20 393d 6265 7374 2920 6465 st to 9=best) de\n-00190080: 6661 756c 7420 6c65 7665 6c20 6973 2036 fault level is 6\n-00190090: 2e22 3e73 6f61 703a 3a7a 5f6c 6576 656c .\">soap::z_level\n-001900a0: 3c2f 613e 3c2f 636f 6465 3e20 746f 2061 to a\n-001900b0: 2076 616c 7565 2062 6574 7765 656e 2031 value between 1\n-001900c0: 2061 6e64 2039 2c20 7768 6572 6520 3120 and 9, where 1 \n-001900d0: 6973 2074 6865 2062 6573 7420 7370 6565 is the best spee\n-001900e0: 6420 616e 6420 3920 6973 2074 6865 2062 d and 9 is the b\n-001900f0: 6573 7420 636f 6d70 7265 7373 696f 6e20 est compression \n-00190100: 2864 6566 6175 6c74 2069 7320 3629 2e20 (default is 6). \n-00190110: 466f 7220 6578 616d 706c 653c 2f70 3e0a For example

    .\n-00190120: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    soa\n-001901a0: 705f 696e 6974 3c2f 613e 2826 616d 703b p_init(&\n-001901b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-001901e0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    ..
    \n-00190340: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.z_level = \n-001903a0: 393b 203c 7370 616e 2063 6c61 7373 3d22 9; // best\n-001903c0: 2063 6f6d 7072 6573 7369 6f6e 203c 2f73 compression
    .
    u\n-001904a0: 6e73 6967 6e65 6420 7368 6f72 7420 7a5f nsigned short z_\n-001904b0: 6c65 7665 6c3c 2f64 6976 3e3c 6469 7620 level
    Us\n-001904d0: 6572 2d64 6566 696e 6162 6c65 2063 6f6d er-definable com\n-001904e0: 7072 6573 7369 6f6e 206c 6576 656c 2066 pression level f\n-001904f0: 6f72 2067 7a69 7020 636f 6d70 7265 7373 or gzip compress\n-00190500: 696f 6e20 2830 3d6e 6f6e 652c 2031 3d66 ion (0=none, 1=f\n-00190510: 6173 7420 746f 2039 3d62 6573 7429 2064 ast to 9=best) d\n-00190520: 6566 6175 6c74 206c 6576 656c 2069 7320 efault level is \n-00190530: 362e 3c2f 6469 763e 3c64 6976 2063 6c61 6.
    De\n-00190550: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n-00190560: 6473 6f61 7032 2e68 3a33 3730 343c 2f64 dsoap2.h:3704
    .
    \n-00190580: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    \n-00190eb0: 4e6f 7465 3a20 6c6f 7765 7220 7261 7469 Note: lower rati\n-00190ec0: 6f73 206d 6561 6e20 6869 6768 6572 2063 os mean higher c\n-00190ed0: 6f6d 7072 6573 7369 6f6e 2072 6174 6573 ompression rates\n-00190ee0: 2e3c 2f70 3e0a 3c70 3e43 6f6d 7072 6573 .

    .

    Compres\n-00190ef0: 7365 6420 7472 616e 7366 6572 7320 7265 sed transfers re\n-00190f00: 7175 6972 6520 6275 6666 6572 696e 6720 quire buffering \n-00190f10: 7468 6520 656e 7469 7265 206f 7574 7075 the entire outpu\n-00190f20: 7420 6d65 7373 6167 6520 746f 2064 6574 t message to det\n-00190f30: 6572 6d69 6e65 2048 5454 5020 6d65 7373 ermine HTTP mess\n-00190f40: 6167 6520 6c65 6e67 7468 2e20 5468 6973 age length. This\n-00190f50: 206d 6561 6e73 2074 6861 7420 7468 6520 means that the \n-00190f60: 3c63 6f64 653e 2353 4f41 505f 494f 5f53 #SOAP_IO_S\n-00190f70: 544f 5245 3c2f 636f 6465 3e20 666c 6167 TORE flag\n-00190f80: 2069 7320 6175 746f 6d61 7469 6361 6c6c is automaticall\n-00190f90: 7920 7365 7420 7768 656e 2074 6865 203c y set when the <\n-00190fa0: 636f 6465 3e23 534f 4150 5f45 4e43 5f5a code>#SOAP_ENC_Z\n-00190fb0: 4c49 423c 2f63 6f64 653e 2066 6c61 6720 LIB flag \n-00190fc0: 6973 2073 6574 2074 6f20 7365 6e64 2063 is set to send c\n-00190fd0: 6f6d 7072 6573 7365 6420 6d65 7373 6167 ompressed messag\n-00190fe0: 6573 2e20 5468 6520 7573 6520 6f66 2048 es. The use of H\n-00190ff0: 5454 5020 6368 756e 6b69 6e67 2073 6967 TTP chunking sig\n-00191000: 6e69 6669 6361 6e74 6c79 2072 6564 7563 nificantly reduc\n-00191010: 6573 206d 656d 6f72 7920 7573 6167 6520 es memory usage \n-00191020: 616e 6420 6d61 7920 7370 6565 6420 7570 and may speed up\n-00191030: 2074 6865 2074 7261 6e73 6d69 7373 696f the transmissio\n-00191040: 6e20 6f66 2063 6f6d 7072 6573 7365 6420 n of compressed \n-00191050: 534f 4150 2f58 4d4c 206d 6573 7361 6765 SOAP/XML message\n-00191060: 732e 2054 6869 7320 6973 2061 6363 6f6d s. This is accom\n-00191070: 706c 6973 6865 6420 6279 2073 6574 7469 plished by setti\n-00191080: 6e67 2074 6865 203c 636f 6465 3e23 534f ng the #SO\n-00191090: 4150 5f49 4f5f 4348 554e 4b3c 2f63 6f64 AP_IO_CHUNK flag with #SOAP_ENC_ZLI\n-001910c0: 423c 2f63 6f64 653e 2066 6f72 2074 6865 B for the\n-001910d0: 206f 7574 7075 7420 6d6f 6465 2e20 486f output mode. Ho\n-001910e0: 7765 7665 722c 2073 6f6d 6520 5765 6220 wever, some Web \n-001910f0: 7365 7276 6572 7320 646f 206e 6f74 2061 servers do not a\n-00191100: 6363 6570 7420 4854 5450 2063 6875 6e6b ccept HTTP chunk\n-00191110: 6564 2072 6571 7565 7374 206d 6573 7361 ed request messa\n-00191120: 6765 7320 2865 7665 6e20 7768 656e 2074 ges (even when t\n-00191130: 6865 7920 7265 7475 726e 2048 5454 5020 hey return HTTP \n-00191140: 6368 756e 6b65 6420 6d65 7373 6167 6573 chunked messages\n-00191150: 2129 2e20 5374 616e 642d 616c 6f6e 6520 !). Stand-alone \n-00191160: 6753 4f41 5020 7365 7276 6963 6573 2061 gSOAP services a\n-00191170: 6c77 6179 7320 6163 6365 7074 2063 6875 lways accept chu\n-00191180: 6e6b 6564 2072 6571 7565 7374 206d 6573 nked request mes\n-00191190: 7361 6765 732e 3c2f 703e 0a3c 703e 546f sages.

    .

    To\n-001911a0: 2072 6573 7472 6963 7420 7468 6520 636f restrict the co\n-001911b0: 6d70 7265 7373 696f 6e20 746f 2074 6865 mpression to the\n-001911c0: 2064 6566 6c61 7465 2066 6f72 6d61 7420 deflate format \n-001911d0: 6f6e 6c79 2c20 636f 6d70 696c 6520 7468 only, compile th\n-001911e0: 6520 736f 7572 6365 7320 7769 7468 2074 e sources with t\n-001911f0: 6865 2063 6f6d 7069 6c65 2d74 696d 6520 he compile-time \n-00191200: 666c 6167 203c 636f 6465 3e23 5749 5448 flag #WITH\n-00191210: 5f5a 4c49 423c 2f63 6f64 653e 2e20 5468 _ZLIB. Th\n-00191220: 6973 206c 696d 6974 7320 636f 6d70 7265 is limits compre\n-00191230: 7373 696f 6e20 616e 6420 6465 636f 6d70 ssion and decomp\n-00191240: 7265 7373 696f 6e20 746f 2074 6865 2064 ression to the d\n-00191250: 6566 6c61 7465 2066 6f72 6d61 742e 204f eflate format. O\n-00191260: 6e6c 7920 706c 6169 6e20 616e 6420 6465 nly plain and de\n-00191270: 666c 6174 6564 206d 6573 7361 6765 7320 flated messages \n-00191280: 6361 6e20 6265 2065 7863 6861 6e67 6564 can be exchanged\n-00191290: 2c20 677a 6970 2069 7320 6e6f 7420 7375 , gzip is not su\n-001912a0: 7070 6f72 7465 6420 7769 7468 2074 6869 pported with thi\n-001912b0: 7320 6f70 7469 6f6e 2e20 5265 6365 6976 s option. Receiv\n-001912c0: 696e 6720 677a 6970 2063 6f6d 7072 6573 ing gzip compres\n-001912d0: 7365 6420 636f 6e74 656e 7420 6973 2061 sed content is a\n-001912e0: 7574 6f6d 6174 6963 2c20 6576 656e 2069 utomatic, even i\n-001912f0: 6e20 7468 6520 6162 7365 6e63 6520 6f66 n the absence of\n-00191300: 2048 5454 5020 6865 6164 6572 732e 2052 HTTP headers. R\n-00191310: 6563 6569 7669 6e67 2064 6566 6c61 7465 eceiving deflate\n-00191320: 2063 6f6d 7072 6573 7365 6420 636f 6e74 compressed cont\n-00191330: 656e 7420 6973 206e 6f74 2061 7574 6f6d ent is not autom\n-00191340: 6174 6963 2069 6e20 7468 6520 6162 7365 atic in the abse\n-00191350: 6e63 6520 6f66 2048 5454 5020 6865 6164 nce of HTTP head\n-00191360: 6572 7320 616e 6420 7265 7175 6972 6573 ers and requires\n-00191370: 2074 6865 2066 6c61 6720 3c63 6f64 653e the flag \n-00191380: 2353 4f41 505f 454e 435f 5a4c 4942 3c2f #SOAP_ENC_ZLIB to be set \n-001913a0: 666f 7220 7468 6520 696e 7075 7420 6d6f for the input mo\n-001913b0: 6465 2074 6f20 6465 636f 6d70 7265 7373 de to decompress\n-001913c0: 2064 6566 6c61 7465 6420 6461 7461 2e3c deflated data.<\n-001913d0: 2f70 3e0a 3c64 6c20 636c 6173 733d 2273 /p>.

    \n-001913f0: 3c64 743e 5761 726e 696e 673c 2f64 743e
    Warning
    \n-00191400: 3c64 643e 4974 2069 7320 696d 706f 7274
    It is import\n-00191410: 616e 7420 7468 6174 2074 6865 203c 636f ant that the #WITH_GZIP and #\n-00191440: 5749 5448 5f5a 4c49 423c 2f63 6f64 653e WITH_ZLIB\n-00191450: 206d 6163 726f 7320 6d75 7374 2062 6520 macros must be \n-00191460: 636f 6e73 6973 7465 6e74 6c79 2064 6566 consistently def\n-00191470: 696e 6564 2074 6f20 636f 6d70 696c 6520 ined to compile \n-00191480: 7468 6520 736f 7572 6365 732c 2073 7563 the sources, suc\n-00191490: 6820 6173 203c 656d 3e3c 636f 6465 3e67 h as g\n-001914a0: 736f 6170 2f73 7464 736f 6170 322e 6370 soap/stdsoap2.cp\n-001914b0: 703c 2f63 6f64 653e 3c2f 656d 3e2c 203c p, <\n-001914c0: 656d 3e3c 636f 6465 3e73 6f61 7043 2e63 em>soapC.c\n-001914d0: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 pp, \n-001914e0: 3c65 6d3e 3c63 6f64 653e 736f 6170 436c soapCl\n-001914f0: 6965 6e74 2e63 7070 3c2f 636f 6465 3e3c ient.cpp<\n-00191500: 2f65 6d3e 2c20 3c65 6d3e 3c63 6f64 653e /em>, \n-00191510: 736f 6170 5365 7276 6572 2e63 7070 3c2f soapServer.cpp, and \n-00191530: 616c 6c20 6170 706c 6963 6174 696f 6e20 all application \n-00191540: 736f 7572 6365 7320 7468 6174 2069 6e63 sources that inc\n-00191550: 6c75 6465 203c 656d 3e3c 636f 6465 3e67 lude g\n-00191560: 736f 6170 2f73 7464 736f 6170 322e 683c soap/stdsoap2.h<\n-00191570: 2f63 6f64 653e 3c2f 656d 3e20 6f72 203c /code> or <\n-00191580: 656d 3e3c 636f 6465 3e73 6f61 7048 2e68 em>soapH.h\n-00191590: 3c2f 636f 6465 3e3c 2f65 6d3e 2e20 4966 . If\n-001915a0: 2074 6865 206d 6163 726f 7320 6172 6520 the macros are \n-001915b0: 6e6f 7420 636f 6e73 6973 7465 6e74 6c79 not consistently\n-001915c0: 2075 7365 642c 2074 6865 2061 7070 6c69 used, the appli\n-001915d0: 6361 7469 6f6e 2077 696c 6c20 6372 6173 cation will cras\n-001915e0: 6820 6475 6520 746f 2061 206d 6973 6d61 h due to a misma\n-001915f0: 7463 6865 7320 696e 2074 6865 2064 6563 tches in the dec\n-00191600: 6c61 7261 7469 6f6e 2061 6e64 2061 6363 laration and acc\n-00191610: 6573 7320 6f66 2074 6865 203c 636f 6465 ess of the soa\n-00191670: 703c 2f61 3e3c 2f63 6f64 653e 2063 6f6e p con\n-00191680: 7465 7874 2e3c 2f64 643e 3c2f 646c 3e0a text.
    .\n-00191690: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

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

    .

    .Client-side c\n-00191700: 6f6f 6b69 6520 7375 7070 6f72 743c 2f68 ookie support.

    Client-sid\n-00191720: 6520 636f 6f6b 6965 2073 7570 706f 7274 e cookie support\n-00191730: 2069 7320 6f70 7469 6f6e 616c 2e20 546f is optional. To\n-00191740: 2065 6e61 626c 6520 636f 6f6b 6965 2073 enable cookie s\n-00191750: 7570 706f 7274 2c20 636f 6d70 696c 6520 upport, compile \n-00191760: 616c 6c20 736f 7572 6365 7320 7769 7468 all sources with\n-00191770: 2074 6865 2063 6f6d 7069 6c65 2d74 696d the compile-tim\n-00191780: 6520 666c 6167 203c 636f 6465 3e23 5749 e flag #WI\n-00191790: 5448 5f43 4f4f 4b49 4553 3c2f 636f 6465 TH_COOKIES, for example: \n-001917b0: 3c2f 703e 3c70 7265 2063 6c61 7373 3d22

     c++ -\n-001917d0: 4457 4954 485f 434f 4f4b 4945 5320 2d6f  DWITH_COOKIES -o\n-001917e0: 206d 7963 6c69 656e 7420 7374 6473 6f61   myclient stdsoa\n-001917f0: 7032 2e63 7070 2073 6f61 7043 2e63 7070  p2.cpp soapC.cpp\n-00191800: 2073 6f61 7043 6c69 656e 742e 6370 700a   soapClient.cpp.\n-00191810: 3c2f 7072 653e 3c70 3e20 6f72 2061 6464  

    or add\n-00191820: 2074 6865 2066 6f6c 6c6f 7769 6e67 206c the following l\n-00191830: 696e 6520 746f 203c 656d 3e3c 636f 6465 ine to stdsoap.h:

    .
    #\n-001918a0: 6465 6669 6e65 2057 4954 485f 434f 4f4b define WITH_COOK\n-001918b0: 4945 533c 2f73 7061 6e3e 3c2f 6469 763e IES
    \n-001918c0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    Clien\n-001918e0: 742d 7369 6465 2063 6f6f 6b69 6520 7375 t-side cookie su\n-001918f0: 7070 6f72 7420 6973 2066 756c 6c79 2061 pport is fully a\n-00191900: 7574 6f6d 6174 6963 2e20 536f 206a 7573 utomatic. So jus\n-00191910: 7420 636f 6d70 696c 6520 3c65 6d3e 3c63 t compile gsoap/stdsoa\n-00191930: 7032 2e63 7070 3c2f 636f 6465 3e3c 2f65 p2.cpp with the comp\n-00191950: 696c 652d 7469 6d65 2066 6c61 6720 3c63 ile-time flag #WITH_COOKIE\n-00191970: 533c 2f63 6f64 653e 2074 6f20 656e 6162 S to enab\n-00191980: 6c65 2063 6f6f 6b69 652d 6261 7365 6420 le cookie-based \n-00191990: 7365 7373 696f 6e20 636f 6e74 726f 6c20 session control \n-001919a0: 696e 2079 6f75 7220 636c 6965 6e74 2e3c in your client.<\n-001919b0: 2f70 3e0a 3c70 3e41 2063 6f6f 6b69 6520 /p>.

    A cookie \n-001919c0: 7374 6f72 6520 7769 7468 2063 6f6f 6b69 store with cooki\n-001919d0: 6573 2069 7320 6b65 7074 2061 6e64 2072 es is kept and r\n-001919e0: 6574 7572 6e65 6420 746f 2074 6865 2061 eturned to the a\n-001919f0: 7070 726f 7072 6961 7465 2073 6572 7665 ppropriate serve\n-00191a00: 7273 2077 6865 6e20 7468 6520 636c 6965 rs when the clie\n-00191a10: 6e74 2063 6f6e 6e65 6374 7320 746f 2074 nt connects to t\n-00191a20: 6865 7365 2073 6572 7665 7273 2e20 436f hese servers. Co\n-00191a30: 6f6b 6965 7320 6172 6520 6e6f 7420 6175 okies are not au\n-00191a40: 746f 6d61 7469 6361 6c6c 7920 7361 7665 tomatically save\n-00191a50: 6420 746f 2061 2066 696c 6520 6279 2061 d to a file by a\n-00191a60: 2063 6c69 656e 742e 2041 6e20 6578 616d client. An exam\n-00191a70: 706c 6520 636f 6f6b 6965 2066 696c 6520 ple cookie file \n-00191a80: 6d61 6e61 6765 7220 6973 2069 6e63 6c75 manager is inclu\n-00191a90: 6465 6420 6173 2061 6e20 6578 7472 6173 ded as an extras\n-00191aa0: 2069 6e20 7468 6520 6753 4f41 5020 7061 in the gSOAP pa\n-00191ab0: 636b 6167 652e 2059 6f75 2063 616e 2072 ckage. You can r\n-00191ac0: 656d 6f76 6520 616c 6c20 636f 6f6b 6965 emove all cookie\n-00191ad0: 7320 6672 6f6d 2061 203c 636f 6465 3e3c s from a <\n-00191ae0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00191af0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-00191b00: 6d6c 2220 7469 746c 653d 2243 6f6e 7465 ml\" title=\"Conte\n-00191b10: 7874 2077 6974 6820 7468 6520 656e 6769 xt with the engi\n-00191b20: 6e65 2073 7461 7465 2e22 3e73 6f61 703c ne state.\">soap<\n-00191b30: 2f61 3e3c 2f63 6f64 653e 2063 6f6e 7465 /a> conte\n-00191b40: 7874 2062 7920 6361 6c6c 696e 6720 3c63 xt by calling soap_free_co\n-00191b60: 6f6b 6965 7328 736f 6170 293c 2f63 6f64 okies(soap), which also h\n-00191b80: 6170 7065 6e73 2077 6865 6e20 796f 7520 appens when you \n-00191b90: 6361 6c6c 203c 636f 6465 3e73 6f61 705f call soap_\n-00191ba0: 646f 6e65 2873 6f61 7029 3c2f 636f 6465 done(soap).

    .

    To avo\n-00191bc0: 6964 2022 636f 6f6b 6965 2073 746f 726d id \"cookie storm\n-00191bd0: 7322 2063 6175 7365 6420 6279 206d 616c s\" caused by mal\n-00191be0: 6963 696f 7573 2073 6572 7665 7273 2074 icious servers t\n-00191bf0: 6861 7420 7265 7475 726e 2061 6e20 756e hat return an un\n-00191c00: 7265 6173 6f6e 6162 6c65 2061 6d6f 756e reasonable amoun\n-00191c10: 7420 6f66 2063 6f6f 6b69 6573 2c20 6753 t of cookies, gS\n-00191c20: 4f41 5020 636c 6965 6e74 732f 7365 7276 OAP clients/serv\n-00191c30: 6572 7320 6172 6520 6c69 6d69 7465 6420 ers are limited \n-00191c40: 746f 2061 2063 6f6f 6b69 6520 7374 6f72 to a cookie stor\n-00191c50: 6520 7369 7a65 206f 6620 3c63 6f64 653e e size of \n-00191c60: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::co\n-00191d20: 6f6b 6965 5f6d 6178 3c2f 613e 3c2f 636f okie_max that the use\n-00191d40: 7220 6361 6e20 6368 616e 6765 2c20 666f r can change, fo\n-00191d50: 7220 6578 616d 706c 653a 3c2f 703e 0a3c r example:

    .<\n-00191d60: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n-00191d70: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    str\n-00191da0: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap *soap = soap_new(\n-00191e70: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    soap->\n-00191ec0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 cookie_\n-00191f10: 6d61 783c 2f61 3e20 3d20 3130 3b3c 2f64 max = 10;.<\n-00192000: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-00192010: 223e 5573 6572 2d64 6566 696e 6162 6c65 \">User-definable\n-00192020: 206d 6178 696d 756d 206e 756d 6265 7220 maximum number \n-00192030: 6f66 2061 6374 6976 6520 636f 6f6b 6965 of active cookie\n-00192040: 7320 616c 6c6f 7765 6420 746f 2062 6520 s allowed to be \n-00192050: 7365 7420 7769 7468 2073 6f61 705f 7365 set with soap_se\n-00192060: 745f 636f 6f6b 6965 2062 6566 6f72 6520 t_cookie before \n-00192070: 636f 6f6b 6965 202e 2e2e 3c2f 6469 763e cookie ...
    \n-00192080: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n-001920a0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-001920b0: 3a32 3937 333c 2f64 6976 3e3c 2f64 6976 :2973
    .

    The \n-001920e0: 636f 6f6b 6965 2073 746f 7265 2069 7320 cookie store is \n-001920f0: 6120 6c69 6e6b 6564 206c 6973 7420 6f66 a linked list of\n-00192100: 203c 636f 6465 3e3c 6120 636c 6173 733d so\n-00192150: 6170 5f63 6f6f 6b69 653c 2f61 3e3c 2f63 ap_cookie structures \n-00192170: 706f 696e 7465 6420 746f 2062 7920 3c63 pointed to by soap::cookies.

    .<\n-00192220: 703e 5369 6e63 6520 7468 6520 636f 6f6b p>Since the cook\n-00192230: 6965 2073 746f 7265 2069 7320 6c69 6e6b ie store is link\n-00192240: 6564 2074 6f20 7468 6520 6375 7272 656e ed to the curren\n-00192250: 7420 3c63 6f64 653e 3c61 2063 6c61 7373 t soap context, and\n-001922c0: 2065 6163 6820 7468 7265 6164 206d 7573 each thread mus\n-001922d0: 7420 7573 6520 6974 7320 6f77 6e20 636f t use its own co\n-001922e0: 6e74 6578 742c 2065 6163 6820 7468 7265 ntext, each thre\n-001922f0: 6164 2061 6c73 6f20 6861 7320 6974 7320 ad also has its \n-00192300: 6f77 6e20 636f 6f6b 6965 2073 746f 7265 own cookie store\n-00192310: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

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

    .

    \n-00192350: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .Server-\n-00192380: 7369 6465 2063 6f6f 6b69 6520 7375 7070 side cookie supp\n-00192390: 6f72 743c 2f68 323e 0a3c 703e 5468 6973 ort

    .

    This\n-001923a0: 2066 6561 7475 7265 2069 7320 6e6f 7420 feature is not \n-001923b0: 7265 636f 6d6d 656e 6465 6420 746f 2069 recommended to i\n-001923c0: 6d70 6c65 6d65 6e74 2073 7461 7465 2069 mplement state i\n-001923d0: 6e20 7374 616e 642d 616c 6f6e 6520 7365 n stand-alone se\n-001923e0: 7276 6572 732e 2043 6f6f 6b69 6573 206d rvers. Cookies m\n-001923f0: 6179 2072 6571 7569 7265 2061 2066 6169 ay require a fai\n-00192400: 7220 616d 6f75 6e74 206f 6620 7072 6f63 r amount of proc\n-00192410: 6573 7369 6e67 206f 7665 7268 6561 6420 essing overhead \n-00192420: 616e 6420 6172 6520 6e6f 7420 696e 2066 and are not in f\n-00192430: 6163 7420 6e65 6564 6564 2074 6f20 696d act needed to im\n-00192440: 706c 656d 656e 7420 7374 6174 6566 756c plement stateful\n-00192450: 2073 6572 7669 6365 732c 2077 6869 6368 services, which\n-00192460: 2069 7320 7479 7069 6361 6c6c 7920 7065 is typically pe\n-00192470: 7266 6f72 6d65 6420 7769 7468 2073 6573 rformed with ses\n-00192480: 7369 6f6e 2049 4473 2069 6e20 584d 4c2f sion IDs in XML/\n-00192490: 4a53 4f4e 206d 6573 7361 6765 7320 6f72 JSON messages or\n-001924a0: 2062 7920 7061 7373 696e 6720 7468 6520 by passing the \n-001924b0: 7365 7373 696f 6e20 4944 7320 7669 6120 session IDs via \n-001924c0: 7468 6520 5552 4c2e 3c2f 703e 0a3c 703e the URL.

    .

    \n-001924d0: 5365 7276 6572 2d73 6964 6520 636f 6f6b Server-side cook\n-001924e0: 6965 2073 7570 706f 7274 2069 7320 6f70 ie support is op\n-001924f0: 7469 6f6e 616c 2e20 546f 2065 6e61 626c tional. To enabl\n-00192500: 6520 636f 6f6b 6965 2073 7570 706f 7274 e cookie support\n-00192510: 2c20 636f 6d70 696c 6520 616c 6c20 736f , compile all so\n-00192520: 7572 6365 7320 7769 7468 2063 6f6d 7069 urces with compi\n-00192530: 6c65 2d74 696d 6520 666c 6167 203c 636f le-time flag #WITH_COOKIES\n-00192550: 3c2f 636f 6465 3e3a 203c 2f70 3e3c 7072 :

    c++ -DWITH_C\n-00192580: 4f4f 4b49 4553 202d 6f20 6d79 7365 7276 OOKIES -o myserv\n-00192590: 6572 202e 2e2e 0a3c 2f70 7265 3e3c 703e er ....

    \n-001925a0: 2053 6565 2041 5049 2064 6f63 756d 656e See API documen\n-001925b0: 7461 7469 6f6e 204d 6f64 756c 6520 3c61 tation Module HT\n-001925f0: 5450 2063 6f6f 6b69 6520 6675 6e63 7469 TP cookie functi\n-00192600: 6f6e 733c 2f61 3e20 666f 7220 7468 6520 ons for the \n-00192610: 636f 6f6b 6965 2041 5049 2066 756e 6374 cookie API funct\n-00192620: 696f 6e73 2e20 5365 6520 7468 6520 3c61 ions. See the HTTP sess\n-00192660: 696f 6e73 2070 6c75 6769 6e3c 2f61 3e20 ions plugin \n-00192670: 666f 7220 4854 5450 2073 6573 7369 6f6e for HTTP session\n-00192680: 206d 616e 6167 656d 656e 7420 7769 7468 management with\n-00192690: 2063 6f6f 6b69 6573 2074 6861 7420 6973 cookies that is\n-001926a0: 2072 6571 7569 7265 6420 666f 7220 7365 required for se\n-001926b0: 7276 6572 2d73 6964 6520 7365 7373 696f rver-side sessio\n-001926c0: 6e20 636f 6e74 726f 6c2e 2054 6865 203c n control. The <\n-001926d0: 636f 6465 3e23 5749 5448 5f43 4f4f 4b49 code>#WITH_COOKI\n-001926e0: 4553 3c2f 636f 6465 3e20 666c 6167 2069 ES flag i\n-001926f0: 7320 7573 656c 6573 7320 7769 7468 6f75 s useless withou\n-00192700: 7420 7365 7276 6572 2d73 6964 6520 7365 t server-side se\n-00192710: 7373 696f 6e20 6d61 6e61 6765 6d65 6e74 ssion management\n-00192720: 2061 6e64 2063 6f6e 7472 6f6c 2e3c 2f70 and control..

    Here is an \n-00192740: 6f76 6572 7669 6577 206f 6620 7468 6520 overview of the \n-00192750: 636f 6f6b 6965 2041 5049 2066 756e 6374 cookie API funct\n-00192760: 696f 6e73 3a3c 2f70 3e0a 3c75 6c3e 0a3c ions:

    .
    .

    The \n-00195220: 666f 6c6c 6f77 696e 6720 7661 7269 6162 following variab\n-00195230: 6c65 7320 6f66 2074 6865 203c 636f 6465 les of the soa\n-00195290: 703c 2f61 3e3c 2f63 6f64 653e 2063 6f6e p con\n-001952a0: 7465 7874 2061 7265 2075 7365 6420 746f text are used to\n-001952b0: 2064 6566 696e 6520 7468 6520 6375 7272 define the curr\n-001952c0: 656e 7420 646f 6d61 696e 2061 6e64 2070 ent domain and p\n-001952d0: 6174 683a 3c2f 703e 0a3c 756c 3e0a 3c6c ath:

    ..

    Th\n-00195610: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap::co\n-001956c0: 6f6b 6965 5f70 6174 683c 2f61 3e3c 2f63 okie_path value is us\n-001956e0: 6564 2074 6f20 6669 6c74 6572 2063 6f6f ed to filter coo\n-001956f0: 6b69 6573 2069 6e74 656e 6465 6420 666f kies intended fo\n-00195700: 7220 7468 6973 2073 6572 7669 6365 2061 r this service a\n-00195710: 6363 6f72 6469 6e67 2074 6f20 7468 6520 ccording to the \n-00195720: 7061 7468 2070 7265 6669 7820 7275 6c65 path prefix rule\n-00195730: 7320 6f75 746c 696e 6564 2069 6e20 5246 s outlined in RF\n-00195740: 4332 3130 392e 3c2f 703e 0a3c 703e 5468 C2109.

    .

    Th\n-00195750: 6520 666f 6c6c 6f77 696e 6720 6578 616d e following exam\n-00195760: 706c 6520 7365 7276 6572 2061 646f 7074 ple server adopt\n-00195770: 7320 636f 6f6b 6965 7320 666f 7220 7365 s cookies for se\n-00195780: 7373 696f 6e20 636f 6e74 726f 6c3a 3c2f ssion control:.

    int \n-001957e0: 6d61 696e 2829 203c 2f64 6976 3e0a 3c64 main()
    .\n-00195800: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    struct \n-00195840: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n-00195870: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap;\n-001958a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int\n-001958e0: 206d 2c20 733b 203c 2f64 6976 3e0a 3c64 m, s;
    .\n-00195900: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_init\n-00195960: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap); ..<\n-00195a80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00195a90: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap.cook\n-00195b10: 6965 5f70 6174 683c 2f61 3e20 3d20 3c73 ie_path = "\n-00195b40: 2f26 7175 6f74 3b3c 2f73 7061 6e3e 3b20 /"; \n-00195b50: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // the pat\n-00195b70: 6820 7768 6963 6820 6973 2075 7365 6420 h which is used \n-00195b80: 746f 2066 696c 7465 722f 7365 7420 636f to filter/set co\n-00195b90: 6f6b 6965 7320 7769 7468 2074 6869 7320 okies with this \n-00195ba0: 6465 7374 696e 6174 696f 6e20 3c2f 7370 destination
    .
    if (argc < 2) \n-00195c00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    so\n-00195c90: 6170 5f67 6574 656e 765f 636f 6f6b 6965 ap_getenv_cookie\n-00195ca0: 733c 2f61 3e28 2661 6d70 3b3c 6120 636c s(&soap); // CGI app: g\n-00195d00: 7261 6220 636f 6f6b 6965 7320 6672 6f6d rab cookies from\n-00195d10: 2026 2333 393b 4854 5450 5f43 4f4f 4b49 'HTTP_COOKI\n-00195d20: 4526 2333 393b 2065 6e76 2076 6172 203c E' env var <\n-00195d30: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-00195d50: 2020 203c 6120 636c 6173 733d 2263 6f64 soap_serve(&so\n-00195de0: 6170 3c2f 613e 293b 203c 2f64 6976 3e0a ap);
    .\n-00195df0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    . \n-00195e20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else<\n-00195e40: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    .\n-00195e60: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n-00195e80: 6d20 3d20 3c61 2063 6c61 7373 3d22 636f m = soap_bind(&so\n-00195f10: 6170 3c2f 613e 2c20 4e55 4c4c 2c20 6174 ap, NULL, at\n-00195f20: 6f69 2861 7267 765b 315d 292c 2031 3029 oi(argv[1]), 10)\n-00195f30: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // small\n-00195f50: 2042 4143 4b4c 4f47 2066 6f72 2069 7465 BACKLOG for ite\n-00195f60: 7261 7469 7665 2073 6572 7665 7273 3c2f rative servers
    . \n-00195f90: 2020 3c73 7061 6e20 636c 6173 733d 226b if (!soap_v\n-00196010: 616c 6964 5f73 6f63 6b65 743c 2f61 3e28 alid_socket(\n-00196020: 6d29 2920 3c2f 6469 763e 0a3c 6469 7620 m)) .
    \n-00196040: 2020 2065 7869 7428 4558 4954 5f46 4149 exit(EXIT_FAI\n-00196050: 4c55 5245 293b 203c 2f64 6976 3e0a 3c64 LURE);
    .\n-00196070: 2020 2020 3c73 7061 6e20 636c 6173 733d fo\n-00196090: 723c 2f73 7061 6e3e 2028 3c73 7061 6e20 r (int i\n-001960c0: 203d 2031 3b20 3b20 692b 2b29 203c 2f64 = 1; ; i++) .
    {.
    s = so\n-00196160: 6170 5f61 6363 6570 743c 2f61 3e28 2661 ap_accept(&a\n-00196170: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    . \n-001961c0: 2020 2020 3c73 7061 6e20 636c 6173 733d if\n-001961e0: 3c2f 7370 616e 3e20 2821 3c61 2063 6c61 (!soap\n-00196240: 5f76 616c 6964 5f73 6f63 6b65 743c 2f61 _valid_socket(s))
    . \n-00196270: 2020 2020 2020 2065 7869 7428 4558 4954 exit(EXIT\n-00196280: 5f46 4149 4c55 5245 293b 203c 2f64 6976 _FAILURE); .
    soap_s\n-00196300: 6572 7665 3c2f 613e 2826 616d 703b 3c61 erve(&soap); \n-00196340: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n-00196360: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00196370: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00196380: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n-00196390: 6761 3831 6130 3039 6165 3165 6138 3235 ga81a009ae1ea825\n-001963a0: 6130 3565 3532 3431 6532 6237 6138 6563 a05e5241e2b7a8ec\n-001963b0: 6539 223e 736f 6170 5f65 6e64 3c2f 613e e9\">soap_end\n-001963c0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n-001963f0: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
    .\n-00196410: 2020 2020 2020 3c61 2063 6c61 7373 3d22 soap_\n-00196470: 6672 6565 5f63 6f6f 6b69 6573 3c2f 613e free_cookies\n-00196480: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n-001964b0: 703c 2f61 3e29 3b20 3c73 7061 6e20 636c p); //\n-001964d0: 2072 656d 6f76 6520 616c 6c20 6f6c 6420 remove all old \n-001964e0: 636f 6f6b 6965 7320 6672 6f6d 2064 6174 cookies from dat\n-001964f0: 6162 6173 6520 736f 206e 6f20 696e 7465 abase so no inte\n-00196500: 7266 6572 656e 6365 206f 6363 7572 7320 rference occurs \n-00196510: 7769 7468 2074 6865 2061 7272 6976 616c with the arrival\n-00196520: 206f 6620 6e65 7720 636f 6f6b 6965 7320 of new cookies \n-00196530: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64 .\n-00196550: 2020 2020 7d20 3c2f 6469 763e 0a3c 6469 } . \n-00196570: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 } .
    return 0;
    .\n-001965c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    int ns__\n-00196630: 7765 626d 6574 686f 6428 3c73 7061 6e20 webmethod(\n-00196650: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n-00196690: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001966a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001966b0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001966c0: 2e2e 2e29 203c 2f64 6976 3e0a 3c64 6976 ...)
    .{<\n-001966e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-00196710: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *cookie_value\n-00196750: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_coo\n-001967b0: 6b69 655f 7661 6c75 653c 2f61 3e28 3c61 kie_value(soap, <\n-001967f0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-00196800: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-00196810: 3b63 6f6f 6b69 655f 6e61 6d65 2671 756f ;cookie_name&quo\n-00196820: 743b 3c2f 7370 616e 3e2c 204e 554c 4c2c t;, NULL,\n-00196830: 204e 554c 4c29 3b3c 2f64 6976 3e0a 3c64 NULL);
    .\n-00196850: 2020 3c73 7061 6e20 636c 6173 733d 226b if (!cookie_v\n-00196880: 616c 7565 2920 2020 2020 2020 2020 2020 alue) \n-00196890: 2020 2020 203c 7370 616e 2063 6c61 7373 // co\n-001968b0: 6f6b 6965 2072 6574 7572 6e65 6420 6279 okie returned by\n-001968c0: 2063 6c69 656e 743f 203c 2f73 7061 6e3e client? \n-001968d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    coo\n-001968f0: 6b69 655f 7661 6c75 6520 3d20 3c73 7061 kie_value = "in\n-00196920: 6974 6961 6c5f 7661 6c75 6526 7175 6f74 itial_value"\n-00196930: 3b3c 2f73 7061 6e3e 3b20 3c73 7061 6e20 ;; \n-00196950: 2f2f 206e 6f3a 2073 6574 2069 6e69 7469 // no: set initi\n-00196960: 616c 2063 6f6f 6b69 6520 7661 6c75 6520 al cookie value \n-00196970: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-00196990: 2020 3c73 7061 6e20 636c 6173 733d 226b else\n-001969b0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c .<\n-001969c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001969d0: 3e20 2020 202e 2e2e 2020 2020 2020 2020 > ... \n-001969e0: 2020 2020 2020 2020 2020 2020 2020 2020 \n-001969f0: 2020 2020 203c 7370 616e 2063 6c61 7373 // ye\n-00196a10: 733a 206d 6f64 6966 7920 7468 6520 636f s: modify the co\n-00196a20: 6f6b 6965 2076 616c 7565 2074 6f20 7265 okie value to re\n-00196a30: 666c 6563 7420 7468 6520 6e65 7720 7374 flect the new st\n-00196a40: 6174 653c 2f73 7061 6e3e 3c2f 6469 763e ate\n-00196a50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_s\n-00196ac0: 6574 5f63 6f6f 6b69 653c 2f61 3e28 3c61 et_cookie(soap, <\n-00196b00: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-00196b10: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-00196b20: 3b63 6f6f 6b69 655f 6e61 6d65 2671 756f ;cookie_name&quo\n-00196b30: 743b 3c2f 7370 616e 3e2c 2063 6f6f 6b69 t;, cooki\n-00196b40: 655f 7661 6c75 652c 204e 554c 4c2c 204e e_value, NULL, N\n-00196b50: 554c 4c29 3b20 3c2f 6469 763e 0a3c 6469 ULL);
    . \n-00196b70: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_set_c\n-00196bd0: 6f6f 6b69 655f 6578 7069 7265 3c2f 613e ookie_expire\n-00196be0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-00196c10: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n-00196c30: 756f 743b 636f 6f6b 6965 5f6e 616d 6526 uot;cookie_name&\n-00196c40: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3630 quot;, 60\n-00196c50: 2c20 4e55 4c4c 2c20 4e55 4c4c 293b 203c , NULL, NULL); <\n-00196c60: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-00196c70: 656e 7422 3e2f 2f20 636f 6f6b 6965 2065 ent\">// cookie e\n-00196c80: 7870 6972 6573 2069 6e20 3630 2073 6563 xpires in 60 sec\n-00196c90: 6f6e 6473 203c 2f73 7061 6e3e 3c2f 6469 onds
    .
    return <\n-00196ce0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00196cf0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-00196d00: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g\n-00196d10: 6133 6231 3061 3638 6633 3534 6633 3963 a3b10a68f354f39c\n-00196d20: 6262 3066 6530 6430 3433 6164 3463 3763 bb0fe0d043ad4c7c\n-00196d30: 3022 3e53 4f41 505f 4f4b 3c2f 613e 3b20 0\">SOAP_OK; \n-00196d40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    \n-00196d60: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    const char * so\n-00196e50: 6170 5f63 6f6f 6b69 655f 7661 6c75 6528 ap_cookie_value(\n-00196e60: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n-00196e70: 702c 2063 6f6e 7374 2063 6861 7220 2a6e p, const char *n\n-00196e80: 616d 652c 2063 6f6e 7374 2063 6861 7220 ame, const char \n-00196e90: 2a64 6f6d 6169 6e2c 2063 6f6e 7374 2063 *domain, const c\n-00196ea0: 6861 7220 2a70 6174 6829 3c2f 6469 763e har *path)
    \n-00196eb0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Get cookie va\n-00196ed0: 6c75 652e 3c2f 6469 763e 3c2f 6469 763e lue.
    \n-00196ee0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    s\n-00196fc0: 7472 7563 7420 736f 6170 5f63 6f6f 6b69 truct soap_cooki\n-00196fd0: 6520 2a20 736f 6170 5f73 6574 5f63 6f6f e * soap_set_coo\n-00196fe0: 6b69 6528 7374 7275 6374 2073 6f61 7020 kie(struct soap \n-00196ff0: 2a73 6f61 702c 2063 6f6e 7374 2063 6861 *soap, const cha\n-00197000: 7220 2a6e 616d 652c 2063 6f6e 7374 2063 r *name, const c\n-00197010: 6861 7220 2a76 616c 7565 2c20 636f 6e73 har *value, cons\n-00197020: 7420 6368 6172 202a 646f 6d61 696e 2c20 t char *domain, \n-00197030: 636f 6e73 7420 6368 6172 202a 7061 7468 const char *path\n-00197040: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Add a \n-00197060: 636f 6f6b 6965 2e3c 2f64 6976 3e3c 2f64 cookie.
    .
    soap_getenv\n-00197130: 5f63 6f6f 6b69 6573 3c2f 613e 3c2f 6469 _cookies
    int soap_g\n-00197160: 6574 656e 765f 636f 6f6b 6965 7328 7374 etenv_cookies(st\n-00197170: 7275 6374 2073 6f61 7020 2a73 6f61 7029 ruct soap *soap)\n-00197180: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Get coo\n-001971a0: 6b69 6573 2066 726f 6d20 7468 6520 4854 kies from the HT\n-001971b0: 5450 5f43 4f4f 4b49 4520 656e 7669 726f TP_COOKIE enviro\n-001971c0: 6e6d 656e 7420 7661 7269 6162 6c65 2e3c nment variable.<\n-001971d0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    ..
    int\n-00197400: 2073 6f61 705f 7365 745f 636f 6f6b 6965 soap_set_cookie\n-00197410: 5f65 7870 6972 6528 7374 7275 6374 2073 _expire(struct s\n-00197420: 6f61 7020 2a73 6f61 702c 2063 6f6e 7374 oap *soap, const\n-00197430: 2063 6861 7220 2a6e 616d 652c 206c 6f6e char *name, lon\n-00197440: 6720 6d61 7861 6765 2c20 636f 6e73 7420 g maxage, const \n-00197450: 6368 6172 202a 646f 6d61 696e 2c20 636f char *domain, co\n-00197460: 6e73 7420 6368 6172 202a 7061 7468 293c nst char *path)<\n-00197470: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Set cook\n-00197490: 6965 2065 7870 6972 6174 696f 6e2e 3c2f ie expiration.
    .
    soap::cookie\n-00197550: 5f64 6f6d 6169 6e3c 2f61 3e3c 2f64 6976 _domain
    const char \n-00197580: 2a20 636f 6f6b 6965 5f64 6f6d 6169 6e3c * cookie_domain<\n-00197590: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    User-def\n-001975b0: 696e 6162 6c65 2073 7472 696e 6720 7468 inable string th\n-001975c0: 6174 2073 7065 6369 6669 6573 2074 6865 at specifies the\n-001975d0: 2048 5454 5020 636f 6f6b 6965 2064 6f6d HTTP cookie dom\n-001975e0: 6169 6e20 6f66 2074 6865 2072 756e 6e69 ain of the runni\n-001975f0: 6e67 2073 6572 7665 722e 3c2f 6469 763e ng server.
    \n-00197600: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n-00197620: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n-00197630: 3a32 3936 393c 2f64 6976 3e3c 2f64 6976 :2969
    .
    <\n-001976a0: 6120 6872 6566 3d22 7374 7275 6374 736f a href=\"structso\n-001976b0: 6170 2e68 746d 6c23 6166 6464 3931 6365 ap.html#afdd91ce\n-001976c0: 3131 3839 6665 6464 3332 6562 6661 3531 1189fedd32ebfa51\n-001976d0: 6464 3665 6433 3365 6222 3e73 6f61 703a dd6ed33eb\">soap:\n-001976e0: 3a63 6f6f 6b69 655f 7061 7468 3c2f 613e :cookie_path\n-001976f0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    const \n-00197710: 6368 6172 202a 2063 6f6f 6b69 655f 7061 char * cookie_pa\n-00197720: 7468 3c2f 6469 763e 3c64 6976 2063 6c61 th
    User-\n-00197740: 6465 6669 6e61 626c 6520 7374 7269 6e67 definable string\n-00197750: 2074 6861 7420 7370 6563 6966 6965 7320 that specifies \n-00197760: 7468 6520 4854 5450 2063 6f6f 6b69 6520 the HTTP cookie \n-00197770: 7061 7468 206f 6620 7468 6520 7275 6e6e path of the runn\n-00197780: 696e 6720 7365 7276 6572 2e3c 2f64 6976 ing server.
    Definitio\n-001977b0: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n-001977c0: 683a 3239 3731 3c2f 6469 763e 3c2f 6469 h:2971
    .

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

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

    .Con\n-00197850: 6e65 6374 696e 6720 636c 6965 6e74 7320 necting clients \n-00197860: 7468 726f 7567 6820 7072 6f78 7920 7365 through proxy se\n-00197870: 7276 6572 733c 2f68 323e 0a3c 703e 5768 rvers

    .

    Wh\n-00197880: 656e 2061 2063 6c69 656e 7420 6e65 6564 en a client need\n-00197890: 7320 746f 2063 6f6e 6e65 6374 2074 6f20 s to connect to \n-001978a0: 6120 5765 6220 5365 7276 6963 6520 7468 a Web Service th\n-001978b0: 726f 7567 6820 6120 7072 6f78 7920 7365 rough a proxy se\n-001978c0: 7276 6572 2c20 7365 7420 7468 6520 3c63 rver, set the s\n-00197980: 6f61 703a 3a70 726f 7879 5f68 6f73 743c oap::proxy_host<\n-00197990: 2f61 3e3c 2f63 6f64 653e 2073 7472 696e /a> strin\n-001979a0: 6720 616e 6420 3c63 6f64 653e 3c61 2063 g and soap::proxy_\n-00197a70: 706f 7274 3c2f 613e 3c2f 636f 6465 3e20 port \n-00197a80: 696e 7465 6765 7220 6174 7472 6962 7574 integer attribut\n-00197a90: 6573 206f 6620 7468 6520 6375 7272 656e es of the curren\n-00197aa0: 7420 3c63 6f64 653e 3c61 2063 6c61 7373 t soap context to t\n-00197b10: 6865 2070 726f 7879 2773 2068 6f73 7420 he proxy's host \n-00197b20: 6e61 6d65 2061 6e64 2070 6f72 742c 2072 name and port, r\n-00197b30: 6573 7065 6374 6976 656c 792e 2046 6f72 espectively. For\n-00197b40: 2065 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 example:

    .
    stru\n-00197b90: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap soap; .
    soap_in\n-00197c70: 6974 3c2f 613e 2826 616d 703b 3c61 2063 it(&soap); .
    so\n-00197cf0: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.\n-00197d40: 7072 6f78 795f 686f 7374 3c2f 613e 203d proxy_host =\n-00197d50: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-00197d70: 6f74 3b70 726f 7879 686f 7374 6e61 6d65 ot;proxyhostname\n-00197d80: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n-00197d90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n-00197dd0: 6f61 703c 2f61 3e2e 3c61 2063 6c61 7373 oap.proxy_port \n-00197e30: 3d20 3830 3830 3b20 3c2f 6469 763e 0a3c = 8080;
    .<\n-00197e40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00197e50: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >if (soap_call_\n-00197e80: 6e73 5f5f 7765 626d 6574 686f 6428 2661 ns__webmethod(&a\n-00197e90: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, \n-00197ee0: 2671 756f 743b 6874 7470 3a2f 2f68 6f73 "http://hos\n-00197ef0: 743a 706f 7274 2f70 6174 6826 7175 6f74 t:port/path"\n-00197f00: 3b3c 2f73 7061 6e3e 2c20 3c73 7061 6e20 ;, "acti\n-00197f30: 6f6e 2671 756f 743b 3c2f 7370 616e 3e2c on",\n-00197f40: 202e 2e2e 2929 203c 2f64 6976 3e0a 3c64 ...))
    .\n-00197f60: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_print_\n-00197fc0: 6661 756c 743c 2f61 3e28 2661 6d70 3b3c fault(&<\n-00197fd0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-00197fe0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-00197ff0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-00198000: 7374 6465 7272 293b 203c 2f64 6976 3e0a stderr);
    .\n-00198010: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    else\n-00198040: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n-00198050: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00198060: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... // \n-00198080: 7375 6363 6573 733c 2f73 7061 6e3e 3c2f success.

    T\n-001980b0: 6865 2063 6f6e 7465 7874 2061 7474 7269 he context attri\n-001980c0: 6275 7465 7320 3c63 6f64 653e 3c61 2063 butes soap::pro\n-00198180: 7879 5f68 6f73 743c 2f61 3e3c 2f63 6f64 xy_host and soap::proxy\n-00198260: 5f70 6f72 743c 2f61 3e3c 2f63 6f64 653e _port\n-00198270: 206b 6565 7020 7468 6569 7220 7661 6c75 keep their valu\n-00198280: 6573 2074 6872 6f75 6768 2061 2073 6571 es through a seq\n-00198290: 7565 6e63 6520 6f66 2073 6572 7669 6365 uence of service\n-001982a0: 206f 7065 7261 7469 6f6e 2063 616c 6c73 operation calls\n-001982b0: 2c20 736f 2074 6865 7920 6f6e 6c79 206e , so they only n\n-001982c0: 6565 6420 746f 2062 6520 7365 7420 6f6e eed to be set on\n-001982d0: 6365 2e3c 2f70 3e0a 3c70 3e57 6865 6e20 ce.

    .

    When \n-001982e0: 582d 466f 7277 6172 6465 642d 466f 7220 X-Forwarded-For \n-001982f0: 6865 6164 6572 7320 6172 6520 7265 7475 headers are retu\n-00198300: 726e 6564 2062 7920 7468 6520 7072 6f78 rned by the prox\n-00198310: 792c 2074 6865 2068 6561 6465 7220 6361 y, the header ca\n-00198320: 6e20 6265 2061 6363 6573 7365 6420 696e n be accessed in\n-00198330: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap::proxy_fr\n-001983d0: 6f6d 3c2f 613e 3c2f 636f 6465 3e20 7374 om st\n-001983e0: 7269 6e67 2e3c 2f70 3e0a 3c70 3e53 6565 ring.

    .

    See\n-001983f0: 2061 6c73 6f20 5365 6374 696f 6e73 203c also Sections <\n-00198400: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-00198410: 663d 2269 6e64 6578 2e68 746d 6c23 7072 f=\"index.html#pr\n-00198420: 6f78 7961 7574 6865 6e74 6963 6174 696f oxyauthenticatio\n-00198430: 6e22 3e48 5454 5020 7072 6f78 7920 6261 n\">HTTP proxy ba\n-00198440: 7369 6320 6175 7468 656e 7469 6361 7469 sic authenticati\n-00198450: 6f6e 3c2f 613e 2061 6e64 203c 6120 636c on and HTTP proxy NT\n-001984a0: 4c4d 2061 7574 6865 6e74 6963 6174 696f LM authenticatio\n-001984b0: 6e3c 2f61 3e2e 3c2f 703e 0a3c 703e f09f n.

    .

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

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

    .Bind before c\n-00198530: 6f6e 6e65 6374 2061 6e64 2073 6574 7469 onnect and setti\n-00198540: 6e67 2074 6865 2063 6c69 656e 7420 696e ng the client in\n-00198550: 7465 7266 6163 6520 6164 6472 6573 733c terface address<\n-00198560: 2f68 323e 0a3c 703e 546f 2062 696e 6420 /h2>.

    To bind \n-00198570: 7468 6520 636c 6965 6e74 2074 6f20 6120 the client to a \n-00198580: 706f 7274 2062 6566 6f72 6520 636f 6e6e port before conn\n-00198590: 6563 742c 2073 6574 2074 6865 203c 636f ect, set the soap::\n-00198650: 636c 6965 6e74 5f70 6f72 743c 2f61 3e3c client_port<\n-00198660: 2f63 6f64 653e 2074 6f20 6120 6e6f 6e2d /code> to a non-\n-00198670: 6e65 6761 7469 7665 2070 6f72 7420 6e75 negative port nu\n-00198680: 6d62 6572 3a3c 2f70 3e0a 3c64 6976 2063 mber:

    .
    \n-001986a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n-001986d0: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n-00198700: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n-00198730: 6170 3c2f 613e 203d 203c 6120 636c 6173 ap = so\n-00198790: 6170 5f6e 6577 3c2f 613e 2829 3b20 3c2f ap_new(); ..
    if\n-001988c0: 2028 736f 6170 5f63 616c 6c5f 6e73 5f5f (soap_call_ns__\n-001988d0: 7765 626d 6574 686f 6428 3c61 2063 6c61 webmethod(soap, "htt\n-00198930: 703a 2f2f 686f 7374 3a70 6f72 742f 7061 p://host:port/pa\n-00198940: 7468 2671 756f 743b 3c2f 7370 616e 3e2c th",\n-00198950: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-00198970: 6f74 3b61 6374 696f 6e26 7175 6f74 3b3c ot;action"<\n-00198980: 2f73 7061 6e3e 2c20 2e2e 2e29 2920 3c2f /span>, ...)) .
    ... // error
    .
    else\n-00198a10: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    ... \n-00198a30: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // success\n-00198a50: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .
    soap::cli\n-00198b00: 656e 745f 706f 7274 3c2f 613e 3c2f 6469 ent_port
    int client\n-00198b30: 5f70 6f72 743c 2f64 6976 3e3c 6469 7620 _port
    Us\n-00198b50: 6572 2d64 6566 696e 6162 6c65 2063 6c69 er-definable cli\n-00198b60: 656e 7420 706f 7274 2074 6f20 6269 6e64 ent port to bind\n-00198b70: 2074 6f20 6265 666f 7265 2063 6f6e 6e65 to before conne\n-00198b80: 6374 696e 6720 746f 2061 2073 6572 7665 cting to a serve\n-00198b90: 722c 2077 6865 6e20 6e6f 6e2d 6e65 6761 r, when non-nega\n-00198ba0: 7469 7665 2e3c 2f64 6976 3e3c 6469 7620 tive.
    Definition:\n-00198bd0: 2073 7464 736f 6170 322e 683a 3336 3930 stdsoap2.h:3690\n-00198be0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    This port\n-00198c10: 206e 756d 6265 7220 6973 2075 7365 6420 number is used \n-00198c20: 6f6e 6c79 206f 6e63 6520 616e 6420 7265 only once and re\n-00198c30: 7365 7420 746f 202d 3120 2864 6973 6162 set to -1 (disab\n-00198c40: 6c65 6429 2e20 5365 7420 6974 2061 6761 led). Set it aga\n-00198c50: 696e 2066 6f72 2074 6865 206e 6578 7420 in for the next \n-00198c60: 6361 6c6c 2e3c 2f70 3e0a 3c70 3e54 6f20 call.

    .

    To \n-00198c70: 7365 7420 6120 636c 6965 6e74 2069 6e74 set a client int\n-00198c80: 6572 6661 6365 2061 6464 7265 7373 2066 erface address f\n-00198c90: 6f72 2074 6865 2063 6f6e 6e65 6374 696f or the connectio\n-00198ca0: 6e20 7468 6174 2069 7320 616e 2049 5020 n that is an IP \n-00198cb0: 6164 6472 6573 7320 6f66 2074 6865 2063 address of the c\n-00198cc0: 6c69 656e 743a 3c2f 703e 0a3c 6469 7620 lient:

    .
    struct \n-00198d10: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n-00198d40: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n-00198d70: 6f61 703c 2f61 3e20 3d20 3c61 2063 6c61 oap = s\n-00198dd0: 6f61 705f 6e65 773c 2f61 3e28 293b 203c oap_new(); <\n-00198de0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n-00198e20: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->client_inte\n-00198e80: 7266 6163 653c 2f61 3e20 3d20 3c73 7061 rface = "..\n-00198eb0: 2e26 7175 6f74 3b3c 2f73 7061 6e3e 3b20 ."; \n-00198ec0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // IP addr\n-00198ee0: 6573 7320 3c2f 7370 616e 3e3c 2f64 6976 ess .
    if\n-00198f20: 3c2f 7370 616e 3e20 2873 6f61 705f 6361 (soap_ca\n-00198f30: 6c6c 5f6e 735f 5f77 6562 6d65 7468 6f64 ll_ns__webmethod\n-00198f40: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-00198f70: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n-00198f90: 756f 743b 6874 7470 3a2f 2f68 6f73 743a uot;http://host:\n-00198fa0: 706f 7274 2f70 6174 6826 7175 6f74 3b3c port/path"<\n-00198fb0: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, "action\n-00198fe0: 2671 756f 743b 3c2f 7370 616e 3e2c 202e ", .\n-00198ff0: 2e2e 2929 203c 2f64 6976 3e0a 3c64 6976 ..))
    . \n-00199010: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // err\n-00199030: 6f72 3c2f 7370 616e 3e3c 2f64 6976 3e0a or
    .\n-00199040: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    else\n-00199070: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n-00199080: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-00199090: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... // \n-001990b0: 7375 6363 6573 733c 2f73 7061 6e3e 3c2f success.const char * c\n-001991a0: 6c69 656e 745f 696e 7465 7266 6163 653c lient_interface<\n-001991b0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    User-def\n-001991d0: 696e 6162 6c65 2063 6c69 656e 7420 696e inable client in\n-001991e0: 7465 7266 6163 6520 6164 6472 6573 7320 terface address \n-001991f0: 746f 206f 7665 7272 6964 6520 7768 656e to override when\n-00199200: 2063 6f6e 6e65 6374 696e 6720 746f 2061 connecting to a\n-00199210: 2073 6572 7665 722c 2077 6865 6e20 6e6f server, when no\n-00199220: 6e2d 4e55 4c4c 2028 5769 6e64 6f2e 2e2e n-NULL (Windo...\n-00199230: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n-00199250: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n-00199260: 6f61 7032 2e68 3a33 3639 393c 2f64 6976 oap2.h:3699
    .
    <\n-00199290: 703e 5468 6973 2063 6c69 656e 7420 696e p>This client in\n-001992a0: 7465 7266 6163 6520 6164 6472 6573 7320 terface address \n-001992b0: 7374 7269 6e67 2069 7320 7573 6564 206f string is used o\n-001992c0: 6e6c 7920 6f6e 6365 2061 6e64 2072 6573 nly once and res\n-001992d0: 6574 2074 6f20 4e55 4c4c 2028 6469 7361 et to NULL (disa\n-001992e0: 626c 6564 292e 2053 6574 2069 7420 6167 bled). Set it ag\n-001992f0: 6169 6e20 666f 7220 7468 6520 6e65 7874 ain for the next\n-00199300: 2063 616c 6c2e 2054 6869 7320 6665 6174 call. This feat\n-00199310: 7572 6520 6973 206e 6f74 2061 7661 696c ure is not avail\n-00199320: 6162 6c65 2077 6865 6e20 636f 6d70 696c able when compil\n-00199330: 696e 6720 7468 6520 636f 6465 206f 6e20 ing the code on \n-00199340: 7769 6e64 6f77 732e 3c2f 703e 0a3c 703e windows.

    .

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

    .FastC\n-001993b0: 4749 3c2f 6832 3e0a 3c70 3e54 6f20 656e GI

    .

    To en\n-001993c0: 6162 6c65 2046 6173 7443 4749 2073 7570 able FastCGI sup\n-001993d0: 706f 7274 2c20 696e 7374 616c 6c20 4661 port, install Fa\n-001993e0: 7374 4347 4920 616e 6420 636f 6d70 696c stCGI and compil\n-001993f0: 6520 616c 6c20 736f 6170 6370 7032 2d67 e all soapcpp2-g\n-00199400: 656e 6572 6174 6564 2073 6f75 7263 6520 enerated source \n-00199410: 636f 6465 2066 696c 6573 2061 6e64 2079 code files and y\n-00199420: 6f75 7220 6170 706c 6963 6174 696f 6e20 our application \n-00199430: 736f 7572 6365 7320 7769 7468 2074 6865 sources with the\n-00199440: 2063 6f6d 7069 6c65 2d74 696d 6520 666c compile-time fl\n-00199450: 6167 203c 636f 6465 3e23 5749 5448 5f46 ag #WITH_F\n-00199460: 4153 5443 4749 3c2f 636f 6465 3e20 6f72 ASTCGI or\n-00199470: 2061 6464 3a3c 2f70 3e0a 3c64 6976 2063 add:

    .
    \n-00199490: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #de\n-001994c0: 6669 6e65 2057 4954 485f 4641 5354 4347 fine WITH_FASTCG\n-001994d0: 493c 2f73 7061 6e3e 3c2f 6469 763e 0a3c I
    .<\n-001994e0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    to \n-00199500: 3c63 6f64 653e 6773 6f61 702f 7374 6473 gsoap/stds\n-00199510: 6f61 7032 2e68 3c2f 636f 6465 3e3c 2f65 oap2.h and recompile\n-00199530: 2074 6865 2070 726f 6a65 6374 2063 6f64 the project cod\n-00199540: 652e 3c2f 703e 0a3c 646c 2063 6c61 7373 e.

    .
    Warning
    Do not li\n-00199580: 6e6b 2061 6761 696e 7374 2074 6865 203c nk against the <\n-00199590: 656d 3e3c 636f 6465 3e67 736f 6170 2f6c em>gsoap/l\n-001995a0: 6962 6773 6f61 702a 3c2f 636f 6465 3e3c ibgsoap*<\n-001995b0: 2f65 6d3e 206c 6962 7261 7269 6573 2061 /em> libraries a\n-001995c0: 7320 7468 6573 6520 6172 6520 6e6f 7420 s these are not \n-001995d0: 7375 6974 6162 6c65 2066 6f72 2046 6173 suitable for Fas\n-001995e0: 7443 4749 2e20 436f 6d70 696c 6520 3c65 tCGI. Compile gsoap/st\n-00199600: 6473 6f61 7032 2e63 3c2f 636f 6465 3e3c dsoap2.c<\n-00199610: 2f65 6d3e 2028 6f72 203c 656d 3e3c 636f /em> (or gsoap/stdsoap\n-00199630: 322e 6370 703c 2f63 6f64 653e 3c2f 656d 2.cpp) instead.
    \n-00199650: 3c2f 646c 3e0a 3c70 3ef0 9f94 9d20 3c61
    .

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

    .

    \n-00199690: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 \n-001996b0: 0a48 6f77 2074 6f20 6d69 6e69 6d69 7a65 .How to minimize\n-001996c0: 2061 7070 6c69 6361 7469 6f6e 206d 656d application mem\n-001996d0: 6f72 7920 666f 6f74 7072 696e 743c 2f68 ory footprint.

    To compile\n-001996f0: 2067 534f 4150 2061 7070 6c69 6361 7469 gSOAP applicati\n-00199700: 6f6e 7320 696e 7465 6e64 6564 2066 6f72 ons intended for\n-00199710: 2073 6d61 6c6c 206d 656d 6f72 7920 6465 small memory de\n-00199720: 7669 6365 732c 2079 6f75 206d 6179 2077 vices, you may w\n-00199730: 616e 7420 746f 2072 656d 6f76 6520 616c ant to remove al\n-00199740: 6c20 6e6f 6e2d 6573 7365 6e74 6961 6c20 l non-essential \n-00199750: 6665 6174 7572 6573 2074 6861 7420 636f features that co\n-00199760: 6e73 756d 6520 7072 6563 696f 7573 2063 nsume precious c\n-00199770: 6f64 6520 616e 6420 6461 7461 2073 7061 ode and data spa\n-00199780: 6365 2e20 546f 2064 6f20 7468 6973 2c20 ce. To do this, \n-00199790: 636f 6d70 696c 6520 7468 6520 736f 7572 compile the sour\n-001997a0: 6365 2063 6f64 6520 6669 6c65 7320 7769 ce code files wi\n-001997b0: 7468 2074 6865 2063 6f6d 7069 6c65 2d74 th the compile-t\n-001997c0: 696d 6520 666c 6167 203c 636f 6465 3e23 ime flag #\n-001997d0: 5749 5448 5f4c 4541 4e3c 2f63 6f64 653e WITH_LEAN\n-001997e0: 2028 692e 652e 203c 636f 6465 3e23 6465 (i.e. #de\n-001997f0: 6669 6e65 2057 4954 485f 4c45 414e 3c2f fine WITH_LEAN) to remove\n-00199810: 206d 616e 7920 6e6f 6e2d 6573 7365 6e74 many non-essent\n-00199820: 6961 6c20 6665 6174 7572 6573 2e20 5468 ial features. Th\n-00199830: 6520 6665 6174 7572 6573 2074 6861 7420 e features that \n-00199840: 7769 6c6c 2062 6520 6469 7361 626c 6564 will be disabled\n-00199850: 2061 7265 3a3c 2f70 3e0a 3c75 6c3e 0a3c are:

    .
    .Use the compile\n-0019a1a0: 2d74 696d 6520 666c 6167 203c 636f 6465 -time flag #WITH_LEANER to make the\n-0019a1d0: 2065 7865 6375 7461 626c 6520 6576 656e executable even\n-0019a1e0: 2073 6d61 6c6c 6572 2062 7920 7265 6d6f smaller by remo\n-0019a1f0: 7669 6e67 2044 494d 4520 616e 6420 4d49 ving DIME and MI\n-0019a200: 4d45 2061 7474 6163 686d 656e 7420 6861 ME attachment ha\n-0019a210: 6e64 6c69 6e67 2c20 3c63 6f64 653e 234c ndling, #L\n-0019a220: 4f4e 4736 343c 2f63 6f64 653e 2028 3634 ONG64 (64\n-0019a230: 2062 6974 2920 7365 7269 616c 697a 6174 bit) serializat\n-0019a240: 696f 6e2c 203c 636f 6465 3e77 6368 6172 ion, wchar\n-0019a250: 5f74 2a3c 2f63 6f64 653e 2073 6572 6961 _t* seria\n-0019a260: 6c69 7a61 7469 6f6e 2c20 616e 6420 7375 lization, and su\n-0019a270: 7070 6f72 7420 666f 7220 584d 4c20 444f pport for XML DO\n-0019a280: 4d20 6f70 6572 6174 696f 6e73 2e20 4e6f M operations. No\n-0019a290: 7465 2074 6861 7420 4449 4d45 2f4d 494d te that DIME/MIM\n-0019a2a0: 4520 6174 7461 6368 6d65 6e74 7320 6172 E attachments ar\n-0019a2b0: 6520 6e6f 7420 6573 7365 6e74 6961 6c20 e not essential \n-0019a2c0: 746f 2061 6368 6965 7665 2053 4f41 502f to achieve SOAP/\n-0019a2d0: 584d 4c20 696e 7465 726f 7065 7261 6269 XML interoperabi\n-0019a2e0: 6c69 7479 2e20 4449 4d45 2061 7474 6163 lity. DIME attac\n-0019a2f0: 686d 656e 7473 2061 7265 2061 2063 6f6e hments are a con\n-0019a300: 7665 6e69 656e 7420 7761 7920 746f 2065 venient way to e\n-0019a310: 7863 6861 6e67 6520 6e6f 6e2d 7465 7874 xchange non-text\n-0019a320: 2d62 6173 6564 2028 692e 652e 2062 696e -based (i.e. bin\n-0019a330: 6172 7929 2063 6f6e 7465 6e74 2c20 6275 ary) content, bu\n-0019a340: 7420 6172 6520 6e6f 7420 7265 7175 6972 t are not requir\n-0019a350: 6564 2066 6f72 2062 6173 6963 2053 4f41 ed for basic SOA\n-0019a360: 502f 584d 4c20 696e 7465 726f 7065 7261 P/XML interopera\n-0019a370: 6269 6c69 7479 2e20 4174 7461 6368 6d65 bility. Attachme\n-0019a380: 6e74 2072 6571 7569 7265 6d65 6e74 7320 nt requirements \n-0019a390: 6172 6520 7072 6564 6963 7461 626c 652e are predictable.\n-0019a3a0: 2054 6861 7420 6973 2c20 6170 706c 6963 That is, applic\n-0019a3b0: 6174 696f 6e73 2077 6f6e 2774 2073 7564 ations won't sud\n-0019a3c0: 6465 6e6c 7920 6465 6369 6465 2074 6f20 denly decide to \n-0019a3d0: 7573 6520 4449 4d45 206f 7220 4d49 4d45 use DIME or MIME\n-0019a3e0: 2069 6e73 7465 6164 206f 6620 584d 4c20 instead of XML \n-0019a3f0: 746f 2065 7863 6861 6e67 6520 636f 6e74 to exchange cont\n-0019a400: 656e 742e 3c2f 703e 0a3c 703e 4974 2069 ent.

    .

    It i\n-0019a410: 7320 7361 6665 2074 6f20 7472 7920 746f s safe to try to\n-0019a420: 2063 6f6d 7069 6c65 2079 6f75 7220 6170 compile your ap\n-0019a430: 706c 6963 6174 696f 6e20 7769 7468 2074 plication with t\n-0019a440: 6865 2063 6f6d 7069 6c65 2d74 696d 6520 he compile-time \n-0019a450: 666c 6167 203c 636f 6465 3e23 5749 5448 flag #WITH\n-0019a460: 5f4c 4541 4e3c 2f63 6f64 653e 2c20 7072 _LEAN, pr\n-0019a470: 6f76 6964 6564 2074 6861 7420 796f 7572 ovided that your\n-0019a480: 2061 7070 6c69 6361 7469 6f6e 2064 6f65 application doe\n-0019a490: 7320 6e6f 7420 7265 6c79 206f 6e20 492f s not rely on I/\n-0019a4a0: 4f20 7469 6d65 6f75 7473 2e20 5768 656e O timeouts. When\n-0019a4b0: 206e 6f20 6c69 6e6b 6167 6520 6572 726f no linkage erro\n-0019a4c0: 7220 6f63 6375 7273 2069 6e20 7468 6520 r occurs in the \n-0019a4d0: 636f 6d70 696c 6174 696f 6e20 7072 6f63 compilation proc\n-0019a4e0: 6573 732c 2069 7420 6973 2073 6166 6520 ess, it is safe \n-0019a4f0: 746f 2061 7373 756d 6520 7468 6174 2079 to assume that y\n-0019a500: 6f75 7220 6170 706c 6963 6174 696f 6e20 our application \n-0019a510: 7769 6c6c 2072 756e 206a 7573 7420 6669 will run just fi\n-0019a520: 6e65 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 ne.

    .

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

    ..How to remove\n-0019a590: 2074 6865 2042 5344 2073 6f63 6b65 7420 the BSD socket \n-0019a5a0: 6c69 6272 6172 7920 7265 7175 6972 656d library requirem\n-0019a5b0: 656e 743c 2f68 323e 0a3c 703e 5468 6520 ent

    .

    The \n-0019a5c0: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n-0019a5d0: 7374 6473 6f61 7032 2e63 3c2f 636f 6465 stdsoap2.c and <\n-0019a5f0: 636f 6465 3e67 736f 6170 2f73 7464 736f code>gsoap/stdso\n-0019a600: 6170 322e 6370 703c 2f63 6f64 653e 3c2f ap2.cpp libraries sh\n-0019a620: 6f75 6c64 2062 6520 6c69 6e6b 6564 2077 ould be linked w\n-0019a630: 6974 6820 6120 4253 4420 736f 636b 6574 ith a BSD socket\n-0019a640: 206c 6962 7261 7279 2069 6e20 7468 6520 library in the \n-0019a650: 7072 6f6a 6563 7420 6275 696c 642e 2054 project build. T\n-0019a660: 6f20 7265 6d6f 7665 2074 6865 206e 6565 o remove the nee\n-0019a670: 6420 746f 206c 696e 6b20 6120 736f 636b d to link a sock\n-0019a680: 6574 206c 6962 7261 7279 2c20 796f 7520 et library, you \n-0019a690: 6361 6e20 636f 6d70 696c 6520 3c65 6d3e can compile \n-0019a6a0: 3c63 6f64 653e 6773 6f61 702f 7374 6473 gsoap/stds\n-0019a6b0: 6f61 7032 2e63 3c2f 636f 6465 3e3c 2f65 oap2.c (for C) and <\n-0019a6d0: 656d 3e3c 636f 6465 3e67 736f 6170 2f73 em>gsoap/s\n-0019a6e0: 7464 736f 6170 322e 6370 703c 2f63 6f64 tdsoap2.cpp (for C++\n-0019a700: 2920 7769 7468 2074 6865 2074 6865 2063 ) with the the c\n-0019a710: 6f6d 7069 6c65 2d74 696d 6520 666c 6167 ompile-time flag\n-0019a720: 203c 636f 6465 3e23 5749 5448 5f4e 4f49 #WITH_NOI\n-0019a730: 4f3c 2f63 6f64 653e 206d 6163 726f 2073 O macro s\n-0019a740: 6574 2028 692e 652e 203c 636f 6465 3e23 et (i.e. #\n-0019a750: 6465 6669 6e65 2057 4954 485f 4e4f 494f define WITH_NOIO\n-0019a760: 3c2f 636f 6465 3e29 2e20 5468 6973 2072 ). This r\n-0019a770: 656d 6f76 6573 2074 6865 2064 6570 656e emoves the depen\n-0019a780: 6465 6e63 7920 6f6e 2074 6865 2042 5344 dency on the BSD\n-0019a790: 2073 6f63 6b65 7420 4150 492c 2049 4f20 socket API, IO \n-0019a7a0: 7374 7265 616d 732c 203c 636f 6465 3e46 streams, F\n-0019a7b0: 494c 453c 2f63 6f64 653e 2074 7970 652c ILE type,\n-0019a7c0: 2061 6e64 203c 636f 6465 3e65 7272 6e6f and errno\n-0019a7d0: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 703e .

    .

    \n-0019a7e0: 596f 7520 7368 6f75 6c64 2064 6566 696e You should defin\n-0019a7f0: 6520 6361 6c6c 6261 636b 7320 746f 2072 e callbacks to r\n-0019a800: 6570 6c61 6365 2074 6865 206d 6973 7369 eplace the missi\n-0019a810: 6e67 2073 6f63 6b65 7420 7374 6163 6b2e ng socket stack.\n-0019a820: 2054 6f20 646f 2073 6f2c 2061 6464 2074 To do so, add t\n-0019a830: 6f20 796f 7572 2063 6f64 6520 7468 6520 o your code the \n-0019a840: 666f 6c6c 6f77 696e 6720 6465 6669 6e69 following defini\n-0019a850: 7469 6f6e 733a 3c2f 703e 0a3c 6469 7620 tions:

    .
    .<\n-0019a910: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0019a920: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_init<\n-0019a980: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-0019a9b0: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); .
    /* fse\n-0019a9f0: 6e64 2069 7320 7573 6564 2074 6f20 7472 nd is used to tr\n-0019aa00: 616e 736d 6974 2064 6174 6120 696e 2062 ansmit data in b\n-0019aa10: 6c6f 636b 7320 2a2f 3c2f 7370 616e 3e20 locks */ \n-0019aa20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ../* frecv is \n-0019ab10: 7573 6564 2074 6f20 7265 6365 6976 6520 used to receive \n-0019ab20: 6461 7461 2069 6e20 626c 6f63 6b73 202a data in blocks *\n-0019ab30: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    .\n-0019ab40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap.frecv = my_recv; .
    /* \n-0019ac20: 666f 7065 6e20 6973 2075 7365 6420 746f fopen is used to\n-0019ac30: 2063 6f6e 6e65 6374 202a 2f3c 2f73 7061 connect */
    .
    soap.fopen = m\n-0019acf0: 795f 7463 705f 636f 6e6e 6563 743b 203c y_tcp_connect; <\n-0019ad00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    /*\n-0019ad30: 2066 636c 6f73 6520 6973 2075 7365 6420 fclose is used \n-0019ad40: 746f 2064 6973 636f 6e6e 6563 7420 2a2f to disconnect */\n-0019ad50: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n-0019ad60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0019ad70: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n-0019ada0: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .fclose = my_tcp_disc\n-0019ae10: 6f6e 6e65 6374 3b20 3c2f 6469 763e 0a3c onnect;
    .<\n-0019ae20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0019ae30: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >/* fclose\n-0019ae50: 736f 636b 6574 2069 7320 7573 6564 206f socket is used o\n-0019ae60: 6e6c 7920 746f 2063 6c6f 7365 2074 6865 nly to close the\n-0019ae70: 206d 6173 7465 7220 736f 636b 6574 2069 master socket i\n-0019ae80: 6e20 6120 7365 7276 6572 2075 706f 6e20 n a server upon \n-0019ae90: 736f 6170 5f64 6f6e 6528 2920 2a2f 3c2f soap_done() */
    .<\n-0019aec0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0019aed0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-0019aee0: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n-0019aef0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-0019af00: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-0019af10: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm\n-0019af20: 6c23 6761 3231 6564 6164 6362 6430 3831 l#ga21edadcbd081\n-0019af30: 6337 6633 3738 3232 6430 3462 6230 3561 c7f37822d04bb05a\n-0019af40: 3964 3239 223e 6663 6c6f 7365 736f 636b 9d29\">fclosesock\n-0019af50: 6574 3c2f 613e 203d 206d 795f 7463 705f et = my_tcp_\n-0019af60: 636c 6f73 6573 6f63 6b65 743b 203c 2f64 closesocket; .
    /* f\n-0019afa0: 7368 7574 646f 776e 736f 636b 6574 2069 shutdownsocket i\n-0019afb0: 7320 7573 6564 2061 6674 6572 2063 6f6d s used after com\n-0019afc0: 706c 6574 696e 6720 6120 7365 6e64 206f pleting a send o\n-0019afd0: 7065 7261 7469 6f6e 2074 6f20 7365 6e64 peration to send\n-0019afe0: 2054 4350 2046 494e 202a 2f3c 2f73 7061 TCP FIN */
    .
    soap.fshutdownsock\n-0019b0a0: 6574 3c2f 613e 203d 206d 795f 7463 705f et = my_tcp_\n-0019b0b0: 7368 7574 646f 776e 736f 636b 6574 3b20 shutdownsocket; \n-0019b0c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n-0019b0f0: 2a20 7365 7474 696e 6720 6670 6f6c 6c20 * setting fpoll \n-0019b100: 6973 206f 7074 696f 6e61 6c2c 206c 6561 is optional, lea\n-0019b110: 7665 2069 7420 4e55 4c4c 2074 6f20 6f6d ve it NULL to om\n-0019b120: 6974 2070 6f6c 6c69 6e67 2074 6865 2073 it polling the s\n-0019b130: 6572 7665 7220 2a2f 3c2f 7370 616e 3e20 erver */ \n-0019b140: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ../* faccept i\n-0019b230: 7320 7573 6564 206f 6e6c 7920 6279 2061 s used only by a\n-0019b240: 2073 6572 7665 7220 6170 706c 6963 6174 server applicat\n-0019b250: 696f 6e20 2a2f 3c2f 7370 616e 3e20 3c2f ion */ ..\n-0019b420: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Callback that\n-0019b440: 2062 6c6f 636b 7320 756e 7469 6c20 6163 blocks until ac\n-0019b450: 7469 7669 7479 2069 7320 6465 7465 6374 tivity is detect\n-0019b460: 6564 206f 6e20 7468 6520 736f 6170 3a3a ed on the soap::\n-0019b470: 736f 636b 6574 206f 7220 736f 6170 3a3a socket or soap::\n-0019b480: 6d61 7374 6572 2073 6f63 6b65 742c 2e2e master socket,..\n-0019b490: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n-0019b4b0: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n-0019b4c0: 736f 6170 322e 683a 3435 3934 3c2f 6469 soap2.h:4594
    .
    \n-0019b530: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    in\n-0019b5c0: 7428 2a20 6663 6c6f 7365 736f 636b 6574 t(* fclosesocket\n-0019b5d0: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s\n-0019b5e0: 6f61 702c 2053 4f41 505f 534f 434b 4554 oap, SOAP_SOCKET\n-0019b5f0: 2073 6f63 6b29 3c2f 6469 763e 3c64 6976 sock)
    C\n-0019b610: 616c 6c62 6163 6b20 7468 6174 2063 6c6f allback that clo\n-0019b620: 7365 7320 6120 6769 7665 6e20 736f 636b ses a given sock\n-0019b630: 6574 2e3c 2f64 6976 3e3c 6469 7620 636c et.
    D\n-0019b650: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-0019b660: 7464 736f 6170 322e 683a 3435 3730 3c2f tdsoap2.h:4570
    .
    <\n-0019b750: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-0019b760: 6922 3e69 6e74 282a 2066 7368 7574 646f i\">int(* fshutdo\n-0019b770: 776e 736f 636b 6574 2928 7374 7275 6374 wnsocket)(struct\n-0019b780: 2073 6f61 7020 2a73 6f61 702c 2053 4f41 soap *soap, SOA\n-0019b790: 505f 534f 434b 4554 2073 6f63 6b2c 2069 P_SOCKET sock, i\n-0019b7a0: 6e74 2068 6f77 293c 2f64 6976 3e3c 6469 nt how)
    \n-0019b7c0: 4361 6c6c 6261 636b 2074 6861 7420 7368 Callback that sh\n-0019b7d0: 7574 7320 646f 776e 2061 2067 6976 656e uts down a given\n-0019b7e0: 2073 6f63 6b65 742e 3c2f 6469 763e 3c64 socket.
    Definition:<\n-0019b810: 2f62 3e20 7374 6473 6f61 7032 2e68 3a34 /b> stdsoap2.h:4\n-0019b820: 3538 333c 2f64 6976 3e3c 2f64 6976 3e0a 583
    .\n-0019b830: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    \n-0019b910: 534f 4150 5f53 4f43 4b45 5428 2a20 6661 SOAP_SOCKET(* fa\n-0019b920: 6363 6570 7429 2873 7472 7563 7420 736f ccept)(struct so\n-0019b930: 6170 202a 736f 6170 2c20 534f 4150 5f53 ap *soap, SOAP_S\n-0019b940: 4f43 4b45 5420 736f 636b 2c20 7374 7275 OCKET sock, stru\n-0019b950: 6374 2073 6f63 6b61 6464 7220 2a61 6464 ct sockaddr *add\n-0019b960: 722c 2069 6e74 202a 6c65 6e29 3c2f 6469 r, int *len)
    Callback th\n-0019b990: 6174 2077 6169 7473 2066 6f72 2061 6e64 at waits for and\n-0019b9a0: 2061 6363 6570 7473 2061 2073 6f63 6b65 accepts a socke\n-0019b9b0: 7420 636f 6e6e 6563 7469 6f6e 2072 6571 t connection req\n-0019b9c0: 7565 7374 6564 2062 7920 6120 636c 6965 uested by a clie\n-0019b9d0: 6e74 2e3c 2f64 6976 3e3c 6469 7620 636c nt.
    D\n-0019b9f0: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n-0019ba00: 7464 736f 6170 322e 683a 3435 3039 3c2f tdsoap2.h:4509
    .\n-0019cba0: 3c70 3e57 6865 6e20 636f 6d70 696c 696e

    When compilin\n-0019cbb0: 6720 7468 6973 2069 6e74 6572 6661 6365 g this interface\n-0019cbc0: 2068 6561 6465 7220 6669 6c65 2077 6974 header file wit\n-0019cbd0: 6820 7468 6520 736f 6170 6370 7032 2074 h the soapcpp2 t\n-0019cbe0: 6f6f 6c2c 2061 6c6c 2074 7970 6520 6465 ool, all type de\n-0019cbf0: 6669 6e69 7469 6f6e 732c 2074 6865 2073 finitions, the s\n-0019cc00: 6572 6961 6c69 7a65 7273 2066 6f72 2074 erializers for t\n-0019cc10: 6865 7365 2074 7970 6573 2c20 616e 6420 hese types, and \n-0019cc20: 7468 6520 7374 7562 2061 6e64 2073 6b65 the stub and ske\n-0019cc30: 6c65 746f 6e20 6675 6e63 7469 6f6e 7320 leton functions \n-0019cc40: 7769 6c6c 2062 6520 706c 6163 6564 2069 will be placed i\n-0019cc50: 6e20 7468 6973 206e 616d 6573 7061 6365 n this namespace\n-0019cc60: 2e20 5468 6520 584d 4c20 6e61 6d65 7370 . The XML namesp\n-0019cc70: 6163 6520 6d61 7070 696e 6720 7461 626c ace mapping tabl\n-0019cc80: 6520 2873 6176 6564 2069 6e20 6120 3c65 e (saved in a .nsmap file)\n-0019ccb0: 2077 696c 6c20 6e6f 7420 6265 2070 6c61 will not be pla\n-0019ccc0: 6365 6420 696e 2074 6865 2063 6f64 6520 ced in the code \n-0019ccd0: 6e61 6d65 7370 6163 6520 746f 2061 6c6c namespace to all\n-0019cce0: 6f77 2069 7420 746f 2062 6520 6c69 6e6b ow it to be link\n-0019ccf0: 6564 2061 7320 6120 676c 6f62 616c 206f ed as a global o\n-0019cd00: 626a 6563 742e 2059 6f75 2063 616e 2075 bject. You can u\n-0019cd10: 7365 203c 623e 3c63 6f64 653e 736f 6170 se soap\n-0019cd20: 6370 7032 202d 6e3c 2f63 6f64 653e 3c2f cpp2 -n option -n\n-0019cd50: 2074 6f20 6372 6561 7465 206c 6f63 616c to create local\n-0019cd60: 2058 4d4c 206e 616d 6573 7061 6365 2074 XML namespace t\n-0019cd70: 6162 6c65 732c 2073 6565 2053 6563 7469 ables, see Secti\n-0019cd80: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on soapcpp2 opti\n-0019cdc0: 6f6e 733c 2f61 3e20 2862 7574 2072 656d ons (but rem\n-0019cdd0: 656d 6265 7220 7468 6174 2079 6f75 2065 ember that you e\n-0019cde0: 7870 6c69 6369 746c 7920 6e65 6564 2074 xplicitly need t\n-0019cdf0: 6f20 696e 6974 6961 6c69 7a65 2074 6865 o initialize the\n-0019ce00: 206e 616d 6573 7061 6365 7320 746f 2070 namespaces to p\n-0019ce10: 6f69 6e74 2074 6f20 6120 7461 626c 6520 oint to a table \n-0019ce20: 6174 2072 756e 2074 696d 6520 7573 696e at run time usin\n-0019ce30: 6720 3c63 6f64 653e 3c61 2063 6c61 7373 g soap_set\n-0019cf00: 5f6e 616d 6573 7061 6365 733c 2f61 3e3c _namespaces<\n-0019cf10: 2f63 6f64 653e 292e 2054 6865 2067 656e /code>). The gen\n-0019cf20: 6572 6174 6564 2066 696c 6573 2061 7265 erated files are\n-0019cf30: 2070 7265 6669 7865 6420 7769 7468 2074 prefixed with t\n-0019cf40: 6865 2063 6f64 6520 6e61 6d65 7370 6163 he code namespac\n-0019cf50: 6520 6e61 6d65 2069 6e73 7465 6164 206f e name instead o\n-0019cf60: 6620 7468 6520 7573 7561 6c20 3c65 6d3e f the usual \n-0019cf70: 3c63 6f64 653e 736f 6170 3c2f 636f 6465 soap file name\n-0019cf90: 2070 7265 6669 7820 746f 2065 6e61 626c prefix to enabl\n-0019cfa0: 6520 6d75 6c74 6970 6c65 2063 6c69 656e e multiple clien\n-0019cfb0: 742f 7365 7276 6572 2063 6f64 6573 2074 t/server codes t\n-0019cfc0: 6f20 6265 2062 7569 6c64 2069 6e20 7468 o be build in th\n-0019cfd0: 6520 7361 6d65 2070 726f 6a65 6374 2064 e same project d\n-0019cfe0: 6972 6563 746f 7279 2e3c 2f70 3e0a 3c70 irectory.

    .Because the SOA\n-0019d000: 5020 4865 6164 6572 2061 6e64 2046 6175 P Header and Fau\n-0019d010: 6c74 2073 6572 6961 6c69 7a65 7273 2077 lt serializers w\n-0019d020: 696c 6c20 616c 736f 2062 6520 706c 6163 ill also be plac\n-0019d030: 6564 2069 6e20 7468 6520 6e61 6d65 7370 ed in the namesp\n-0019d040: 6163 652c 2074 6865 7920 6361 6e6e 6f74 ace, they cannot\n-0019d050: 2062 6520 6361 6c6c 6564 2066 726f 6d20 be called from \n-0019d060: 7468 6520 3c65 6d3e 3c63 6f64 653e 6773 the gs\n-0019d070: 6f61 702f 7374 6473 6f61 7032 2e63 7070 oap/stdsoap2.cpp\n-0019d080: 3c2f 636f 6465 3e3c 2f65 6d3e 2072 756e run\n-0019d090: 2074 696d 6520 6c69 6272 6172 7920 636f time library co\n-0019d0a0: 6465 2061 6e64 2061 7265 2074 6865 7265 de and are there\n-0019d0b0: 666f 7265 2072 656e 6465 7265 6420 756e fore rendered un\n-0019d0c0: 7573 6162 6c65 2e20 5468 6572 6566 6f72 usable. Therefor\n-0019d0d0: 652c 2074 6865 7365 2073 6572 6961 6c69 e, these seriali\n-0019d0e0: 7a65 7273 2061 7265 206e 6f74 2063 6f6d zers are not com\n-0019d0f0: 7069 6c65 6420 6174 2061 6c6c 2028 656e piled at all (en\n-0019d100: 666f 7263 6564 2077 6974 6820 3c63 6f64 forced with #define WITH_N\n-0019d120: 4f47 4c4f 4241 4c3c 2f63 6f64 653e 292e OGLOBAL).\n-0019d130: 2054 6f20 6164 6420 534f 4150 2048 6561 To add SOAP Hea\n-0019d140: 6465 7220 616e 6420 4661 756c 7420 7365 der and Fault se\n-0019d150: 7269 616c 697a 6572 732c 2079 6f75 206d rializers, you m\n-0019d160: 7573 7420 636f 6d70 696c 6520 7468 656d ust compile them\n-0019d170: 2073 6570 6172 6174 656c 7920 6173 2066 separately as f\n-0019d180: 6f6c 6c6f 7773 2e20 4669 7273 742c 2063 ollows. First, c\n-0019d190: 7265 6174 6520 6120 6e65 7720 6865 6164 reate a new head\n-0019d1a0: 6572 2066 696c 6520 3c65 6d3e 3c63 6f64 er file env.h with the SOA\n-0019d1d0: 5020 4865 6164 6572 203c 636f 6465 3e3c P Header <\n-0019d1e0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0019d1f0: 663d 2273 7472 7563 745f 735f 6f5f 615f f=\"struct_s_o_a_\n-0019d200: 705f 5f5f 655f 6e5f 765f 5f5f 5f5f 6865 p___e_n_v_____he\n-0019d210: 6164 6572 2e68 746d 6c22 2074 6974 6c65 ader.html\" title\n-0019d220: 3d22 534f 4150 2048 6561 6465 7220 7374 =\"SOAP Header st\n-0019d230: 7275 6374 7572 652e 223e 534f 4150 5f45 ructure.\">SOAP_E\n-0019d240: 4e56 5f5f 4865 6164 6572 3c2f 613e 3c2f NV__Header and SOAP F\n-0019d260: 6175 6c74 203c 636f 6465 3e3c 6120 636c ault SOAP_ENV__Fa\n-0019d2d0: 756c 743c 2f61 3e3c 2f63 6f64 653e 2073 ult s\n-0019d2e0: 7472 7563 7475 7265 732c 2069 6e63 6c75 tructures, inclu\n-0019d2f0: 6469 6e67 203c 636f 6465 3e3c 6120 636c ding SOAP\n-0019d360: 5f45 4e56 5f5f 4465 7461 696c 3c2f 613e _ENV__Detail\n-0019d370: 3c2f 636f 6465 3e20 6966 2074 6869 7320 if this \n-0019d380: 7374 7275 6374 7572 6520 636f 6e74 6169 structure contai\n-0019d390: 6e73 206d 656d 6265 7273 2074 6861 7420 ns members that \n-0019d3a0: 6172 6520 7365 7269 616c 697a 6564 2061 are serialized a\n-0019d3b0: 7320 6661 756c 7420 6465 7461 696c 732e s fault details.\n-0019d3c0: 2059 6f75 2063 616e 206c 6561 7665 2074 You can leave t\n-0019d3d0: 6869 7320 6865 6164 6572 2066 696c 6520 his header file \n-0019d3e0: 656d 7074 7920 6966 2079 6f75 2077 616e empty if you wan\n-0019d3f0: 7420 746f 2075 7365 2074 6865 2064 6566 t to use the def\n-0019d400: 6175 6c74 2053 4f41 5020 4865 6164 6572 ault SOAP Header\n-0019d410: 2061 6e64 2046 6175 6c74 2e20 486f 7765 and Fault. Howe\n-0019d420: 7665 722c 2069 6620 534f 4150 2048 6561 ver, if SOAP Hea\n-0019d430: 6465 7273 2061 7265 2072 6571 7569 7265 ders are require\n-0019d440: 6420 7468 656e 2079 6f75 2063 616e 6e6f d then you canno\n-0019d450: 7420 6c65 6176 6520 7468 6520 3c63 6f64 t leave the SOA\n-0019d4c0: 505f 454e 565f 5f48 6561 6465 723c 2f61 P_ENV__Header structu\n-0019d4e0: 7265 2065 6d70 7479 2e20 466f 7220 6578 re empty. For ex\n-0019d4f0: 616d 706c 652c 2074 6865 2057 532d 4164 ample, the WS-Ad\n-0019d500: 6472 6573 7369 6e67 2061 6e64 2057 532d dressing and WS-\n-0019d510: 5365 6375 7269 7479 2070 6c75 6769 6e73 Security plugins\n-0019d520: 2072 6571 7569 7265 2053 4f41 5020 4865 require SOAP He\n-0019d530: 6164 6572 7320 7768 6963 6820 6361 6e20 aders which can \n-0019d540: 6265 2069 6d70 6f72 7465 6420 6279 2061 be imported by a\n-0019d550: 6464 696e 6720 3c63 6f64 653e 2369 6d70 dding #imp\n-0019d560: 6f72 7420 2277 7361 352e 6822 3c2f 636f ort \"wsa5.h\" and #i\n-0019d580: 6d70 6f72 7420 2277 7373 652e 6822 3c2f mport \"wsse.h\", respectiv\n-0019d5a0: 656c 7920 746f 203c 656d 3e3c 636f 6465 ely to env.h. Then compile\n-0019d5d0: 2074 6869 7320 6865 6164 6572 2066 696c this header fil\n-0019d5e0: 6520 7769 7468 3a20 3c2f 703e 3c70 7265 e with:

    soapcpp2 -pen\n-0019d610: 7620 656e 762e 680a 3c2f 7072 653e 3c70 v env.h. The generated \n-0019d630: 3c65 6d3e 3c63 6f64 653e 656e 7643 2e63 envC.c\n-0019d640: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2066 pp f\n-0019d650: 696c 6520 686f 6c64 7320 7468 6520 534f ile holds the SO\n-0019d660: 4150 2048 6561 6465 7220 616e 6420 4661 AP Header and Fa\n-0019d670: 756c 7420 7365 7269 616c 697a 6572 7320 ult serializers \n-0019d680: 616e 6420 796f 7520 6361 6e20 6c69 6e6b and you can link\n-0019d690: 2074 6869 7320 6669 6c65 2077 6974 6820 this file with \n-0019d6a0: 796f 7572 2063 6c69 656e 7420 616e 6420 your client and \n-0019d6b0: 7365 7276 6572 2061 7070 6c69 6361 7469 server applicati\n-0019d6c0: 6f6e 732e 3c2f 703e 0a3c 703e f09f 949d ons.

    .

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

    .<\n-0019d700: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.How to cre\n-0019d730: 6174 6520 636c 6965 6e74 2f73 6572 7665 ate client/serve\n-0019d740: 7220 6c69 6272 6172 6965 733c 2f68 323e r libraries

    \n-0019d750: 0a3c 703e 5468 6520 736f 6170 6370 7032 .

    The soapcpp2\n-0019d760: 2074 6f6f 6c20 7072 6f64 7563 6573 203c tool produces <\n-0019d770: 656d 3e3c 636f 6465 3e73 6f61 7043 6c69 em>soapCli\n-0019d780: 656e 744c 6962 2e63 7070 3c2f 636f 6465 entLib.cpp and <\n-0019d7a0: 636f 6465 3e73 6f61 7053 6572 7665 724c code>soapServerL\n-0019d7b0: 6962 2e63 7070 3c2f 636f 6465 3e3c 2f65 ib.cpp source code f\n-0019d7d0: 696c 6573 2074 6861 7420 6172 6520 7370 iles that are sp\n-0019d7e0: 6563 6966 6963 616c 6c79 2069 6e74 656e ecifically inten\n-0019d7f0: 6465 6420 666f 7220 6275 696c 6469 6e67 ded for building\n-0019d800: 2073 7461 7469 6320 6f72 2064 796e 616d static or dynam\n-0019d810: 6963 2063 6c69 656e 7420 616e 6420 7365 ic client and se\n-0019d820: 7276 6572 206c 6962 7261 7269 6573 2069 rver libraries i\n-0019d830: 6e20 4320 6f72 2043 2b2b 2e20 5468 6573 n C or C++. Thes\n-0019d840: 6520 6669 6c65 7320 6578 706f 7274 2074 e files export t\n-0019d850: 6865 2073 7475 6220 616e 6420 736b 656c he stub and skel\n-0019d860: 6574 6f6e 2066 756e 6374 696f 6e73 2c20 eton functions, \n-0019d870: 6275 7420 6b65 6570 2061 6c6c 2073 6572 but keep all ser\n-0019d880: 6961 6c69 7a61 7469 6f6e 2063 6f64 6520 ialization code \n-0019d890: 7374 6174 6963 2c20 7468 7573 2068 6964 static, thus hid\n-0019d8a0: 6465 6e20 746f 2061 766f 6964 206c 696e den to avoid lin\n-0019d8b0: 6b20 7379 6d62 6f6c 2063 6f6e 666c 6963 k symbol conflic\n-0019d8c0: 7473 2077 6865 6e20 636f 6d62 696e 696e ts when combinin\n-0019d8d0: 6720 6d75 6c74 6970 6c65 2063 6c69 656e g multiple clien\n-0019d8e0: 7473 2061 6e64 2073 6572 7669 6365 7320 ts and services \n-0019d8f0: 696e 746f 206f 6e65 2065 7865 6375 7461 into one executa\n-0019d900: 626c 652e 204e 6f74 6520 7468 6174 2069 ble. Note that i\n-0019d910: 7420 6973 2066 6172 2073 696d 706c 6572 t is far simpler\n-0019d920: 2074 6f20 7573 6520 7468 6520 7773 646c to use the wsdl\n-0019d930: 3268 2074 6f6f 6c20 6f6e 206d 756c 7469 2h tool on multi\n-0019d940: 706c 6520 5753 444c 2066 696c 6573 2074 ple WSDL files t\n-0019d950: 6f20 6765 6e65 7261 7465 2061 2068 6561 o generate a hea\n-0019d960: 6465 7220 6669 6c65 2074 6861 7420 636f der file that co\n-0019d970: 6d62 696e 6573 2061 6c6c 2073 6572 7669 mbines all servi\n-0019d980: 6365 2064 6566 696e 6974 696f 6e73 2e20 ce definitions. \n-0019d990: 486f 7765 7665 722c 2074 6865 2061 7070 However, the app\n-0019d9a0: 726f 6163 6820 7072 6573 656e 7465 6420 roach presented \n-0019d9b0: 696e 2074 6869 7320 7365 6374 696f 6e20 in this section \n-0019d9c0: 6973 2075 7365 6675 6c20 7768 656e 2063 is useful when c\n-0019d9d0: 7265 6174 696e 6720 2864 796e 616d 6963 reating (dynamic\n-0019d9e0: 2920 6c69 6272 6172 6965 7320 666f 7220 ) libraries for \n-0019d9f0: 636c 6965 6e74 2061 6e64 2073 6572 7665 client and serve\n-0019da00: 7220 6f62 6a65 6374 732c 2073 7563 6820 r objects, such \n-0019da10: 6173 2044 4c4c 7320 6173 2064 6573 6372 as DLLs as descr\n-0019da20: 6962 6564 2069 6e20 5365 6374 696f 6e20 ibed in Section \n-0019da30: 3c61 2063 6c61 7373 3d22 656c 2220 6872 How to creat\n-0019da60: 6520 444c 4c73 3c2f 613e 202e 3c2f 703e e DLLs .

    \n-0019da70: 0a3c 646c 2063 6c61 7373 3d22 7365 6374 .
    No\n-0019da90: 7465 3c2f 6474 3e3c 6464 3e4f 6e65 206d te
    One m\n-0019daa0: 616a 6f72 2064 6973 6164 7661 6e74 6167 ajor disadvantag\n-0019dab0: 6520 6f66 2074 6865 2061 7070 726f 6163 e of the approac\n-0019dac0: 6820 7072 6573 656e 7465 6420 6865 7265 h presented here\n-0019dad0: 2069 7320 7468 6174 2074 6865 2073 6572 is that the ser\n-0019dae0: 6961 6c69 7a65 7220 6675 6e63 7469 6f6e ializer function\n-0019daf0: 7320 6172 6520 6e6f 206c 6f6e 6765 7220 s are no longer \n-0019db00: 6163 6365 7373 6962 6c65 2069 6e20 7468 accessible in th\n-0019db10: 6520 7573 6572 2773 2073 6f75 7263 6520 e user's source \n-0019db20: 636f 6465 2c20 6265 6361 7573 6520 7365 code, because se\n-0019db30: 7269 616c 697a 6572 7320 7769 6c6c 2062 rializers will b\n-0019db40: 6520 636f 6e76 6572 7465 6420 746f 2073 e converted to s\n-0019db50: 7461 7469 6320 6675 6e63 7469 6f6e 7320 tatic functions \n-0019db60: 2874 6f20 6265 2075 7365 6420 6279 2074 (to be used by t\n-0019db70: 6865 2067 656e 6572 6174 6564 2073 7475 he generated stu\n-0019db80: 6220 616e 6420 736b 656c 6574 6f6e 2066 b and skeleton f\n-0019db90: 756e 6374 696f 6e73 206f 6e6c 7929 2e20 unctions only). \n-0019dba0: 466f 7220 6578 616d 706c 652c 2066 756e For example, fun\n-0019dbb0: 6374 696f 6e73 2073 7563 6820 6173 203c ctions such as <\n-0019dbc0: 636f 6465 3e73 6f61 705f 6e65 775f 543c code>soap_new_T<\n-0019dbd0: 2f63 6f64 653e 2c20 3c63 6f64 653e 736f /code>, so\n-0019dbe0: 6170 5f64 6566 6175 6c74 5f54 3c2f 636f ap_default_T, soap_\n-0019dc00: 7772 6974 655f 543c 2f63 6f64 653e 2c20 write_T, \n-0019dc10: 3c63 6f64 653e 736f 6170 5f72 6561 645f soap_read_\n-0019dc20: 543c 2f63 6f64 653e 2c20 3c63 6f64 653e T, \n-0019dc30: 736f 6170 5f70 7574 5f54 3c2f 636f 6465 soap_put_T, and soa\n-0019dc50: 705f 6765 745f 543c 2f63 6f64 653e 2063 p_get_T c\n-0019dc60: 616e 6e6f 7420 6265 2075 7365 6420 616e annot be used an\n-0019dc70: 7920 6c6f 6e67 6572 2e3c 2f64 643e 3c2f y longer.
    .

    Using C++\n-0019dc90: 206e 616d 6573 7061 6365 7320 6973 2061 namespaces is a\n-0019dca0: 2062 6574 7465 7220 616c 7465 726e 6174 better alternat\n-0019dcb0: 6976 6520 7768 656e 2062 7569 6c64 696e ive when buildin\n-0019dcc0: 6720 6170 706c 6963 6174 696f 6e73 2069 g applications i\n-0019dcd0: 6e20 432b 2b20 7468 6174 2063 6f6d 6269 n C++ that combi\n-0019dce0: 6e65 206d 756c 7469 706c 6520 636c 6965 ne multiple clie\n-0019dcf0: 6e74 7320 616e 6420 7365 7276 6963 6573 nts and services\n-0019dd00: 2e20 546f 2062 7569 6c64 206d 756c 7469 . To build multi\n-0019dd10: 706c 6520 6c69 6272 6172 6965 732c 2079 ple libraries, y\n-0019dd20: 6f75 2063 616e 2064 6566 696e 6520 6120 ou can define a \n-0019dd30: 432b 2b20 6e61 6d65 7370 6163 6520 696e C++ namespace in\n-0019dd40: 2079 6f75 7220 6865 6164 6572 2066 696c your header fil\n-0019dd50: 6520 7769 7468 203c 623e 3c63 6f64 653e e with \n-0019dd60: 736f 6170 6370 7032 202d 716e 616d 653c soapcpp2 -qname<\n-0019dd70: 2f63 6f64 653e 3c2f 623e 206f 7074 696f /code> optio\n-0019dd80: 6e20 3c62 3e3c 636f 6465 3e2d 716e 616d n -qnam\n-0019dd90: 653c 2f63 6f64 653e 3c2f 623e 2c20 7365 e, se\n-0019dda0: 6520 5365 6374 696f 6e20 3c61 2063 6c61 e Section How to b\n-0019dde0: 7569 6c64 2061 2063 6c69 656e 7420 6f72 uild a client or\n-0019ddf0: 2073 6572 7665 7220 696e 2061 2043 2b2b server in a C++\n-0019de00: 2063 6f64 6520 6e61 6d65 7370 6163 653c code namespace<\n-0019de10: 2f61 3e20 666f 7220 6465 7461 696c 732e /a> for details.\n-0019de20: 3c2f 703e 0a3c 703e 466f 7220 432c 2079

    .

    For C, y\n-0019de30: 6f75 2063 616e 2075 7365 203c 623e 3c63 ou can use soapcpp2 -c \n-0019de50: 2d70 206e 616d 653c 2f63 6f64 653e 3c2f -p name option -p name to rename \n-0019de90: 7468 6520 6765 6e65 7261 7465 6420 3c65 the generated soapClie\n-0019deb0: 6e74 4c69 622e 633c 2f63 6f64 653e 3c2f ntLib.c and soapServerLib.\n-0019dee0: 633c 2f63 6f64 653e 3c2f 656d 3e20 2861 c (a\n-0019def0: 6e64 2061 7373 6f63 6961 7465 6429 2066 nd associated) f\n-0019df00: 696c 6573 2e20 5468 6520 3c62 3e3c 636f iles. The -p name option spe\n-0019df30: 6369 6669 6573 2074 6865 2066 696c 6520 cifies the file \n-0019df40: 3c65 6d3e 3c63 6f64 653e 6e61 6d65 3c2f name prefi\n-0019df60: 7820 746f 2072 6570 6c61 6365 2074 6865 x to replace the\n-0019df70: 203c 656d 3e3c 636f 6465 3e73 6f61 703c soap<\n-0019df80: 2f63 6f64 653e 3c2f 656d 3e20 6669 6c65 /code> file\n-0019df90: 206e 616d 6520 7072 6566 6978 2e3c 2f70 name prefix..

    The engine \n-0019dfb0: 646f 6573 206e 6f74 2064 6566 696e 6520 does not define \n-0019dfc0: 534f 4150 2048 6561 6465 7220 616e 6420 SOAP Header and \n-0019dfd0: 4661 756c 7420 7365 7269 616c 697a 6572 Fault serializer\n-0019dfe0: 7320 7468 6174 2074 6865 2065 6e67 696e s that the engin\n-0019dff0: 6520 6e65 6564 732e 2057 6520 7468 6572 e needs. We ther\n-0019e000: 6566 6f72 6520 6164 6420 534f 4150 2048 efore add SOAP H\n-0019e010: 6561 6465 7220 616e 6420 4661 756c 7420 eader and Fault \n-0019e020: 7365 7269 616c 697a 6572 732c 2077 6869 serializers, whi\n-0019e030: 6368 2061 7265 2063 6f6d 7069 6c65 6420 ch are compiled \n-0019e040: 7365 7061 7261 7465 6c79 2061 7320 666f separately as fo\n-0019e050: 6c6c 6f77 732e 2046 6972 7374 2c20 6372 llows. First, cr\n-0019e060: 6561 7465 2061 206e 6577 2068 6561 6465 eate a new heade\n-0019e070: 7220 6669 6c65 203c 656d 3e3c 636f 6465 r file env.h with the SOAP\n-0019e0a0: 2048 6561 6465 7220 3c63 6f64 653e 3c61 Header SOAP_EN\n-0019e110: 565f 5f48 6561 6465 723c 2f61 3e3c 2f63 V__Header and SOAP Fa\n-0019e130: 756c 7420 3c63 6f64 653e 3c61 2063 6c61 ult SOAP_ENV__Fau\n-0019e1a0: 6c74 3c2f 613e 3c2f 636f 6465 3e20 7374 lt st\n-0019e1b0: 7275 6374 7572 6573 2c20 696e 636c 7564 ructures, includ\n-0019e1c0: 696e 6720 3c63 6f64 653e 3c61 2063 6c61 ing SOAP_\n-0019e230: 454e 565f 5f44 6574 6169 6c3c 2f61 3e3c ENV__Detail<\n-0019e240: 2f63 6f64 653e 2069 6620 7468 6973 2073 /code> if this s\n-0019e250: 7472 7563 7475 7265 2063 6f6e 7461 696e tructure contain\n-0019e260: 7320 6d65 6d62 6572 7320 7468 6174 2061 s members that a\n-0019e270: 7265 2073 6572 6961 6c69 7a65 6420 6173 re serialized as\n-0019e280: 2066 6175 6c74 2064 6574 6169 6c73 2e20 fault details. \n-0019e290: 596f 7520 6361 6e20 6c65 6176 6520 7468 You can leave th\n-0019e2a0: 6973 2068 6561 6465 7220 6669 6c65 2065 is header file e\n-0019e2b0: 6d70 7479 2069 6620 796f 7520 7761 6e74 mpty if you want\n-0019e2c0: 2074 6f20 7573 6520 7468 6520 6465 6661 to use the defa\n-0019e2d0: 756c 7420 534f 4150 2048 6561 6465 7220 ult SOAP Header \n-0019e2e0: 616e 6420 4661 756c 742e 2048 6f77 6576 and Fault. Howev\n-0019e2f0: 6572 2c20 6966 2053 4f41 5020 4865 6164 er, if SOAP Head\n-0019e300: 6572 7320 6172 6520 7265 7175 6972 6564 ers are required\n-0019e310: 2074 6865 6e20 796f 7520 6361 6e6e 6f74 then you cannot\n-0019e320: 206c 6561 7665 2074 6865 203c 636f 6465 leave the SOAP\n-0019e390: 5f45 4e56 5f5f 4865 6164 6572 3c2f 613e _ENV__Header\n-0019e3a0: 3c2f 636f 6465 3e20 7374 7275 6374 7572 structur\n-0019e3b0: 6520 656d 7074 792e 2046 6f72 2065 7861 e empty. For exa\n-0019e3c0: 6d70 6c65 2c20 7468 6520 5753 2d41 6464 mple, the WS-Add\n-0019e3d0: 7265 7373 696e 6720 616e 6420 5753 2d53 ressing and WS-S\n-0019e3e0: 6563 7572 6974 7920 706c 7567 696e 7320 ecurity plugins \n-0019e3f0: 7265 7175 6972 6520 534f 4150 2048 6561 require SOAP Hea\n-0019e400: 6465 7273 2077 6869 6368 2063 616e 2062 ders which can b\n-0019e410: 6520 696d 706f 7274 6564 2062 7920 6164 e imported by ad\n-0019e420: 6469 6e67 203c 636f 6465 3e23 696d 706f ding #impo\n-0019e430: 7274 2022 7773 6135 2e68 223c 2f63 6f64 rt \"wsa5.h\" and #im\n-0019e450: 706f 7274 2022 7773 7365 2e68 223c 2f63 port \"wsse.h\", respective\n-0019e470: 6c79 2074 6f20 3c65 6d3e 3c63 6f64 653e ly to \n-0019e480: 656e 762e 683c 2f63 6f64 653e 3c2f 656d env.h. Then compile \n-0019e4a0: 7468 6973 2068 6561 6465 7220 6669 6c65 this header file\n-0019e4b0: 2077 6974 683a 203c 2f70 3e3c 7072 6520 with:

     soapcpp2 -penv\n-0019e4e0: 2065 6e76 2e68 0a3c 2f70 7265 3e3c 703e   env.h.

    \n-0019e4f0: 2054 6865 2067 656e 6572 6174 6564 203c The generated <\n-0019e500: 656d 3e3c 636f 6465 3e65 6e76 432e 6370 em>envC.cp\n-0019e510: 703c 2f63 6f64 653e 3c2f 656d 3e20 6669 p fi\n-0019e520: 6c65 2068 6f6c 6473 2074 6865 2053 4f41 le holds the SOA\n-0019e530: 5020 4865 6164 6572 2061 6e64 2046 6175 P Header and Fau\n-0019e540: 6c74 2073 6572 6961 6c69 7a65 7273 2061 lt serializers a\n-0019e550: 6e64 2079 6f75 2063 616e 2063 7265 6174 nd you can creat\n-0019e560: 6520 6120 2864 796e 616d 6963 2920 6c69 e a (dynamic) li\n-0019e570: 6272 6172 7920 666f 7220 6974 2074 6f20 brary for it to \n-0019e580: 6c69 6e6b 2069 7420 7769 7468 2079 6f75 link it with you\n-0019e590: 7220 636c 6965 6e74 2061 6e64 2073 6572 r client and ser\n-0019e5a0: 7665 7220 6170 706c 6963 6174 696f 6e73 ver applications\n-0019e5b0: 2e3c 2f70 3e0a 3c70 3e59 6f75 2073 686f .

    .

    You sho\n-0019e5c0: 756c 6420 7468 656e 2063 6f6d 7069 6c65 uld then compile\n-0019e5d0: 2074 6865 203c 656d 3e3c 636f 6465 3e67 the g\n-0019e5e0: 736f 6170 2f73 7464 736f 6170 322e 6370 soap/stdsoap2.cp\n-0019e5f0: 703c 2f63 6f64 653e 3c2f 656d 3e20 6c69 p li\n-0019e600: 6272 6172 7920 7769 7468 2074 6865 2063 brary with the c\n-0019e610: 6f6d 7069 6c65 2d74 696d 6520 3c63 6f64 ompile-time #WITH_NONAMESP\n-0019e630: 4143 4553 3c2f 636f 6465 3e20 666c 6167 ACES flag\n-0019e640: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

     c++\n-0019e660: 202d 4457 4954 485f 4e4f 4e41 4d45 5350   -DWITH_NONAMESP\n-0019e670: 4143 4553 202d 6320 7374 6473 6f61 7032  ACES -c stdsoap2\n-0019e680: 2e63 7070 0a3c 2f70 7265 3e3c 703e 2054  .cpp.

    T\n-0019e690: 6869 7320 6f6d 6974 7320 7468 6520 7265 his omits the re\n-0019e6a0: 6665 7265 6e63 6520 746f 2074 6865 2067 ference to the g\n-0019e6b0: 6c6f 6261 6c20 6e61 6d65 7370 6163 6573 lobal namespaces\n-0019e6c0: 2074 6162 6c65 2c20 7768 6963 6820 6973 table, which is\n-0019e6d0: 206e 6f77 6865 7265 2074 6f20 6265 2064 nowhere to be d\n-0019e6e0: 6566 696e 6564 2073 696e 6365 2077 6520 efined since we \n-0019e6f0: 7769 6c6c 2075 7365 2058 4d4c 206e 616d will use XML nam\n-0019e700: 6573 7061 6365 7320 666f 7220 6561 6368 espaces for each\n-0019e710: 2063 6c69 656e 742f 7365 7276 6963 6520 client/service \n-0019e720: 7365 7061 7261 7465 6c79 2e20 5468 6572 separately. Ther\n-0019e730: 6566 6f72 652c 2079 6f75 206d 7573 7420 efore, you must \n-0019e740: 6578 706c 6963 6974 6c79 2073 6574 2074 explicitly set t\n-0019e750: 6865 206e 616d 6573 7061 6365 7320 7661 he namespaces va\n-0019e760: 6c75 6520 6f66 2074 6865 203c 636f 6465 lue of the soa\n-0019e7c0: 703c 2f61 3e3c 2f63 6f64 653e 2063 6f6e p con\n-0019e7d0: 7465 7874 2069 6e20 796f 7572 2063 6f64 text in your cod\n-0019e7e0: 6520 6576 6572 7920 7469 6d65 2061 6674 e every time aft\n-0019e7f0: 6572 2069 6e69 7469 616c 697a 6174 696f er initializatio\n-0019e800: 6e20 6f66 2074 6865 203c 636f 6465 3e3c n of the <\n-0019e810: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-0019e820: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n-0019e830: 6d6c 2220 7469 746c 653d 2243 6f6e 7465 ml\" title=\"Conte\n-0019e840: 7874 2077 6974 6820 7468 6520 656e 6769 xt with the engi\n-0019e850: 6e65 2073 7461 7465 2e22 3e73 6f61 703c ne state.\">soap<\n-0019e860: 2f61 3e3c 2f63 6f64 653e 2063 6f6e 7465 /a> conte\n-0019e870: 7874 2077 6974 6820 7468 6520 3c63 6f64 xt with the soap_set_names\n-0019e950: 7061 6365 7328 7374 7275 6374 2073 6f61 paces(struct soa\n-0019e960: 702a 2c20 636f 6e73 7420 7374 7275 6374 p*, const struct\n-0019e970: 204e 616d 6573 7061 6365 2a29 3c2f 613e Namespace*)\n-0019e980: 3c2f 636f 6465 3e20 6675 6e63 7469 6f6e function\n-0019e990: 2e3c 2f70 3e0a 3c70 3e46 6f72 2065 7861 .

    .

    For exa\n-0019e9a0: 6d70 6c65 2c20 7375 7070 6f73 6520 7765 mple, suppose we\n-0019e9b0: 2068 6176 6520 7477 6f20 636c 6965 6e74 have two client\n-0019e9c0: 7320 6465 6669 6e65 6420 696e 2068 6561 s defined in hea\n-0019e9d0: 6465 7220 6669 6c65 7320 3c65 6d3e 3c63 der files client1.h and client2.\n-0019ea10: 683c 2f63 6f64 653e 3c2f 656d 3e2e 2057 h. W\n-0019ea20: 6520 6669 7273 7420 6765 6e65 7261 7465 e first generate\n-0019ea30: 2074 6865 203c 656d 3e3c 636f 6465 3e65 the e\n-0019ea40: 6e76 482e 683c 2f63 6f64 653e 3c2f 656d nvH.h file for the S\n-0019ea60: 4f41 5020 4865 6164 6572 2061 6e64 2046 OAP Header and F\n-0019ea70: 6175 6c74 2064 6566 696e 6974 696f 6e73 ault definitions\n-0019ea80: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

     soa\n-0019eaa0: 7063 7070 3220 2d63 202d 7065 6e76 2065  pcpp2 -c -penv e\n-0019eab0: 6e76 2e68 0a3c 2f70 7265 3e3c 703e 2054  nv.h.

    T\n-0019eac0: 6865 6e20 7765 2067 656e 6572 6174 6520 hen we generate \n-0019ead0: 7468 6520 636f 6465 2066 6f72 2063 6c69 the code for cli\n-0019eae0: 656e 7431 2061 6e64 2063 6c69 656e 7432 ent1 and client2\n-0019eaf0: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

     soa\n-0019eb10: 7063 7070 3220 2d63 202d 6e20 2d70 6d79  pcpp2 -c -n -pmy\n-0019eb20: 436c 6965 6e74 3120 636c 6965 6e74 312e  Client1 client1.\n-0019eb30: 680a 2073 6f61 7063 7070 3220 2d63 202d  h. soapcpp2 -c -\n-0019eb40: 6e20 2d70 6d79 436c 6965 6e74 3220 636c  n -pmyClient2 cl\n-0019eb50: 6965 6e74 322e 680a 3c2f 7072 653e 3c70  ient2.h.
    This generates\n-0019eb70: 203c 656d 3e3c 636f 6465 3e6d 7943 6c69 myCli\n-0019eb80: 656e 7431 436c 6965 6e74 4c69 622e 633c ent1ClientLib.c<\n-0019eb90: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and \n-0019eba0: 3c65 6d3e 3c63 6f64 653e 6d79 436c 6965 myClie\n-0019ebb0: 6e74 3243 6c69 656e 744c 6962 2e63 3c2f nt2ClientLib.c (amon\n-0019ebd0: 6720 7365 7665 7261 6c20 6f74 6865 7220 g several other \n-0019ebe0: 6669 6c65 7329 2e20 5468 6573 6520 7477 files). These tw\n-0019ebf0: 6f20 6669 6c65 7320 7368 6f75 6c64 2062 o files should b\n-0019ec00: 6520 636f 6d70 696c 6564 2061 6e64 206c e compiled and l\n-0019ec10: 696e 6b65 6420 7769 7468 2079 6f75 7220 inked with your \n-0019ec20: 6170 706c 6963 6174 696f 6e2e 2054 6865 application. The\n-0019ec30: 2073 6f75 7263 6520 636f 6465 206f 6620 source code of \n-0019ec40: 796f 7572 2061 7070 6c69 6361 7469 6f6e your application\n-0019ec50: 2073 686f 756c 6420 696e 636c 7564 6520 should include \n-0019ec60: 7468 6520 6765 6e65 7261 7465 6420 3c65 the generated envH.h, \n-0019ec90: 3c63 6f64 653e 6d79 436c 6965 6e74 3148 myClient1H\n-0019eca0: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 .h, \n-0019ecb0: 3c65 6d3e 3c63 6f64 653e 6d79 436c 6965 myClie\n-0019ecc0: 6e74 322e 683c 2f63 6f64 653e 3c2f 656d nt2.h files and \n-0019ece0: 3c63 6f64 653e 6d79 436c 6965 6e74 312e myClient1.\n-0019ecf0: 6e73 6d61 703c 2f63 6f64 653e 3c2f 656d nsmap, myC\n-0019ed10: 6c69 656e 7432 2e6e 736d 6170 3c2f 636f lient2.nsmap files:<\n-0019ed30: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
    #include \n-0019ed80: 2671 756f 743b 6d79 436c 6965 6e74 3148 "myClient1H\n-0019ed90: 2e68 2671 756f 743b 3c2f 7370 616e 3e20 .h" \n-0019eda0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // include\n-0019edc0: 2063 6c69 656e 7420 3120 7374 7562 7320 client 1 stubs \n-0019edd0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-0019edf0: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl\n-0019ee10: 7564 6520 2671 756f 743b 6d79 436c 6965 ude "myClie\n-0019ee20: 6e74 3248 2e68 2671 756f 743b 3c2f 7370 nt2H.h" // inc\n-0019ee50: 6c75 6465 2063 6c69 656e 7420 3220 7374 lude client 2 st\n-0019ee60: 7562 7320 3c2f 7370 616e 3e3c 2f64 6976 ubs .
    #\n-0019eea0: 696e 636c 7564 6520 2671 756f 743b 656e include "en\n-0019eeb0: 7648 2e68 2671 756f 743b 3c2f 7370 616e vH.h"
    .
    ... <\n-0019eee0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0019eef0: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent\">//.
    #include "\n-0019ef40: 3b6d 7943 6c69 656e 7431 482e 6e73 6d61 ;myClient1H.nsma\n-0019ef50: 7026 7175 6f74 3b3c 2f73 7061 6e3e 203c p" <\n-0019ef60: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0019ef70: 656e 7422 3e2f 2f20 696e 636c 7564 6520 ent\">// include \n-0019ef80: 636c 6965 6e74 2031 206e 736d 6170 203c client 1 nsmap <\n-0019ef90: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-0019efb0: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n-0019efc0: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n-0019efd0: 6465 2026 7175 6f74 3b6d 7943 6c69 656e de "myClien\n-0019efe0: 7432 482e 6e73 6d61 7026 7175 6f74 3b3c t2H.nsmap"<\n-0019eff0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> // \n-0019f010: 696e 636c 7564 6520 636c 6965 6e74 2032 include client 2\n-0019f020: 206e 736d 6170 203c 2f73 7061 6e3e 3c2f nsmap .
    .<\n-0019f050: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-0019f060: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct soap\n-0019f0b0: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n-0019f0e0: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa\n-0019f140: 705f 6e65 773c 2f61 3e28 293b 3c2f 6469 p_new();.
    soap\n-0019f1c0: 5f73 6574 5f6e 616d 6573 7061 6365 733c _set_namespaces<\n-0019f1d0: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n-0019f200: 2f61 3e2c 206d 7943 6c69 656e 7431 5f6e /a>, myClient1_n\n-0019f210: 616d 6573 7061 6365 7329 3b20 3c2f 6469 amespaces); .
    ... /\n-0019f250: 2f20 6d61 6b65 2043 6c69 656e 7420 3120 / make Client 1 \n-0019f260: 696e 766f 6361 7469 6f6e 733c 2f73 7061 invocations
    .
    ... <\n-0019f290: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-0019f2a0: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent\">//.
    so\n-0019f320: 6170 5f73 6574 5f6e 616d 6573 7061 6365 ap_set_namespace\n-0019f330: 733c 2f61 3e28 3c61 2063 6c61 7373 3d22 s(soa\n-0019f360: 703c 2f61 3e2c 206d 7943 6c69 656e 7432 p, myClient2\n-0019f370: 5f6e 616d 6573 7061 6365 7329 3b20 3c2f _namespaces); .
    ... // make Client \n-0019f3c0: 3220 696e 766f 6361 7469 6f6e 733c 2f73 2 invocations
    .

    We\n-0019fed0: 2074 6865 6e20 636f 6d70 696c 6520 6974 then compile it\n-0019fee0: 2061 7320 6120 6c69 6272 6172 7920 616e as a library an\n-0019fef0: 6420 7765 2075 7365 206f 7074 696f 6e20 d we use option \n-0019ff00: 3c62 3e3c 636f 6465 3e2d 6e3c 2f63 6f64 -n to prefix\n-0019ff20: 2074 6865 2067 656e 6572 6174 6564 2066 the generated f\n-0019ff30: 696c 6573 2061 6e64 2074 6f20 7265 6e61 iles and to rena\n-0019ff40: 6d65 2074 6865 206e 616d 6573 7061 6365 me the namespace\n-0019ff50: 2074 6162 6c65 2074 6f20 6176 6f69 6420 table to avoid \n-0019ff60: 6c69 6e6b 2063 6f6e 666c 6963 7473 206c link conflicts l\n-0019ff70: 6174 6572 3a20 3c2f 703e 3c70 7265 2063 ater:

    \n-0019ff90: 2073 6f61 7063 7070 3220 2d6e 2071 756f   soapcpp2 -n quo\n-0019ffa0: 7465 2e68 0a20 632b 2b20 2d63 2071 756f  te.h. c++ -c quo\n-0019ffb0: 7465 436c 6965 6e74 4c69 622e 6370 700a  teClientLib.cpp.\n-0019ffc0: 3c2f 7072 653e 3c70 3e20 4966 2079 6f75  

    If you\n-0019ffd0: 2064 6f6e 2774 2077 616e 7420 746f 2075 don't want to u\n-0019ffe0: 7365 2061 2043 2b2b 2063 6f64 6520 6e61 se a C++ code na\n-0019fff0: 6d65 7370 6163 652c 2079 6f75 2073 686f mespace, you sho\n-001a0000: 756c 6420 636f 6d70 696c 6520 3c65 6d3e uld compile \n-001a0010: 3c63 6f64 653e 7175 6f74 652e 683c 2f63 quote.h \"as is\n-001a0030: 2220 7769 7468 206f 7074 696f 6e20 3c62 \" with option -pquote:

    <\n-001a0060: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n-001a0070: 656e 7422 3e20 736f 6170 6370 7032 202d ent\"> soapcpp2 -\n-001a0080: 6e20 2d70 7175 6f74 6520 7175 6f74 652e n -pquote quote.\n-001a0090: 680a 2063 2b2b 202d 6320 7175 6f74 6543 h. c++ -c quoteC\n-001a00a0: 6c69 656e 744c 6962 2e63 7070 0a3c 2f70 lientLib.cpp.

    Third, we\n-001a00c0: 2063 7265 6174 6520 7468 6520 4375 7272 create the Curr\n-001a00d0: 656e 6379 2045 7863 6861 6e67 6520 5261 ency Exchange Ra\n-001a00e0: 7465 2068 6561 6465 7220 6669 6c65 2073 te header file s\n-001a00f0: 7065 6369 6669 6361 7469 6f6e 3a3c 2f70 pecification:.

    \n-001a0140: 6e61 6d65 7370 6163 6520 3c2f 7370 616e namespace rate {
    .\n-001a0170: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-001a01a0: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n-001a01b0: 6365 206e 616d 653a 2053 6572 7669 6365 ce name: Service\n-001a01c0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-001a01d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a01e0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n-001a0200: 7320 7365 7276 6963 6520 7374 796c 653a s service style:\n-001a0210: 2072 7063 203c 2f73 7061 6e3e 3c2f 6469 rpc .
    //gso\n-001a0250: 6170 206e 7320 7365 7276 6963 6520 656e ap ns service en\n-001a0260: 636f 6469 6e67 3a20 656e 636f 6465 6420 coding: encoded \n-001a0270: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001a0290: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n-001a02b0: 2073 6572 7669 6365 206c 6f63 6174 696f service locatio\n-001a02c0: 6e3a 2068 7474 703a 2f2f 7365 7276 6963 n: http://servic\n-001a02d0: 6573 2e78 6d65 7468 6f64 732e 6e65 742f es.xmethods.net/\n-001a02e0: 736f 6170 203c 2f73 7061 6e3e 3c2f 6469 soap .
    //gso\n-001a0320: 6170 206e 7320 7363 6865 6d61 206e 616d ap ns schema nam\n-001a0330: 6573 7061 6365 3a20 7572 6e3a 786d 6574 espace: urn:xmet\n-001a0340: 686f 6473 2d43 7572 7265 6e63 7945 7863 hods-CurrencyExc\n-001a0350: 6861 6e67 6520 3c2f 7370 616e 3e3c 2f64 hange .
    //gs\n-001a0390: 6f61 7020 6e73 2073 6572 7669 6365 206d oap ns service m\n-001a03a0: 6574 686f 642d 6163 7469 6f6e 3a20 6765 ethod-action: ge\n-001a03b0: 7452 6174 6520 2671 756f 743b 2671 756f tRate "&quo\n-001a03c0: 743b 203c 2f73 7061 6e3e 3c2f 6469 763e t;
    \n-001a03d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int\n-001a0400: 3c2f 7370 616e 3e20 6e73 5f5f 6765 7452 ns__getR\n-001a0410: 6174 6528 3c73 7061 6e20 636c 6173 733d ate(ch\n-001a0430: 6172 3c2f 7370 616e 3e20 2a63 6f75 6e74 ar *count\n-001a0440: 7279 312c 203c 7370 616e 2063 6c61 7373 ry1, c\n-001a0460: 6861 723c 2f73 7061 6e3e 202a 636f 756e har *coun\n-001a0470: 7472 7932 2c20 3c73 7061 6e20 636c 6173 try2, \n-001a0490: 666c 6f61 743c 2f73 7061 6e3e 2026 616d float &am\n-001a04a0: 703b 5265 7375 6c74 293b 203c 2f64 6976 p;Result); .
    .} \n-001a04e0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // namespa\n-001a0500: 6365 2072 6174 653c 2f73 7061 6e3e 3c2f ce rate.

    S\n-001a0530: 696d 696c 6172 2074 6f20 7468 6520 5175 imilar to the Qu\n-001a0540: 6f74 6520 6578 616d 706c 6520 6162 6f76 ote example abov\n-001a0550: 652c 2077 6520 6765 6e65 7261 7465 2073 e, we generate s\n-001a0560: 6f75 7263 6520 636f 6465 2075 7369 6e67 ource code using\n-001a0570: 206f 7074 696f 6e20 3c62 3e3c 636f 6465 option -n t\n-001a0590: 6f20 7072 6566 6978 2074 6865 2067 656e o prefix the gen\n-001a05a0: 6572 6174 6564 2066 696c 6573 2061 6e64 erated files and\n-001a05b0: 2074 6f20 7265 6e61 6d65 2074 6865 206e to rename the n\n-001a05c0: 616d 6573 7061 6365 2074 6162 6c65 2074 amespace table t\n-001a05d0: 6f20 6176 6f69 6420 6c69 6e6b 2063 6f6e o avoid link con\n-001a05e0: 666c 6963 7473 3a20 3c2f 703e 3c70 7265 flicts:

    soapcpp2 -n r\n-001a0610: 6174 652e 680a 3c2f 7072 653e 3c70 3e20 ate.h.

    \n-001a0620: 466f 7572 7468 2c20 7765 2075 7365 2074 Fourth, we use t\n-001a0630: 6865 2067 656e 6572 6174 6564 2073 6f75 he generated sou\n-001a0640: 7263 6520 636f 6465 206c 6962 7261 7269 rce code librari\n-001a0650: 6573 2077 6974 6820 7468 6520 6d61 696e es with the main\n-001a0660: 2070 726f 6772 616d 2e3c 2f70 3e0a 3c64 program.

    .
    #include "\n-001a06c0: 7175 6f74 6548 2e68 2e68 2671 756f 743b quoteH.h.h"\n-001a06d0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001a06f0: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl\n-001a0710: 7564 6520 2671 756f 743b 7261 7465 482e ude "rateH.\n-001a0720: 682e 6826 7175 6f74 3b3c 2f73 7061 6e3e h.h"\n-001a0730: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #include &qu\n-001a0770: 6f74 3b71 756f 7465 2e6e 736d 6170 2671 ot;quote.nsmap&q\n-001a0780: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;.
    #\n-001a07c0: 696e 636c 7564 6520 2671 756f 743b 7261 include "ra\n-001a07d0: 7465 2e6e 736d 6170 2671 756f 743b 3c2f te.nsmap"
    . <\n-001a0800: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int mai\n-001a0840: 6e28 3c73 7061 6e20 636c 6173 733d 226b n(int<\n-001a0860: 2f73 7061 6e3e 2061 7267 632c 203c 7370 /span> argc, char *argv[]) .
    {
    . \n-001a08d0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (argc <=\n-001a0900: 2031 2920 3c2f 6469 763e 0a3c 6469 7620 1)
    .
    {\n-001a0920: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    std\n-001a0940: 3a3a 6365 7272 2026 6c74 3b26 6c74 3b20 ::cerr << \n-001a0950: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-001a0970: 743b 5573 6167 653a 206d 6169 6e20 7469 t;Usage: main ti\n-001a0980: 636b 6572 205b 6375 7272 656e 6379 5d26 cker [currency]&\n-001a0990: 7175 6f74 3b3c 2f73 7061 6e3e 2026 6c74 quot; <\n-001a09a0: 3b26 6c74 3b20 7374 643a 3a65 6e64 6c20 ;< std::endl \n-001a09b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    exi\n-001a09d0: 7428 4558 4954 5f46 4149 4c55 5245 293b t(EXIT_FAILURE);\n-001a09e0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } .
    s\n-001a0a30: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap = \n-001a0aa0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_new();
    .
    <\n-001a0b20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a0b30: 6f72 6474 7970 6522 3e66 6c6f 6174 3c2f ordtype\">float q;
    .\n-001a0b50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .\n-001a0c30: 2020 3c73 7061 6e20 636c 6173 733d 226b if (soap_call\n-001a0c60: 5f6e 735f 5f67 6574 5175 6f74 6528 3c61 _ns__getQuote(soap, N\n-001a0ca0: 554c 4c2c 204e 554c 4c2c 2061 7267 765b ULL, NULL, argv[\n-001a0cb0: 315d 2c20 7129 2920 3c73 7061 6e20 636c 1], q)) //\n-001a0cd0: 2067 6574 2071 756f 7465 203c 2f73 7061 get quote
    ..
    \n-001a0ec0: 2020 3c73 7061 6e20 636c 6173 733d 226b floa\n-001a0ee0: 743c 2f73 7061 6e3e 2072 3b20 3c2f 6469 t r; .
    soap_set_names\n-001a0f70: 7061 6365 733c 2f61 3e28 3c61 2063 6c61 paces(soap, rate_\n-001a0fb0: 6e61 6d65 7370 6163 6573 293b 203c 2f64 namespaces); .
    if \n-001a1000: 2873 6f61 705f 6361 6c6c 5f6e 735f 5f67 (soap_call_ns__g\n-001a1010: 6574 5261 7465 283c 6120 636c 6173 733d etRate(so\n-001a1040: 6170 3c2f 613e 2c20 4e55 4c4c 2c20 4e55 ap, NULL, NU\n-001a1050: 4c4c 2c20 3c73 7061 6e20 636c 6173 733d LL, \n-001a1070: 2671 756f 743b 7573 2671 756f 743b 3c2f "us", argv[2], \n-001a1090: 7229 2920 3c73 7061 6e20 636c 6173 733d r)) // get\n-001a10b0: 2072 6174 6520 696e 2055 5320 646f 6c6c rate in US doll\n-001a10c0: 6172 7320 3c2f 7370 616e 3e3c 2f64 6976 ars .
    s\n-001a1140: 6f61 705f 7072 696e 745f 6661 756c 743c oap_print_fault<\n-001a1150: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n-001a1180: 2f61 3e2c 2073 7464 6572 7229 3b20 3c2f /a>, stderr); .
    else
    .
    \n-001a11f0: 2020 2020 7120 2a3d 2072 3b20 3c73 7061 q *= r; // convert the\n-001a1220: 2071 756f 7465 203c 2f73 7061 6e3e 3c2f quote .
    } .
    std::c\n-001a1270: 6f75 7420 266c 743b 266c 743b 2061 7267 out << arg\n-001a1280: 765b 315d 2026 6c74 3b26 6c74 3b20 3c73 v[1] << "\n-001a12b0: 3a20 2671 756f 743b 3c2f 7370 616e 3e20 : " \n-001a12c0: 266c 743b 266c 743b 2071 2026 6c74 3b26 << q <&\n-001a12d0: 6c74 3b20 7374 643a 3a65 6e64 6c3b 203c lt; std::endl; <\n-001a12e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } .
    soap\n-001a1370: 5f64 6573 7472 6f79 3c2f 613e 283c 6120 _destroy(soap);.
    so\n-001a1420: 6170 5f65 6e64 3c2f 613e 283c 6120 636c ap_end(soap);.
    soap\n-001a14d0: 5f66 7265 653c 2f61 3e28 3c61 2063 6c61 _free(soap);.
    \n-001a1540: 7265 7475 726e 3c2f 7370 616e 3e20 303b return 0;\n-001a1550: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    }.

    Comp\n-001a1590: 696c 6520 616e 6420 6c69 6e6b 2074 6869 ile and link thi\n-001a15a0: 7320 6170 706c 6963 6174 696f 6e20 7769 s application wi\n-001a15b0: 7468 203c 656d 3e3c 636f 6465 3e73 7464 th std\n-001a15c0: 736f 6170 322e 6f3c 2f63 6f64 653e 3c2f soap2.o, e\n-001a15e0: 6e76 432e 6f3c 2f63 6f64 653e 3c2f 656d nvC.o, quo\n-001a1600: 7465 5365 7276 6572 5072 6f78 792e 6f3c teServerProxy.o<\n-001a1610: 2f63 6f64 653e 3c2f 656d 3e2c 2061 6e64 /code>, and\n-001a1620: 203c 656d 3e3c 636f 6465 3e72 6174 6553 rateS\n-001a1630: 6572 7665 7250 726f 7879 2e6f 3c2f 636f erverProxy.o.

    .Instead of the \n-001a1660: 6765 6e65 7261 7465 6420 3c63 6f64 653e generated \n-001a1670: 736f 6170 5f63 616c 6c5f 7765 626d 6574 soap_call_webmet\n-001a1680: 686f 643c 2f63 6f64 653e 2073 7475 6220 hod stub \n-001a1690: 6675 6e63 7469 6f6e 7320 796f 7520 6361 functions you ca\n-001a16a0: 6e20 616c 736f 2075 7365 203c 623e 3c63 n also use soapcpp2 -j<\n-001a16c0: 2f63 6f64 653e 3c2f 623e 206f 7074 696f /code> optio\n-001a16d0: 6e20 3c62 3e3c 636f 6465 3e2d 6a3c 2f63 n -j or opti\n-001a16f0: 6f6e 203c 623e 3c63 6f64 653e 2d69 3c2f on -i to gen\n-001a1710: 6572 6174 6520 432b 2b20 7072 6f78 7920 erate C++ proxy \n-001a1720: 636c 6173 7365 732e 3c2f 703e 0a3c 703e classes.

    .

    \n-001a1730: 546f 2063 6f6d 7069 6c65 2073 6572 7665 To compile serve\n-001a1740: 7220 6973 2076 6572 7920 7369 6d69 6c61 r is very simila\n-001a1750: 722e 2046 6f72 2065 7861 6d70 6c65 2c20 r. For example, \n-001a1760: 6173 7375 6d65 2074 6861 7420 7765 206e assume that we n\n-001a1770: 6565 6420 746f 2069 6d70 6c65 6d65 6e74 eed to implement\n-001a1780: 2061 2063 616c 6375 6c61 746f 7220 7365 a calculator se\n-001a1790: 7276 6963 6520 616e 6420 7765 2077 616e rvice and we wan\n-001a17a0: 7420 746f 2063 7265 6174 6520 6120 6c69 t to create a li\n-001a17b0: 6272 6172 7920 666f 7220 6974 2e3c 2f70 brary for it..

    \n-001a1800: 6e61 6d65 7370 6163 6520 3c2f 7370 616e namespace calc {
    .\n-001a1830: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-001a1860: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n-001a1870: 6365 206e 616d 653a 2043 616c 6320 3c2f ce name: Calc
    .//gsoap ns s\n-001a18c0: 6572 7669 6365 2073 7479 6c65 3a20 7270 ervice style: rp\n-001a18d0: 6320 3c2f 7370 616e 3e3c 2f64 6976 3e0a c
    .\n-001a18e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n-001a1910: 6e73 2073 6572 7669 6365 2065 6e63 6f64 ns service encod\n-001a1920: 696e 673a 2065 6e63 6f64 6564 203c 2f73 ing: encoded
    .
    //gsoap ns se\n-001a1970: 7276 6963 6520 6c6f 6361 7469 6f6e 3a20 rvice location: \n-001a1980: 6874 7470 3a2f 2f77 7777 2e63 732e 6673 http://www.cs.fs\n-001a1990: 752e 6564 752f 7e65 6e67 656c 656e 2f63 u.edu/~engelen/c\n-001a19a0: 616c 632e 6367 6920 3c2f 7370 616e 3e3c alc.cgi <\n-001a19b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n-001a19e0: 6773 6f61 7020 6e73 2073 6368 656d 6120 gsoap ns schema \n-001a19f0: 6e61 6d65 7370 6163 653a 2075 726e 3a63 namespace: urn:c\n-001a1a00: 616c 6320 3c2f 7370 616e 3e3c 2f64 6976 alc .
    in\n-001a1a40: 743c 2f73 7061 6e3e 206e 735f 5f61 6464 t ns__add\n-001a1a50: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (doubl\n-001a1a70: 653c 2f73 7061 6e3e 2061 2c20 3c73 7061 e a, double b, double &\n-001a1ad0: 616d 703b 7265 7375 6c74 293b 203c 2f64 amp;result); .
    \n-001a1b10: 696e 743c 2f73 7061 6e3e 206e 735f 5f73 int ns__s\n-001a1b20: 7562 283c 7370 616e 2063 6c61 7373 3d22 ub(dou\n-001a1b40: 626c 653c 2f73 7061 6e3e 2061 2c20 3c73 ble a, double b, double\n-001a1ba0: 2026 616d 703b 7265 7375 6c74 293b 203c &result); <\n-001a1bb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int ns_\n-001a1bf0: 5f6d 756c 283c 7370 616e 2063 6c61 7373 _mul(d\n-001a1c10: 6f75 626c 653c 2f73 7061 6e3e 2061 2c20 ouble a, \n-001a1c20: 3c73 7061 6e20 636c 6173 733d 226b 6579 double\n-001a1c40: 3c2f 7370 616e 3e20 622c 203c 7370 616e b, double &result);\n-001a1c80: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int n\n-001a1cc0: 735f 5f64 6976 283c 7370 616e 2063 6c61 s__div(double a\n-001a1cf0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , doub\n-001a1d10: 6c65 3c2f 7370 616e 3e20 622c 203c 7370 le b, double &result\n-001a1d50: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    .
    } //\n-001a1da0: 206e 616d 6573 7061 6365 2063 616c 633c namespace calc<\n-001a1db0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 2f64 /span>
    .

    We genera\n-001a1de0: 7465 2063 6f64 653a 203c 2f70 3e3c 7072 te code:

    soapcpp2 -j \n-001a1e10: 2d6e 2063 616c 632e 680a 3c2f 7072 653e -n calc.h.\n-001a1e20: 3c70 3e20 4865 7265 2077 6520 7573 6564

    Here we used\n-001a1e30: 206f 7074 696f 6e20 3c62 3e3c 636f 6465 option -j t\n-001a1e50: 6f20 6765 6e65 7261 7465 2061 2043 2b2b o generate a C++\n-001a1e60: 2073 6572 7669 6365 2063 6c61 7373 203c service class <\n-001a1e70: 656d 3e3c 636f 6465 3e63 616c 6343 616c em>calcCal\n-001a1e80: 6353 6572 7669 6365 2e68 3c2f 636f 6465 cService.h and <\n-001a1ea0: 636f 6465 3e63 616c 6343 616c 6353 6572 code>calcCalcSer\n-001a1eb0: 7669 6365 2e63 7070 3c2f 636f 6465 3e3c vice.cpp<\n-001a1ec0: 2f65 6d3e 2e20 5468 6520 6566 6665 6374 /em>. The effect\n-001a1ed0: 206f 6620 7468 6520 3c62 3e3c 636f 6465 of the -n o\n-001a1ef0: 7074 696f 6e20 6973 2074 6861 7420 6974 ption is that it\n-001a1f00: 2063 7265 6174 6573 206c 6f63 616c 206e creates local n\n-001a1f10: 616d 6573 7061 6365 2074 6162 6c65 7320 amespace tables \n-001a1f20: 616e 6420 7573 6573 203c 656d 3e3c 636f and uses calc to prefix th\n-001a1f50: 6520 6765 6e65 7261 7465 6420 6669 6c65 e generated file\n-001a1f60: 732e 3c2f 703e 0a3c 6469 7620 636c 6173 s.

    .
    <\n-001a1f90: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n-001a1fa0: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n-001a1fb0: 6465 2026 7175 6f74 3b63 616c 6343 616c de "calcCal\n-001a1fc0: 6353 6572 7669 6365 2e68 2671 756f 743b cService.h"\n-001a1fd0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001a1ff0: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl\n-001a2010: 7564 6520 2671 756f 743b 6361 6c63 2e6e ude "calc.n\n-001a2020: 736d 6170 2671 756f 743b 3c2f 7370 616e smap"
    .
    .
    in\n-001a2080: 743c 2f73 7061 6e3e 206d 6169 6e28 293c t main()<\n-001a2090: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n-001a20b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    calc::Calc c\n-001a20d0: 616c 633b 203c 2f64 6976 3e0a 3c64 6976 alc;
    . \n-001a20f0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... //
    .
    ca\n-001a2130: 6c63 2e73 6572 7665 2829 3b20 3c73 7061 lc.serve(); // calls reque\n-001a2160: 7374 2064 6973 7061 7463 6865 7220 746f st dispatcher to\n-001a2170: 2069 6e76 6f6b 6520 6f6e 6520 6f66 2074 invoke one of t\n-001a2180: 6865 2066 756e 6374 696f 6e73 2062 656c he functions bel\n-001a2190: 6f77 203c 2f73 7061 6e3e 3c2f 6469 763e ow
    \n-001a21a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... /\n-001a21d0: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .<\n-001a21e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a21f0: 3e7d 3c2f 6469 763e 0a3c 6469 7620 636c >}
    .
    .
    i\n-001a2240: 6e74 3c2f 7370 616e 3e20 6361 6c63 3a3a nt calc::\n-001a2250: 4361 6c63 3a3a 6164 6428 3c73 7061 6e20 Calc::add(double a, d\n-001a22a0: 6f75 626c 653c 2f73 7061 6e3e 2062 2c20 ouble b, \n-001a22b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 double\n-001a22d0: 3c2f 7370 616e 3e20 2661 6d70 3b72 6573 &res\n-001a22e0: 756c 7429 3c2f 6469 763e 0a3c 6469 7620 ult)
    .
    {.
    result \n-001a2320: 3d20 6120 2b20 623b 3c2f 6469 763e 0a3c = a + b;
    .<\n-001a2330: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a2340: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret\n-001a2360: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn S\n-001a23c0: 4f41 505f 4f4b 3c2f 613e 3b3c 2f64 6976 OAP_OK;.
    }
    . \n-001a2400: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ca\n-001a2440: 6c63 3a3a 4361 6c63 3a3a 7375 6228 3c73 lc::Calc::sub(double a, double\n-001a24a0: 2062 2c20 3c73 7061 6e20 636c 6173 733d b, do\n-001a24c0: 7562 6c65 3c2f 7370 616e 3e20 2661 6d70 uble &\n-001a24d0: 3b72 6573 756c 7429 3c2f 6469 763e 0a3c ;result)
    .<\n-001a24e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a24f0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    res\n-001a2510: 756c 7420 3d20 6120 2d20 623b 3c2f 6469 ult = a - b;.
    return <\n-001a2560: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a2570: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001a2580: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g\n-001a2590: 6133 6231 3061 3638 6633 3534 6633 3963 a3b10a68f354f39c\n-001a25a0: 6262 3066 6530 6430 3433 6164 3463 3763 bb0fe0d043ad4c7c\n-001a25b0: 3022 3e53 4f41 505f 4f4b 3c2f 613e 3b3c 0\">SOAP_OK;<\n-001a25c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    \n-001a25e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    int calc::Calc::mu\n-001a2640: 6c28 3c73 7061 6e20 636c 6173 733d 226b l(doub\n-001a2660: 6c65 3c2f 7370 616e 3e20 612c 203c 7370 le a, double b, double \n-001a26c0: 2661 6d70 3b72 6573 756c 7429 3c2f 6469 &result).
    {
    . \n-001a2700: 2072 6573 756c 7420 3d20 6120 2a20 623b result = a * b;\n-001a2710: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return SOAP_OK;
    .
    } .
    .<\n-001a27f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a2800: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int calc::Calc\n-001a2830: 3a3a 6469 7628 3c73 7061 6e20 636c 6173 ::div(\n-001a2850: 646f 7562 6c65 3c2f 7370 616e 3e20 612c double a,\n-001a2860: 203c 7370 616e 2063 6c61 7373 3d22 6b65 doubl\n-001a2880: 653c 2f73 7061 6e3e 2062 2c20 3c73 7061 e b, double &result)\n-001a28c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-001a28e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    result = a \n-001a2900: 2f20 623b 3c2f 6469 763e 0a3c 6469 7620 / b;
    .
    .\n-001a29c0: 7d20 3c2f 6469 763e 0a3c 2f64 6976 3e3c }
    .
    <\n-001a29d0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-001a29e0: 3c70 3e54 6865 2065 7861 6d70 6c65 2061

    The example a\n-001a29f0: 626f 7665 2073 6572 7665 7320 7265 7175 bove serves requ\n-001a2a00: 6573 7473 206f 7665 7220 7374 6469 6e2f ests over stdin/\n-001a2a10: 6f75 742e 2055 7365 2074 6865 2062 696e out. Use the bin\n-001a2a20: 6420 616e 6420 6163 6365 7074 2063 616c d and accept cal\n-001a2a30: 6c73 2074 6f20 6372 6561 7465 2061 2073 ls to create a s\n-001a2a40: 7461 6e64 2d61 6c6f 6e65 2073 6572 7665 tand-alone serve\n-001a2a50: 7220 746f 2073 6572 7669 6365 2069 6e62 r to service inb\n-001a2a60: 6f75 6e64 2072 6571 7565 7374 7320 6f76 ound requests ov\n-001a2a70: 6572 2073 6f63 6b65 7473 2c20 7365 6520 er sockets, see \n-001a2a80: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section How to creat\n-001a2ac0: 6520 6120 7374 616e 642d 616c 6f6e 6520 e a stand-alone \n-001a2ad0: 7365 7276 6572 3c2f 613e 202e 3c2f 703e server .

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

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

    .

    \n-001a2b40: 0a43 2065 7861 6d70 6c65 733c 2f68 333e .C examples

    \n-001a2b50: 0a3c 703e 5468 6973 2069 7320 7468 6520 .

    This is the \n-001a2b60: 7361 6d65 2065 7861 6d70 6c65 2061 7320 same example as \n-001a2b70: 6162 6f76 652c 2062 7574 2074 6865 2063 above, but the c\n-001a2b80: 6c69 656e 7473 2061 7265 2062 7569 6c64 lients are build\n-001a2b90: 2069 6e20 432e 3c2f 703e 0a3c 703e 5765 in C.

    .

    We\n-001a2ba0: 2063 7265 6174 6520 6120 3c65 6d3e 3c63 create a env.h\n-001a2bc0: 3c2f 656d 3e20 7468 6174 2063 6f6e 7461 that conta\n-001a2bd0: 696e 7320 7468 6520 6a6f 696e 7420 534f ins the joint SO\n-001a2be0: 4150 2048 6561 6465 7220 616e 6420 534f AP Header and SO\n-001a2bf0: 4150 2046 6175 6c74 2064 6566 696e 6974 AP Fault definit\n-001a2c00: 696f 6e73 2e20 596f 7520 6d61 7920 6861 ions. You may ha\n-001a2c10: 7665 2074 6f20 636f 7079 2d70 6173 7465 ve to copy-paste\n-001a2c20: 2074 6865 7365 2066 726f 6d20 7468 6520 these from the \n-001a2c30: 6f74 6865 7220 6865 6164 6572 2066 696c other header fil\n-001a2c40: 6573 2e20 5468 656e 2c20 636f 6d70 696c es. Then, compil\n-001a2c50: 6520 6974 2061 7320 666f 6c6c 6f77 733a e it as follows:\n-001a2c60: 203c 2f70 3e3c 7072 6520 636c 6173 733d

     soap\n-001a2c80: 6370 7032 202d 6320 2d70 656e 7620 656e  cpp2 -c -penv en\n-001a2c90: 762e 680a 2063 6320 2d63 2065 6e76 432e  v.h. cc -c envC.\n-001a2ca0: 630a 3c2f 7072 653e 3c70 3e20 5765 2061  c.

    We a\n-001a2cb0: 6c73 6f20 636f 6d70 696c 6520 3c65 6d3e lso compile \n-001a2cc0: 3c63 6f64 653e 6773 6f61 702f 7374 6473 gsoap/stds\n-001a2cd0: 6f61 7032 2e63 3c2f 636f 6465 3e3c 2f65 oap2.c without names\n-001a2cf0: 7061 6365 733a 203c 2f70 3e3c 7072 6520 paces:

     cc -c -DWITH_N\n-001a2d20: 4f4e 414d 4553 5041 4345 5320 7374 6473  ONAMESPACES stds\n-001a2d30: 6f61 7032 2e63 0a3c 2f70 7265 3e3c 703e  oap2.c.

    \n-001a2d40: 2053 6563 6f6e 642c 2077 6520 6372 6561 Second, we crea\n-001a2d50: 7465 2074 6865 2044 656c 6179 6564 2053 te the Delayed S\n-001a2d60: 746f 636b 2051 756f 7465 2068 6561 6465 tock Quote heade\n-001a2d70: 7220 6669 6c65 2073 7065 6369 6669 6361 r file specifica\n-001a2d80: 7469 6f6e 2c20 7768 6963 6820 6d61 7920 tion, which may \n-001a2d90: 6265 206f 6274 6169 6e65 6420 7573 696e be obtained usin\n-001a2da0: 6720 7468 6520 5753 444c 2069 6d70 6f72 g the WSDL impor\n-001a2db0: 7465 722e 3c2f 703e 0a3c 6469 7620 636c ter.

    .
    <\n-001a2dd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a2de0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n-001a2e00: 7320 7365 7276 6963 6520 6e61 6d65 3a20 s service name: \n-001a2e10: 5365 7276 6963 6520 3c2f 7370 616e 3e3c Service <\n-001a2e20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n-001a2e50: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n-001a2e60: 2073 7479 6c65 3a20 7270 6320 3c2f 7370 style: rpc
    .
    //gsoap ns ser\n-001a2eb0: 7669 6365 2065 6e63 6f64 696e 673a 2065 vice encoding: e\n-001a2ec0: 6e63 6f64 6564 203c 2f73 7061 6e3e 3c2f ncoded .
    //g\n-001a2f00: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service \n-001a2f10: 6c6f 6361 7469 6f6e 3a20 6874 7470 3a2f location: http:/\n-001a2f20: 2f73 6572 7669 6365 732e 786d 6574 686f /services.xmetho\n-001a2f30: 6473 2e6e 6574 2f73 6f61 7020 3c2f 7370 ds.net/soap
    .
    //gsoap ns sch\n-001a2f80: 656d 6120 6e61 6d65 7370 6163 653a 2075 ema namespace: u\n-001a2f90: 726e 3a78 6d65 7468 6f64 732d 6465 6c61 rn:xmethods-dela\n-001a2fa0: 7965 642d 7175 6f74 6573 203c 2f73 7061 yed-quotes
    .
    //gsoap ns serv\n-001a2ff0: 6963 6520 6d65 7468 6f64 2d61 6374 696f ice method-actio\n-001a3000: 6e3a 2067 6574 5175 6f74 6520 2671 756f n: getQuote &quo\n-001a3010: 743b 2671 756f 743b 203c 2f73 7061 6e3e t;" \n-001a3020: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ns\n-001a3060: 5f5f 6765 7451 756f 7465 283c 7370 616e __getQuote(char\n-001a3090: 202a 7379 6d62 6f6c 2c20 3c73 7061 6e20 *symbol, float\n-001a30c0: 202a 5265 7375 6c74 293b 3c2f 6469 763e *Result);
    \n-001a30d0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    We co\n-001a30f0: 6d70 696c 6520 6974 2061 7320 6120 6c69 mpile it as a li\n-001a3100: 6272 6172 7920 616e 6420 7765 2075 7365 brary and we use\n-001a3110: 206f 7074 696f 6e73 203c 623e 3c63 6f64 options -n \n-001a3130: 616e 6420 3c62 3e3c 636f 6465 3e2d 7071 and -pq\n-001a3140: 756f 7465 3c2f 636f 6465 3e3c 2f62 3e20 uote \n-001a3150: 746f 2070 7265 6669 7820 7468 6520 6765 to prefix the ge\n-001a3160: 6e65 7261 7465 6420 6669 6c65 7320 616e nerated files an\n-001a3170: 6420 746f 2072 656e 616d 6520 7468 6520 d to rename the \n-001a3180: 6e61 6d65 7370 6163 6520 7461 626c 6520 namespace table \n-001a3190: 746f 2061 766f 6964 206c 696e 6b20 636f to avoid link co\n-001a31a0: 6e66 6c69 6374 733a 203c 2f70 3e3c 7072 nflicts:

    soapcpp2 -c \n-001a31d0: 2d6e 202d 7071 756f 7465 2071 756f 7465 -n -pquote quote\n-001a31e0: 2e68 0a20 6363 202d 6320 7175 6f74 6543 .h. cc -c quoteC\n-001a31f0: 6c69 656e 744c 6962 2e63 0a3c 2f70 7265 lientLib.c.

    Third, we c\n-001a3210: 7265 6174 6520 7468 6520 4375 7272 656e reate the Curren\n-001a3220: 6379 2045 7863 6861 6e67 6520 5261 7465 cy Exchange Rate\n-001a3230: 2068 6561 6465 7220 6669 6c65 2073 7065 header file spe\n-001a3240: 6369 6669 6361 7469 6f6e 3a3c 2f70 3e0a cification:

    .\n-001a3250: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    //\n-001a3290: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n-001a32a0: 206e 616d 653a 2053 6572 7669 6365 203c name: Service <\n-001a32b0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-001a32d0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001a32e0: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n-001a32f0: 7365 7276 6963 6520 7374 796c 653a 2072 service style: r\n-001a3300: 7063 203c 2f73 7061 6e3e 3c2f 6469 763e pc
    \n-001a3310: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n-001a3340: 206e 7320 7365 7276 6963 6520 656e 636f ns service enco\n-001a3350: 6469 6e67 3a20 656e 636f 6465 6420 3c2f ding: encoded
    .//gsoap ns s\n-001a33a0: 6572 7669 6365 206c 6f63 6174 696f 6e3a ervice location:\n-001a33b0: 2068 7474 703a 2f2f 7365 7276 6963 6573 http://services\n-001a33c0: 2e78 6d65 7468 6f64 732e 6e65 742f 736f .xmethods.net/so\n-001a33d0: 6170 203c 2f73 7061 6e3e 3c2f 6469 763e ap
    \n-001a33e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n-001a3410: 206e 7320 7363 6865 6d61 206e 616d 6573 ns schema names\n-001a3420: 7061 6365 3a20 7572 6e3a 786d 6574 686f pace: urn:xmetho\n-001a3430: 6473 2d43 7572 7265 6e63 7945 7863 6861 ds-CurrencyExcha\n-001a3440: 6e67 6520 3c2f 7370 616e 3e3c 2f64 6976 nge .
    //gsoa\n-001a3480: 7020 6e73 2073 6572 7669 6365 206d 6574 p ns service met\n-001a3490: 686f 642d 6163 7469 6f6e 3a20 6765 7452 hod-action: getR\n-001a34a0: 6174 6520 2671 756f 743b 2671 756f 743b ate ""\n-001a34b0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-001a34c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a34d0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int ns__getRat\n-001a3500: 6528 3c73 7061 6e20 636c 6173 733d 226b e(char\n-001a3520: 3c2f 7370 616e 3e20 2a63 6f75 6e74 7279 *country\n-001a3530: 312c 203c 7370 616e 2063 6c61 7373 3d22 1, cha\n-001a3550: 723c 2f73 7061 6e3e 202a 636f 756e 7472 r *countr\n-001a3560: 7932 2c20 3c73 7061 6e20 636c 6173 733d y2, fl\n-001a3580: 6f61 743c 2f73 7061 6e3e 202a 5265 7375 oat *Resu\n-001a3590: 6c74 293b 3c2f 6469 763e 0a3c 2f64 6976 lt);
    .

    Compile \n-001a45a0: 616e 6420 6c69 6e6b 2074 6869 7320 6170 and link this ap\n-001a45b0: 706c 6963 6174 696f 6e20 7769 7468 203c plication with <\n-001a45c0: 656d 3e3c 636f 6465 3e73 7464 736f 6170 em>stdsoap\n-001a45d0: 322e 6f3c 2f63 6f64 653e 3c2f 656d 3e2c 2.o,\n-001a45e0: 203c 656d 3e3c 636f 6465 3e65 6e76 432e envC.\n-001a45f0: 6f3c 2f63 6f64 653e 3c2f 656d 3e2c 203c o, <\n-001a4600: 656d 3e3c 636f 6465 3e71 756f 7465 436c em>quoteCl\n-001a4610: 6965 6e74 4c69 622e 6f3c 2f63 6f64 653e ientLib.o\n-001a4620: 3c2f 656d 3e2c 2061 6e64 203c 656d 3e3c , and <\n-001a4630: 636f 6465 3e72 6174 6543 6c69 656e 744c code>rateClientL\n-001a4640: 6962 2e6f 3c2f 636f 6465 3e3c 2f65 6d3e ib.o\n-001a4650: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

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

    .

    \n-001a4690: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .How to cha\n-001a46c0: 696e 2043 2073 6572 7669 6365 7320 746f in C services to\n-001a46d0: 2061 6363 6570 7420 6d65 7373 6167 6573 accept messages\n-001a46e0: 206f 6e20 7468 6520 7361 6d65 2070 6f72 on the same por\n-001a46f0: 743c 2f68 333e 0a3c 703e 5768 656e 2063 t

    .

    When c\n-001a4700: 6f6d 6269 6e69 6e67 206d 756c 7469 706c ombining multipl\n-001a4710: 6520 7365 7276 6963 6573 2069 6e74 6f20 e services into \n-001a4720: 6f6e 6520 6170 706c 6963 6174 696f 6e2c one application,\n-001a4730: 2079 6f75 2063 616e 2072 756e 2077 7364 you can run wsd\n-001a4740: 6c32 6820 6f6e 206d 756c 7469 706c 6520 l2h on multiple \n-001a4750: 5753 444c 7320 746f 2067 656e 6572 6174 WSDLs to generat\n-001a4760: 6520 7468 6520 7369 6e67 6c65 2061 6c6c e the single all\n-001a4770: 2d69 6e63 6c75 7369 7665 2073 6572 7669 -inclusive servi\n-001a4780: 6365 2064 6566 696e 6974 696f 6e73 2069 ce definitions i\n-001a4790: 6e74 6572 6661 6365 2068 6561 6465 7220 nterface header \n-001a47a0: 6669 6c65 2066 6f72 2073 6f61 7063 7070 file for soapcpp\n-001a47b0: 322e 2054 6869 7320 6865 6164 6572 2066 2. This header f\n-001a47c0: 696c 6520 6973 2074 6865 6e20 7072 6f63 ile is then proc\n-001a47d0: 6573 7365 6420 7769 7468 2073 6f61 7063 essed with soapc\n-001a47e0: 7070 3220 746f 2067 656e 6572 6174 6520 pp2 to generate \n-001a47f0: 736b 656c 6574 6f6e 2066 756e 6374 696f skeleton functio\n-001a4800: 6e73 2069 6e20 432e 3c2f 703e 0a3c 703e ns in C.

    .

    \n-001a4810: 5768 6174 2069 6620 7765 2067 656e 6572 What if we gener\n-001a4820: 6174 6520 6d75 6c74 6970 6c65 2073 6572 ate multiple ser\n-001a4830: 7669 6365 732c 2065 6163 6820 6672 6f6d vices, each from\n-001a4840: 2061 2057 5344 4c20 7365 7061 7261 7465 a WSDL separate\n-001a4850: 6c79 2c20 616e 6420 7761 6e74 2074 6f20 ly, and want to \n-001a4860: 6465 706c 6f79 2074 6865 6d20 6f6e 2074 deploy them on t\n-001a4870: 6865 2073 616d 6520 706f 7274 3f20 5468 he same port? Th\n-001a4880: 6973 2072 6571 7569 7265 7320 6c69 7374 is requires list\n-001a4890: 656e 696e 6720 746f 2074 6865 2073 616d ening to the sam\n-001a48a0: 6520 706f 7274 2061 6e64 2074 6865 6e20 e port and then \n-001a48b0: 6368 6169 6e69 6e67 2074 6865 2073 6572 chaining the ser\n-001a48c0: 7669 6365 2064 6973 7061 7463 6865 7320 vice dispatches \n-001a48d0: 736f 2074 6861 7420 6561 6368 2073 6572 so that each ser\n-001a48e0: 7669 6365 2063 616e 2073 6572 7665 2061 vice can serve a\n-001a48f0: 2072 6571 7565 7374 2e3c 2f70 3e0a 3c70 request.

    .First we create\n-001a4910: 2061 203c 656d 3e3c 636f 6465 3e65 6e76 a env\n-001a4920: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2074 .h t\n-001a4930: 6861 7420 636f 6e74 6169 6e73 2074 6865 hat contains the\n-001a4940: 206a 6f69 6e74 2053 4f41 5020 4865 6164 joint SOAP Head\n-001a4950: 6572 2061 6e64 2053 4f41 5020 4661 756c er and SOAP Faul\n-001a4960: 7420 6465 6669 6e69 7469 6f6e 732c 2066 t definitions, f\n-001a4970: 6f72 2065 7861 6d70 6c65 2062 7920 636f or example by co\n-001a4980: 7079 2d70 6173 7469 6e67 2074 6865 7365 py-pasting these\n-001a4990: 2066 726f 6d20 7468 6520 6f74 6865 7220 from the other \n-001a49a0: 6865 6164 6572 2066 696c 6573 2067 656e header files gen\n-001a49b0: 6572 6174 6564 2062 7920 7773 646c 3268 erated by wsdl2h\n-001a49c0: 2e20 4f72 2074 6869 7320 6669 6c65 2069 . Or this file i\n-001a49d0: 7320 656d 7074 7920 6966 206e 6f20 7370 s empty if no sp\n-001a49e0: 6563 6961 6c69 7a65 6420 534f 4150 2048 ecialized SOAP H\n-001a49f0: 6561 6465 7273 2061 6e64 2046 6175 6c74 eaders and Fault\n-001a4a00: 7320 6172 6520 7573 6564 2e20 5765 2063 s are used. We c\n-001a4a10: 6f6d 7069 6c65 2069 7420 6173 2066 6f6c ompile it as fol\n-001a4a20: 6c6f 7773 3a20 3c2f 703e 3c70 7265 2063 lows:

    \n-001a4a40: 2073 6f61 7063 7070 3220 2d63 202d 7065   soapcpp2 -c -pe\n-001a4a50: 6e76 2065 6e76 2e68 0a20 6363 202d 6320  nv env.h. cc -c \n-001a4a60: 656e 7643 2e63 0a3c 2f70 7265 3e3c 703e  envC.c.

    \n-001a4a70: 2057 6520 616c 736f 2063 6f6d 7069 6c65 We also compile\n-001a4a80: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n-001a4a90: 2f73 7464 736f 6170 322e 633c 2f63 6f64 /stdsoap2.c without \n-001a4ab0: 6e61 6d65 7370 6163 6573 3a20 3c2f 703e namespaces:

    \n-001a4ac0: 3c70 7265 2063 6c61 7373 3d22 6672 6167
     cc -c -DW\n-001a4ae0: 4954 485f 4e4f 4e41 4d45 5350 4143 4553  ITH_NONAMESPACES\n-001a4af0: 2073 7464 736f 6170 322e 630a 3c2f 7072   stdsoap2.c.

    Say for ex\n-001a4b10: 616d 706c 6520 7468 6174 2077 6520 6861 ample that we ha\n-001a4b20: 7665 2061 2073 6572 7669 6365 2064 6566 ve a service def\n-001a4b30: 696e 6974 696f 6e20 696e 203c 656d 3e3c inition in <\n-001a4b40: 636f 6465 3e71 756f 7465 2e68 3c2f 636f code>quote.h. We com\n-001a4b60: 7069 6c65 2069 7420 6173 2061 206c 6962 pile it as a lib\n-001a4b70: 7261 7279 2061 6e64 2077 6520 7573 6520 rary and we use \n-001a4b80: 6f70 7469 6f6e 7320 3c62 3e3c 636f 6465 options -n a\n-001a4ba0: 6e64 203c 623e 3c63 6f64 653e 2d70 7175 nd -pqu\n-001a4bb0: 6f74 653c 2f63 6f64 653e 3c2f 623e 2074 ote t\n-001a4bc0: 6f20 7072 6566 6978 2074 6865 2067 656e o prefix the gen\n-001a4bd0: 6572 6174 6564 2066 696c 6573 2061 6e64 erated files and\n-001a4be0: 2074 6f20 7265 6e61 6d65 2074 6865 206e to rename the n\n-001a4bf0: 616d 6573 7061 6365 2074 6162 6c65 2074 amespace table t\n-001a4c00: 6f20 6176 6f69 6420 6c69 6e6b 2063 6f6e o avoid link con\n-001a4c10: 666c 6963 7473 3a20 3c2f 703e 3c70 7265 flicts:

    soapcpp2 -c -\n-001a4c40: 6e20 2d70 7175 6f74 6520 7175 6f74 652e n -pquote quote.\n-001a4c50: 680a 2063 6320 2d63 2071 756f 7465 436c h. cc -c quoteCl\n-001a4c60: 6965 6e74 4c69 622e 630a 3c2f 7072 653e ientLib.c.
    \n-001a4c70: 3c70 3e20 5765 2064 6f20 7468 6520 7361

    We do the sa\n-001a4c80: 6d65 2066 6f72 2061 2073 6572 7669 6365 me for a service\n-001a4c90: 2064 6566 696e 6974 696f 6e20 696e 203c definition in <\n-001a4ca0: 656d 3e3c 636f 6465 3e72 6174 652e 683c em>rate.h<\n-001a4cb0: 2f63 6f64 653e 3c2f 656d 3e3a 203c 2f70 /code>:

     soapcpp2\n-001a4ce0: 202d 6320 2d6e 202d 7072 6174 6520 7261   -c -n -prate ra\n-001a4cf0: 7465 2e68 0a20 6363 202d 6320 7261 7465  te.h. cc -c rate\n-001a4d00: 436c 6965 6e74 4c69 622e 630a 3c2f 7072  ClientLib.c.

    To serve b\n-001a4d20: 6f74 6820 7468 6520 7175 6f74 6520 616e oth the quote an\n-001a4d30: 6420 7261 7465 2073 6572 7669 6365 7320 d rate services \n-001a4d40: 6f6e 2074 6865 2073 616d 6520 706f 7274 on the same port\n-001a4d50: 2c20 7765 2063 6861 696e 2074 6865 2073 , we chain the s\n-001a4d60: 6572 7669 6365 2064 6973 7061 7463 6865 ervice dispatche\n-001a4d70: 7273 2061 7320 666f 6c6c 6f77 733a 3c2f rs as follows:.

    #include &\n-001a4dd0: 7175 6f74 3b71 756f 7465 482e 6826 7175 quot;quoteH.h&qu\n-001a4de0: 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 763e ot;
    \n-001a4df0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    #i\n-001a4e20: 6e63 6c75 6465 2026 7175 6f74 3b72 6174 nclude "rat\n-001a4e30: 6548 2e68 2671 756f 743b 3c2f 7370 616e eH.h"
    .
    #include &q\n-001a4e80: 756f 743b 7175 6f74 652e 6e73 6d61 7026 uot;quote.nsmap&\n-001a4e90: 7175 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 quot;.
    \n-001a4ed0: 2369 6e63 6c75 6465 2026 7175 6f74 3b72 #include "r\n-001a4ee0: 6174 652e 6e73 6d61 7026 7175 6f74 3b3c ate.nsmap"<\n-001a4ef0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-001a4f10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s\n-001a4f40: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap = \n-001a4fb0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_new();
    .if (soap_valid_\n-001a50b0: 736f 636b 6574 3c2f 613e 283c 6120 636c socket(soap_\n-001a5110: 6269 6e64 3c2f 613e 283c 6120 636c 6173 bind(\n-001a5140: 736f 6170 3c2f 613e 2c20 4e55 4c4c 2c20 soap, NULL, \n-001a5150: 3830 3830 2c20 3130 2929 2920 3c73 7061 8080, 10))) // small BACKL\n-001a5180: 4f47 2066 6f72 2069 7465 7261 7469 7665 OG for iterative\n-001a5190: 2073 6572 7665 7273 3c2f 7370 616e 3e3c servers<\n-001a51a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n-001a51c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    \n-001a5390: 2020 203c 7370 616e 2063 6c61 7373 3d22 if<\n-001a53b0: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (soap_beg\n-001a5410: 696e 5f73 6572 7665 3c2f 613e 283c 6120 in_serve(soap)) <\n-001a5450: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {<\n-001a5470: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-001a5490: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_print_fa\n-001a54f0: 756c 743c 2f61 3e28 3c61 2063 6c61 7373 ult(s\n-001a5520: 6f61 703c 2f61 3e2c 2073 7464 6572 7229 oap, stderr)\n-001a5530: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    \n-001a5550: 2020 203c 7370 616e 2063 6c61 7373 3d22 con\n-001a5570: 7469 6e75 653c 2f73 7061 6e3e 3b3c 2f64 tinue;.
    }.
    soap_set_name\n-001a5620: 7370 6163 6573 3c2f 613e 283c 6120 636c spaces(soap, quot\n-001a5660: 655f 6e61 6d65 7370 6163 6573 293b 3c2f e_namespaces);.
    if\n-001a56b0: 2028 7175 6f74 655f 7365 7276 655f 7265 (quote_serve_re\n-001a56c0: 7175 6573 7428 3c61 2063 6c61 7373 3d22 quest(soa\n-001a56f0: 703c 2f61 3e29 203d 3d20 3c61 2063 6c61 p) == SO\n-001a5750: 4150 5f4e 4f5f 4d45 5448 4f44 3c2f 613e AP_NO_METHOD\n-001a5760: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    \n-001a5780: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    ..
    \n-001a5870: 2020 2020 203c 7370 616e 2063 6c61 7373 i\n-001a5890: 663c 2f73 7061 6e3e 2028 7261 7465 5f73 f (rate_s\n-001a58a0: 6572 7665 5f72 6571 7565 7374 283c 6120 erve_request(soap)).
    \n-001a5900: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_send_fault\n-001a5960: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n-001a5990: 3c2f 613e 293b 203c 7370 616e 2063 6c61 ); // \n-001a59b0: 7365 6e64 2066 6175 6c74 2074 6f20 636c send fault to cl\n-001a59c0: 6965 6e74 203c 2f73 7061 6e3e 3c2f 6469 ient .
    } .
    else if (so\n-001a5a80: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->error) <\n-001a5ae0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {<\n-001a5b00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-001a5b20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n-001a5b70: 736f 6170 5f73 656e 645f 6661 756c 743c soap_send_fault<\n-001a5b80: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n-001a5bb0: 2f61 3e29 3b20 3c73 7061 6e20 636c 6173 /a>); // s\n-001a5bd0: 656e 6420 6661 756c 7420 746f 2063 6c69 end fault to cli\n-001a5be0: 656e 7420 3c2f 7370 616e 3e3c 2f64 6976 ent .
    }.
    }
    .\n-001a5c30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n-001a5c60: 656c 7365 3c2f 7370 616e 3e20 3c73 7061 else if \n-001a5c90: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001a5cc0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->er\n-001a5d10: 726e 756d 3c2f 613e 2920 3c73 7061 6e20 rnum) \n-001a5d30: 2f2f 2061 6363 6570 7420 6661 696c 6564 // accept failed\n-001a5d40: 2c20 7472 7920 6167 6169 6e20 6166 7465 , try again afte\n-001a5d50: 7220 3120 7365 636f 6e64 3c2f 7370 616e r 1 second
    .
    {<\n-001a5d80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_print_faul\n-001a5e00: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soa\n-001a5e30: 703c 2f61 3e2c 2073 7464 6572 7229 3b20 p, stderr); \n-001a5e40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s\n-001a5e60: 6c65 6570 2831 293b 3c2f 6469 763e 0a3c leep(1);
    .<\n-001a5e70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a5e80: 3e20 2020 207d 203c 2f64 6976 3e0a 3c64 > }
    .\n-001a5ea0: 2020 2020 3c73 7061 6e20 636c 6173 733d el\n-001a5ec0: 7365 3c2f 7370 616e 3e3c 2f64 6976 3e0a se
    .\n-001a5ed0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .\n-001a5f00: 2020 2020 2020 6670 7269 6e74 6628 7374 fprintf(st\n-001a5f10: 6465 7272 2c20 3c73 7061 6e20 636c 6173 derr, "server t\n-001a5f40: 696d 6564 206f 7574 5c6e 2671 756f 743b imed out\\n"\n-001a5f50: 3c2f 7370 616e 3e29 3b20 3c2f 6469 763e );
    \n-001a5f60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    break;\n-001a5fa0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..
    }.
    soap_de\n-001a61d0: 7374 726f 793c 2f61 3e28 3c61 2063 6c61 stroy(soap); ..\n-001a62c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .

    This chai\n-001a6390: 6e69 6e67 2063 616e 2062 6520 6172 6269 ning can be arbi\n-001a63a0: 7472 6172 696c 7920 6465 6570 2e20 5768 trarily deep. Wh\n-001a63b0: 656e 2074 6865 2070 7265 7669 6f75 7320 en the previous \n-001a63c0: 7265 7175 6573 7420 6661 696c 7320 7769 request fails wi\n-001a63d0: 7468 2061 203c 636f 6465 3e23 534f 4150 th a #SOAP\n-001a63e0: 5f4e 4f5f 4d45 5448 4f44 3c2f 636f 6465 _NO_METHOD then next requ\n-001a6400: 6573 7420 6469 7370 6174 6368 6572 2063 est dispatcher c\n-001a6410: 616e 2062 6520 7472 6965 642e 3c2f 703e an be tried.

    \n-001a6420: 0a3c 703e 5468 6520 7365 7276 6572 2073 .

    The server s\n-001a6430: 686f 756c 6420 616c 736f 2064 6566 696e hould also defin\n-001a6440: 6520 7468 6520 7365 7276 6963 6520 6f70 e the service op\n-001a6450: 6572 6174 696f 6e73 3a3c 2f70 3e0a 3c64 erations:

    .
    \n-001a64a0: 696e 743c 2f73 7061 6e3e 206e 735f 5f67 int ns__g\n-001a64b0: 6574 5175 6f74 6528 3c73 7061 6e20 636c etQuote(st\n-001a64d0: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, char *symbol, float *Result); .
    {
    .<\n-001a65c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a65d0: 3e20 202a 5265 7375 6c74 203d 202e 2e2e > *Result = ...\n-001a65e0: 203b 203c 2f64 6976 3e0a 3c64 6976 2063 ;
    ..\n-001a66a0: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    .
    i\n-001a66f0: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 6765 nt ns__ge\n-001a6700: 7452 6174 6528 3c73 7061 6e20 636c 6173 tRate(stru\n-001a6720: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, char *country1, char *country2, float *Result); <\n-001a6820: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n-001a6840: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    *Result = ..\n-001a6860: 2e20 3b20 3c2f 6469 763e 0a3c 6469 7620 . ;
    .
    <\n-001a6880: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a6890: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n-001a68a0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> SOAP_\n-001a6900: 4f4b 3c2f 613e 3b20 3c2f 6469 763e 0a3c OK;
    .<\n-001a6910: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a6920: 3e7d 3c2f 6469 763e 0a3c 2f64 6976 3e3c >}
    .
    <\n-001a6930: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-001a6940: 3c70 3e48 6f77 6576 6572 2c20 7468 6520

    However, the \n-001a6950: 7768 696c 6520 6c6f 6f70 2069 7465 7261 while loop itera\n-001a6960: 7465 7320 666f 7220 6561 6368 206e 6577 tes for each new\n-001a6970: 2063 6f6e 6e65 6374 696f 6e20 7468 6174 connection that\n-001a6980: 2069 7320 6573 7461 626c 6973 6865 6420 is established \n-001a6990: 7769 7468 203c 636f 6465 3e3c 6120 636c with soap_accept<\n-001a6a20: 2f61 3e3c 2f63 6f64 653e 2061 6e64 2064 /a> and d\n-001a6a30: 6f65 7320 6e6f 7420 616c 6c6f 7720 666f oes not allow fo\n-001a6a40: 7220 4854 5450 206b 6565 702d 616c 6976 r HTTP keep-aliv\n-001a6a50: 6520 636f 6e6e 6563 7469 6f6e 7320 746f e connections to\n-001a6a60: 2070 6572 7369 7374 2e20 466f 7220 6f75 persist. For ou\n-001a6a70: 7220 6669 6e61 6c20 696d 7072 6f76 656d r final improvem\n-001a6a80: 656e 7420 7765 2077 616e 7420 746f 2073 ent we want to s\n-001a6a90: 7570 706f 7274 2048 5454 5020 6b65 6570 upport HTTP keep\n-001a6aa0: 2d61 6c69 7665 2063 6f6e 6e65 6374 696f -alive connectio\n-001a6ab0: 6e73 2074 6861 7420 7265 7175 6972 6520 ns that require \n-001a6ac0: 6c6f 6f70 696e 6720 6f76 6572 2074 6865 looping over the\n-001a6ad0: 2073 6572 7669 6365 2064 6973 7061 7463 service dispatc\n-001a6ae0: 6865 7320 756e 7469 6c20 7468 6520 636f hes until the co\n-001a6af0: 6e6e 6563 7469 6f6e 2063 6c6f 7365 7320 nnection closes \n-001a6b00: 6f6e 2065 6974 6865 7220 656e 642c 2061 on either end, a\n-001a6b10: 6674 6572 2077 6869 6368 2077 6520 7265 fter which we re\n-001a6b20: 7375 6d65 2074 6865 206f 7574 6572 206c sume the outer l\n-001a6b30: 6f6f 702e 2054 6865 2072 6573 756c 7469 oop. The resulti\n-001a6b40: 6e67 2063 6f64 6520 6973 2076 6572 7920 ng code is very \n-001a6b50: 636c 6f73 6520 746f 2074 6865 2073 6f61 close to the soa\n-001a6b60: 7063 7070 322d 6765 6e65 7261 7465 6420 pcpp2-generated \n-001a6b70: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_serve<\n-001a6bf0: 2f61 3e3c 2f63 6f64 653e 2063 6f64 6520 /a> code \n-001a6c00: 616e 6420 7468 6520 3c63 6f64 653e 7365 and the se\n-001a6c10: 7276 653c 2f63 6f64 653e 2073 6572 7669 rve servi\n-001a6c20: 6365 2063 6c61 7373 206d 6574 686f 6473 ce class methods\n-001a6c30: 2c20 7769 7468 2074 6865 2061 6464 6974 , with the addit\n-001a6c40: 696f 6e20 6f66 2074 6865 2063 6861 696e ion of the chain\n-001a6c50: 206f 6620 7365 7276 6963 6520 6469 7370 of service disp\n-001a6c60: 6174 6368 6573 2069 6e20 7468 6520 6c6f atches in the lo\n-001a6c70: 6f70 2062 6f64 793a 3c2f 703e 0a3c 6469 op body:

    .
    \n-001a6cc0: 2369 6e63 6c75 6465 2026 7175 6f74 3b71 #include "q\n-001a6cd0: 756f 7465 482e 6826 7175 6f74 3b3c 2f73 uoteH.h"
    .
    #include\n-001a6d20: 2026 7175 6f74 3b72 6174 6548 2e68 2671 "rateH.h&q\n-001a6d30: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;.
    #\n-001a6d70: 696e 636c 7564 6520 2671 756f 743b 7175 include "qu\n-001a6d80: 6f74 652e 6e73 6d61 7026 7175 6f74 3b3c ote.nsmap"<\n-001a6d90: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-001a6db0: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n-001a6dc0: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n-001a6dd0: 6465 2026 7175 6f74 3b72 6174 652e 6e73 de "rate.ns\n-001a6de0: 6d61 7026 7175 6f74 3b3c 2f73 7061 6e3e map"\n-001a6df0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-001a6e10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    \n-001a7130: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soap_val\n-001a71b0: 6964 5f73 6f63 6b65 743c 2f61 3e28 3c61 id_socket(so\n-001a7210: 6170 5f61 6363 6570 743c 2f61 3e28 3c61 ap_accept(soap)))\n-001a7250: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    soap->\n-001a72c0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;keep_a\n-001a7310: 6c69 7665 3c2f 613e 203d 203c 6120 636c live = soap-><\n-001a7350: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a7360: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001a7370: 6874 6d6c 2361 3164 3761 6361 3661 6331 html#a1d7aca6ac1\n-001a7380: 6436 3233 3032 3130 3263 3137 3530 3861 d62302102c17508a\n-001a7390: 3862 3065 6330 223e 6d61 785f 6b65 6570 8b0ec0\">max_keep\n-001a73a0: 5f61 6c69 7665 3c2f 613e 202b 2031 3b20 _alive + 1; \n-001a73b0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // max kee\n-001a73d0: 702d 616c 6976 6520 6974 6572 6174 696f p-alive iteratio\n-001a73e0: 6e73 3c2f 7370 616e 3e3c 2f64 6976 3e0a ns
    .\n-001a73f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    do.
    {.
    if \n-001a7490: 2828 3c61 2063 6c61 7373 3d22 636f 6465 ((soap->k\n-001a7510: 6565 705f 616c 6976 653c 2f61 3e20 2667 eep_alive &g\n-001a7520: 743b 2030 2920 2661 6d70 3b26 616d 703b t; 0) &&\n-001a7530: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap->m\n-001a75b0: 6178 5f6b 6565 705f 616c 6976 653c 2f61 ax_keep_alive > 0))
    \n-001a75d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap->\n-001a7620: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;keep_a\n-001a7670: 6c69 7665 3c2f 613e 2d2d 3b3c 2f64 6976 live--;..\n-001a7770: 2020 2020 2020 2020 7b3c 2f64 6976 3e0a {
    .\n-001a7780: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if \n-001a77c0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001a77f0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->er\n-001a7840: 726f 723c 2f61 3e20 2667 743b 3d20 3c61 ror >= SOAP_STOP)\n-001a78b0: 203c 7370 616e 2063 6c61 7373 3d22 636f // if a p\n-001a78d0: 6c75 6769 6e20 6861 7320 7365 7276 6564 lugin has served\n-001a78e0: 2074 6865 2072 6571 7565 7374 3c2f 7370 the request
    .
    \n-001a7910: 2020 2020 2020 2020 3c73 7061 6e20 636c continue; \n-001a7950: 2020 2020 203c 7370 616e 2063 6c61 7373 // th\n-001a7970: 656e 2063 6f6e 7469 6e75 6520 7769 7468 en continue with\n-001a7980: 2074 6865 206e 6578 7420 7265 7175 6573 the next reques\n-001a7990: 743c 2f73 7061 6e3e 3c2f 6469 763e 0a3c t
    .<\n-001a79a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a79b0: 3e20 2020 2020 2020 2020 203c 7370 616e > break; \n-001a79f0: 2020 2020 2020 2020 2020 3c73 7061 6e20 \n-001a7a10: 2f2f 2061 6e20 6572 726f 7220 6f63 6375 // an error occu\n-001a7a20: 7272 6564 3c2f 7370 616e 3e3c 2f64 6976 rred.
    }.
    soap_set_na\n-001a7ad0: 6d65 7370 6163 6573 3c2f 613e 283c 6120 mespaces(soap, qu\n-001a7b10: 6f74 655f 6e61 6d65 7370 6163 6573 293b ote_namespaces);\n-001a7b20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-001a7b40: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (quote_serv\n-001a7b70: 655f 7265 7175 6573 7428 3c61 2063 6c61 e_request(soap) == SOAP_NO_METHOD\n-001a7c10: 3c2f 613e 2920 3c2f 6469 763e 0a3c 6469 )
    . \n-001a7c30: 2020 2020 2020 207b 3c2f 6469 763e 0a3c {
    .<\n-001a7c40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a7c50: 3e20 2020 2020 2020 2020 203c 6120 636c > soap_set_names\n-001a7cc0: 7061 6365 733c 2f61 3e28 3c61 2063 6c61 paces(soap, rate_\n-001a7d00: 6e61 6d65 7370 6163 6573 293b 3c2f 6469 namespaces);.
    <\n-001a7d30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001a7d40: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (rate_serve_r\n-001a7d60: 6571 7565 7374 283c 6120 636c 6173 733d equest(so\n-001a7d90: 6170 3c2f 613e 2929 3c2f 6469 763e 0a3c ap))
    .<\n-001a7da0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a7db0: 3e20 2020 2020 2020 2020 2020 203c 6120 > soa\n-001a7e10: 705f 7365 6e64 5f66 6175 6c74 3c2f 613e p_send_fault\n-001a7e20: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001a7e50: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // send\n-001a7e70: 2066 6175 6c74 2074 6f20 636c 6965 6e74 fault to client\n-001a7e80: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-001a7e90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001a7ea0: 3e20 2020 2020 2020 207d 203c 2f64 6976 > } .
    else if (so\n-001a7f40: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->error) <\n-001a7fa0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-001a7fc0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    \n-001a7fe0: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap_send_fa\n-001a8040: 756c 743c 2f61 3e28 3c61 2063 6c61 7373 ult(s\n-001a8070: 6f61 703c 2f61 3e29 3b20 3c73 7061 6e20 oap); \n-001a8090: 2f2f 2073 656e 6420 6661 756c 7420 746f // send fault to\n-001a80a0: 2063 6c69 656e 7420 3c2f 7370 616e 3e3c client <\n-001a80b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-001a80d0: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .\n-001a8190: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    \n-001a8200: 736f 6170 5f65 6e64 3c2f 613e 283c 6120 soap_end(soap); <\n-001a8240: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } \n-001a8260: 3c73 7061 6e20 636c 6173 733d 226b 6579 while<\n-001a8280: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (s\n-001a82b0: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->keep_alive<\n-001a8310: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    . \n-001a8330: 2020 7d3c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    \n-001a8350: 3c73 7061 6e20 636c 6173 733d 226b 6579 else \n-001a8390: 6966 3c2f 7370 616e 3e20 283c 6120 636c if (soap-><\n-001a83d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a83e0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001a83f0: 6874 6d6c 2361 3130 6236 3664 3664 3438 html#a10b66d6d48\n-001a8400: 3936 3930 6237 6430 6635 3931 6165 3236 9690b7d0f591ae26\n-001a8410: 3333 6464 3133 223e 6572 726e 756d 3c2f 33dd13\">errnum) // acc\n-001a8440: 6570 7420 6661 696c 6564 2c20 7472 7920 ept failed, try \n-001a8450: 6167 6169 6e20 6166 7465 7220 3120 7365 again after 1 se\n-001a8460: 636f 6e64 3c2f 7370 616e 3e3c 2f64 6976 cond.
    {
    .\n-001a8490: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_\n-001a8500: 7072 696e 745f 6661 756c 743c 2f61 3e28 print_fault(\n-001a8510: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001a8540: 2073 7464 6572 7229 3b20 3c2f 6469 763e stderr);
    \n-001a8550: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    sleep(1\n-001a8570: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    }\n-001a8590: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    else
    .
    \n-001a85f0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    \n-001a8610: 6670 7269 6e74 6628 7374 6465 7272 2c20 fprintf(stderr, \n-001a8620: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n-001a8640: 743b 7365 7276 6572 2074 696d 6564 206f t;server timed o\n-001a8650: 7574 5c6e 2671 756f 743b 3c2f 7370 616e ut\\n");
    .
    \n-001a8680: 2020 203c 7370 616e 2063 6c61 7373 3d22 bre\n-001a86a0: 616b 3c2f 7370 616e 3e3b 203c 2f64 6976 ak; .
    }
    .\n-001a86d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_\n-001a8740: 6465 7374 726f 793c 2f61 3e28 3c61 2063 destroy(soap); ..
    soap_free(<\n-001a8a40: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001a8a50: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001a8a60: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n-001a8a70: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    .... Back to table \n-001a8ab0: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents<\n-001a8ac0: 2f70 3e0a 3c68 323e 3c61 2063 6c61 7373 /p>.

    .How to c\n-001a8af0: 7265 6174 6520 444c 4c73 3c2f 6832 3e0a reate DLLs

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

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

    .

    .Cr\n-001a8b60: 6561 7469 6e67 2074 6865 2062 6173 6520 eating the base \n-001a8b70: 7374 6473 6f61 7032 2e64 6c6c 3c2f 6833 stdsoap2.dll.

    The engine \n-001a8b90: 646f 6573 206e 6f74 2064 6566 696e 6520 does not define \n-001a8ba0: 534f 4150 2048 6561 6465 7220 616e 6420 SOAP Header and \n-001a8bb0: 4661 756c 7420 7365 7269 616c 697a 6572 Fault serializer\n-001a8bc0: 7320 7468 6174 2074 6865 2065 6e67 696e s that the engin\n-001a8bd0: 6520 6e65 6564 7320 7768 656e 2069 6e73 e needs when ins\n-001a8be0: 7461 6c6c 6564 2061 7320 6120 6c69 6272 talled as a libr\n-001a8bf0: 6172 792e 2057 6520 7468 6572 6566 6f72 ary. We therefor\n-001a8c00: 6520 6164 6420 534f 4150 2048 6561 6465 e add SOAP Heade\n-001a8c10: 7220 616e 6420 4661 756c 7420 7365 7269 r and Fault seri\n-001a8c20: 616c 697a 6572 732c 2077 6869 6368 2061 alizers, which a\n-001a8c30: 7265 2063 6f6d 7069 6c65 6420 7365 7061 re compiled sepa\n-001a8c40: 7261 7465 6c79 2061 7320 666f 6c6c 6f77 rately as follow\n-001a8c50: 732e 2046 6972 7374 2c20 6372 6561 7465 s. First, create\n-001a8c60: 2061 206e 6577 2068 6561 6465 7220 6669 a new header fi\n-001a8c70: 6c65 203c 656d 3e3c 636f 6465 3e65 6e76 le env\n-001a8c80: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2077 .h w\n-001a8c90: 6974 6820 7468 6520 534f 4150 2048 6561 ith the SOAP Hea\n-001a8ca0: 6465 7220 3c63 6f64 653e 3c61 2063 6c61 der SOAP_ENV__H\n-001a8d10: 6561 6465 723c 2f61 3e3c 2f63 6f64 653e eader\n-001a8d20: 2061 6e64 2053 4f41 5020 4661 756c 7420 and SOAP Fault \n-001a8d30: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 S\n-001a8d90: 4f41 505f 454e 565f 5f46 6175 6c74 3c2f OAP_ENV__Fault struct\n-001a8db0: 7572 6573 2c20 696e 636c 7564 696e 6720 ures, including \n-001a8dc0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 SOAP_ENV_\n-001a8e30: 5f44 6574 6169 6c3c 2f61 3e3c 2f63 6f64 _Detail if this struc\n-001a8e50: 7475 7265 2063 6f6e 7461 696e 7320 6d65 ture contains me\n-001a8e60: 6d62 6572 7320 7468 6174 2061 7265 2073 mbers that are s\n-001a8e70: 6572 6961 6c69 7a65 6420 6173 2066 6175 erialized as fau\n-001a8e80: 6c74 2064 6574 6169 6c73 2e20 596f 7520 lt details. You \n-001a8e90: 6361 6e20 6c65 6176 6520 7468 6973 2068 can leave this h\n-001a8ea0: 6561 6465 7220 6669 6c65 2065 6d70 7479 eader file empty\n-001a8eb0: 2069 6620 796f 7520 7761 6e74 2074 6f20 if you want to \n-001a8ec0: 7573 6520 7468 6520 6465 6661 756c 7420 use the default \n-001a8ed0: 534f 4150 2048 6561 6465 7220 616e 6420 SOAP Header and \n-001a8ee0: 4661 756c 742e 2048 6f77 6576 6572 2c20 Fault. However, \n-001a8ef0: 6966 2053 4f41 5020 4865 6164 6572 7320 if SOAP Headers \n-001a8f00: 6172 6520 7265 7175 6972 6564 2074 6865 are required the\n-001a8f10: 6e20 796f 7520 6361 6e6e 6f74 206c 6561 n you cannot lea\n-001a8f20: 7665 2074 6865 203c 636f 6465 3e3c 6120 ve the SOAP_ENV\n-001a8f90: 5f5f 4865 6164 6572 3c2f 613e 3c2f 636f __Header structure em\n-001a8fb0: 7074 792e 2046 6f72 2065 7861 6d70 6c65 pty. For example\n-001a8fc0: 2c20 7468 6520 5753 2d41 6464 7265 7373 , the WS-Address\n-001a8fd0: 696e 6720 616e 6420 5753 2d53 6563 7572 ing and WS-Secur\n-001a8fe0: 6974 7920 706c 7567 696e 7320 7265 7175 ity plugins requ\n-001a8ff0: 6972 6520 534f 4150 2048 6561 6465 7273 ire SOAP Headers\n-001a9000: 2077 6869 6368 2063 616e 2062 6520 696d which can be im\n-001a9010: 706f 7274 6564 2062 7920 6164 6469 6e67 ported by adding\n-001a9020: 203c 636f 6465 3e23 696d 706f 7274 2022 #import \"\n-001a9030: 7773 6135 2e68 223c 2f63 6f64 653e 2061 wsa5.h\" a\n-001a9040: 6e64 203c 636f 6465 3e23 696d 706f 7274 nd #import\n-001a9050: 2022 7773 7365 2e68 223c 2f63 6f64 653e \"wsse.h\"\n-001a9060: 2c20 7265 7370 6563 7469 7665 6c79 2074 , respectively t\n-001a9070: 6f20 3c65 6d3e 3c63 6f64 653e 656e 762e o env.\n-001a9080: 683c 2f63 6f64 653e 3c2f 656d 3e2e 2054 h. T\n-001a9090: 6865 6e20 636f 6d70 696c 6520 7468 6973 hen compile this\n-001a90a0: 2068 6561 6465 7220 6669 6c65 2077 6974 header file wit\n-001a90b0: 683a 203c 2f70 3e3c 7072 6520 636c 6173 h:

     so\n-001a90d0: 6170 6370 7032 202d 7065 6e76 2065 6e76  apcpp2 -penv env\n-001a90e0: 2e68 0a3c 2f70 7265 3e3c 703e 2054 6865  .h.

    The\n-001a90f0: 2067 656e 6572 6174 6564 203c 656d 3e3c generated <\n-001a9100: 636f 6465 3e65 6e76 432e 6370 703c 2f63 code>envC.cpp file h\n-001a9120: 6f6c 6473 2074 6865 2053 4f41 5020 4865 olds the SOAP He\n-001a9130: 6164 6572 2061 6e64 2046 6175 6c74 2073 ader and Fault s\n-001a9140: 6572 6961 6c69 7a65 7273 2e20 5765 2063 erializers. We c\n-001a9150: 616e 2065 6974 6865 7220 6372 6561 7465 an either create\n-001a9160: 2061 2073 6570 6172 6174 6520 3c65 6d3e a separate \n-001a9170: 3c63 6f64 653e 656e 7643 2e64 6c6c 3c2f envC.dll DLL f\n-001a9190: 6f72 2074 6869 7320 7468 6174 2061 6c6c or this that all\n-001a91a0: 2063 6c69 656e 7473 2061 6e64 2073 6572 clients and ser\n-001a91b0: 7669 6365 2061 7070 6c69 6361 7469 6f6e vice application\n-001a91c0: 7320 7769 6c6c 2075 7365 2c20 6f72 2063 s will use, or c\n-001a91d0: 6f6d 6269 6e65 203c 656d 3e3c 636f 6465 ombine envC.cpp\n-001a91f0: 3c2f 656d 3e20 7769 7468 2074 6865 203c with the <\n-001a9200: 656d 3e3c 636f 6465 3e73 7464 736f 6170 em>stdsoap\n-001a9210: 322e 646c 6c3c 2f63 6f64 653e 3c2f 656d 2.dll we create, whi\n-001a9230: 6368 2077 6520 7769 6c6c 2065 7870 6c61 ch we will expla\n-001a9240: 696e 2066 7572 7468 6572 2e3c 2f70 3e0a in further.

    .\n-001a9250: 3c70 3e54 6865 206e 6578 7420 7374 6570

    The next step\n-001a9260: 2069 7320 746f 2063 7265 6174 6520 3c65 is to create stdsoap2\n-001a9280: 2e64 6c6c 3c2f 636f 6465 3e3c 2f65 6d3e .dll\n-001a9290: 2077 6869 6368 2063 6f6e 7369 7374 7320 which consists \n-001a92a0: 6f66 2074 6865 2066 696c 6520 3c65 6d3e of the file \n-001a92b0: 3c63 6f64 653e 6773 6f61 702f 7374 6473 gsoap/stds\n-001a92c0: 6f61 7032 2e63 7070 3c2f 636f 6465 3e3c oap2.cpp<\n-001a92d0: 2f65 6d3e 2061 6e64 203c 656d 3e3c 636f /em> and envC.cpp and opti\n-001a9300: 6f6e 616c 6c79 2074 6865 2070 6c75 6769 onally the plugi\n-001a9310: 6e73 2079 6f75 2077 616e 7420 746f 2075 ns you want to u\n-001a9320: 7365 2073 7563 6820 6173 203c 656d 3e3c se such as <\n-001a9330: 636f 6465 3e77 7373 6561 7069 2e63 7070 code>wsseapi.cpp\n-001a9340: 3c2f 636f 6465 3e3c 2f65 6d3e 2028 7765 (we\n-001a9350: 206e 6565 6420 746f 2072 656e 616d 6520 need to rename \n-001a9360: 616c 6c20 3c65 6d3e 3c63 6f64 653e 2e63 all .c\n-001a9370: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 696c fil\n-001a9380: 6573 2074 6f20 3c65 6d3e 3c63 6f64 653e es to \n-001a9390: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp\n-001a93a0: 2066 696c 6573 2074 6f20 6176 6f69 6420 files to avoid \n-001a93b0: 6973 7375 6573 2077 6974 6820 4d53 5643 issues with MSVC\n-001a93c0: 2b2b 292e 2054 6869 7320 444c 4c20 636f ++). This DLL co\n-001a93d0: 6e74 6169 6e73 2061 6c6c 2063 6f6d 6d6f ntains all commo\n-001a93e0: 6e20 6675 6e63 7469 6f6e 7320 6e65 6564 n functions need\n-001a93f0: 6564 2066 6f72 2061 6c6c 206f 7468 6572 ed for all other\n-001a9400: 2063 6c69 656e 7473 2061 6e64 2073 6572 clients and ser\n-001a9410: 7665 7273 2062 6173 6564 206f 6e20 6753 vers based on gS\n-001a9420: 4f41 502e 2043 6f6d 7069 6c65 203c 656d OAP. Compile envC.cpp<\n-001a9440: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and \n-001a9450: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n-001a9460: 7374 6473 6f61 7032 2e63 7070 3c2f 636f stdsoap2.cpp into stdsoap2\n-001a9490: 2e64 6c6c 3c2f 636f 6465 3e3c 2f65 6d3e .dll\n-001a94a0: 2075 7369 6e67 2074 6865 2063 6f6d 7069 using the compi\n-001a94b0: 6c65 7220 6f70 7469 6f6e 203c 636f 6465 ler option /D #WITH_NONAMESPA\n-001a94e0: 4345 533c 2f63 6f64 653e 2061 6e64 2074 CES and t\n-001a94f0: 6865 204d 5356 4320 5072 652d 5072 6f63 he MSVC Pre-Proc\n-001a9500: 6573 736f 7220 6465 6669 6e69 7469 6f6e essor definition\n-001a9510: 7320 3c63 6f64 653e 534f 4150 5f46 4d41 s SOAP_FMA\n-001a9520: 4331 3d5f 5f64 6563 6c73 7065 6328 646c C1=__declspec(dl\n-001a9530: 6c65 7870 6f72 7429 3c2f 636f 6465 3e2c lexport),\n-001a9540: 203c 636f 6465 3e53 4f41 505f 464d 4143 SOAP_FMAC\n-001a9550: 333d 5f5f 6465 636c 7370 6563 2864 6c6c 3=__declspec(dll\n-001a9560: 6578 706f 7274 293c 2f63 6f64 653e 2c20 export), \n-001a9570: 616e 6420 7468 6520 3c63 6f64 653e 2353 and the #S\n-001a9580: 4f41 505f 5354 445f 4558 504f 5254 533c OAP_STD_EXPORTS<\n-001a9590: 2f63 6f64 653e 206d 6163 726f 2073 6574 /code> macro set\n-001a95a0: 2061 7320 7368 6f77 6e20 6265 6c6f 7720 as shown below \n-001a95b0: 6672 6f6d 2074 6865 204d 5356 4320 636f from the MSVC co\n-001a95c0: 6d6d 616e 6420 7072 6f6d 7074 3a20 3c2f mmand prompt:

    C:> c\n-001a95f0: 6c20 2f63 202f 492e 202f 4548 7363 202f  l /c /I. /EHsc /\n-001a9600: 4457 4954 485f 4e4f 4e41 4d45 5350 4143  DWITH_NONAMESPAC\n-001a9610: 4553 202f 4453 4f41 505f 464d 4143 313d  ES /DSOAP_FMAC1=\n-001a9620: 5f5f 6465 636c 7370 6563 2864 6c6c 6578  __declspec(dllex\n-001a9630: 706f 7274 2920 2f44 534f 4150 5f46 4d41  port) /DSOAP_FMA\n-001a9640: 4333 3d5f 5f64 6563 6c73 7065 6328 646c  C3=__declspec(dl\n-001a9650: 6c65 7870 6f72 7429 202f 4453 4f41 505f  lexport) /DSOAP_\n-001a9660: 5354 445f 4558 504f 5254 5320 656e 7643  STD_EXPORTS envC\n-001a9670: 2e63 7070 2073 7464 736f 6170 322e 6370  .cpp stdsoap2.cp\n-001a9680: 700a 433a 2667 743b 206c 696e 6b20 2f4c  p.C:> link /L\n-001a9690: 4942 5041 5448 2077 7332 5f33 322e 6c69  IBPATH ws2_32.li\n-001a96a0: 6220 2f4f 5554 3a6d 7967 736f 6170 2e64  b /OUT:mygsoap.d\n-001a96b0: 6c6c 202f 444c 4c20 656e 7643 2e6f 626a  ll /DLL envC.obj\n-001a96c0: 2073 7464 736f 6170 322e 6f62 6a0a 3c2f   stdsoap2.obj.

    Note: as\n-001a96e0: 206f 6620 6753 4f41 5020 322e 382e 3330 of gSOAP 2.8.30\n-001a96f0: 2061 6e64 206c 6174 6572 2c20 7468 6520 and later, the \n-001a9700: 444c 4c20 6578 706f 7274 206d 6163 726f DLL export macro\n-001a9710: 7320 7368 6f77 6e20 6865 7265 2061 7265 s shown here are\n-001a9720: 2061 6c6c 2073 6574 2077 6974 6820 6f6e all set with on\n-001a9730: 6520 7072 652d 7072 6f63 6573 736f 7220 e pre-processor \n-001a9740: 6465 6669 6e69 7469 6f6e 203c 636f 6465 definition #SOAP_STD_EXPOR\n-001a9760: 5453 3c2f 636f 6465 3e2e 3c2f 703e 0a3c TS.

    .<\n-001a9770: 703e 416c 7465 726e 6174 6976 656c 792c p>Alternatively,\n-001a9780: 2079 6f75 2063 616e 2063 6f6d 7069 6c65 you can compile\n-001a9790: 2077 6974 6820 3c63 6f64 653e 2f44 3c2f with /D #WIT\n-001a97b0: 485f 534f 4150 4445 4653 5f48 3c2f 636f H_SOAPDEFS_H and put the \n-001a97d0: 6d61 6372 6f20 6465 6669 6e69 7469 6f6e macro definition\n-001a97e0: 7320 696e 203c 656d 3e3c 636f 6465 3e73 s in s\n-001a97f0: 6f61 7064 6566 732e 683c 2f63 6f64 653e oapdefs.h\n-001a9800: 3c2f 656d 3e2e 2054 6869 7320 6578 706f . This expo\n-001a9810: 7274 7320 616c 6c20 6675 6e63 7469 6f6e rts all function\n-001a9820: 7320 7768 6963 6820 6172 6520 7072 6563 s which are prec\n-001a9830: 6564 6564 2062 7920 7468 6520 6d61 6372 eded by the macr\n-001a9840: 6f20 3c63 6f64 653e 2353 4f41 505f 464d o #SOAP_FM\n-001a9850: 4143 313c 2f63 6f64 653e 2069 6e20 7468 AC1 in th\n-001a9860: 6520 3c65 6d3e 3c63 6f64 653e 736f 6170 e soap\n-001a9870: 6370 7032 2e63 7070 3c2f 636f 6465 3e3c cpp2.cpp<\n-001a9880: 2f65 6d3e 2073 6f75 7263 6520 6669 6c65 /em> source file\n-001a9890: 2061 6e64 206d 6163 726f 203c 636f 6465 and macro #SOAP_FMAC3 in the <\n-001a98c0: 636f 6465 3e65 6e76 432e 6370 703c 2f63 code>envC.cpp source\n-001a98e0: 2066 696c 652e 3c2f 703e 0a3c 703e 4669 file.

    .

    Fi\n-001a98f0: 6e61 6c6c 792c 206e 6f74 6520 7468 6174 nally, note that\n-001a9900: 2074 6865 2067 534f 4150 2073 6f75 7263 the gSOAP sourc\n-001a9910: 6520 636f 6465 2070 6163 6b61 6765 2063 e code package c\n-001a9920: 6f6e 7461 696e 7320 6120 6c6f 7420 6f66 ontains a lot of\n-001a9930: 203c 656d 3e3c 636f 6465 3e2e 633c 2f63 .c source\n-001a9950: 2063 6f64 6520 6669 6c65 732e 204d 6978 code files. Mix\n-001a9960: 696e 6720 4320 7769 7468 2043 2b2b 2066 ing C with C++ f\n-001a9970: 696c 6573 2069 7320 6e6f 7420 7265 636f iles is not reco\n-001a9980: 6d6d 656e 6465 6420 7769 7468 2056 6973 mmended with Vis\n-001a9990: 7561 6c20 5374 7564 696f 2061 6e64 2077 ual Studio and w\n-001a99a0: 696c 6c20 6c65 6164 2074 6f20 7275 6e2d ill lead to run-\n-001a99b0: 7469 6d65 2065 7272 6f72 7320 7768 656e time errors when\n-001a99c0: 2062 7569 6c64 696e 6720 444c 4c73 2e20 building DLLs. \n-001a99d0: 5468 6572 6566 6f72 652c 2061 6c77 6179 Therefore, alway\n-001a99e0: 7320 7265 6e61 6d65 203c 656d 3e3c 636f s rename .c source code fi\n-001a9a10: 6c65 7320 746f 203c 656d 3e3c 636f 6465 les to .cpp source code fi\n-001a9a40: 6c65 7320 7768 656e 2063 7265 6174 696e les when creatin\n-001a9a50: 6720 444c 4c73 2e3c 2f70 3e0a 3c70 3ef0 g DLLs.

    .

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

    .Creating clien\n-001a9ad0: 7420 616e 6420 7365 7276 6572 2044 4c4c t and server DLL\n-001a9ae0: 733c 2f68 333e 0a3c 703e 436f 6d70 696c s

    .

    Compil\n-001a9af0: 6520 7468 6520 3c65 6d3e 3c63 6f64 653e e the \n-001a9b00: 736f 6170 436c 6965 6e74 4c69 622e 6370 soapClientLib.cp\n-001a9b10: 703c 2f63 6f64 653e 3c2f 656d 3e20 616e p an\n-001a9b20: 6420 3c65 6d3e 3c63 6f64 653e 736f 6170 d soap\n-001a9b30: 5365 7276 6572 4c69 622e 6370 703c 2f63 ServerLib.cpp source\n-001a9b50: 7320 6173 2044 4c4c 7320 6279 2075 7369 s as DLLs by usi\n-001a9b60: 6e67 2074 6865 204d 5356 4320 5072 652d ng the MSVC Pre-\n-001a9b70: 5072 6f63 6573 736f 7220 6465 6669 6e69 Processor defini\n-001a9b80: 7469 6f6e 7320 3c63 6f64 653e 534f 4150 tions SOAP\n-001a9b90: 5f46 4d41 4335 3d5f 5f64 6563 6c73 7065 _FMAC5=__declspe\n-001a9ba0: 6328 646c 6c65 7870 6f72 7429 3c2f 636f c(dllexport) and SO\n-001a9bc0: 4150 5f43 4d41 433d 5f5f 6465 636c 7370 AP_CMAC=__declsp\n-001a9bd0: 6563 2864 6c6c 6578 706f 7274 293c 2f63 ec(dllexport), and by usi\n-001a9bf0: 6e67 2074 6865 2043 2b2b 2063 6f6d 7069 ng the C++ compi\n-001a9c00: 6c65 7220 6f70 7469 6f6e 203c 636f 6465 ler option /D #WITH_NONAMESPA\n-001a9c30: 4345 533c 2f63 6f64 653e 2e20 416c 6c20 CES. All \n-001a9c40: 6f66 2074 6865 7365 206d 6163 726f 7320 of these macros \n-001a9c50: 6172 6520 7365 7420 6173 2061 2073 686f are set as a sho\n-001a9c60: 7274 6861 6e64 2077 6974 6820 6f6e 6520 rthand with one \n-001a9c70: 7072 652d 7072 6f63 6573 736f 7220 6465 pre-processor de\n-001a9c80: 6669 6e69 7469 6f6e 203c 636f 6465 3e23 finition #\n-001a9c90: 534f 4150 5f53 5444 5f45 5850 4f52 5453 SOAP_STD_EXPORTS\n-001a9ca0: 3c2f 636f 6465 3e20 2872 6571 7569 7265 (require\n-001a9cb0: 7320 6753 4f41 5020 322e 382e 3330 206f s gSOAP 2.8.30 o\n-001a9cc0: 7220 6c61 7465 7229 2e3c 2f70 3e0a 3c70 r later).

    .This DLL links \n-001a9ce0: 746f 203c 656d 3e3c 636f 6465 3e73 7464 to std\n-001a9cf0: 736f 6170 322e 646c 6c3c 2f63 6f64 653e soap2.dll\n-001a9d00: 3c2f 656d 3e20 7765 2063 7265 6174 6564 we created\n-001a9d10: 2069 6e20 5365 6374 696f 6e20 3c61 2063 in Section
    Creating the\n-001a9d50: 2062 6173 6520 7374 6473 6f61 7032 2e64 base stdsoap2.d\n-001a9d60: 6c6c 3c2f 613e 2e3c 2f70 3e0a 3c70 3e54 ll.

    .

    T\n-001a9d70: 6f20 6372 6561 7465 206d 756c 7469 706c o create multipl\n-001a9d80: 6520 444c 4c73 2069 6e20 7468 6520 7361 e DLLs in the sa\n-001a9d90: 6d65 2070 726f 6a65 6374 2064 6972 6563 me project direc\n-001a9da0: 746f 7279 2c20 796f 7520 7368 6f75 6c64 tory, you should\n-001a9db0: 2075 7365 203c 623e 3c63 6f64 653e 736f use so\n-001a9dc0: 6170 6370 7032 202d 7020 6e61 6d65 3c2f apcpp2 -p name option\n-001a9de0: 203c 623e 3c63 6f64 653e 2d70 206e 616d -p nam\n-001a9df0: 653c 2f63 6f64 653e 3c2f 623e 2074 6f20 e to \n-001a9e00: 7265 6e61 6d65 2074 6865 2067 656e 6572 rename the gener\n-001a9e10: 6174 6564 203c 656d 3e3c 636f 6465 3e73 ated s\n-001a9e20: 6f61 7043 6c69 656e 744c 6962 2e63 7070 oapClientLib.cpp\n-001a9e30: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 6e64 and\n-001a9e40: 203c 656d 3e3c 636f 6465 3e73 6f61 7053 soapS\n-001a9e50: 6572 7665 724c 6962 2e63 7070 3c2f 636f erverLib.cpp (and as\n-001a9e70: 736f 6369 6174 6564 2920 6669 6c65 732e sociated) files.\n-001a9e80: 2054 6865 203c 623e 3c63 6f64 653e 2d70 The -p\n-001a9e90: 206e 616d 653c 2f63 6f64 653e 3c2f 623e name\n-001a9ea0: 206f 7074 696f 6e20 7370 6563 6966 6965 option specifie\n-001a9eb0: 7320 6120 3c65 6d3e 3c63 6f64 653e 6e61 s a na\n-001a9ec0: 6d65 3c2f 636f 6465 3e3c 2f65 6d3e 2070 me p\n-001a9ed0: 7265 6669 7820 746f 2072 6570 6c61 6365 refix to replace\n-001a9ee0: 2074 6865 203c 656d 3e3c 636f 6465 3e73 the s\n-001a9ef0: 6f61 703c 2f63 6f64 653e 3c2f 656d 3e20 oap \n-001a9f00: 6669 6c65 206e 616d 6520 7072 6566 6978 file name prefix\n-001a9f10: 2e20 416e 6f74 6865 7220 7761 7920 6973 . Another way is\n-001a9f20: 2074 6f20 7573 6520 432b 2b20 6e61 6d65 to use C++ name\n-001a9f30: 7370 6163 6573 2077 6974 6820 3c62 3e3c spaces with <\n-001a9f40: 636f 6465 3e73 6f61 7063 7070 3220 2d71 code>soapcpp2 -q\n-001a9f50: 206e 616d 653c 2f63 6f64 653e 3c2f 623e name\n-001a9f60: 206f 7074 696f 6e20 3c62 3e3c 636f 6465 option -q name<\n-001a9f80: 2f62 3e2c 2069 6620 7468 6520 696e 7465 /b>, if the inte\n-001a9f90: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil\n-001a9fa0: 6520 696e 7075 7420 746f 2073 6f61 7063 e input to soapc\n-001a9fb0: 7070 3220 646f 6573 206e 6f74 2061 6c72 pp2 does not alr\n-001a9fc0: 6561 6479 2064 6563 6c61 7265 2061 2043 eady declare a C\n-001a9fd0: 2b2b 206e 616d 6573 7061 6365 2e20 4120 ++ namespace. A \n-001a9fe0: 636c 6561 6e20 7365 7061 7261 7469 6f6e clean separation\n-001a9ff0: 206f 6620 6c69 6272 6172 6965 7320 6361 of libraries ca\n-001aa000: 6e20 616c 736f 2062 6520 6163 6869 6576 n also be achiev\n-001aa010: 6564 2077 6974 6820 432b 2b20 6e61 6d65 ed with C++ name\n-001aa020: 7370 6163 6573 2c20 7365 6520 5365 6374 spaces, see Sect\n-001aa030: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion How to build a\n-001aa070: 2063 6c69 656e 7420 6f72 2073 6572 7665 client or serve\n-001aa080: 7220 696e 2061 2043 2b2b 2063 6f64 6520 r in a C++ code \n-001aa090: 6e61 6d65 7370 6163 653c 2f61 3e20 2e3c namespace .<\n-001aa0a0: 2f70 3e0a 3c70 3e55 6e6c 6573 7320 796f /p>.

    Unless yo\n-001aa0b0: 7520 7573 6520 7468 6520 636c 6965 6e74 u use the client\n-001aa0c0: 2070 726f 7879 2061 6e64 2073 6572 7665 proxy and serve\n-001aa0d0: 7220 6f62 6a65 6374 2063 6c61 7373 6573 r object classes\n-001aa0e0: 2028 3c65 6d3e 3c63 6f64 653e 736f 6170 (soap\n-001aa0f0: 5859 5a50 726f 7879 2e68 3c2f 636f 6465 XYZProxy.h and <\n-001aa110: 636f 6465 3e73 6f61 7058 595a 5365 7276 code>soapXYZServ\n-001aa120: 6963 652e 683c 2f63 6f64 653e 3c2f 656d ice.h), all client a\n-001aa140: 6e64 2073 6572 7665 7220 6170 706c 6963 nd server applic\n-001aa150: 6174 696f 6e73 206d 7573 7420 6578 706c ations must expl\n-001aa160: 6963 6974 6c79 2073 6574 2074 6865 206e icitly set the n\n-001aa170: 616d 6573 7061 6365 7320 7661 6c75 6520 amespaces value \n-001aa180: 6f66 2074 6865 203c 636f 6465 3e3c 6120 of the soap context\n-001aa1f0: 2077 6974 683a 3c2f 703e 0a3c 6469 7620 with:

    .

    where\n-001aa350: 2074 6865 203c 636f 6465 3e6e 616d 6573 the names\n-001aa360: 7061 6365 735b 5d3c 2f63 6f64 653e 2074 paces[] t\n-001aa370: 6162 6c65 2073 686f 756c 6420 6265 2064 able should be d\n-001aa380: 6566 696e 6564 2069 6e20 7468 6520 636c efined in the cl\n-001aa390: 6965 6e74 2f73 6572 7665 7220 736f 7572 ient/server sour\n-001aa3a0: 6365 2e20 5468 6573 6520 7461 626c 6573 ce. These tables\n-001aa3b0: 2061 7265 2067 656e 6572 6174 6564 2069 are generated i\n-001aa3c0: 6e20 7468 6520 3c65 6d3e 3c63 6f64 653e n the \n-001aa3d0: 2e6e 736d 6170 3c2f 636f 6465 3e3c 2f65 .nsmap files. The ta\n-001aa3f0: 626c 6573 2061 7265 2072 656e 616d 6564 bles are renamed\n-001aa400: 2066 6f72 2063 6f6e 7665 6e69 656e 6365 for convenience\n-001aa410: 2075 7369 6e67 203c 623e 3c63 6f64 653e using \n-001aa420: 736f 6170 6370 7032 202d 6e3c 2f63 6f64 soapcpp2 -n option -n\n-001aa450: 3c2f 623e 2c20 7365 6520 5365 6374 696f , see Sectio\n-001aa460: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n soapcpp2 optio\n-001aa4a0: 6e73 3c2f 613e 202e 3c2f 703e 0a3c 703e ns .

    .

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

    .How to\n-001aa510: 2062 7569 6c64 206d 6f64 756c 6573 2061 build modules a\n-001aa520: 6e64 206c 6962 7261 7269 6573 2077 6974 nd libraries wit\n-001aa530: 6820 7468 6520 236d 6f64 756c 6520 6469 h the #module di\n-001aa540: 7265 6374 6976 653c 2f68 323e 0a3c 703e rective

    .

    \n-001aa550: 5468 6520 3c63 6f64 653e 236d 6f64 756c The #modul\n-001aa560: 653c 2f63 6f64 653e 2064 6972 6563 7469 e directi\n-001aa570: 7665 2069 7320 7573 6564 2074 6f20 6275 ve is used to bu\n-001aa580: 696c 6420 6d6f 6475 6c65 7320 7769 7468 ild modules with\n-001aa590: 2073 6f61 7063 7070 322e 2041 206c 6962 soapcpp2. A lib\n-001aa5a0: 7261 7279 2063 616e 2062 6520 6275 696c rary can be buil\n-001aa5b0: 7420 6672 6f6d 2061 206d 6f64 756c 6520 t from a module \n-001aa5c0: 616e 6420 6c69 6e6b 6564 2077 6974 6820 and linked with \n-001aa5d0: 6d75 6c74 6970 6c65 2057 6562 2073 6572 multiple Web ser\n-001aa5e0: 7669 6365 7320 6170 706c 6963 6174 696f vices applicatio\n-001aa5f0: 6e73 2e20 5468 6520 6469 7265 6374 6976 ns. The directiv\n-001aa600: 6520 7368 6f75 6c64 2061 7070 6561 7220 e should appear \n-001aa610: 6174 2074 6865 2074 6f70 206f 6620 7468 at the top of th\n-001aa620: 6520 696e 7465 7266 6163 6520 6865 6164 e interface head\n-001aa630: 6572 2066 696c 6520 666f 7220 736f 6170 er file for soap\n-001aa640: 6370 7032 2061 6e64 2068 6173 2074 6865 cpp2 and has the\n-001aa650: 2066 6f6c 6c6f 7769 6e67 2066 6f72 6d61 following forma\n-001aa660: 7473 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ts:

    .
    \n-001aa690: 3c73 7061 6e20 636c 6173 733d 2270 7265 #modu\n-001aa6b0: 6c65 2026 7175 6f74 3b6e 616d 6526 7175 le "name&qu\n-001aa6c0: 6f74 3b3c 2f73 7061 6e3e 203c 2f64 6976 ot; .

    and<\n-001aa6f0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    #module &\n-001aa740: 7175 6f74 3b6e 616d 6526 7175 6f74 3b3c quot;name"<\n-001aa750: 2f73 7061 6e3e 2026 7175 6f74 3b66 756c /span> "ful\n-001aa760: 6c6e 616d 6526 7175 6f74 3b3c 2f64 6976 lname".

    wher\n-001aa790: 6520 7468 6520 3c63 6f64 653e 6e61 6d65 e the name\n-001aa7a0: 3c2f 636f 6465 3e20 6d75 7374 2062 6520 must be \n-001aa7b0: 6120 756e 6971 7565 2073 686f 7274 206e a unique short n\n-001aa7c0: 616d 6520 666f 7220 7468 6520 6d6f 6475 ame for the modu\n-001aa7d0: 6c65 2e20 5468 6520 6e61 6d65 2069 7320 le. The name is \n-001aa7e0: 6361 7365 2069 6e73 656e 7369 7469 7665 case insensitive\n-001aa7f0: 2061 6e64 206d 7573 7420 6e6f 7420 6578 and must not ex\n-001aa800: 6365 6564 2034 2063 6861 7261 6374 6572 ceed 4 character\n-001aa810: 7320 696e 206c 656e 6774 682e 2054 6865 s in length. The\n-001aa820: 203c 636f 6465 3e66 756c 6c6e 616d 653c fullname<\n-001aa830: 2f63 6f64 653e 2c20 7768 656e 2070 7265 /code>, when pre\n-001aa840: 7365 6e74 2c20 7265 7072 6573 656e 7473 sent, represents\n-001aa850: 2074 6865 2066 756c 6c20 6e61 6d65 206f the full name o\n-001aa860: 6620 7468 6520 6d6f 6475 6c65 2061 6e64 f the module and\n-001aa870: 2069 7320 7573 6564 2074 6f20 7072 6566 is used to pref\n-001aa880: 6978 2074 6865 2066 756e 6374 696f 6e20 ix the function \n-001aa890: 6e61 6d65 7320 6f66 2074 6865 2067 656e names of the gen\n-001aa8a0: 6572 6174 6564 2073 6572 6961 6c69 7a65 erated serialize\n-001aa8b0: 7273 2072 6570 6c61 6369 6e67 2074 6865 rs replacing the\n-001aa8c0: 2075 7375 616c 203c 636f 6465 3e73 6f61 usual soa\n-001aa8d0: 703c 2f63 6f64 653e 2070 7265 6669 782e p prefix.\n-001aa8e0: 2049 6620 6162 7365 6e74 2c20 7468 6520 If absent, the \n-001aa8f0: 7368 6f72 7420 6e61 6d65 2069 7320 7573 short name is us\n-001aa900: 6564 2074 6f20 7072 6566 6978 2074 6865 ed to prefix the\n-001aa910: 2066 756e 6374 696f 6e20 6e61 6d65 7320 function names \n-001aa920: 6f66 2074 6865 2073 6572 6961 6c69 7a65 of the serialize\n-001aa930: 7273 2e3c 2f70 3e0a 3c70 3e54 6865 2072 rs.

    .

    The r\n-001aa940: 6573 7420 6f66 2074 6865 2063 6f6e 7465 est of the conte\n-001aa950: 6e74 206f 6620 7468 6520 696e 7465 7266 nt of the interf\n-001aa960: 6163 6520 6865 6164 6572 2066 696c 6520 ace header file \n-001aa970: 696e 636c 7564 6573 2074 7970 6520 6465 includes type de\n-001aa980: 636c 6172 6174 696f 6e73 2061 6e64 206f clarations and o\n-001aa990: 7074 696f 6e61 6c6c 7920 7468 6520 6465 ptionally the de\n-001aa9a0: 636c 6172 6174 696f 6e73 206f 6620 7365 clarations of se\n-001aa9b0: 7276 6963 6520 6f70 6572 6174 696f 6e73 rvice operations\n-001aa9c0: 2061 6e64 2053 4f41 5020 4865 6164 6572 and SOAP Header\n-001aa9d0: 7320 616e 6420 4661 756c 7473 2074 6861 s and Faults tha\n-001aa9e0: 7420 6172 6520 756e 6976 6572 7361 6c6c t are universall\n-001aa9f0: 7920 7573 6564 2062 7920 534f 4150 2073 y used by SOAP s\n-001aaa00: 6572 7669 6365 732c 2077 6865 6e20 6170 ervices, when ap\n-001aaa10: 706c 6963 6162 6c65 2e20 5768 656e 2074 plicable. When t\n-001aaa20: 6865 2073 6f61 7063 7070 3220 746f 6f6c he soapcpp2 tool\n-001aaa30: 2070 726f 6365 7373 6573 2074 6865 2068 processes the h\n-001aaa40: 6561 6465 7220 6669 6c65 206d 6f64 756c eader file modul\n-001aaa50: 652c 2069 7420 7769 6c6c 2067 656e 6572 e, it will gener\n-001aaa60: 6174 6520 7468 6520 736f 7572 6365 2063 ate the source c\n-001aaa70: 6f64 6573 2066 6f72 2061 206c 6962 7261 odes for a libra\n-001aaa80: 7279 2e20 5468 6520 5765 6220 7365 7276 ry. The Web serv\n-001aaa90: 6963 6573 2061 7070 6c69 6361 7469 6f6e ices application\n-001aaaa0: 2074 6861 7420 7573 6573 2074 6865 206c that uses the l\n-001aaab0: 6962 7261 7279 2073 686f 756c 6420 7573 ibrary should us\n-001aaac0: 6520 6120 6865 6164 6572 2066 696c 6520 e a header file \n-001aaad0: 7468 6174 2069 6d70 6f72 7473 2074 6865 that imports the\n-001aaae0: 206d 6f64 756c 6520 7769 7468 2074 6865 module with the\n-001aaaf0: 203c 636f 6465 3e23 696d 706f 7274 3c2f #import directive,\n-001aab10: 2066 6f72 2065 7861 6d70 6c65 3a3c 2f70 for example:.

    \n-001aab60: 2f2a 2043 6f6e 7465 6e74 7320 6f66 2066 /* Contents of f\n-001aab70: 696c 6520 2671 756f 743b 6d6f 6475 6c65 ile "module\n-001aab80: 2e68 2671 756f 743b 202a 2f3c 2f73 7061 .h" */
    .
    #module &\n-001aabd0: 7175 6f74 3b74 6573 7426 7175 6f74 3b3c quot;test"<\n-001aabe0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-001aac00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n-001aac30: 2f20 7479 7065 7320 616e 6420 7479 7065 / types and type\n-001aac40: 6465 6673 2062 6563 6f6d 6520 6d6f 6475 defs become modu\n-001aac50: 6c65 2d73 7065 6369 6669 633c 2f73 7061 le-specific
    .
    typedef \n-001aaca0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 LONG64 xsd\n-001aad00: 5f5f 6c6f 6e67 3b3c 2f64 6976 3e0a 3c64 __long;
    .\n-001aad20: 3c73 7061 6e20 636c 6173 733d 226b 6579 char*;
    .\n-001aad60: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61

    .
    \n-001aad90: 2f2f 2061 206d 6f64 756c 652d 7370 6563 // a module-spec\n-001aada0: 6966 6963 2073 7472 7563 743c 2f73 7061 ific struct
    .
    struct n\n-001aadf0: 735f 5f53 203c 2f64 6976 3e0a 3c64 6976 s__S
    .{<\n-001aae10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... \n-001aae30: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // members\n-001aae50: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001aae70: 7d3b 3c2f 6469 763e 0a3c 2f64 6976 3e3c };
    .
    <\n-001aae80: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-001aae90: 3c70 3e54 6865 203c 656d 3e3c 636f 6465

    The module.h\n-001aaeb0: 3c2f 656d 3e20 6461 7461 2062 696e 6469 data bindi\n-001aaec0: 6e67 2069 6e74 6572 6661 6365 2068 6561 ng interface hea\n-001aaed0: 6465 7220 6669 6c65 2066 6f72 2073 6f61 der file for soa\n-001aaee0: 7063 7070 3220 6465 636c 6172 6573 206d pcpp2 declares m\n-001aaef0: 6f64 756c 652d 7370 6563 6966 6963 2073 odule-specific s\n-001aaf00: 6572 6961 6c69 7a61 626c 6520 7479 7065 erializable type\n-001aaf10: 7320 3c63 6f64 653e 4c4f 4e47 3634 3c2f s LONG64, xsd\n-001aaf30: 5f5f 6c6f 6e67 3c2f 636f 6465 3e2c 203c __long, <\n-001aaf40: 636f 6465 3e63 6861 722a 3c2f 636f 6465 code>char*, and a s\n-001aaf60: 7472 7563 7420 6e73 5f5f 533c 2f63 6f64 truct ns__S. The module n\n-001aaf80: 616d 6520 6973 2022 7465 7374 222c 2073 ame is \"test\", s\n-001aaf90: 6f20 7468 6520 736f 6170 6370 7032 2074 o the soapcpp2 t\n-001aafa0: 6f6f 6c20 7072 6f64 7563 6573 2061 203c ool produces a <\n-001aafb0: 656d 3e3c 636f 6465 3e74 6573 7443 2e63 em>testC.c\n-001aafc0: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2066 pp f\n-001aafd0: 696c 6520 7769 7468 2074 6865 2058 4d4c ile with the XML\n-001aafe0: 2073 6572 6961 6c69 7a65 7273 2066 6f72 serializers for\n-001aaff0: 2074 6865 7365 2074 7970 6573 2e20 5468 these types. Th\n-001ab000: 6520 3c65 6d3e 3c63 6f64 653e 7465 7374 e test\n-001ab010: 432e 6370 703c 2f63 6f64 653e 3c2f 656d C.cpp data binding i\n-001ab030: 6d70 6c65 6d65 6e74 6174 696f 6e20 736f mplementation so\n-001ab040: 7572 6365 2063 6f64 6520 6361 6e20 6265 urce code can be\n-001ab050: 2073 6570 6172 6174 656c 7920 636f 6d70 separately comp\n-001ab060: 696c 6564 2061 6e64 206c 696e 6b65 6420 iled and linked \n-001ab070: 7769 7468 2061 6e20 6170 706c 6963 6174 with an applicat\n-001ab080: 696f 6e2e 2049 6620 7365 7276 6963 6520 ion. If service \n-001ab090: 6f70 6572 6174 696f 6e73 2061 7265 2064 operations are d\n-001ab0a0: 6563 6c61 7265 6420 696e 2074 6865 2069 eclared in the i\n-001ab0b0: 6e74 6572 6661 6365 2068 6561 6465 7220 nterface header \n-001ab0c0: 6669 6c65 2061 7320 6675 6e63 7469 6f6e file as function\n-001ab0d0: 2070 726f 746f 7479 7065 732c 2077 6520 prototypes, we \n-001ab0e0: 616c 736f 2067 6574 203c 656d 3e3c 636f also get testClient.cp\n-001ab100: 703c 2f63 6f64 653e 3c2f 656d 3e20 636c p cl\n-001ab110: 6965 6e74 2073 7475 6220 6675 6e63 7469 ient stub functi\n-001ab120: 6f6e 7320 616e 6420 3c65 6d3e 3c63 6f64 ons and testServer.cpp\n-001ab140: 3c2f 636f 6465 3e3c 2f65 6d3e 2073 6572 ser\n-001ab150: 7665 7220 736b 656c 6574 6f6e 2066 756e ver skeleton fun\n-001ab160: 6374 696f 6e73 2e3c 2f70 3e0a 3c70 3e54 ctions.

    .

    T\n-001ab170: 6865 7265 2061 7265 2073 6f6d 6520 6c69 here are some li\n-001ab180: 6d69 7461 7469 6f6e 7320 666f 7220 6d6f mitations for mo\n-001ab190: 6475 6c65 2069 6d70 6f72 7473 3a3c 2f70 dule imports:.

      .
    • A mod\n-001ab1b0: 756c 6520 6d75 7374 2062 6520 696d 706f ule must be impo\n-001ab1c0: 7274 6564 2069 6e74 6f20 616e 6f74 6865 rted into anothe\n-001ab1d0: 7220 696e 7465 7266 6163 6520 6865 6164 r interface head\n-001ab1e0: 6572 2074 6f20 7573 6520 7468 6520 6d6f er to use the mo\n-001ab1f0: 6475 6c65 2773 2074 7970 6520 6465 6669 dule's type defi\n-001ab200: 6e69 7469 6f6e 732e 3c2f 6c69 3e0a 3c6c nitions.
    • .When multiple \n-001ab220: 6d6f 6475 6c65 7320 6172 6520 696d 706f modules are impo\n-001ab230: 7274 6564 2c20 7468 6520 7479 7065 7320 rted, the types \n-001ab240: 7468 6174 2074 6865 7920 6465 636c 6172 that they declar\n-001ab250: 6520 6d75 7374 2062 6520 6465 636c 6172 e must be declar\n-001ab260: 6564 2069 6e20 6f6e 6520 6d6f 6475 6c65 ed in one module\n-001ab270: 206f 6e6c 7920 746f 2061 766f 6964 206e only to avoid n\n-001ab280: 616d 6520 636c 6173 6865 7320 616e 6420 ame clashes and \n-001ab290: 6c69 6e6b 2065 7272 6f72 732e 2059 6f75 link errors. You\n-001ab2a0: 2063 616e 6e6f 7420 6372 6561 7465 2074 cannot create t\n-001ab2b0: 776f 206d 6f64 756c 6573 2074 6861 7420 wo modules that \n-001ab2c0: 6465 636c 6172 6520 6f72 2075 7365 2074 declare or use t\n-001ab2d0: 6865 2073 616d 6520 7479 7065 2061 6e64 he same type and\n-001ab2e0: 2069 6d70 6f72 7420 7468 6573 6520 6d6f import these mo\n-001ab2f0: 6475 6c65 7320 7365 7061 7261 7465 6c79 dules separately\n-001ab300: 2069 6e74 6f20 616e 6f74 6865 7220 6865 into another he\n-001ab310: 6164 6572 2066 696c 652e 2057 6865 6e20 ader file. When \n-001ab320: 7573 696e 6720 6d6f 6475 6c65 732c 2063 using modules, c\n-001ab330: 6f6e 7369 6465 7220 6372 6561 7469 6e67 onsider creating\n-001ab340: 2061 206d 6f64 756c 6520 6869 6572 6172 a module hierar\n-001ab350: 6368 7920 7375 6368 2074 6861 7420 7479 chy such that ty\n-001ab360: 7065 7320 6172 6520 6465 636c 6172 6564 pes are declared\n-001ab370: 206f 6e6c 7920 6f6e 6365 2061 6e64 2062 only once and b\n-001ab380: 7920 6f6e 6c79 206f 6e65 206d 6f64 756c y only one modul\n-001ab390: 6520 7768 656e 2074 6865 7365 206d 6f64 e when these mod\n-001ab3a0: 756c 6573 206d 7573 7420 6265 206c 696e ules must be lin\n-001ab3b0: 6b65 642e 3c2f 6c69 3e0a 3c2f 756c 3e0a ked..
    .\n-001ab3c0: 3c70 3e57 6974 6820 6d6f 6475 6c65 732c

    With modules,\n-001ab3d0: 2074 6865 2073 6f75 7263 6520 636f 6465 the source code\n-001ab3e0: 2073 6572 6961 6c69 7a65 7273 2066 6f72 serializers for\n-001ab3f0: 2074 6865 2074 7970 6573 2064 6566 696e the types defin\n-001ab400: 6564 2069 6e20 7468 6520 6d6f 6475 6c65 ed in the module\n-001ab410: 7320 6172 6520 6765 6e65 7261 7465 6420 s are generated \n-001ab420: 7769 7468 2073 6f61 7063 7070 3220 7365 with soapcpp2 se\n-001ab430: 7061 7261 7465 6c79 2e20 466f 7220 6578 parately. For ex\n-001ab440: 616d 706c 652c 2061 7373 756d 6520 7468 ample, assume th\n-001ab450: 6174 2077 6520 6861 7665 2061 206d 6f64 at we have a mod\n-001ab460: 756c 6520 3c65 6d3e 3c63 6f64 653e 6d6f ule mo\n-001ab470: 6475 6c65 2e68 3c2f 636f 6465 3e3c 2f65 dule.h:

    .
    \n-001ab4b0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* Content\n-001ab4d0: 7320 6f66 2066 696c 6520 2671 756f 743b s of file "\n-001ab4e0: 6d6f 6475 6c65 2e68 2671 756f 743b 202a module.h" *\n-001ab4f0: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .<\n-001ab500: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001ab510: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#mod\n-001ab530: 756c 6520 2671 756f 743b 7465 7374 2671 ule "test&q\n-001ab540: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;.
    .struct ns__S
    .\n-001ab5c0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    char *name;
    \n-001ab610: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int amou\n-001ab650: 6e74 3b3c 2f64 6976 3e0a 3c64 6976 2063 nt;
    .
    };.

    a\n-001ab690: 6e64 2061 2068 6561 6465 7220 6669 6c65 nd a header file\n-001ab6a0: 203c 656d 3e3c 636f 6465 3e65 7861 6d70 examp\n-001ab6b0: 6c65 2e68 3c2f 636f 6465 3e3c 2f65 6d3e le.h\n-001ab6c0: 2074 6861 7420 7573 6573 2069 743a 3c2f that uses it:.

    /* Contents of \n-001ab720: 6669 6c65 2026 7175 6f74 3b65 7861 6d70 file "examp\n-001ab730: 6c65 2e68 2671 756f 743b 202a 2f3c 2f73 le.h" */
    .
    #import \n-001ab780: 2671 756f 743b 6d6f 6475 6c65 2e68 2671 "module.h&q\n-001ab790: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;.
    .int ns__webmethod\n-001ab800: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (const ch\n-001ab840: 6172 3c2f 7370 616e 3e20 2a63 6f64 652c ar *code,\n-001ab850: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct ns__S *reco\n-001ab880: 7264 2c20 3c73 7061 6e20 636c 6173 733d rd, in\n-001ab8a0: 743c 2f73 7061 6e3e 202a 7265 7375 6c74 t *result\n-001ab8b0: 293b 2020 2020 3c2f 6469 763e 0a3c 2f64 );
    .

    The modul\n-001ab8e0: 6520 6973 2063 6f6d 7069 6c65 6420 6173 e is compiled as\n-001ab8f0: 2066 6f6c 6c6f 7773 3a20 3c2f 703e 3c70 follows:

    soapcpp2 mod\n-001ab920: 756c 6531 2e68 0a3c 2f70 7265 3e3c 703e ule1.h.

    \n-001ab930: 2054 6869 7320 6765 6e65 7261 7465 7320 This generates \n-001ab940: 7468 6520 6669 6c65 7320 3c65 6d3e 3c63 the files testStub.h, \n-001ab970: 3c63 6f64 653e 7465 7374 482e 683c 2f63 testH.h, and <\n-001ab990: 656d 3e3c 636f 6465 3e74 6573 7443 2e63 em>testC.c\n-001ab9a0: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2077 pp w\n-001ab9b0: 6974 6820 7365 7269 616c 697a 6572 7320 ith serializers \n-001ab9c0: 666f 7220 3c63 6f64 653e 7374 7275 6374 for struct\n-001ab9d0: 206e 735f 5f53 3c2f 636f 6465 3e20 6275 ns__S bu\n-001ab9e0: 7420 616c 736f 2066 6f72 203c 636f 6465 t also for char* an\n-001aba00: 6420 3c63 6f64 653e 696e 743c 2f63 6f64 d int.

    .

    Runni\n-001aba20: 6e67 2073 6f61 7063 7070 3220 6f6e 203c ng soapcpp2 on <\n-001aba30: 656d 3e3c 636f 6465 3e65 7861 6d70 6c65 em>example\n-001aba40: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2069 .h i\n-001aba50: 6d70 6f72 7473 2074 6865 206d 6f64 756c mports the modul\n-001aba60: 6520 6465 6669 6e69 7469 6f6e 732c 2062 e definitions, b\n-001aba70: 7574 2064 6f65 7320 6e6f 7420 6765 6e65 ut does not gene\n-001aba80: 7261 7465 2073 6572 6961 6c69 7a65 7273 rate serializers\n-001aba90: 2066 6f72 203c 636f 6465 3e73 7472 7563 for struc\n-001abaa0: 7420 6e73 5f5f 533c 2f63 6f64 653e 2c20 t ns__S, \n-001abab0: 3c63 6f64 653e 6368 6172 2a3c 2f63 6f64 char* and int\n-001abad0: 3c2f 636f 6465 3e20 7369 6e63 6520 7468 since th\n-001abae0: 6573 6520 6172 6520 6465 6669 6e65 6420 ese are defined \n-001abaf0: 6279 203c 656d 3e3c 636f 6465 3e6d 6f64 by mod\n-001abb00: 756c 652e 683c 2f63 6f64 653e 3c2f 656d ule.h:

    soa\n-001abb30: 7063 7070 3220 2d43 4c20 6578 616d 706c  pcpp2 -CL exampl\n-001abb40: 652e 680a 3c2f 7072 653e 3c70 3e20 416e  e.h.

    An\n-001abb50: 2065 7861 6d70 6c65 2063 6c69 656e 7420 example client \n-001abb60: 6170 706c 6963 6174 696f 6e20 7468 6174 application that\n-001abb70: 2063 616c 6c73 2074 6865 2063 6c69 656e calls the clien\n-001abb80: 7420 7374 7562 2066 756e 6374 696f 6e3a t stub function:\n-001abb90: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    #include\n-001abbe0: 2026 7175 6f74 3b73 6f61 7048 2e68 2671 "soapH.h&q\n-001abbf0: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;.
    #\n-001abc30: 696e 636c 7564 6520 2671 756f 743b 6e73 include "ns\n-001abc40: 2e6e 736d 6170 2671 756f 743b 3c2f 7370 .nsmap"
    .
    .
    \n-001abca0: 696e 743c 2f73 7061 6e3e 206d 6169 6e28 int main(\n-001abcb0: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    {.
    stru\n-001abd00: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap *soap = soap_new()\n-001abdd0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    struct \n-001abe10: 6e73 5f5f 5320 733b 3c2f 6469 763e 0a3c ns__S s;
    .<\n-001abe20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001abe30: 3e20 2073 6f61 705f 6465 6661 756c 745f > soap_default_\n-001abe40: 6e73 5f5f 5328 3c61 2063 6c61 7373 3d22 ns__S(soa\n-001abe70: 703c 2f61 3e2c 2026 616d 703b 7329 3b3c p, &s);<\n-001abe80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s.name\n-001abea0: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_str\n-001abf00: 6475 703c 2f61 3e28 3c61 2063 6c61 7373 dup(s\n-001abf30: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, "name&\n-001abf60: 7175 6f74 3b3c 2f73 7061 6e3e 293b 3c2f quot;);.
    s.amoun\n-001abf90: 7420 3d20 3132 343b 3c2f 6469 763e 0a3c t = 124;
    .<\n-001abfa0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001abfb0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > int\n-001abfd0: 3c2f 7370 616e 3e20 6e3b 3c2f 6469 763e n;
    \n-001abfe0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-001ac010: 663c 2f73 7061 6e3e 2028 736f 6170 5f63 f (soap_c\n-001ac020: 616c 6c5f 6e73 5f5f 7765 626d 6574 686f all_ns__webmetho\n-001ac030: 6428 3c61 2063 6c61 7373 3d22 636f 6465 d(soap, endpoint, NUL\n-001ac070: 4c2c 203c 7370 616e 2063 6c61 7373 3d22 L, &\n-001ac090: 7175 6f74 3b63 6f64 6526 7175 6f74 3b3c quot;code"<\n-001ac0a0: 2f73 7061 6e3e 2c20 2661 6d70 3b73 2c20 /span>, &s, \n-001ac0b0: 2661 6d70 3b6e 2929 3c2f 6469 763e 0a3c &n))
    .<\n-001ac0c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001ac0d0: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap_pri\n-001ac130: 6e74 5f66 6175 6c74 3c2f 613e 283c 6120 nt_fault(soap, st\n-001ac170: 6465 7272 293b 3c2f 6469 763e 0a3c 6469 derr);
    . \n-001ac190: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else<\n-001ac1b0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-001ac1d0: 2020 2070 7269 6e74 6628 3c73 7061 6e20 printf("OK n\n-001ac200: 203d 2025 645c 6e26 7175 6f74 3b3c 2f73 = %d\\n", n);
    .\n-001ac220: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    <\n-001ac450: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n-001ac460: 3c70 3e57 6520 636f 6d70 696c 6520 7468

    We compile th\n-001ac470: 6973 2065 7861 6d70 6c65 2061 7320 666f is example as fo\n-001ac480: 6c6c 6f77 733a 203c 2f70 3e3c 7072 6520 llows:

    c++ -o example \n-001ac4b0: 6578 616d 706c 652e 6370 7020 7465 7374  example.cpp test\n-001ac4c0: 432e 6370 7020 736f 6170 432e 6370 7020  C.cpp soapC.cpp \n-001ac4d0: 736f 6170 436c 6965 6e74 2e63 7070 2073  soapClient.cpp s\n-001ac4e0: 7464 736f 6170 322e 6370 700a 3c2f 7072  tdsoap2.cpp.

    Modules ma\n-001ac500: 7920 6865 6c70 2074 6f20 6465 6669 6e65 y help to define\n-001ac510: 2061 206d 6f64 756c 6172 2068 6965 7261 a modular hiera\n-001ac520: 7263 6879 206f 6620 6c69 6272 6172 6965 rchy of librarie\n-001ac530: 7320 7769 7468 2072 6575 7361 626c 6520 s with reusable \n-001ac540: 7365 7269 616c 697a 6162 6c65 2074 7970 serializable typ\n-001ac550: 6573 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 es.

    .

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

    ..Plugins, m\n-001ac5c0: 6f64 756c 6573 2c20 616e 6420 6578 7465 odules, and exte\n-001ac5d0: 6e73 696f 6e73 3c2f 6832 3e0a 3c70 3e50 nsions

    .

    P\n-001ac5e0: 6c75 6769 6e73 206f 6666 6572 2061 2063 lugins offer a c\n-001ac5f0: 6f6e 7665 6e69 656e 7420 6578 7465 6e73 onvenient extens\n-001ac600: 696f 6e20 6d65 6368 616e 6973 6d20 666f ion mechanism fo\n-001ac610: 7220 7468 6520 6753 4f41 5020 746f 6f6c r the gSOAP tool\n-001ac620: 6b69 7420 6279 2065 7874 656e 6469 6e67 kit by extending\n-001ac630: 2074 6865 2063 6170 6162 696c 6974 6965 the capabilitie\n-001ac640: 7320 6f66 2069 7473 2065 6e67 696e 652e s of its engine.\n-001ac650: 2057 6865 6e20 7468 6520 706c 7567 696e When the plugin\n-001ac660: 2072 6567 6973 7465 7273 2077 6974 6820 registers with \n-001ac670: 7468 6520 6753 4f41 5020 656e 6769 6e65 the gSOAP engine\n-001ac680: 2c20 6974 2068 6173 2066 756c 6c20 6163 , it has full ac\n-001ac690: 6365 7373 2074 6f20 7468 6520 7275 6e2d cess to the run-\n-001ac6a0: 7469 6d65 2073 6574 7469 6e67 7320 616e time settings an\n-001ac6b0: 6420 7468 6520 656e 6769 6e65 2773 2066 d the engine's f\n-001ac6c0: 756e 6374 696f 6e20 6361 6c6c 6261 636b unction callback\n-001ac6d0: 732e 2055 706f 6e20 7265 6769 7374 7279 s. Upon registry\n-001ac6e0: 2c20 7468 6520 706c 7567 696e 2773 206c , the plugin's l\n-001ac6f0: 6f63 616c 2064 6174 6120 6973 2061 7373 ocal data is ass\n-001ac700: 6f63 6961 7465 6420 7769 7468 2074 6865 ociated with the\n-001ac710: 203c 636f 6465 3e3c 6120 636c 6173 733d soap context. By o\n-001ac780: 7665 7272 6964 696e 6720 7468 6520 6361 verriding the ca\n-001ac790: 6c6c 6261 636b 7320 7769 7468 2074 6865 llbacks with the\n-001ac7a0: 2070 6c75 6769 6e27 7320 6361 6c6c 6261 plugin's callba\n-001ac7b0: 636b 732c 2074 6865 2070 6c75 6769 6e20 cks, the plugin \n-001ac7c0: 6578 7465 6e64 7320 6f72 206d 6f64 6966 extends or modif\n-001ac7d0: 6965 7320 7468 6520 656e 6769 6e65 2773 ies the engine's\n-001ac7e0: 2063 6170 6162 696c 6974 6965 732e 2054 capabilities. T\n-001ac7f0: 6865 206c 6f63 616c 2070 6c75 6769 6e20 he local plugin \n-001ac800: 6461 7461 2063 616e 2062 6520 6163 6365 data can be acce\n-001ac810: 7373 6564 2074 6872 6f75 6768 2061 206c ssed through a l\n-001ac820: 6f6f 6b75 7020 6675 6e63 7469 6f6e 2c20 ookup function, \n-001ac830: 7573 7561 6c6c 7920 696e 766f 6b65 6420 usually invoked \n-001ac840: 7769 7468 696e 2061 2063 616c 6c62 6163 within a callbac\n-001ac850: 6b20 6675 6e63 7469 6f6e 2074 6f20 6163 k function to ac\n-001ac860: 6365 7373 2074 6865 2070 6c75 6769 6e20 cess the plugin \n-001ac870: 6461 7461 2e20 5468 6520 7265 6769 7374 data. The regist\n-001ac880: 7279 2061 6e64 206c 6f6f 6b75 7020 6675 ry and lookup fu\n-001ac890: 6e63 7469 6f6e 7320 6172 653a 3c2f 703e nctions are:

    \n-001ac8a0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    int soap_register_\n-001ac950: 706c 7567 696e 5f61 7267 3c2f 613e 283c plugin_arg(<\n-001ac960: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001ac970: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n-001ac9e0: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, i\n-001aca00: 6e74 3c2f 7370 616e 3e20 282a 6663 7265 nt (*fcre\n-001aca10: 6174 6529 283c 7370 616e 2063 6c61 7373 ate)(struc\n-001aca30: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n-001aca60: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, struct s\n-001acac0: 6f61 705f 706c 7567 696e 202a 702c 203c oap_plugin *p, <\n-001acad0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001acae0: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void *arg), void *arg)
    .<\n-001acc00: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-001acc10: 6922 3e69 6e74 2073 6f61 705f 7265 6769 i\">int soap_regi\n-001acc20: 7374 6572 5f70 6c75 6769 6e5f 6172 6728 ster_plugin_arg(\n-001acc30: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n-001acc40: 702c 2069 6e74 282a 6663 7265 6174 6529 p, int(*fcreate)\n-001acc50: 2873 7472 7563 7420 736f 6170 202a 2c20 (struct soap *, \n-001acc60: 7374 7275 6374 2073 6f61 705f 706c 7567 struct soap_plug\n-001acc70: 696e 202a 2c20 766f 6964 202a 292c 2076 in *, void *), v\n-001acc80: 6f69 6420 2a61 7267 293c 2f64 6976 3e3c oid *arg)
    <\n-001acc90: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n-001acca0: 223e 5265 6769 7374 6572 2061 2070 6c75 \">Register a plu\n-001accb0: 6769 6e20 7769 7468 2061 6e20 6172 6775 gin with an argu\n-001accc0: 6d65 6e74 2e3c 2f64 6976 3e3c 2f64 6976 ment..
    \n-001acd00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    void\n-001acd30: 3c2f 7370 616e 3e2a 2073 6f61 705f 6c6f * soap_lo\n-001acd40: 6f6b 7570 5f70 6c75 6769 6e28 3c73 7061 okup_plugin(struct \n-001acd70: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap*\n-001acda0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const c\n-001acde0: 6861 723c 2f73 7061 6e3e 2a29 3b3c 2f64 har*);.

    Th\n-001ace10: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap_copy\n-001aced0: 3c2f 636f 6465 3e20 6675 6e63 7469 6f6e function\n-001acee0: 2072 6574 7572 6e73 2061 206e 6577 2064 returns a new d\n-001acef0: 796e 616d 6963 616c 6c79 2061 6c6c 6f63 ynamically alloc\n-001acf00: 6174 6564 203c 636f 6465 3e3c 6120 636c ated soap<\n-001acf60: 2f63 6f64 653e 2063 6f6e 7465 7874 2074 /code> context t\n-001acf70: 6861 7420 6973 2061 2063 6f70 7920 6f66 hat is a copy of\n-001acf80: 2061 6e6f 7468 6572 2c20 7375 6368 2074 another, such t\n-001acf90: 6861 7420 6e6f 2064 6174 6120 6973 2073 hat no data is s\n-001acfa0: 6861 7265 6420 6265 7477 6565 6e20 7468 hared between th\n-001acfb0: 6520 636f 7079 2061 6e64 2074 6865 206f e copy and the o\n-001acfc0: 7269 6769 6e61 6c20 636f 6e74 6578 742e riginal context.\n-001acfd0: 2054 6865 203c 636f 6465 3e3c 6120 636c The soap_copy<\n-001ad090: 2f61 3e3c 2f63 6f64 653e 2066 756e 6374 /a> funct\n-001ad0a0: 696f 6e20 696e 766f 6b65 7320 7468 6520 ion invokes the \n-001ad0b0: 636f 7079 2066 756e 6374 696f 6e73 206f copy functions o\n-001ad0c0: 6620 7468 6520 7265 6769 7374 6572 6564 f the registered\n-001ad0d0: 2070 6c75 6769 6e73 2074 6f20 636f 7079 plugins to copy\n-001ad0e0: 2074 6865 2070 6c75 6769 6e73 2720 6c6f the plugins' lo\n-001ad0f0: 6361 6c20 6461 7461 2e20 5468 6520 3c63 cal data. The soap_don\n-001ad1d0: 653c 2f61 3e3c 2f63 6f64 653e 2061 6e64 e and\n-001ad1e0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_free\n-001ad290: 3c2f 613e 3c2f 636f 6465 3e20 6675 6e63 func\n-001ad2a0: 7469 6f6e 7320 6465 2d72 6567 6973 7465 tions de-registe\n-001ad2b0: 7273 2061 6c6c 2070 6c75 6769 6e2e 3c2f rs all plugin..

    The follow\n-001ad2d0: 2065 7861 6d70 6c65 206f 7665 7272 6964 example overrid\n-001ad2e0: 6573 2074 6865 2073 656e 6420 616e 6420 es the send and \n-001ad2f0: 7265 6365 6976 6520 6361 6c6c 6261 636b receive callback\n-001ad300: 7320 746f 2063 6f70 7920 616c 6c20 6d65 s to copy all me\n-001ad310: 7373 6167 6573 2074 6861 7420 6172 6520 ssages that are \n-001ad320: 7365 6e74 2061 6e64 2072 6563 6569 7665 sent and receive\n-001ad330: 6420 746f 2074 6865 2074 6572 6d69 6e61 d to the termina\n-001ad340: 6c20 2873 7464 6572 7229 2e3c 2f70 3e0a l (stderr).

    .\n-001ad350: 3c70 3e46 6972 7374 2c20 7765 2077 7269

    First, we wri\n-001ad360: 7465 2061 2068 6561 6465 7220 6669 6c65 te a header file\n-001ad370: 203c 656d 3e3c 636f 6465 3e70 6c75 6769 plugi\n-001ad380: 6e2e 683c 2f63 6f64 653e 3c2f 656d 3e20 n.h \n-001ad390: 746f 2064 6566 696e 6520 7468 6520 6c6f to define the lo\n-001ad3a0: 6361 6c20 706c 7567 696e 2064 6174 6120 cal plugin data \n-001ad3b0: 7374 7275 6374 7572 6528 7329 2061 6e64 structure(s) and\n-001ad3c0: 2077 6520 6465 6669 6e65 2061 2067 6c6f we define a glo\n-001ad3d0: 6261 6c20 6e61 6d65 2074 6f20 6964 656e bal name to iden\n-001ad3e0: 7469 6679 2074 6865 2070 6c75 6769 6e3a tify the plugin:\n-001ad3f0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    #include\n-001ad440: 2026 7175 6f74 3b3c 6120 636c 6173 733d "s\n-001ad470: 7464 736f 6170 322e 683c 2f61 3e26 7175 tdsoap2.h&qu\n-001ad480: 6f74 3b3c 2f73 7061 6e3e 203c 2f64 6976 ot; .
    #\n-001ad4c0: 6465 6669 6e65 2050 4c55 4749 4e5f 4944 define PLUGIN_ID\n-001ad4d0: 2026 7175 6f74 3b50 4c55 4749 4e2d 312e "PLUGIN-1.\n-001ad4e0: 3026 7175 6f74 3b3c 2f73 7061 6e3e 203c 0" <\n-001ad4f0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001ad500: 656e 7422 3e2f 2f20 736f 6d65 206e 616d ent\">// some nam\n-001ad510: 6520 746f 2069 6465 6e74 6966 7920 706c e to identify pl\n-001ad520: 7567 696e 203c 2f73 7061 6e3e 3c2f 6469 ugin .
    .<\n-001ad560: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001ad570: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct plugin_data <\n-001ad590: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001ad5a0: 656e 7422 3e2f 2f20 6c6f 6361 6c20 706c ent\">// local pl\n-001ad5b0: 7567 696e 2064 6174 6120 3c2f 7370 616e ugin data
    .
    {.
    int (*fsen\n-001ad600: 6429 283c 7370 616e 2063 6c61 7373 3d22 d)(struct \n-001ad620: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n-001ad650: 6170 3c2f 613e 2a2c 203c 7370 616e 2063 ap*, c\n-001ad670: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char*, size_t); // to save an\n-001ad6d0: 6420 7573 6520 7365 6e64 2063 616c 6c62 d use send callb\n-001ad6e0: 6163 6b20 3c2f 7370 616e 3e3c 2f64 6976 ack .
    size_t (*<\n-001ad710: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001ad720: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001ad730: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm\n-001ad740: 6c23 6761 3063 3231 3863 6435 3535 3230 l#ga0c218cd55520\n-001ad750: 3435 3734 3563 6336 3430 3939 3865 3235 45745cc640998e25\n-001ad760: 6564 3732 223e 6672 6563 763c 2f61 3e29 ed72\">frecv)\n-001ad770: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap\n-001ad7c0: 3c2f 613e 2a2c 203c 7370 616e 2063 6c61 *, char*, s\n-001ad7f0: 697a 655f 7429 3b20 3c73 7061 6e20 636c ize_t); //\n-001ad810: 2074 6f20 7361 7665 2061 6e64 2075 7365 to save and use\n-001ad820: 2072 6563 7620 6361 6c6c 6261 636b 203c recv callback <\n-001ad830: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .}\n-001ad850: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    int \n-001ad890: 706c 7567 696e 283c 7370 616e 2063 6c61 plugin(str\n-001ad8b0: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, struct\n-001ad940: 2073 6f61 705f 706c 7567 696e 202a 706c soap_plugin *pl\n-001ad950: 7567 696e 2c20 3c73 7061 6e20 636c 6173 ugin, \n-001ad970: 766f 6964 3c2f 7370 616e 3e20 2a61 7267 void *arg\n-001ad980: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    \n-001ad9e0: 7374 6473 6f61 7032 2e68 3c2f 613e 3c2f stdsoap2.h
    This file\n-001ada10: 2064 6566 696e 6573 2074 6865 2063 6f6d defines the com\n-001ada20: 6d6f 6e20 6d61 6372 6f73 2c20 7479 7065 mon macros, type\n-001ada30: 7320 616e 6420 6675 6e63 7469 6f6e 7320 s and functions \n-001ada40: 6f66 2074 6865 2067 534f 4150 2041 5049 of the gSOAP API\n-001ada50: 2067 726f 7570 6564 2062 7920 6d6f 6475 grouped by modu\n-001ada60: 6c65 733c 2f64 6976 3e3c 2f64 6976 3e0a les
    .\n-001ada70: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    Then, \n-001ada90: 7765 2077 7269 7465 2074 6865 2070 6c75 we write the plu\n-001adaa0: 6769 6e20 7265 6769 7374 7279 2066 756e gin registry fun\n-001adab0: 6374 696f 6e20 616e 6420 7468 6520 6361 ction and the ca\n-001adac0: 6c6c 6261 636b 733a 3c2f 703e 0a3c 6469 llbacks:

    .
    \n-001adb10: 2369 6e63 6c75 6465 2026 7175 6f74 3b70 #include "p\n-001adb20: 6c75 6769 6e2e 6826 7175 6f74 3b3c 2f73 lugin.h"
    . <\n-001adb50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st\n-001adb80: 6174 6963 3c2f 7370 616e 3e20 3c73 7061 atic const <\n-001adbb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001adbc0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char plugin_id[]\n-001adbe0: 203d 2050 4c55 4749 4e5f 4944 3b20 3c73 = PLUGIN_ID; // the plugi\n-001adc10: 6e20 6964 203c 2f73 7061 6e3e 3c2f 6469 n id .
    stati\n-001adc50: 633c 2f73 7061 6e3e 203c 7370 616e 2063 c int pl\n-001adc80: 7567 696e 5f69 6e69 7428 3c73 7061 6e20 ugin_init(\n-001adca0: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n-001adce0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001adcf0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001add00: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001add10: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct plugin_data \n-001add40: 2a64 6174 6129 3b20 3c2f 6469 763e 0a3c *data);
    .<\n-001add50: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001add60: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >static i\n-001adda0: 6e74 3c2f 7370 616e 3e20 706c 7567 696e nt plugin\n-001addb0: 5f63 6f70 7928 3c73 7061 6e20 636c 6173 _copy(stru\n-001addd0: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, struct \n-001ade60: 736f 6170 5f70 6c75 6769 6e20 2a64 7374 soap_plugin *dst\n-001ade70: 2c20 3c73 7061 6e20 636c 6173 733d 226b , struct soap_plugi\n-001adea0: 6e20 2a73 7263 293b 203c 2f64 6976 3e0a n *src);
    .\n-001adeb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    static \n-001adf00: 766f 6964 3c2f 7370 616e 3e20 706c 7567 void plug\n-001adf10: 696e 5f64 656c 6574 6528 3c73 7061 6e20 in_delete(\n-001adf30: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n-001adf70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001adf80: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001adf90: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001adfa0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap_plugin \n-001adfd0: 2a70 293b 203c 2f64 6976 3e0a 3c64 6976 *p);
    .static int<\n-001ae030: 2f73 7061 6e3e 2070 6c75 6769 6e5f 7365 /span> plugin_se\n-001ae040: 6e64 283c 7370 616e 2063 6c61 7373 3d22 nd(struct<\n-001ae060: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n-001ae090: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n-001ae0c0: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, c\n-001ae0e0: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *buf<\n-001ae160: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, s\n-001ae180: 697a 655f 743c 2f73 7061 6e3e 206c 656e ize_t len\n-001ae190: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    ..
    ..
    p->\n-001ae500: 3b69 6420 3d20 706c 7567 696e 5f69 643b ;id = plugin_id;\n-001ae510: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    p-&g\n-001ae530: 743b 6461 7461 203d 2028 3c73 7061 6e20 t;data = (void*\n-001ae560: 296d 616c 6c6f 6328 3c73 7061 6e20 636c )malloc(si\n-001ae580: 7a65 6f66 3c2f 7370 616e 3e28 3c73 7061 zeof(struct \n-001ae5b0: 706c 7567 696e 5f64 6174 6129 293b 203c plugin_data)); <\n-001ae5c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    p->\n-001ae5e0: 6663 6f70 7920 3d20 706c 7567 696e 5f63 fcopy = plugin_c\n-001ae5f0: 6f70 793b 203c 7370 616e 2063 6c61 7373 opy; /* op\n-001ae610: 7469 6f6e 616c 3a20 7768 656e 2073 6574 tional: when set\n-001ae620: 2074 6865 2070 6c75 6769 6e20 6d75 7374 the plugin must\n-001ae630: 2063 6f70 7920 6974 7320 6c6f 6361 6c20 copy its local \n-001ae640: 6461 7461 202a 2f3c 2f73 7061 6e3e 3c2f data */.
    p->f\n-001ae670: 6465 6c65 7465 203d 2070 6c75 6769 6e5f delete = plugin_\n-001ae680: 6465 6c65 7465 3b20 3c2f 6469 763e 0a3c delete;
    .<\n-001ae690: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001ae6a0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n-001ae6c0: 2f73 7061 6e3e 2028 702d 2667 743b 6461 /span> (p->da\n-001ae6d0: 7461 2920 3c2f 6469 763e 0a3c 6469 7620 ta)
    .
    {\n-001ae6f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if\n-001ae730: 2028 706c 7567 696e 5f69 6e69 7428 3c61 (plugin_init(soap, (\n-001ae770: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct plugin_data*\n-001ae7a0: 2970 2d26 6774 3b64 6174 6129 2920 3c2f )p->data)) .
    {.
    free(\n-001ae7f0: 702d 2667 743b 6461 7461 293b 203c 7370 p->data); // error: cou\n-001ae820: 6c64 206e 6f74 2069 6e69 7420 3c2f 7370 ld not init
    .
    \n-001ae850: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n-001ae870: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn SO\n-001ae8d0: 4150 5f45 4f4d 3c2f 613e 3b20 3c73 7061 AP_EOM; // return erro\n-001ae900: 7220 3c2f 7370 616e 3e3c 2f64 6976 3e0a r
    .\n-001ae910: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .<\n-001ae930: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001ae940: 3e20 207d 3c2f 6469 763e 0a3c 6469 7620 > }
    .
    <\n-001ae960: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001ae970: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n-001ae980: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> SOAP_\n-001ae9e0: 4f4b 3c2f 613e 3b20 3c2f 6469 763e 0a3c OK;
    .<\n-001ae9f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001aea00: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}
    .
    .
    stat\n-001aea50: 6963 3c2f 7370 616e 3e20 3c73 7061 6e20 ic int p\n-001aea80: 6c75 6769 6e5f 696e 6974 283c 7370 616e lugin_init(struct <\n-001aeab0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001aeac0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001aead0: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n-001aeae0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001aeb10: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct plugin_data\n-001aeb40: 202a 6461 7461 2920 3c2f 6469 763e 0a3c *data)
    .<\n-001aeb50: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001aeb60: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    dat\n-001aeb80: 612d 2667 743b 6673 656e 6420 3d20 3c61 a->fsend = soap-&g\n-001aebc0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;fsend; // sav\n-001aec40: 6520 6f6c 6420 7265 6376 2063 616c 6c62 e old recv callb\n-001aec50: 6163 6b20 3c2f 7370 616e 3e3c 2f64 6976 ack ..
    <\n-001aed70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001aed80: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001aed90: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-001aeda0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;fsend<\n-001aee00: 2f61 3e20 3d20 706c 7567 696e 5f73 656e /a> = plugin_sen\n-001aee10: 643b 203c 7370 616e 2063 6c61 7373 3d22 d; // repl\n-001aee30: 6163 6520 7365 6e64 2063 616c 6c62 6163 ace send callbac\n-001aee40: 6b20 7769 7468 206e 6577 203c 2f73 7061 k with new
    ...
    } <\n-001af010: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .\n-001af030: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    // copy \n-001af060: 706c 7567 696e 2064 6174 612c 2063 616c plugin data, cal\n-001af070: 6c65 6420 6279 2073 6f61 705f 636f 7079 led by soap_copy\n-001af080: 2829 3c2f 7370 616e 3e3c 2f64 6976 3e0a ()
    .\n-001af090: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    // This \n-001af0c0: 6973 2069 6d70 6f72 7461 6e74 3a20 7765 is important: we\n-001af0d0: 206e 6565 6420 6120 6465 6570 2063 6f70 need a deep cop\n-001af0e0: 7920 746f 2061 766f 6964 2064 6174 6120 y to avoid data \n-001af0f0: 7368 6172 696e 6720 6279 2074 776f 2063 sharing by two c\n-001af100: 6f6e 7465 7874 7320 3c2f 7370 616e 3e3c ontexts <\n-001af110: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st\n-001af140: 6174 6963 3c2f 7370 616e 3e20 3c73 7061 atic int\n-001af170: 2070 6c75 6769 6e5f 636f 7079 283c 7370 plugin_copy(struct\n-001af1a0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n-001af1d0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, struct<\n-001af220: 2f73 7061 6e3e 2073 6f61 705f 706c 7567 /span> soap_plug\n-001af230: 696e 202a 6473 742c 203c 7370 616e 2063 in *dst, s\n-001af250: 7472 7563 743c 2f73 7061 6e3e 2073 6f61 truct soa\n-001af260: 705f 706c 7567 696e 202a 7372 6329 203c p_plugin *src) <\n-001af270: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n-001af290: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if\n-001af2c0: 3c2f 7370 616e 3e20 2821 2864 7374 2d26 (!(dst-&\n-001af2d0: 6774 3b64 6174 6120 3d20 283c 7370 616e gt;data = (struct p\n-001af300: 6c75 6769 6e5f 6461 7461 2a29 6d61 6c6c lugin_data*)mall\n-001af310: 6f63 283c 7370 616e 2063 6c61 7373 3d22 oc(sizeof<\n-001af330: 2f73 7061 6e3e 283c 7370 616e 2063 6c61 /span>(str\n-001af350: 7563 743c 2f73 7061 6e3e 2070 6c75 6769 uct plugi\n-001af360: 6e5f 6461 7461 2929 2929 203c 2f64 6976 n_data)))) .
    return \n-001af3b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_EOM\n-001af410: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    *ds\n-001af430: 742d 2667 743b 6461 7461 203d 202a 7372 t->data = *sr\n-001af440: 632d 2667 743b 6461 7461 3b20 3c2f 6469 c->data; .
    return <\n-001af490: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001af4a0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001af4b0: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g\n-001af4c0: 6133 6231 3061 3638 6633 3534 6633 3963 a3b10a68f354f39c\n-001af4d0: 6262 3066 6530 6430 3433 6164 3463 3763 bb0fe0d043ad4c7c\n-001af4e0: 3022 3e53 4f41 505f 4f4b 3c2f 613e 3b20 0\">SOAP_OK; \n-001af4f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    .// plugin de\n-001af560: 6c65 7469 6f6e 2c20 6361 6c6c 6564 2062 letion, called b\n-001af570: 7920 736f 6170 5f64 6f6e 6528 2920 3c2f y soap_done()
    .static void\n-001af5e0: 3c2f 7370 616e 3e20 706c 7567 696e 5f64 plugin_d\n-001af5f0: 656c 6574 6528 3c73 7061 6e20 636c 6173 elete(stru\n-001af610: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, struct \n-001af6a0: 736f 6170 5f70 6c75 6769 6e20 2a70 2920 soap_plugin *p) \n-001af6b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n-001af6d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    free(p->\n-001af6f0: 6461 7461 293b 203c 7370 616e 2063 6c61 data); // \n-001af710: 6672 6565 2061 6c6c 6f63 6174 6564 2070 free allocated p\n-001af720: 6c75 6769 6e20 6461 7461 203c 2f73 7061 lugin data
    .
    } .
    .\n-001af780: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // the new\n-001af7a0: 2073 656e 6420 6361 6c6c 6261 636b 203c send callback <\n-001af7b0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n-001af7d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001af7e0: 6f72 6422 3e73 7461 7469 633c 2f73 7061 ord\">static int\n-001af810: 3c2f 7370 616e 3e20 706c 7567 696e 5f73 plugin_s\n-001af820: 656e 6428 3c73 7061 6e20 636c 6173 733d end(struct\n-001af840: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n-001af870: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n-001af8a0: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, \n-001af8c0: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *buf\n-001af940: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , \n-001af960: 7369 7a65 5f74 3c2f 7370 616e 3e20 6c65 size_t le\n-001af970: 6e29 203c 2f64 6976 3e0a 3c64 6976 2063 n)
    .
    {.
    st\n-001af9c0: 7275 6374 203c 2f73 7061 6e3e 706c 7567 ruct plug\n-001af9d0: 696e 5f64 6174 6120 2a64 6174 6120 3d20 in_data *data = \n-001af9e0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct plugin_data\n-001afa10: 2a29 736f 6170 5f6c 6f6f 6b75 705f 706c *)soap_lookup_pl\n-001afa20: 7567 696e 283c 6120 636c 6173 733d 2263 ugin(soap\n-001afa50: 3c2f 613e 2c20 706c 7567 696e 5f69 6429 , plugin_id)\n-001afa60: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // fetch\n-001afa80: 2070 6c75 6769 6e26 2333 393b 7320 6c6f plugin's lo\n-001afa90: 6361 6c20 6461 7461 203c 2f73 7061 6e3e cal data \n-001afaa0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    fwrit\n-001afac0: 6528 6275 662c 206c 656e 2c20 312c 2073 e(buf, len, 1, s\n-001afad0: 7464 6572 7229 3b20 3c73 7061 6e20 636c tderr); //\n-001afaf0: 2077 7269 7465 206d 6573 7361 6765 2074 write message t\n-001afb00: 6f20 7374 6465 7272 203c 2f73 7061 6e3e o stderr \n-001afb10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..
    } .
    .// the new r\n-001afc50: 6563 6569 7665 2063 616c 6c62 6163 6b20 eceive callback \n-001afc60: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001afc80: 3c73 7061 6e20 636c 6173 733d 226b 6579 static si\n-001afcc0: 7a65 5f74 3c2f 7370 616e 3e20 706c 7567 ze_t plug\n-001afcd0: 696e 5f72 6563 7628 3c73 7061 6e20 636c in_recv(st\n-001afcf0: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct
    soap *soap, char *buf, size_t len)
    .\n-001afdd0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    struct \n-001afe10: 706c 7567 696e 5f64 6174 6120 2a64 6174 plugin_data *dat\n-001afe20: 6120 3d20 283c 7370 616e 2063 6c61 7373 a = (struc\n-001afe40: 7420 3c2f 7370 616e 3e70 6c75 6769 6e5f t plugin_\n-001afe50: 6461 7461 2a29 736f 6170 5f6c 6f6f 6b75 data*)soap_looku\n-001afe60: 705f 706c 7567 696e 283c 6120 636c 6173 p_plugin(\n-001afe90: 736f 6170 3c2f 613e 2c20 706c 7567 696e soap, plugin\n-001afea0: 5f69 6429 3b20 3c73 7061 6e20 636c 6173 _id); // f\n-001afec0: 6574 6368 2070 6c75 6769 6e26 2333 393b etch plugin'\n-001afed0: 7320 6c6f 6361 6c20 6461 7461 203c 2f73 s local data
    .
    <\n-001aff00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001aff10: 6f72 6474 7970 6522 3e73 697a 655f 743c ordtype\">size_t<\n-001aff20: 2f73 7061 6e3e 2072 6573 203d 2064 6174 /span> res = dat\n-001aff30: 612d 2667 743b 6672 6563 7628 3c61 2063 a->frecv(soap, buf\n-001aff70: 2c20 6c65 6e29 3b20 3c73 7061 6e20 636c , len); //\n-001aff90: 2067 6574 2064 6174 6120 6672 6f6d 206f get data from o\n-001affa0: 6c64 2072 6563 7620 6361 6c6c 6261 636b ld recv callback\n-001affb0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-001affc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001affd0: 3e20 2066 7772 6974 6528 6275 662c 2072 > fwrite(buf, r\n-001affe0: 6573 2c20 312c 2073 7464 6572 7229 3b20 es, 1, stderr); \n-001afff0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return res;
    .<\n-001b0040: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b0050: 3e7d 3c2f 6469 763e 0a3c 6469 7620 636c >}
    .
    #d\n-001b0130: 6566 696e 6520 534f 4150 5f45 4f4d 3c2f efine SOAP_EOM
    A soap_st\n-001b0160: 6174 7573 2065 7272 6f72 2063 6f64 653a atus error code:\n-001b0170: 206f 7574 206f 6620 6d65 6d6f 7279 2e3c out of memory.<\n-001b0180: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n-001b01a0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n-001b01b0: 6170 322e 683a 3233 3731 3c2f 6469 763e ap2.h:2371
    \n-001b01c0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    It is the respo\n-001b01f0: 6e73 6962 696c 6974 7920 6f66 2074 6865 nsibility of the\n-001b0200: 2070 6c75 6769 6e20 746f 2068 616e 646c plugin to handl\n-001b0210: 6520 7265 6769 7374 7279 2028 696e 6974 e registry (init\n-001b0220: 292c 2063 6f70 792c 2061 6e64 2064 656c ), copy, and del\n-001b0230: 6574 696f 6e20 6f66 2074 6865 2070 6c75 etion of the plu\n-001b0240: 6769 6e20 6461 7461 2061 6e64 2072 6573 gin data and res\n-001b0250: 6574 2063 616c 6c62 6163 6b73 2e3c 2f70 et callbacks..

    The f\n-001b0270: 6465 6c65 7465 3c2f 636f 6465 3e20 6361 delete ca\n-001b0280: 6c6c 6261 636b 206f 6620 3c63 6f64 653e llback of \n-001b0290: 7374 7275 6374 2073 6f61 705f 706c 7567 struct soap_plug\n-001b02a0: 696e 3c2f 636f 6465 3e20 6d75 7374 2062 in must b\n-001b02b0: 6520 7365 7420 746f 2064 652d 7265 6769 e set to de-regi\n-001b02c0: 7374 6572 2074 6865 2070 6c75 6769 6e20 ster the plugin \n-001b02d0: 616e 6420 6c65 7420 6974 2064 656c 6574 and let it delet\n-001b02e0: 6520 6974 7320 7265 736f 7572 6365 732e e its resources.\n-001b02f0: 3c2f 703e 0a3c 703e 4120 706c 7567 696e

    .

    A plugin\n-001b0300: 2069 7320 636f 7069 6564 2061 6c6f 6e67 is copied along\n-001b0310: 2077 6974 6820 6974 7320 636f 7272 6573 with its corres\n-001b0320: 706f 6e64 696e 6720 3c63 6f64 653e 3c61 ponding soap contex\n-001b0390: 7420 7769 7468 2074 6865 203c 636f 6465 t with the soap\n-001b0450: 5f63 6f70 793c 2f61 3e3c 2f63 6f64 653e _copy\n-001b0460: 2063 616c 6c2e 2054 6869 7320 6675 6e63 call. This func\n-001b0470: 7469 6f6e 2063 6f70 6965 7320 6120 3c63 tion copies a \n-001b04d0: 736f 6170 3c2f 613e 3c2f 636f 6465 3e20 soap \n-001b04e0: 636f 6e74 6578 7420 616e 6420 7468 6520 context and the \n-001b04f0: 6368 6169 6e20 6f66 2070 6c75 6769 6e73 chain of plugins\n-001b0500: 2e20 4974 2069 7320 7570 2074 6f20 7468 . It is up to th\n-001b0510: 6520 706c 7567 696e 2069 6d70 6c65 6d65 e plugin impleme\n-001b0520: 6e74 6174 696f 6e20 746f 2073 6861 7265 ntation to share\n-001b0530: 2074 6865 2070 6c75 6769 6e20 6461 7461 the plugin data\n-001b0540: 206f 7220 6e6f 7420 6173 2066 6f6c 6c6f or not as follo\n-001b0550: 7773 3a3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 ws:

    .
      .if the fc\n-001b0570: 6f70 7928 293c 2f63 6f64 653e 2063 616c opy() cal\n-001b0580: 6c62 6163 6b20 6973 2073 6574 2062 7920 lback is set by \n-001b0590: 7468 6520 706c 7567 696e 2069 6e69 7469 the plugin initi\n-001b05a0: 616c 697a 6174 696f 6e2c 2074 6869 7320 alization, this \n-001b05b0: 6361 6c6c 6261 636b 2077 696c 6c20 6265 callback will be\n-001b05c0: 2063 616c 6c65 6420 746f 2061 6c6c 6f77 called to allow\n-001b05d0: 2074 6865 2070 6c75 6769 6e20 746f 2063 the plugin to c\n-001b05e0: 6f70 7920 6974 7320 6c6f 6361 6c20 6461 opy its local da\n-001b05f0: 7461 2075 706f 6e20 6120 3c63 6f64 653e ta upon a \n-001b0600: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_\n-001b06b0: 636f 7079 3c2f 613e 3c2f 636f 6465 3e20 copy \n-001b06c0: 6361 6c6c 2e20 5768 656e 203c 636f 6465 call. When soap_done or soap_free\n-001b0860: 3c2f 636f 6465 3e20 6973 2063 616c 6c65 is calle\n-001b0870: 6420 6f6e 2074 6869 7320 3c63 6f64 653e d on this \n-001b0880: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n-001b08d0: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n-001b08e0: 6578 7420 636f 7079 2c20 7468 6520 3c63 ext copy, the fdelete() callback is\n-001b0910: 2063 616c 6c65 6420 666f 7220 6465 616c called for deal\n-001b0920: 6c6f 6361 7469 6f6e 2061 6e64 2063 6c65 location and cle\n-001b0930: 616e 7570 206f 6620 7468 6520 6c6f 6361 anup of the loca\n-001b0940: 6c20 6461 7461 2e3c 2f6c 693e 0a3c 6c69 l data..if the fc\n-001b0960: 6f70 7928 293c 2f63 6f64 653e 2063 616c opy() cal\n-001b0970: 6c62 6163 6b20 6973 206e 6f74 2073 6574 lback is not set\n-001b0980: 2c20 7468 656e 2074 6865 2070 6c75 6769 , then the plugi\n-001b0990: 6e20 6461 7461 2077 696c 6c20 6265 2073 n data will be s\n-001b09a0: 6861 7265 6420 2869 2e65 2e20 7468 6520 hared (i.e. the \n-001b09b0: 6461 7461 2070 6f69 6e74 6572 2070 6f69 data pointer poi\n-001b09c0: 6e74 7320 746f 2074 6865 2073 616d 6520 nts to the same \n-001b09d0: 6164 6472 6573 7329 2e20 5468 6520 3c63 address). The fdelete() callback wi\n-001b0a00: 6c6c 206e 6f74 2062 6520 6361 6c6c 6564 ll not be called\n-001b0a10: 2075 706f 6e20 6120 3c63 6f64 653e 3c61 upon a soap_done<\n-001b0af0: 2f63 6f64 653e 206f 6e20 6120 636f 7079 /code> on a copy\n-001b0b00: 206f 6620 7468 6520 3c63 6f64 653e 3c61 of the soap contex\n-001b0b70: 7420 2e20 5468 6520 3c63 6f64 653e 6664 t . The fd\n-001b0b80: 656c 6574 6528 293c 2f63 6f64 653e 2063 elete() c\n-001b0b90: 616c 6c62 6163 6b20 7769 6c6c 2062 6520 allback will be \n-001b0ba0: 6361 6c6c 6564 2066 6f72 2074 6865 206f called for the o\n-001b0bb0: 7269 6769 6e61 6c20 3c63 6f64 653e 3c61 riginal soap contex\n-001b0c20: 7420 7769 7468 2077 6869 6368 2074 6865 t with which the\n-001b0c30: 2070 6c75 6769 6e20 7761 7320 7265 6769 plugin was regi\n-001b0c40: 7374 6572 6564 2e3c 2f6c 693e 0a3c 2f75 stered...

      The exampl\n-001b0c60: 6520 706c 7567 696e 2073 686f 756c 6420 e plugin should \n-001b0c70: 6265 2075 7365 6420 6173 2066 6f6c 6c6f be used as follo\n-001b0c80: 7773 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ws:

      .
      \n-001b0cb0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n-001b0d00: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n-001b0d30: 3c2f 613e 203d 203c 6120 636c 6173 733d = soap\n-001b0d90: 5f6e 6577 3c2f 613e 2829 3b20 3c2f 6469 _new(); .

      To \n-001b0e80: 7061 7373 2061 203c 636f 6465 3e76 6f69 pass a voi\n-001b0e90: 642a 3c2f 636f 6465 3e20 6172 6775 6d65 d* argume\n-001b0ea0: 6e74 2074 6f20 7468 6520 706c 7567 696e nt to the plugin\n-001b0eb0: 2773 2072 6567 6973 7472 7920 6675 6e63 's registry func\n-001b0ec0: 7469 6f6e 2075 7365 3a3c 2f70 3e0a 3c64 tion use:

      .
      stru\n-001b0f10: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap *soap = soap_new()\n-001b0fe0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
      .

      Addi\n-001b10d0: 7469 6f6e 616c 2064 6f63 756d 656e 7461 tional documenta\n-001b10e0: 7469 6f6e 2066 6f72 2074 6865 2067 726f tion for the gro\n-001b10f0: 7769 6e67 206e 756d 6265 7220 6f66 2067 wing number of g\n-001b1100: 534f 4150 2070 6c75 6769 6e73 2063 616e SOAP plugins can\n-001b1110: 2062 6520 666f 756e 6420 6174 203c 6120 be found at https://www.g\n-001b1150: 656e 6976 6961 2e63 6f6d 2f64 6f63 3c2f enivia.com/doc. A number of \n-001b1170: 6578 616d 706c 6520 706c 7567 696e 7320 example plugins \n-001b1180: 6172 6520 696e 636c 7564 6564 2069 6e20 are included in \n-001b1190: 7468 6520 6753 4f41 5020 736f 7572 6365 the gSOAP source\n-001b11a0: 2063 6f64 6520 7061 636b 6167 6527 7320 code package's \n-001b11b0: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n-001b11c0: 706c 7567 696e 3c2f 636f 6465 3e3c 2f65 plugin directory. So\n-001b11e0: 6d65 206f 6620 7468 6573 6520 706c 7567 me of these plug\n-001b11f0: 696e 7320 6172 6520 6469 7363 7573 7365 ins are discusse\n-001b1200: 6420 696e 2074 6865 206e 6578 7420 7365 d in the next se\n-001b1210: 6374 696f 6e73 2e3c 2f70 3e0a 3c70 3e53 ctions.

      .

      S\n-001b1220: 6565 2061 6c73 6f20 4150 4920 646f 6375 ee also API docu\n-001b1230: 6d65 6e74 6174 696f 6e20 4d6f 6475 6c65 mentation Module\n-001b1240: 203c 6120 636c 6173 733d 2265 6c22 2068 \n-001b1270: 506c 7567 696e 7320 616e 6420 706c 7567 Plugins and plug\n-001b1280: 696e 2072 6567 6973 7472 7920 6675 6e63 in registry func\n-001b1290: 7469 6f6e 733c 2f61 3e20 2e3c 2f70 3e0a tions .

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

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

      .

      .DOM AP\n-001b1300: 4920 6f76 6572 7669 6577 3c2f 6833 3e0a I overview

      .\n-001b1310: 3c70 3e54 6865 2044 4f4d 2041 5049 2069

      The DOM API i\n-001b1320: 7320 6e6f 7420 6120 706c 7567 696e 2c20 s not a plugin, \n-001b1330: 6275 7420 616e 2065 7874 656e 7369 6f6e but an extension\n-001b1340: 2074 6861 7420 7072 6f76 6964 6573 2061 that provides a\n-001b1350: 2044 4f4d 2041 5049 2061 7320 6120 7365 DOM API as a se\n-001b1360: 7061 7261 7465 2073 6f75 7263 6520 636f parate source co\n-001b1370: 6465 2066 696c 6520 746f 2063 6f6d 7069 de file to compi\n-001b1380: 6c65 2061 6e64 206c 696e 6b20 7769 7468 le and link with\n-001b1390: 2067 534f 4150 2061 7070 6c69 6361 7469 gSOAP applicati\n-001b13a0: 6f6e 7320 746f 2065 6e61 626c 6564 2074 ons to enabled t\n-001b13b0: 6865 2067 534f 4150 2044 4f4d 2e20 584d he gSOAP DOM. XM\n-001b13c0: 4c20 444f 4d20 7072 6f63 6573 7369 6e67 L DOM processing\n-001b13d0: 2069 7320 6f70 7469 6f6e 616c 2c20 616e is optional, an\n-001b13e0: 6420 656e 6162 6c65 6420 7769 7468 203c d enabled with <\n-001b13f0: 6120 6872 6566 3d22 2377 7364 6c32 682d a href=\"#wsdl2h-\n-001b1400: 6422 3e3c 623e 3c63 6f64 653e 7773 646c d\">wsdl\n-001b1410: 3268 202d 643c 2f63 6f64 653e 3c2f 623e 2h -d\n-001b1420: 206f 7074 696f 6e20 3c62 3e3c 636f 6465 option -d to generate D\n-001b1450: 4f4d 2073 7472 7563 7475 7265 7320 666f OM structures fo\n-001b1460: 7220 3c65 6d3e 3c63 6f64 653e 7873 643a r xsd:\n-001b1470: 616e 7954 7970 653c 2f63 6f64 653e 3c2f anyType, x\n-001b1490: 7364 3a61 6e79 3c2f 636f 6465 3e3c 2f65 sd:any, and xsd:anyAttribu\n-001b14c0: 7465 3c2f 636f 6465 3e3c 2f65 6d3e 2073 te s\n-001b14d0: 6368 656d 6120 636f 6d70 6f6e 656e 7473 chema components\n-001b14e0: 2c20 7768 6963 6820 6172 6520 656e 6162 , which are enab\n-001b14f0: 6c65 6420 7769 7468 203c 636f 6465 3e23 led with #\n-001b1500: 696d 706f 7274 2022 646f 6d2e 6822 3c2f import \"dom.h\" in an inte\n-001b1520: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil\n-001b1530: 6520 666f 7220 736f 6170 6370 7032 2e20 e for soapcpp2. \n-001b1540: 5468 6973 2069 6d70 6f72 7473 203c 656d This imports gsoap/imp\n-001b1560: 6f72 742f 646f 6d2e 683c 2f63 6f64 653e ort/dom.h\n-001b1570: 3c2f 656d 3e2e 2054 6865 6e20 636f 6d70 . Then comp\n-001b1580: 696c 6520 3c65 6d3e 3c63 6f64 653e 6773 ile gs\n-001b1590: 6f61 702f 646f 6d2e 633c 2f63 6f64 653e oap/dom.c\n-001b15a0: 3c2f 656d 3e20 666f 7220 4320 6f72 203c for C or <\n-001b15b0: 656d 3e3c 636f 6465 3e67 736f 6170 2f64 em>gsoap/d\n-001b15c0: 6f6d 2e63 7070 3c2f 636f 6465 3e3c 2f65 om.cpp for C++ with \n-001b15e0: 796f 7572 2061 7070 6c69 6361 7469 6f6e your application\n-001b15f0: 2e3c 2f70 3e0a 3c70 3e54 6f20 7573 6520 .

      .

      To use \n-001b1600: 7468 6520 444f 4d20 4150 4920 7769 7468 the DOM API with\n-001b1610: 2057 6562 2073 6572 7669 6365 732c 2061 Web services, a\n-001b1620: 6464 203c 636f 6465 3e23 696d 706f 7274 dd #import\n-001b1630: 2022 646f 6d2e 6822 3c2f 636f 6465 3e20 \"dom.h\" \n-001b1640: 746f 2074 6865 2069 6e74 6572 6661 6365 to the interface\n-001b1650: 2068 6561 6465 7220 6669 6c65 206f 7220 header file or \n-001b1660: 7573 6520 3c61 2068 7265 663d 2223 7773 use wsdl2h -d option \n-001b16a0: 3c63 6f64 653e 2d64 3c2f 636f 6465 3e3c -d<\n-001b16b0: 2f62 3e3c 2f61 3e3a 3c2f 703e 0a3c 6469 /b>:

      .
      \n-001b1700: 2369 6d70 6f72 7420 2671 756f 743b 646f #import "do\n-001b1710: 6d2e 6826 7175 6f74 3b3c 2f73 7061 6e3e m.h"\n-001b1720: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
      .
      This declares <\n-001b1750: 636f 6465 3e78 7364 5f5f 616e 7954 7970 code>xsd__anyTyp\n-001b1760: 653c 2f63 6f64 653e 2061 6e64 203c 636f e and xsd__anyAttri\n-001b1780: 6275 7465 3c2f 636f 6465 3e20 7479 7065 bute type\n-001b1790: 732e 3c2f 703e 0a3c 703e 4120 444f 4d20 s.

      .

      A DOM \n-001b17a0: 656c 656d 656e 7420 6e6f 6465 2069 7320 element node is \n-001b17b0: 7365 7269 616c 697a 6564 2077 6974 6820 serialized with \n-001b17c0: 7468 6520 3c63 6f64 653e 7873 645f 5f61 the xsd__a\n-001b17d0: 6e79 5479 7065 3c2f 636f 6465 3e20 7365 nyType se\n-001b17e0: 7269 616c 697a 6162 6c65 2074 7970 652e rializable type.\n-001b17f0: 2054 6865 2075 6e64 6572 6c79 696e 6720 The underlying \n-001b1800: 696d 706c 656d 656e 7461 7469 6f6e 2074 implementation t\n-001b1810: 7970 6520 6f66 203c 636f 6465 3e78 7364 ype of xsd\n-001b1820: 5f5f 616e 7954 7970 653c 2f63 6f64 653e __anyType\n-001b1830: 2069 7320 3c63 6f64 653e 736f 6170 5f64 is soap_d\n-001b1840: 6f6d 5f65 6c65 6d65 6e74 3c2f 636f 6465 om_element. One or more D\n-001b1860: 4f4d 2061 7474 7269 6275 7465 206e 6f64 OM attribute nod\n-001b1870: 6573 2061 7265 2073 6572 6961 6c69 7a65 es are serialize\n-001b1880: 6420 7769 7468 2074 6865 203c 636f 6465 d with the xsd__anyAttribu\n-001b18a0: 7465 3c2f 636f 6465 3e20 7365 7269 616c te serial\n-001b18b0: 697a 6162 6c65 2074 7970 652e 2054 6865 izable type. The\n-001b18c0: 2075 6e64 6572 6c79 696e 6720 696d 706c underlying impl\n-001b18d0: 656d 656e 7461 7469 6f6e 2074 7970 6520 ementation type \n-001b18e0: 6f66 203c 636f 6465 3e78 7364 5f5f 616e of xsd__an\n-001b18f0: 7941 7474 7269 6275 7465 3c2f 636f 6465 yAttribute is soap_\n-001b1910: 646f 6d5f 6174 7472 6962 7574 653c 2f63 dom_attribute, which is a\n-001b1930: 206c 696e 6b65 6420 6c69 7374 2e3c 2f70 linked list..

      #import &qu\n-001b1990: 6f74 3b64 6f6d 2e68 2671 756f 743b 3c2f ot;dom.h" // i\n-001b19c0: 6d70 6f72 7473 2078 7364 5f5f 616e 7954 mports xsd__anyT\n-001b19d0: 7970 6520 6173 2061 2044 4f4d 206e 6f64 ype as a DOM nod\n-001b19e0: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
      .<\n-001b19f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b1a00: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
      .
      class ns\n-001b1a40: 5f5f 6461 7461 203a 203c 7370 616e 2063 __data : p\n-001b1a60: 7562 6c69 633c 2f73 7061 6e3e 2078 7364 ublic xsd\n-001b1a70: 5f5f 616e 7954 7970 653c 2f64 6976 3e0a __anyType
      .\n-001b1a80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      { public\n-001b1ab0: 3c2f 7370 616e 3e3a 3c2f 6469 763e 0a3c :
      .<\n-001b1ac0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b1ad0: 3e20 2020 2078 7364 5f5f 616e 7954 7970 > xsd__anyTyp\n-001b1ae0: 652a 2066 6f6f 3b20 2020 2020 2020 2020 e* foo; \n-001b1af0: 2020 2020 2020 203c 7370 616e 2063 6c61 // \n-001b1b10: 5374 6f72 6520 266c 743b 666f 6f26 6774 Store <foo>\n-001b1b20: 3b20 656c 656d 656e 7420 696e 2044 4f4d ; element in DOM\n-001b1b30: 2073 6f61 705f 646f 6d5f 656c 656d 656e soap_dom_elemen\n-001b1b40: 743c 2f73 7061 6e3e 3c2f 6469 763e 0a3c t
    .<\n-001b1b50: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b1b60: 3e20 2020 2078 7364 5f5f 616e 7954 7970 > xsd__anyTyp\n-001b1b70: 6520 5f5f 616e 793b 2020 2020 2020 2020 e __any; \n-001b1b80: 2020 2020 2020 203c 7370 616e 2063 6c61 // \n-001b1ba0: 5374 6f72 6520 616e 7920 656c 656d 656e Store any elemen\n-001b1bb0: 7420 636f 6e74 656e 7420 696e 2044 4f4d t content in DOM\n-001b1bc0: 2073 6f61 705f 646f 6d5f 656c 656d 656e soap_dom_elemen\n-001b1bd0: 743c 2f73 7061 6e3e 3c2f 6469 763e 0a3c t
    .<\n-001b1be0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b1bf0: 3e20 2040 2078 7364 5f5f 616e 7941 7474 > @ xsd__anyAtt\n-001b1c00: 7269 6275 7465 205f 5f61 6e79 4174 7472 ribute __anyAttr\n-001b1c10: 6962 7574 653b 203c 7370 616e 2063 6c61 ibute; // \n-001b1c30: 5374 6f72 6520 616e 7941 7474 7269 6275 Store anyAttribu\n-001b1c40: 7465 2063 6f6e 7465 6e74 2069 6e20 444f te content in DO\n-001b1c50: 4d20 736f 6170 5f64 6f6d 5f61 7474 7269 M soap_dom_attri\n-001b1c60: 6275 7465 206c 696e 6b65 6420 6e6f 6465 bute linked node\n-001b1c70: 2073 7472 7563 7475 7265 3c2f 7370 616e structure
    .
    };.

    To \n-001b1cc0: 6d61 6e69 7075 6c61 7465 2074 6865 2044 manipulate the D\n-001b1cd0: 4f4d 2065 6c65 6d65 6e74 7320 616e 6420 OM elements and \n-001b1ce0: 6174 7472 6962 7574 6573 2077 6520 7573 attributes we us\n-001b1cf0: 6520 7468 6520 444f 4d20 4150 4920 6675 e the DOM API fu\n-001b1d00: 6e63 7469 6f6e 7320 646f 6375 6d65 6e74 nctions document\n-001b1d10: 6564 2069 6e20 7468 6520 6753 4f41 5020 ed in the gSOAP \n-001b1d20: 3c61 2068 7265 663d 222e 2e2f 2e2e 2f64 XML DOM API \n-001b1d50: 646f 6375 6d65 6e74 6174 696f 6e3c 2f61 documentation.

    .

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

    ..The m\n-001b1dd0: 6573 7361 6765 206c 6f67 6769 6e67 2070 essage logging p\n-001b1de0: 6c75 6769 6e3c 2f68 333e 0a3c 703e 5468 lugin.

    Th\n-001b1df0: 6520 6d65 7373 6167 6520 3c63 6f64 653e e message \n-001b1e00: 3c61 2063 6c61 7373 3d22 656c 2220 6872 logging plugin can\n-001b1ea0: 2062 6520 7573 6564 2074 6f20 7365 6c65 be used to sele\n-001b1eb0: 6374 6976 656c 7920 6c6f 6720 696e 626f ctively log inbo\n-001b1ec0: 756e 6420 616e 6420 6f75 7462 6f75 6e64 und and outbound\n-001b1ed0: 206d 6573 7361 6765 7320 746f 2061 2066 messages to a f\n-001b1ee0: 696c 6520 6f72 2073 7472 6561 6d2e 2049 ile or stream. I\n-001b1ef0: 7420 616c 736f 206b 6565 7073 2061 6363 t also keeps acc\n-001b1f00: 6573 7320 7374 6174 6973 7469 6373 2074 ess statistics t\n-001b1f10: 6f20 6c6f 6720 7468 6520 746f 7461 6c20 o log the total \n-001b1f20: 6e75 6d62 6572 206f 6620 6279 7465 7320 number of bytes \n-001b1f30: 7365 6e74 2061 6e64 2072 6563 6569 7665 sent and receive\n-001b1f40: 642e 3c2f 703e 0a3c 703e 546f 2075 7365 d.

    .

    To use\n-001b1f50: 2074 6865 2070 6c75 6769 6e2c 2063 6f6d the plugin, com\n-001b1f60: 7069 6c65 2061 6e64 206c 696e 6b20 796f pile and link yo\n-001b1f70: 7572 2061 7070 6c69 6361 7469 6f6e 2077 ur application w\n-001b1f80: 6974 6820 3c65 6d3e 3c63 6f64 653e 6c6f ith lo\n-001b1f90: 6767 696e 672e 633c 2f63 6f64 653e 3c2f gging.c located in t\n-001b1fb0: 6865 203c 656d 3e3c 636f 6465 3e67 736f he gso\n-001b1fc0: 6170 2f70 6c75 6769 6e3c 2f63 6f64 653e ap/plugin\n-001b1fd0: 3c2f 656d 3e20 6469 7265 6374 6f72 7920 directory \n-001b1fe0: 6f66 2074 6865 2067 534f 4150 2070 6163 of the gSOAP pac\n-001b1ff0: 6b61 6765 2e20 546f 2065 6e61 626c 6520 kage. To enable \n-001b2000: 7468 6520 706c 7567 696e 2069 6e20 796f the plugin in yo\n-001b2010: 7572 2063 6f64 652c 2072 6567 6973 7465 ur code, registe\n-001b2020: 7220 7468 6520 706c 7567 696e 2061 6e64 r the plugin and\n-001b2030: 2073 6574 2074 6865 2073 7472 6561 6d73 set the streams\n-001b2040: 2061 7320 666f 6c6c 6f77 733a 3c2f 703e as follows:

    \n-001b2050: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    #include &qu\n-001b20a0: 6f74 3b6c 6f67 6769 6e67 2e68 2671 756f ot;logging.h&quo\n-001b20b0: 743b 3c2f 7370 616e 3e20 3c2f 6469 763e t;
    \n-001b20c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    struct soap\n-001b2140: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap = soap_ne\n-001b21d0: 773c 2f61 3e28 293b 3c2f 6469 763e 0a3c w();
    .<\n-001b21e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b21f0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >size_\n-001b2210: 743c 2f73 7061 6e3e 2062 7974 6573 5f69 t bytes_i\n-001b2220: 6e3b 203c 2f64 6976 3e0a 3c64 6976 2063 n;
    .
    size_t bytes_out; <\n-001b2270: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (soap_register_p\n-001b2310: 6c75 6769 6e3c 2f61 3e28 3c61 2063 6c61 lugin(soap, lo\n-001b23a0: 6767 696e 673c 2f61 3e29 2920 3c2f 6469 gging)) .
    ... // failed to re\n-001b23f0: 6769 7374 6572 203c 2f73 7061 6e3e 3c2f gister .
    ... //
    \n-001b2440: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_set_l\n-001b24b0: 6f67 6769 6e67 5f69 6e62 6f75 6e64 3c2f ogging_inbound(soap, stdout); ..
    ... // process m\n-001b2600: 6573 7361 6765 733c 2f73 7061 6e3e 3c2f essages.
    soap_s\n-001b2680: 6574 5f6c 6f67 6769 6e67 5f69 6e62 6f75 et_logging_inbou\n-001b2690: 6e64 3c2f 613e 283c 6120 636c 6173 733d nd(so\n-001b26c0: 6170 3c2f 613e 2c20 4e55 4c4c 293b 203c ap, NULL); <\n-001b26d0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001b26e0: 656e 7422 3e2f 2f20 6469 7361 626c 6520 ent\">// disable \n-001b26f0: 6c6f 6767 696e 6720 3c2f 7370 616e 3e3c logging <\n-001b2700: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_\n-001b2770: 7365 745f 6c6f 6767 696e 675f 6f75 7462 set_logging_outb\n-001b2780: 6f75 6e64 3c2f 613e 283c 6120 636c 6173 ound(\n-001b27b0: 736f 6170 3c2f 613e 2c20 4e55 4c4c 293b soap, NULL);\n-001b27c0: 203c 7370 616e 2063 6c61 7373 3d22 636f // disabl\n-001b27e0: 6520 6c6f 6767 696e 6720 3c2f 7370 616e e logging
    ..
    ...\n-001b28e0: 203c 7370 616e 2063 6c61 7373 3d22 636f //\n-001b2900: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n-001b29c0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    so\n-001b2a70: 6170 5f73 6574 5f6c 6f67 6769 6e67 5f6f ap_set_logging_o\n-001b2a80: 7574 626f 756e 643c 2f61 3e3c 2f64 6976 utbound
    void soap_s\n-001b2ab0: 6574 5f6c 6f67 6769 6e67 5f6f 7574 626f et_logging_outbo\n-001b2ac0: 756e 6428 7374 7275 6374 2073 6f61 7020 und(struct soap \n-001b2ad0: 2a73 6f61 702c 2046 494c 4520 2a66 6429 *soap, FILE *fd)\n-001b2ae0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Specify\n-001b2b00: 206f 7574 626f 756e 6420 6d65 7373 6167 outbound messag\n-001b2b10: 6520 6c6f 6767 696e 6720 7769 7468 2074 e logging with t\n-001b2b20: 6865 206c 6f67 6769 6e67 2070 6c75 6769 he logging plugi\n-001b2b30: 6e2e 3c2f 6469 763e 3c2f 6469 763e 0a3c n.
    .<\n-001b2b40: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n-001b2b50: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n-001b2b60: 705f 5f64 6562 7567 5f68 746d 6c5f 6761 p__debug_html_ga\n-001b2b70: 3439 3635 6132 6435 3861 6563 3461 6533 4965a2d58aec4ae3\n-001b2b80: 3938 3361 6537 3366 6337 3131 6466 3630 983ae73fc711df60\n-001b2b90: 223e 3c64 6976 2063 6c61 7373 3d22 7474 \">void soap_rese\n-001b2c30: 745f 6c6f 6767 696e 675f 7374 6174 7328 t_logging_stats(\n-001b2c40: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n-001b2c50: 7029 3c2f 6469 763e 3c64 6976 2063 6c61 p)
    Reset\n-001b2c70: 206d 6573 7361 6769 6e67 2073 7461 7469 messaging stati\n-001b2c80: 7374 6963 7320 7769 7468 2074 6865 206c stics with the l\n-001b2c90: 6f67 6769 6e67 2070 6c75 6769 6e2e 3c2f ogging plugin.
    .
    soap_log\n-001b2d60: 6769 6e67 5f73 7461 7473 3c2f 613e 3c2f ging_stats
    void soa\n-001b2d90: 705f 6c6f 6767 696e 675f 7374 6174 7328 p_logging_stats(\n-001b2da0: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n-001b2db0: 702c 2073 697a 655f 7420 2a73 656e 742c p, size_t *sent,\n-001b2dc0: 2073 697a 655f 7420 2a72 6563 7629 3c2f size_t *recv)
    Collect m\n-001b2df0: 6573 7361 6769 6e67 2073 7461 7469 7374 essaging statist\n-001b2e00: 6963 7320 7769 7468 2074 6865 206c 6f67 ics with the log\n-001b2e10: 6769 6e67 2070 6c75 6769 6e2e 3c2f 6469 ging plugin.
    .
    \n-001b2e90: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_set_l\n-001b2ee0: 6f67 6769 6e67 5f69 6e62 6f75 6e64 3c2f ogging_inbound
    S\n-001b2f60: 7065 6369 6679 2069 6e62 6f75 6e64 206d pecify inbound m\n-001b2f70: 6573 7361 6765 206c 6f67 6769 6e67 2077 essage logging w\n-001b2f80: 6974 6820 7468 6520 6c6f 6767 696e 6720 ith the logging \n-001b2f90: 706c 7567 696e 2e3c 2f64 6976 3e3c 2f64 plugin.
    .
    logging
    int loggin\n-001b3080: 6728 7374 7275 6374 2073 6f61 7020 2a2c g(struct soap *,\n-001b3090: 2073 7472 7563 7420 736f 6170 5f70 6c75 struct soap_plu\n-001b30a0: 6769 6e20 2a2c 2076 6f69 6420 2a29 3c2f gin *, void *)
    The loggi\n-001b30d0: 6e67 2070 6c75 6769 6e20 7265 6769 7374 ng plugin regist\n-001b30e0: 7261 7469 6f6e 2066 756e 6374 696f 6e2e ration function.\n-001b30f0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    If you us\n-001b3120: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap_copy\n-001b31e0: 3c2f 636f 6465 3e20 746f 2063 6f70 7920 to copy \n-001b31f0: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap context wi\n-001b3260: 7468 2074 6865 2070 6c75 6769 6e2c 2074 th the plugin, t\n-001b3270: 6865 2070 6c75 6769 6e27 7320 7374 6174 he plugin's stat\n-001b3280: 6520 7769 6c6c 2062 6520 7368 6172 6564 e will be shared\n-001b3290: 2062 7920 7468 6520 636f 7079 2e20 5468 by the copy. Th\n-001b32a0: 6520 706c 7567 696e 2069 7320 7468 7265 e plugin is thre\n-001b32b0: 6164 2d73 6166 652c 2062 7574 2064 6f65 ad-safe, but doe\n-001b32c0: 7320 6e6f 7420 7573 6520 6120 6c6f 636b s not use a lock\n-001b32d0: 2074 6f20 7072 6f74 6563 7420 7468 6520 to protect the \n-001b32e0: 696e 7465 726e 616c 2073 7461 7469 7374 internal statist\n-001b32f0: 6963 7320 636f 756e 7465 7273 2074 6f20 ics counters to \n-001b3300: 656e 7375 7265 2074 6865 2073 7065 6564 ensure the speed\n-001b3310: 206f 6620 6d65 7373 6167 696e 6720 6973 of messaging is\n-001b3320: 206e 6f74 2063 6f6d 7072 6f6d 6973 6564 not compromised\n-001b3330: 2c20 6d65 616e 696e 6720 7468 6174 2079 , meaning that y\n-001b3340: 6f75 2073 686f 756c 6420 6e6f 7420 6675 ou should not fu\n-001b3350: 6c6c 7920 7265 6c79 206f 6e20 7468 6520 lly rely on the \n-001b3360: 7374 6174 6973 7469 6373 2074 6f20 6265 statistics to be\n-001b3370: 2031 3030 2520 6163 6375 7261 7465 2066 100% accurate f\n-001b3380: 6f72 206d 756c 7469 2d74 6872 6561 6465 or multi-threade\n-001b3390: 6420 7365 7276 6963 6573 2e3c 2f70 3e0a d services.

    .\n-001b33a0: 3c70 3e53 6565 2061 6c73 6f20 3c63 6f64

    See also logging\n-001b3440: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 703e .

    .

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

    <\n-001b34b0: 2f61 3e0a 5245 5354 6675 6c20 7365 7276 /a>.RESTful serv\n-001b34c0: 6572 2d73 6964 6520 4150 4920 7769 7468 er-side API with\n-001b34d0: 2074 6865 2048 5454 5020 4745 5420 706c the HTTP GET pl\n-001b34e0: 7567 696e 3c2f 6833 3e0a 3c70 3e53 6572 ugin

    .

    Ser\n-001b34f0: 7665 722d 7369 6465 2075 7365 206f 6620 ver-side use of \n-001b3500: 5245 5354 6675 6c20 4854 5450 2047 4554 RESTful HTTP GET\n-001b3510: 206f 7065 7261 7469 6f6e 7320 6973 2073 operations is s\n-001b3520: 7570 706f 7274 6564 2077 6974 6820 7468 upported with th\n-001b3530: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e http_ge\n-001b35c0: 743c 2f61 3e3c 2f63 6f64 653e 2048 5454 t HTT\n-001b35d0: 5020 4745 5420 706c 7567 696e 203c 656d P GET plugin gsoap/plu\n-001b35f0: 6769 6e2f 6874 7470 6765 742e 633c 2f63 gin/httpget.c.

    .<\n-001b3610: 703e 5468 6520 4854 5450 2047 4554 2070 p>The HTTP GET p\n-001b3620: 6c75 6769 6e20 616c 6c6f 7773 2079 6f75 lugin allows you\n-001b3630: 7220 7365 7276 6572 2074 6f20 6861 6e64 r server to hand\n-001b3640: 6c65 2052 4553 5466 756c 2048 5454 5020 le RESTful HTTP \n-001b3650: 4745 5420 7265 7175 6573 7473 2061 6e64 GET requests and\n-001b3660: 2061 7420 7468 6520 7361 6d65 2074 696d at the same tim\n-001b3670: 6520 7374 696c 6c20 7365 7276 6520 534f e still serve SO\n-001b3680: 4150 2d62 6173 6564 2050 4f53 5420 7265 AP-based POST re\n-001b3690: 7175 6573 7473 2e20 5468 6520 706c 7567 quests. The plug\n-001b36a0: 696e 2070 726f 7669 6465 7320 7375 7070 in provides supp\n-001b36b0: 6f72 7420 746f 2063 6c69 656e 7420 6170 ort to client ap\n-001b36c0: 706c 6963 6174 696f 6e73 2074 6f20 6973 plications to is\n-001b36d0: 7375 6520 4854 5450 2047 4554 206f 7065 sue HTTP GET ope\n-001b36e0: 7261 7469 6f6e 7320 746f 2061 2073 6572 rations to a ser\n-001b36f0: 7665 722e 3c2f 703e 0a3c 703e 4e6f 7465 ver.

    .

    Note\n-001b3700: 2074 6861 7420 4854 5450 2047 4554 2072 that HTTP GET r\n-001b3710: 6571 7565 7374 7320 6361 6e20 616c 736f equests can also\n-001b3720: 2062 6520 6861 6e64 6c65 6420 6174 2074 be handled at t\n-001b3730: 6865 2073 6572 7665 7220 7369 6465 2077 he server side w\n-001b3740: 6974 6820 7468 6520 3c63 6f64 653e 3c61 ith the \n-001b3810: 736f 6170 3a3a 6667 6574 3c2f 613e 3c2f soap::fget callback, \n-001b3830: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section Function ca\n-001b3870: 6c6c 6261 636b 7320 666f 7220 6375 7374 llbacks for cust\n-001b3880: 6f6d 697a 6564 2049 2f4f 2061 6e64 2048 omized I/O and H\n-001b3890: 5454 5020 6861 6e64 6c69 6e67 3c2f 613e TTP handling\n-001b38a0: 202e 2048 6f77 6576 6572 2c20 7468 6520 . However, the \n-001b38b0: 4854 5450 2047 4554 2070 6c75 6769 6e20 HTTP GET plugin \n-001b38c0: 616c 736f 206b 6565 7073 2073 7461 7469 also keeps stati\n-001b38d0: 7374 6963 7320 6f6e 2074 6865 206e 756d stics on the num\n-001b38e0: 6265 7220 6f66 2073 7563 6365 7373 6675 ber of successfu\n-001b38f0: 6c20 504f 5354 2061 6e64 2047 4554 2065 l POST and GET e\n-001b3900: 7863 6861 6e67 6573 2061 6e64 2066 6169 xchanges and fai\n-001b3910: 6c65 6420 6f70 6572 6174 696f 6e73 2028 led operations (\n-001b3920: 4854 5450 2066 6175 6c74 732c 2053 4f41 HTTP faults, SOA\n-001b3930: 5020 4661 756c 7473 2c20 6574 632e 292e P Faults, etc.).\n-001b3940: 2049 7420 616c 736f 206b 6565 7073 2068 It also keeps h\n-001b3950: 6974 2068 6973 746f 6772 616d 7320 6163 it histograms ac\n-001b3960: 6375 6d75 6c61 7465 6420 666f 7220 7570 cumulated for up\n-001b3970: 2074 6f20 6120 7965 6172 206f 6620 7275 to a year of ru\n-001b3980: 6e6e 696e 6720 7469 6d65 2e3c 2f70 3e0a nning time.

    .\n-001b3990: 3c70 3e54 6f20 7573 6520 7468 6520 3c63

    To use the http_get plugin,\n-001b3a40: 2063 6f6d 7069 6c65 2061 6e64 206c 696e compile and lin\n-001b3a50: 6b20 796f 7572 2061 7070 6c69 6361 7469 k your applicati\n-001b3a60: 6f6e 2077 6974 6820 3c65 6d3e 3c63 6f64 on with httpget.c located \n-001b3a90: 696e 2074 6865 203c 656d 3e3c 636f 6465 in the gsoap/plugin direct\n-001b3ac0: 6f72 7920 6f66 2074 6865 2067 534f 4150 ory of the gSOAP\n-001b3ad0: 2070 6163 6b61 6765 2e20 546f 2065 6e61 package. To ena\n-001b3ae0: 626c 6520 7468 6520 706c 7567 696e 2069 ble the plugin i\n-001b3af0: 6e20 796f 7572 2063 6f64 652c 2072 6567 n your code, reg\n-001b3b00: 6973 7465 7220 7468 6520 706c 7567 696e ister the plugin\n-001b3b10: 2077 6974 6820 796f 7572 2048 5454 5020 with your HTTP \n-001b3b20: 4745 5420 6861 6e64 6c65 7220 6675 6e63 GET handler func\n-001b3b30: 7469 6f6e 2061 7320 666f 6c6c 6f77 733a tion as follows:\n-001b3b40: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    #include\n-001b3b90: 2026 7175 6f74 3b68 7474 7067 6574 2e68 "httpget.h\n-001b3ba0: 2671 756f 743b 3c2f 7370 616e 3e3c 2f64 ".
    .\n-001b3be0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int main().
    {
    . \n-001b3c40: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct
    soap<\n-001b3c90: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n-001b3cc0: 3c2f 613e 203d 203c 6120 636c 6173 733d = soap\n-001b3d20: 5f6e 6577 3c2f 613e 2829 3b3c 2f64 6976 _new();.
    \n-001b3d60: 6966 3c2f 7370 616e 3e20 283c 6120 636c if (s\n-001b3dc0: 6f61 705f 7265 6769 7374 6572 5f70 6c75 oap_register_plu\n-001b3dd0: 6769 6e5f 6172 673c 2f61 3e28 3c61 2063 gin_arg(soap, htt\n-001b3e60: 705f 6765 743c 2f61 3e2c 2028 3c73 7061 p_get, (void*)my_http_get_h\n-001b3ea0: 616e 646c 6572 2929 203c 2f64 6976 3e0a andler))
    .\n-001b3eb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_pr\n-001b3f20: 696e 745f 6661 756c 743c 2f61 3e28 3c61 int_fault(soap, s\n-001b3f60: 7464 6572 7229 3b20 3c73 7061 6e20 636c tderr); //\n-001b3f80: 2066 6169 6c65 6420 746f 2072 6567 6973 failed to regis\n-001b3f90: 7465 7220 3c2f 7370 616e 3e3c 2f64 6976 ter .
    ... \n-001b3fd0: 2f2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a //
    .\n-001b3fe0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct\n-001b4010: 203c 2f73 7061 6e3e 6874 7470 5f67 6574 http_get\n-001b4020: 5f64 6174 6120 2a68 7474 7067 6574 6461 _data *httpgetda\n-001b4030: 7461 3b20 3c2f 6469 763e 0a3c 6469 7620 ta;
    .
    h\n-001b4050: 7474 7067 6574 6461 7461 203d 2028 3c73 ttpgetdata = (struct http_get_data*\n-001b4090: 2973 6f61 705f 6c6f 6f6b 7570 5f70 6c75 )soap_lookup_plu\n-001b40a0: 6769 6e28 3c61 2063 6c61 7373 3d22 636f gin(soap<\n-001b40d0: 2f61 3e2c 2068 7474 705f 6765 745f 6964 /a>, http_get_id\n-001b40e0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    if (!httpgetdata)\n-001b4130: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    ..\n-001b4150: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // if th\n-001b4170: 6520 706c 7567 696e 2072 6567 6973 7465 e plugin registe\n-001b4180: 7265 6420 4f4b 2c20 7468 6572 6520 6973 red OK, there is\n-001b4190: 2063 6572 7461 696e 6c79 2064 6174 6120 certainly data \n-001b41a0: 6275 7420 6361 6e26 2333 393b 7420 6875 but can't hu\n-001b41b0: 7274 2074 6f20 6368 6563 6b20 3c2f 7370 rt to check
    .
    ..\n-001b41e0: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // proce\n-001b4200: 7373 206d 6573 7361 6765 733c 2f73 7061 ss messages
    .
    size_t get_ok = ht\n-001b4260: 7470 6765 7464 6174 612d 2667 743b 7374 tpgetdata->st\n-001b4270: 6174 5f67 6574 3b20 3c2f 6469 763e 0a3c at_get;
    .<\n-001b4280: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b4290: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > siz\n-001b42b0: 655f 743c 2f73 7061 6e3e 2070 6f73 745f e_t post_\n-001b42c0: 6f6b 203d 2068 7474 7067 6574 6461 7461 ok = httpgetdata\n-001b42d0: 2d26 6774 3b73 7461 745f 706f 7374 3b20 ->stat_post; \n-001b42e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    size_t errors = http\n-001b4330: 6765 7464 6174 612d 2667 743b 7374 6174 getdata->stat\n-001b4340: 5f66 6169 6c3b 203c 2f64 6976 3e0a 3c64 _fail;
    .\n-001b4360: 2020 7469 6d65 5f74 206e 6f77 203d 2074 time_t now = t\n-001b4370: 696d 6528 4e55 4c4c 293b 203c 2f64 6976 ime(NULL); .
    stru\n-001b43b0: 6374 203c 2f73 7061 6e3e 746d 202a 543b ct tm *T;\n-001b43c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    T = \n-001b43e0: 6c6f 6361 6c74 696d 6528 2661 6d70 3b6e localtime(&n\n-001b43f0: 6f77 293b 203c 2f64 6976 3e0a 3c64 6976 ow);
    . \n-001b4410: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t\n-001b4430: 3c2f 7370 616e 3e20 6869 7473 7468 6973 hitsthis\n-001b4440: 6d69 6e75 7465 203d 2068 7474 7067 6574 minute = httpget\n-001b4450: 6461 7461 2d26 6774 3b68 6973 745f 6d69 data->hist_mi\n-001b4460: 6e5b 542d 2667 743b 746d 5f6d 696e 5d3b n[T->tm_min];\n-001b4470: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    size_t hitsthishour\n-001b44c0: 203d 2068 7474 7067 6574 6461 7461 2d26 = httpgetdata-&\n-001b44d0: 6774 3b68 6973 745f 686f 7572 5b54 2d26 gt;hist_hour[T-&\n-001b44e0: 6774 3b74 6d5f 686f 7572 5d3b 203c 2f64 gt;tm_hour]; .
    size_t \n-001b4530: 6869 7473 746f 6461 7920 3d20 6874 7470 hitstoday = http\n-001b4540: 6765 7464 6174 612d 2667 743b 6869 7374 getdata->hist\n-001b4550: 5f64 6179 5b54 2d26 6774 3b74 6d5f 7964 _day[T->tm_yd\n-001b4560: 6179 5d3b 3c2f 6469 763e 0a3c 6469 7620 ay];
    .
    }.

    A\n-001b45a0: 6e20 4854 5450 2047 4554 2068 616e 646c n HTTP GET handl\n-001b45b0: 6572 2063 616e 2073 696d 706c 7920 7072 er can simply pr\n-001b45c0: 6f64 7563 6520 736f 6d65 2048 544d 4c20 oduce some HTML \n-001b45d0: 636f 6e74 656e 742c 206f 7220 616e 7920 content, or any \n-001b45e0: 6f74 6865 7220 7479 7065 206f 6620 636f other type of co\n-001b45f0: 6e74 656e 7420 6279 2073 656e 6469 6e67 ntent by sending\n-001b4600: 2064 6174 6120 7573 696e 6720 3c63 6f64 data using soap_res\n-001b46c0: 706f 6e73 653c 2f61 3e3c 2f63 6f64 653e ponse\n-001b46d0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    int my_http_get_h\n-001b4730: 616e 646c 6572 283c 7370 616e 2063 6c61 andler(str\n-001b4750: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap) .
    {
    .\n-001b47f0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->h\n-001b4870: 7474 705f 636f 6e74 656e 743c 2f61 3e20 ttp_content \n-001b4880: 3d20 3c73 7061 6e20 636c 6173 733d 2273 = &q\n-001b48a0: 756f 743b 7465 7874 2f68 746d 6c26 7175 uot;text/html&qu\n-001b48b0: 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 ot;; .
    if (soap\n-001b4950: 5f72 6573 706f 6e73 653c 2f61 3e28 3c61 _response(soap, <\n-001b4990: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001b49a0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001b49b0: 705f 5f69 6f2e 6874 6d6c 2367 6130 3562 p__io.html#ga05b\n-001b49c0: 6539 3933 3433 6635 3536 6665 3730 3934 e99343f556fe7094\n-001b49d0: 3031 3435 6538 3734 6364 6239 3922 3e53 0145e874cdb99\">S\n-001b49e0: 4f41 505f 4649 4c45 3c2f 613e 293c 2f64 OAP_FILE).
    || soap\n-001b4a60: 5f73 656e 643c 2f61 3e28 3c61 2063 6c61 _send(soap, "<\n-001b4ac0: 3b68 746d 6c26 6774 3b48 656c 6c6f 266c ;html>Hello&l\n-001b4ad0: 743b 2f68 746d 6c26 6774 3b26 7175 6f74 t;/html>"\n-001b4ae0: 3b3c 2f73 7061 6e3e 293c 2f64 6976 3e0a ;)
    .\n-001b4af0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 \n-001b4ba0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    return <\n-001b4be0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001b4bf0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001b4c00: 705f 5f69 6f2e 6874 6d6c 2367 6130 3664 p__io.html#ga06d\n-001b4c10: 3539 3039 3461 6661 3364 6636 6231 6239 59094afa3df6b1b9\n-001b4c20: 6636 6232 6262 3438 3432 3037 6322 3e73 f6b2bb484207c\">s\n-001b4c30: 6f61 705f 636c 6f73 6573 6f63 6b3c 2f61 oap_closesock(soap);
    .
    return SOAP_O\n-001b4d10: 4b3c 2f61 3e3b 203c 7370 616e 2063 6c61 K; // \n-001b4d30: 7265 7475 726e 2053 4f41 505f 4f4b 206f return SOAP_OK o\n-001b4d40: 7220 4854 5450 2065 7272 6f72 2063 6f64 r HTTP error cod\n-001b4d50: 652c 2065 2e67 2e20 3430 3420 3c2f 7370 e, e.g. 404
    .
    }.

    If\n-001b4da0: 2079 6f75 2075 7365 203c 636f 6465 3e3c you use <\n-001b4db0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n-001b4dc0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n-001b4dd0: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga\n-001b4de0: 6234 6333 6638 6365 3830 6261 6630 6631 b4c3f8ce80baf0f1\n-001b4df0: 6665 6338 6338 3666 3062 6235 3738 3861 fec8c86f0bb5788a\n-001b4e00: 2220 7469 746c 653d 2241 6c6c 6f63 6174 \" title=\"Allocat\n-001b4e10: 6520 616e 6420 696e 6974 6961 6c69 7a65 e and initialize\n-001b4e20: 2061 206e 6577 2073 6f61 7020 636f 6e74 a new soap cont\n-001b4e30: 6578 7420 6173 2061 2063 6f70 7920 6f66 ext as a copy of\n-001b4e40: 2074 6865 2067 6976 656e 2073 6f61 7020 the given soap \n-001b4e50: 636f 6e74 6578 742e 223e 736f 6170 5f63 context.\">soap_c\n-001b4e60: 6f70 793c 2f61 3e3c 2f63 6f64 653e 2074 opy t\n-001b4e70: 6f20 636f 7079 2074 6865 203c 636f 6465 o copy the soa\n-001b4ed0: 703c 2f61 3e3c 2f63 6f64 653e 2063 6f6e p con\n-001b4ee0: 7465 7874 2077 6974 6820 7468 6520 706c text with the pl\n-001b4ef0: 7567 696e 2c20 7468 6520 706c 7567 696e ugin, the plugin\n-001b4f00: 2773 2064 6174 6120 7769 6c6c 2062 6520 's data will be \n-001b4f10: 7368 6172 6564 2062 7920 7468 6520 636f shared by the co\n-001b4f20: 7079 2e20 5468 6572 6566 6f72 652c 2074 py. Therefore, t\n-001b4f30: 6865 2073 7461 7469 7374 6963 7320 6172 he statistics ar\n-001b4f40: 6520 6e6f 7420 3130 3025 2067 7561 7261 e not 100% guara\n-001b4f50: 6e74 6565 6420 746f 2062 6520 6163 6375 nteed to be accu\n-001b4f60: 7261 7465 2066 6f72 206d 756c 7469 2d74 rate for multi-t\n-001b4f70: 6872 6561 6465 6420 7365 7276 6963 6573 hreaded services\n-001b4f80: 2073 696e 6365 2072 6163 6520 636f 6e64 since race cond\n-001b4f90: 6974 696f 6e73 206f 6e20 7468 6520 636f itions on the co\n-001b4fa0: 756e 7465 7273 206d 6179 206f 6363 7572 unters may occur\n-001b4fb0: 2e20 4d75 7465 7820 6973 206e 6f74 2075 . Mutex is not u\n-001b4fc0: 7365 6420 746f 2075 7064 6174 6520 7468 sed to update th\n-001b4fd0: 6520 636f 756e 7465 7273 2074 6f20 6176 e counters to av\n-001b4fe0: 6f69 6420 696e 7472 6f64 7563 696e 6720 oid introducing \n-001b4ff0: 6578 7065 6e73 6976 6520 7379 6e63 6872 expensive synchr\n-001b5000: 6f6e 697a 6174 696f 6e20 706f 696e 7473 onization points\n-001b5010: 2e20 4966 2031 3030 2520 7365 7276 6572 . If 100% server\n-001b5020: 2d73 6964 6520 6163 6375 7261 6379 2069 -side accuracy i\n-001b5030: 7320 7265 7175 6972 6564 2c20 6164 6420 s required, add \n-001b5040: 6d75 7465 7820 6174 2074 6865 2070 6f69 mutex at the poi\n-001b5050: 6e74 7320 696e 6469 6361 7465 6420 696e nts indicated in\n-001b5060: 2074 6865 203c 656d 3e3c 636f 6465 3e68 the h\n-001b5070: 7474 7067 6574 2e63 3c2f 636f 6465 3e3c ttpget.c<\n-001b5080: 2f65 6d3e 2063 6f64 652e 3c2f 703e 0a3c /em> code.

    .<\n-001b5090: 703e 5468 6520 636c 6965 6e74 2d73 6964 p>The client-sid\n-001b50a0: 6520 7573 6520 6f66 2048 5454 5020 4745 e use of HTTP GE\n-001b50b0: 5420 6973 2070 726f 7669 6465 6420 6279 T is provided by\n-001b50c0: 2074 6865 203c 636f 6465 3e3c 6120 636c the s\n-001b5140: 6f61 705f 4745 543c 2f61 3e3c 2f63 6f64 oap_GET operation. To\n-001b5160: 2072 6563 6569 7665 2061 2053 4f41 502f receive a SOAP/\n-001b5170: 584d 4c20 2872 6573 706f 6e73 6529 206d XML (response) m\n-001b5180: 6573 7361 6765 203c 656d 3e3c 636f 6465 essage ns:methodRespon\n-001b51a0: 7365 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 se, \n-001b51b0: 7573 653a 3c2f 703e 0a3c 6469 7620 636c use:

    .
    <\n-001b51d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b51e0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int main().
    {
    . \n-001b5240: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct soap\n-001b5290: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n-001b52c0: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa\n-001b5320: 705f 6e65 773c 2f61 3e28 293b 3c2f 6469 p_new();..<\n-001b5460: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b5470: 3e20 2020 202e 2e2e 203c 7370 616e 2063 > ... /\n-001b5490: 2f20 6572 726f 723c 2f73 7061 6e3e 3c2f / error.
    else <\n-001b54e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001b54f0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_recv_ns\n-001b5510: 5f5f 7765 626d 6574 686f 6452 6573 706f __webmethodRespo\n-001b5520: 6e73 6528 3c61 2063 6c61 7373 3d22 636f nse(soap<\n-001b5550: 2f61 3e2c 202e 2e2e 2929 203c 2f64 6976 /a>, ...)) .
    ... // error
    .
    else
    .
    .\n-001b5600: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // succ\n-001b5620: 6573 733c 2f73 7061 6e3e 3c2f 6469 763e ess
    \n-001b5630: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .\n-001b58a0: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_GET<\n-001b58f0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int soa\n-001b5910: 705f 4745 5428 7374 7275 6374 2073 6f61 p_GET(struct soa\n-001b5920: 7020 2a73 6f61 702c 2063 6f6e 7374 2063 p *soap, const c\n-001b5930: 6861 7220 2a65 6e64 706f 696e 742c 2063 har *endpoint, c\n-001b5940: 6f6e 7374 2063 6861 7220 2a61 6374 696f onst char *actio\n-001b5950: 6e29 3c2f 6469 763e 3c64 6976 2063 6c61 n)
    HTTP \n-001b5970: 4745 5420 636f 6e74 656e 7420 6672 6f6d GET content from\n-001b5980: 2073 6572 7665 722e 3c2f 6469 763e 3c2f server.
    .

    T\n-001b59b0: 6f20 7265 6365 6976 6520 616e 7920 4854 o receive any HT\n-001b59c0: 5450 2042 6f64 7920 6461 7461 2069 6e74 TP Body data int\n-001b59d0: 6f20 6120 6275 6666 6572 2c20 7573 653a o a buffer, use:\n-001b59e0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    int main()
    .<\n-001b5a40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b5a50: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    struct soap\n-001b5ac0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap = soap_ne\n-001b5b50: 773c 2f61 3e28 293b 3c2f 6469 763e 0a3c w();
    .<\n-001b5b60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b5b70: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > cha\n-001b5b90: 723c 2f73 7061 6e3e 202a 7265 7370 6f6e r *respon\n-001b5ba0: 7365 203d 204e 554c 4c3b 203c 2f64 6976 se = NULL; .
    \n-001b5be0: 7369 7a65 5f74 3c2f 7370 616e 3e20 7265 size_t re\n-001b5bf0: 7370 6f6e 7365 5f6c 656e 3b3c 2f64 6976 sponse_len;.
    \n-001b5c30: 6966 3c2f 7370 616e 3e20 283c 6120 636c if (soap_\n-001b5c90: 4745 543c 2f61 3e28 3c61 2063 6c61 7373 GET(s\n-001b5cc0: 6f61 703c 2f61 3e2c 203c 6120 636c 6173 oap, endpoint, \n-001b5d20: 4e55 4c4c 293c 2f64 6976 3e0a 3c64 6976 NULL)
    . \n-001b5d40: 207c 7c20 2872 6573 706f 6e73 6520 3d20 || (response = \n-001b5d50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n-001b5da0: 736f 6170 5f68 7474 705f 6765 745f 626f soap_http_get_bo\n-001b5db0: 6479 3c2f 613e 283c 6120 636c 6173 733d dy(so\n-001b5de0: 6170 3c2f 613e 2c20 2661 6d70 3b72 6573 ap, &res\n-001b5df0: 706f 6e73 655f 6c65 6e29 2920 3d3d 204e ponse_len)) == N\n-001b5e00: 554c 4c3c 2f64 6976 3e0a 3c64 6976 2063 ULL
    .\n-001b5ec0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... // error\n-001b5f00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    else\n-001b5f40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ...\n-001b5f60: 203c 7370 616e 2063 6c61 7373 3d22 636f // use th\n-001b5f80: 6520 7265 7370 6f6e 7365 2073 7472 696e e response strin\n-001b5f90: 6720 284e 554c 4c20 696e 6469 6361 7465 g (NULL indicate\n-001b5fa0: 7320 6e6f 2062 6f64 7920 6f72 2065 7272 s no body or err\n-001b5fb0: 6f72 293c 2f73 7061 6e3e 3c2f 6469 763e or)
    \n-001b5fc0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_d\n-001b6030: 6573 7472 6f79 3c2f 613e 2826 616d 703b estroy(&\n-001b6040: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n-001b6070: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap_end(&\n-001b60f0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n-001b6120: 2f61 3e29 3b20 3c2f 6469 763e 0a3c 6469 /a>);
    . \n-001b6140: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_done<\n-001b61a0: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n-001b61d0: 736f 6170 3c2f 613e 293b 3c2f 6469 763e soap);
    \n-001b61e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    <\n-001b6260: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n-001b6270: 726f 7570 5f5f 696f 2e68 746d 6c23 6761 roup__io.html#ga\n-001b6280: 3836 6230 6330 3465 3862 6161 3931 3166 86b0c04e8baa911f\n-001b6290: 6335 3765 3766 3132 3230 6639 6562 3866 c57e7f1220f9eb8f\n-001b62a0: 223e 736f 6170 5f65 6e64 5f72 6563 763c \">soap_end_recv<\n-001b62b0: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    int\n-001b62d0: 2073 6f61 705f 656e 645f 7265 6376 2873 soap_end_recv(s\n-001b62e0: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n-001b62f0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Finali\n-001b6310: 7a65 2074 6865 2063 6f6e 7465 7874 2061 ze the context a\n-001b6320: 6674 6572 2072 6563 6569 7669 6e67 2e3c fter receiving.<\n-001b6330: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .\n-001b63a0: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_http_get\n-001b63f0: 5f62 6f64 793c 2f61 3e3c 2f64 6976 3e3c _body
    <\n-001b6400: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n-001b6410: 6922 3e63 6861 7220 2a20 736f 6170 5f68 i\">char * soap_h\n-001b6420: 7474 705f 6765 745f 626f 6479 2873 7472 ttp_get_body(str\n-001b6430: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n-001b6440: 7369 7a65 5f74 202a 6c65 6e29 3c2f 6469 size_t *len)
    Get the HTT\n-001b6470: 5020 626f 6479 206d 6573 7361 6765 2061 P body message a\n-001b6480: 7320 6120 7374 7269 6e67 2e3c 2f64 6976 s a string.
    .
    <\n-001b64b0: 703e 5365 6520 616c 736f 203c 636f 6465 p>See also http_get.

    .

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

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

    <\n-001b65c0: 2f61 3e0a 5245 5354 6675 6c20 7365 7276 /a>.RESTful serv\n-001b65d0: 6572 2d73 6964 6520 4150 4920 7769 7468 er-side API with\n-001b65e0: 2074 6865 2048 5454 5020 504f 5354 2070 the HTTP POST p\n-001b65f0: 6c75 6769 6e3c 2f68 333e 0a3c 703e 5365 lugin

    .

    Se\n-001b6600: 7276 6572 2d73 6964 6520 7573 6520 6f66 rver-side use of\n-001b6610: 2052 4553 5466 756c 2048 5454 5020 504f RESTful HTTP PO\n-001b6620: 5354 2c20 5055 542c 2050 4154 4348 2c20 ST, PUT, PATCH, \n-001b6630: 616e 6420 4445 4c45 5445 206f 7065 7261 and DELETE opera\n-001b6640: 7469 6f6e 7320 6172 6520 7375 7070 6f72 tions are suppor\n-001b6650: 7465 6420 7769 7468 2074 6865 203c 636f ted with the http_post HTTP P\n-001b6700: 4f53 5420 706c 7567 696e 203c 656d 3e3c OST plugin <\n-001b6710: 636f 6465 3e67 736f 6170 2f70 6c75 6769 code>gsoap/plugi\n-001b6720: 6e2f 6874 7470 706f 7374 2e63 3c2f 636f n/httppost.c.

    .The htt\n-001b67d0: 705f 706f 7374 3c2f 613e 3c2f 636f 6465 p_post HTTP POST plug\n-001b67f0: 696e 2061 6c6c 6f77 7320 796f 7572 2073 in allows your s\n-001b6800: 6572 7665 7220 746f 2068 616e 646c 6520 erver to handle \n-001b6810: 5245 5354 6675 6c20 4854 5450 2050 4f53 RESTful HTTP POS\n-001b6820: 5420 7265 7175 6573 7473 2061 6e64 2061 T requests and a\n-001b6830: 7420 7468 6520 7361 6d65 2074 696d 6520 t the same time \n-001b6840: 7374 696c 6c20 7365 7276 6520 534f 4150 still serve SOAP\n-001b6850: 2d62 6173 6564 2050 4f53 5420 7265 7175 -based POST requ\n-001b6860: 6573 7473 2e20 5468 6520 706c 7567 696e ests. The plugin\n-001b6870: 2061 6c73 6f20 7072 6f76 6964 6573 2073 also provides s\n-001b6880: 7570 706f 7274 2066 6f72 2063 6c69 656e upport for clien\n-001b6890: 7420 6170 706c 6963 6174 696f 6e73 2074 t applications t\n-001b68a0: 6f20 6973 7375 6520 4854 5450 2050 4f53 o issue HTTP POS\n-001b68b0: 5420 6f70 6572 6174 696f 6e73 2074 6f20 T operations to \n-001b68c0: 6120 7365 7276 6572 2e3c 2f70 3e0a 3c70 a server.

    .To simplify the\n-001b68e0: 2073 6572 7665 722d 7369 6465 2068 616e server-side han\n-001b68f0: 646c 696e 6720 6f66 2050 4f53 5420 7265 dling of POST re\n-001b6900: 7175 6573 7473 2c20 6861 6e64 6c65 7273 quests, handlers\n-001b6910: 2063 616e 2062 6520 6173 736f 6369 6174 can be associat\n-001b6920: 6564 2077 6974 6820 6d65 6469 6120 7479 ed with media ty\n-001b6930: 7065 733a 3c2f 703e 0a3c 6469 7620 636c pes:

    .
    <\n-001b6950: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b6960: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct http_post_h\n-001b6990: 616e 646c 6572 7320 6d79 5f68 616e 646c andlers my_handl\n-001b69a0: 6572 735b 5d20 3d20 3c2f 6469 763e 0a3c ers[] =
    .<\n-001b69b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b69c0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    { <\n-001b69e0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n-001b69f0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n-001b6a00: 3b69 6d61 6765 2f6a 7067 2671 756f 743b ;image/jpg"\n-001b6a10: 3c2f 7370 616e 3e2c 206a 7065 675f 6861 , jpeg_ha\n-001b6a20: 6e64 6c65 7220 7d2c 203c 2f64 6976 3e0a ndler },
    .\n-001b6a30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    { "image/*&\n-001b6a70: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, \n-001b6a80: 696d 6167 655f 6861 6e64 6c65 7220 7d2c image_handler },\n-001b6a90: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    { "\n-001b6ad0: 7465 7874 2f68 746d 6c26 7175 6f74 3b3c text/html"<\n-001b6ae0: 2f73 7061 6e3e 2c20 6874 6d6c 5f68 616e /span>, html_han\n-001b6af0: 646c 6572 207d 2c20 3c2f 6469 763e 0a3c dler },
    .<\n-001b6b00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b6b10: 3e20 207b 203c 7370 616e 2063 6c61 7373 > { "text/*&qu\n-001b6b40: 6f74 3b3c 2f73 7061 6e3e 2c20 2020 2074 ot;, t\n-001b6b50: 6578 745f 6861 6e64 6c65 7220 7d2c 203c ext_handler }, <\n-001b6b60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    { "PO\n-001b6ba0: 5354 2671 756f 743b 3c2f 7370 616e 3e2c ST",\n-001b6bb0: 2020 2020 2020 6765 6e65 7269 635f 504f generic_PO\n-001b6bc0: 5354 5f68 616e 646c 6572 207d 2c20 3c2f ST_handler }, .
    { "PUT\n-001b6c10: 2671 756f 743b 3c2f 7370 616e 3e2c 2020 ", \n-001b6c20: 2020 2020 2067 656e 6572 6963 5f50 5554 generic_PUT\n-001b6c30: 5f68 616e 646c 6572 207d 2c20 3c2f 6469 _handler }, .
    { "PATCH\n-001b6c80: 2671 756f 743b 3c2f 7370 616e 3e2c 2020 ", \n-001b6c90: 2020 2067 656e 6572 6963 5f50 4154 4348 generic_PATCH\n-001b6ca0: 5f68 616e 646c 6572 207d 2c20 3c2f 6469 _handler }, .
    { "DELET\n-001b6cf0: 4526 7175 6f74 3b3c 2f73 7061 6e3e 2c20 E", \n-001b6d00: 2020 2067 656e 6572 6963 5f44 454c 4554 generic_DELET\n-001b6d10: 455f 6861 6e64 6c65 7220 7d2c 203c 2f64 E_handler }, .
    { NULL }\n-001b6d40: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    };.

    Not\n-001b6d80: 6520 7468 6174 203c 636f 6465 3e2a 3c2f e that * and \n-001b6da0: 2d3c 2f63 6f64 653e 2063 616e 2062 6520 - can be \n-001b6db0: 7573 6564 2061 7320 7769 6c64 6361 7264 used as wildcard\n-001b6dc0: 7320 746f 206d 6174 6368 2061 6e79 2074 s to match any t\n-001b6dd0: 6578 7420 616e 6420 616e 7920 6368 6172 ext and any char\n-001b6de0: 6163 7465 722c 2072 6573 7065 6374 6976 acter, respectiv\n-001b6df0: 656c 792e 204d 6564 6961 2074 7970 6573 ely. Media types\n-001b6e00: 206d 6179 2068 6176 6520 6f70 7469 6f6e may have option\n-001b6e10: 616c 2070 6172 616d 6574 6572 7320 6166 al parameters af\n-001b6e20: 7465 7220 3c63 6f64 653e 3b3c 2f63 6f64 ter ; such as charset \n-001b6e50: 616e 6420 3c63 6f64 653e 626f 756e 6461 and bounda\n-001b6e60: 7279 3c2f 636f 6465 3e2e 2054 6865 7365 ry. These\n-001b6e70: 2070 6172 616d 6574 6572 7320 6361 6e20 parameters can \n-001b6e80: 6265 206d 6174 6368 6564 2062 7920 7468 be matched by th\n-001b6e90: 6520 6d65 6469 6120 7479 7065 2070 6174 e media type pat\n-001b6ea0: 7465 726e 7320 696e 2074 6865 2074 6162 terns in the tab\n-001b6eb0: 6c65 2e20 5061 7474 6572 6e73 2074 6861 le. Patterns tha\n-001b6ec0: 7420 6172 6520 6d6f 7265 2073 7065 6369 t are more speci\n-001b6ed0: 6669 6320 6d75 7374 2070 7265 6365 6465 fic must precede\n-001b6ee0: 2070 6174 7465 726e 7320 7468 6174 2061 patterns that a\n-001b6ef0: 7265 206c 6573 7320 7370 6563 6966 6963 re less specific\n-001b6f00: 2069 6e20 7468 6520 7461 626c 652e 2046 in the table. F\n-001b6f10: 6f72 2065 7861 6d70 6c65 2c20 3c63 6f64 or example, \"text/xml;*cha\n-001b6f30: 7273 6574 3d75 7466 2d38 2a22 3c2f 636f rset=utf-8*\" must precede\n-001b6f50: 203c 636f 6465 3e22 7465 7874 2f78 6d6c \"text/xml\n-001b6f60: 223c 2f63 6f64 653e 2077 6869 6368 206d \" which m\n-001b6f70: 7573 7420 7072 6563 6564 6520 3c63 6f64 ust precede \"text/*\". Note that \"text/xml\" also matche\n-001b6fc0: 7320 616e 7920 7061 7261 6d65 7465 7273 s any parameters\n-001b6fd0: 206f 6620 7468 6520 6d65 6469 6120 7479 of the media ty\n-001b6fe0: 7065 206f 6620 7468 6520 6d65 7373 6167 pe of the messag\n-001b6ff0: 6520 7265 7665 6976 6564 2c20 7375 6368 e reveived, such\n-001b7000: 2061 7320 3c63 6f64 653e 2274 6578 742f as \"text/\n-001b7010: 786d 6c3b 2063 6861 7273 6574 3d75 7466 xml; charset=utf\n-001b7020: 2d38 223c 2f63 6f64 653e 2028 6f6e 6c79 -8\" (only\n-001b7030: 2073 696e 6365 2067 534f 4150 2076 6572 since gSOAP ver\n-001b7040: 7369 6f6e 2032 2e38 2e37 3529 2e3c 2f70 sion 2.8.75)..

    The handler\n-001b7060: 7320 6172 6520 6675 6e63 7469 6f6e 7320 s are functions \n-001b7070: 7468 6174 2077 696c 6c20 6265 2069 6e76 that will be inv\n-001b7080: 6f6b 6564 2077 6865 6e20 6120 504f 5354 oked when a POST\n-001b7090: 6564 2072 6571 7565 7374 206d 6573 7361 ed request messa\n-001b70a0: 6765 206d 6174 6368 696e 6720 6d65 6469 ge matching medi\n-001b70b0: 6120 7479 7065 2069 7320 7365 6e74 2074 a type is sent t\n-001b70c0: 6f20 7468 6520 7365 7276 6572 2e3c 2f70 o the server..

    An example \n-001b70e0: 696d 6167 6520 6861 6e64 6c65 7220 7468 image handler th\n-001b70f0: 6174 2063 6865 636b 7320 7468 6520 7370 at checks the sp\n-001b7100: 6563 6966 6963 2069 6d61 6765 2074 7970 ecific image typ\n-001b7110: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    <\n-001b7140: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001b7150: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int image_handle\n-001b7170: 7228 3c73 7061 6e20 636c 6173 733d 226b r(struct soa\n-001b71c0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n-001b71f0: 6170 3c2f 613e 2920 3c2f 6469 763e 0a3c ap)
    .<\n-001b7200: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b7210: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    const \n-001b7250: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *buf; .
    size_t l\n-001b72c0: 656e 3b20 3c2f 6469 763e 0a3c 6469 7620 en;
    .
    <\n-001b72e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001b72f0: 656e 7422 3e2f 2f20 6966 206e 6563 6573 ent\">// if neces\n-001b7300: 7361 7279 2c20 6368 6563 6b20 7479 7065 sary, check type\n-001b7310: 2069 6e20 736f 6170 2d26 6774 3b68 7474 in soap->htt\n-001b7320: 705f 636f 6e74 656e 7420 3c2f 7370 616e p_content
    .
    if \n-001b7370: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001b73a0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->ht\n-001b73f0: 7470 5f63 6f6e 7465 6e74 3c2f 613e 2026 tp_content &\n-001b7400: 616d 703b 2661 6d70 3b20 213c 6120 636c amp;& !soa\n-001b7460: 705f 7461 675f 636d 703c 2f61 3e28 3c61 p_tag_cmp(soap-&g\n-001b74a0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;http_\n-001b74f0: 636f 6e74 656e 743c 2f61 3e2c 203c 7370 content, "i\n-001b7520: 6d61 6765 2f67 6966 2671 756f 743b 3c2f mage/gif")
    .\n-001b7550: 2020 2020 3c73 7061 6e20 636c 6173 733d re\n-001b7570: 7475 726e 3c2f 7370 616e 3e20 3430 343b turn 404;\n-001b7580: 203c 7370 616e 2063 6c61 7373 3d22 636f // HTTP e\n-001b75a0: 7272 6f72 2034 3034 203c 2f73 7061 6e3e rror 404 \n-001b75b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if ((\n-001b75d0: 6275 6620 3d20 3c61 2063 6c61 7373 3d22 buf = soap_http_\n-001b7630: 6765 745f 626f 6479 3c2f 613e 283c 6120 get_body(soap, &a\n-001b7670: 6d70 3b6c 656e 2929 203d 3d20 4e55 4c4c mp;len)) == NULL\n-001b7680: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    return soa\n-001b76f0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->error; .
    /\n-001b7780: 2f20 2e2e 2e20 6e6f 7720 7072 6f63 6573 / ... now proces\n-001b7790: 7320 696d 6167 6520 696e 2062 7566 203c s image in buf <\n-001b77a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-001b77c0: 203c 7370 616e 2063 6c61 7373 3d22 636f // reply \n-001b77e0: 7769 7468 2065 6d70 7479 2048 5454 5020 with empty HTTP \n-001b77f0: 3230 3020 4f4b 2072 6573 706f 6e73 653a 200 OK response:\n-001b7800: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n-001b7810: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b7820: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret\n-001b7840: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn soap_\n-001b78a0: 7365 6e64 5f65 6d70 7479 5f72 6573 706f send_empty_respo\n-001b78b0: 6e73 653c 2f61 3e28 3c61 2063 6c61 7373 nse(s\n-001b78e0: 6f61 703c 2f61 3e2c 2032 3030 293b 203c oap, 200); <\n-001b78f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    .\n-001b7910: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    soap_\n-001b79c0: 7461 675f 636d 703c 2f61 3e3c 2f64 6976 tag_cmp
    int soap_ta\n-001b79f0: 675f 636d 7028 636f 6e73 7420 6368 6172 g_cmp(const char\n-001b7a00: 202a 7374 7269 6e67 2c20 636f 6e73 7420 *string, const \n-001b7a10: 6368 6172 202a 7061 7474 6572 6e29 3c2f char *pattern)
    Compare s\n-001b7a40: 7472 696e 6720 746f 2061 2070 6174 7465 tring to a patte\n-001b7a50: 726e 2e3c 2f64 6976 3e3c 2f64 6976 3e0a rn.
    .\n-001b7a60: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    The ab\n-001b7a80: 6f76 6520 6578 616d 706c 6520 7265 7475 ove example retu\n-001b7a90: 726e 7320 4854 5450 204f 4b2e 2049 6620 rns HTTP OK. If \n-001b7aa0: 636f 6e74 656e 7420 6973 2073 7570 706f content is suppo\n-001b7ab0: 7365 6420 746f 2062 6520 7265 7475 726e sed to be return\n-001b7ac0: 6564 2c20 7468 656e 2075 7365 3a3c 2f70 ed, then use:.

    \n-001b7b10: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap *<\n-001b7b50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001b7b60: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001b7b70: 6874 6d6c 223e 736f 6170 3c2f 613e 203d html\">soap =\n-001b7b80: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_new();
    ...\n-001b7c00: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . //
    .
    soap->http_cont\n-001b7cc0: 656e 743c 2f61 3e20 3d20 3c73 7061 6e20 ent = "imag\n-001b7cf0: 652f 6a70 6567 2671 756f 743b 3c2f 7370 e/jpeg"; // a \n-001b7d20: 6a70 6567 2069 6d61 6765 2074 6f20 7265 jpeg image to re\n-001b7d30: 7475 726e 2062 6163 6b20 3c2f 7370 616e turn back
    .
    if (<\n-001b7d80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001b7d90: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001b7da0: 705f 5f69 6f2e 6874 6d6c 2367 6130 3339 p__io.html#ga039\n-001b7db0: 3065 3538 6264 3261 3365 6265 3666 6533 0e58bd2a3ebe6fe3\n-001b7dc0: 6134 3664 6530 3533 3461 3631 3422 3e73 a46de0534a614\">s\n-001b7dd0: 6f61 705f 7265 7370 6f6e 7365 3c2f 613e oap_response\n-001b7de0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001b7e10: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , SOAP_FILE)\n-001b7e70: 2920 3c73 7061 6e20 636c 6173 733d 2263 ) // SOAP_\n-001b7e90: 4649 4c45 2073 6574 7320 6375 7374 6f6d FILE sets custom\n-001b7ea0: 2068 7474 7020 636f 6e74 656e 7420 3c2f http content
    . |\n-001b7ed0: 7c20 3c61 2063 6c61 7373 3d22 636f 6465 | soap_send_raw<\n-001b7f30: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n-001b7f60: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, bu\n-001b7fb0: 663c 2f61 3e2c 206c 656e 2920 3c73 7061 f, len) // send image \n-001b7fe0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001b8000: 207c 7c20 3c61 2063 6c61 7373 3d22 636f || soap_end_sen\n-001b8060: 643c 2f61 3e28 3c61 2063 6c61 7373 3d22 d(soa\n-001b8090: 703c 2f61 3e29 3c2f 6469 763e 0a3c 6469 p)
    . \n-001b80b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n-001b80d0: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n soap_cl\n-001b8130: 6f73 6573 6f63 6b3c 2f61 3e28 3c61 2063 osesock(soap);.
    \n-001b81a0: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_OK;.

    F\n-001b8230: 6f72 2063 6c69 656e 7420 6170 706c 6963 or client applic\n-001b8240: 6174 696f 6e73 2074 6f20 7573 6520 4854 ations to use HT\n-001b8250: 5450 2050 4f53 542c 2075 7365 2074 6865 TP POST, use the\n-001b8260: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_P\n-001b82e0: 4f53 543c 2f61 3e3c 2f63 6f64 653e 206f OST o\n-001b82f0: 7065 7261 7469 6f6e 3a3c 2f70 3e0a 3c64 peration:

    .
    stru\n-001b8340: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap *soap = soap_new()\n-001b8410: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    ... //.
    \n-001b8480: 6368 6172 3c2f 7370 616e 3e20 2a3c 6120 char *buf; <\n-001b84e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001b84f0: 656e 7422 3e2f 2f20 686f 6c64 7320 7468 ent\">// holds th\n-001b8500: 6520 4854 5450 2072 6571 7565 7374 2f72 e HTTP request/r\n-001b8510: 6573 706f 6e73 6520 626f 6479 2064 6174 esponse body dat\n-001b8520: 6120 3c2f 7370 616e 3e3c 2f64 6976 3e0a a
    .\n-001b8530: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    size\n-001b8560: 5f74 3c2f 7370 616e 3e20 6c65 6e3b 203c _t len; <\n-001b8570: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001b8580: 656e 7422 3e2f 2f20 6c65 6e67 7468 206f ent\">// length o\n-001b8590: 6620 6461 7461 203c 2f73 7061 6e3e 3c2f f data .
    ... // populate buf\n-001b85e0: 2061 6e64 206c 656e 2077 6974 6820 6d65 and len with me\n-001b85f0: 7373 6167 6520 746f 2073 656e 643c 2f73 ssage to send
    .
    if\n-001b8640: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap_POST(\n-001b86a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001b86d0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n-001b86f0: 6f74 3b55 524c 2671 756f 743b 3c2f 7370 ot;URL", "SOAP acti\n-001b8730: 6f6e 206f 7220 4e55 4c4c 2671 756f 743b on or NULL"\n-001b8740: 3c2f 7370 616e 3e2c 203c 7370 616e 2063 , "media\n-001b8770: 2074 7970 6526 7175 6f74 3b3c 2f73 7061 type")
    .
    ||\n-001b87a0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_send_raw(soap, buf\n-001b8880: 3c2f 613e 2c20 6c65 6e29 3b20 3c2f 6469 , len); .
    || soap_en\n-001b8900: 645f 7365 6e64 3c2f 613e 283c 6120 636c d_send(soap)) .
    ... // error\n-001b8980: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (so\n-001b8a10: 6170 5f62 6567 696e 5f72 6563 763c 2f61 ap_begin_recv(&so\n-001b8a50: 6170 3c2f 613e 2920 3c2f 6469 763e 0a3c ap)
    .<\n-001b8a60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001b8a70: 3e20 7c7c 2028 3c61 2063 6c61 7373 3d22 > || (b\n-001b8ac0: 7566 3c2f 613e 203d 203c 6120 636c 6173 uf = soap_ht\n-001b8b20: 7470 5f67 6574 5f62 6f64 793c 2f61 3e28 tp_get_body(\n-001b8b30: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001b8b60: 2026 616d 703b 6c65 6e29 2920 3d3d 204e &len)) == N\n-001b8b70: 554c 4c3c 2f64 6976 3e0a 3c64 6976 2063 ULL
    ..\n-001b8c30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //\n-001b8c60: 2065 7272 6f72 3c2f 7370 616e 3e3c 2f64 error.\n-001b8fa0: 696e 7420 736f 6170 5f62 6567 696e 5f72 int soap_begin_r\n-001b8fb0: 6563 7628 7374 7275 6374 2073 6f61 7020 ecv(struct soap \n-001b8fc0: 2a73 6f61 7029 3c2f 6469 763e 3c64 6976 *soap)
    I\n-001b8fe0: 6e69 7469 616c 697a 6520 7468 6520 636f nitialize the co\n-001b8ff0: 6e74 6578 7420 666f 7220 7265 6365 6976 ntext for receiv\n-001b9000: 696e 672e 3c2f 6469 763e 3c2f 6469 763e ing.
    \n-001b9010: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    i\n-001b90e0: 6e74 2073 6f61 705f 504f 5354 2873 7472 nt soap_POST(str\n-001b90f0: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n-001b9100: 636f 6e73 7420 6368 6172 202a 656e 6470 const char *endp\n-001b9110: 6f69 6e74 2c20 636f 6e73 7420 6368 6172 oint, const char\n-001b9120: 202a 6163 7469 6f6e 2c20 636f 6e73 7420 *action, const \n-001b9130: 6368 6172 202a 7479 7065 293c 2f64 6976 char *type)
    HTTP POST co\n-001b9160: 6e74 656e 7420 746f 2073 6572 7665 722e ntent to server.\n-001b9170: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    Similarly\n-001b91a0: 2c20 3c63 6f64 653e 3c61 2063 6c61 7373 , soap_P\n-001b9220: 5554 3c2f 613e 3c2f 636f 6465 3e2c 203c UT, <\n-001b9230: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_PA\n-001b92b0: 5443 483c 2f61 3e3c 2f63 6f64 653e 2c20 TCH, \n-001b92c0: 616e 6420 3c63 6f64 653e 3c61 2063 6c61 and soap_DELETE\n-001b9350: 3c2f 636f 6465 3e20 636f 6d6d 616e 6473 commands\n-001b9360: 2061 7265 2070 726f 7669 6465 6420 666f are provided fo\n-001b9370: 7220 5055 542c 2050 4154 4348 2c20 616e r PUT, PATCH, an\n-001b9380: 6420 4445 4c45 5445 2068 616e 646c 696e d DELETE handlin\n-001b9390: 672e 3c2f 703e 0a3c 703e 546f 2073 7570 g.

    .

    To sup\n-001b93a0: 706f 7274 2048 5454 5020 7069 7065 6c69 port HTTP pipeli\n-001b93b0: 6e69 6e67 2077 6520 7573 6520 7468 6520 ning we use the \n-001b93c0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 ht\n-001b9450: 7470 5f70 6970 653c 2f61 3e3c 2f63 6f64 tp_pipe plugin, which\n-001b9470: 2063 616e 2062 6520 7573 6564 2061 7420 can be used at \n-001b9480: 7468 6520 7365 7276 6572 2073 6964 6520 the server side \n-001b9490: 746f 2065 6e61 626c 6520 4854 5450 2070 to enable HTTP p\n-001b94a0: 6970 656c 696e 696e 6720 6175 746f 6d61 ipelining automa\n-001b94b0: 7469 6361 6c6c 792c 2077 6865 6e20 7265 tically, when re\n-001b94c0: 6769 7374 6572 6564 2e20 5468 6520 706c gistered. The pl\n-001b94d0: 7567 696e 2063 616e 2061 6c73 6f20 6265 ugin can also be\n-001b94e0: 2075 7365 6420 6174 2074 6865 2063 6c69 used at the cli\n-001b94f0: 656e 7420 7369 6465 2c20 7468 6f75 6768 ent side, though\n-001b9500: 2074 6869 7320 6973 206f 6e6c 7920 6e65 this is only ne\n-001b9510: 6365 7373 6172 7920 696e 2073 6365 6e61 cessary in scena\n-001b9520: 7269 6f73 2074 6861 7420 7265 7175 6972 rios that requir\n-001b9530: 6520 7468 6520 636c 6965 6e74 2074 6f20 e the client to \n-001b9540: 7265 6365 6976 6520 6d75 6c74 6970 6c65 receive multiple\n-001b9550: 206d 6573 7361 6765 7320 7769 7468 6f75 messages withou\n-001b9560: 7420 696e 7465 726d 6974 7465 6e64 2073 t intermittend s\n-001b9570: 656e 6473 2c20 692e 652e 206d 756c 7469 ends, i.e. multi\n-001b9580: 706c 6520 7365 6e64 7320 666f 6c6c 6f77 ple sends follow\n-001b9590: 6564 2062 7920 6d75 6c74 6970 6c65 2072 ed by multiple r\n-001b95a0: 6563 6569 7665 7320 6279 2074 6865 2073 eceives by the s\n-001b95b0: 616d 6520 7468 7265 6164 2075 7369 6e67 ame thread using\n-001b95c0: 2074 6865 2073 616d 6520 3c63 6f64 653e the same \n-001b95d0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n-001b9620: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n-001b9630: 6578 742e 2048 6f77 6576 6572 2c20 636c ext. However, cl\n-001b9640: 6965 6e74 7320 7368 6f75 6c64 2075 7365 ients should use\n-001b9650: 206d 756c 7469 706c 6520 7468 7265 6164 multiple thread\n-001b9660: 7320 7768 656e 2048 5454 5020 7069 7065 s when HTTP pipe\n-001b9670: 6c69 6e69 6e67 2069 7320 7573 6564 2074 lining is used t\n-001b9680: 6f20 7072 6576 656e 7420 626c 6f63 6b69 o prevent blocki\n-001b9690: 6e67 2e20 5365 6520 7468 6520 3c65 6d3e ng. See the \n-001b96a0: 3c63 6f64 653e 6773 6f61 702f 7361 6d70 gsoap/samp\n-001b96b0: 6c65 732f 6173 796e 633c 2f63 6f64 653e les/async\n-001b96c0: 3c2f 656d 3e20 666f 6c64 6572 2069 6e20 folder in \n-001b96d0: 7468 6520 6753 4f41 5020 7061 636b 6167 the gSOAP packag\n-001b96e0: 6520 666f 7220 6578 706c 616e 6174 696f e for explanatio\n-001b96f0: 6e20 616e 6420 6578 616d 706c 6573 2e3c n and examples.<\n-001b9700: 2f70 3e0a 3c70 3e53 6565 2061 6c73 6f20 /p>.

    See also \n-001b9710: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 http_pos\n-001b97a0: 743c 2f61 3e3c 2f63 6f64 653e 2061 6e64 t and\n-001b97b0: 203c 636f 6465 3e3c 6120 636c 6173 733d h\n-001b9840: 7474 705f 7069 7065 3c2f 613e 3c2f 636f ttp_pipe.

    .

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

    .<\n-001b9890: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.The \n-001b98c0: 4854 5450 2064 6967 6573 7420 6175 7468 HTTP digest auth\n-001b98d0: 656e 7469 6361 7469 6f6e 2070 6c75 6769 entication plugi\n-001b98e0: 6e3c 2f68 333e 0a3c 703e 5468 6520 4854 n.

    The HT\n-001b98f0: 5450 2064 6967 6573 7420 6175 7468 656e TP digest authen\n-001b9900: 7469 6361 7469 6f6e 2070 6c75 6769 6e20 tication plugin \n-001b9910: 656e 6162 6c65 7320 6120 6d6f 7265 2073 enables a more s\n-001b9920: 6563 7572 6520 6175 7468 656e 7469 6361 ecure authentica\n-001b9930: 7469 6f6e 2073 6368 656d 6520 636f 6d70 tion scheme comp\n-001b9940: 6172 6564 2074 6f20 6261 7369 6320 6175 ared to basic au\n-001b9950: 7468 656e 7469 6361 7469 6f6e 2e20 4854 thentication. HT\n-001b9960: 5450 2062 6173 6963 2061 7574 6865 6e74 TP basic authent\n-001b9970: 6963 6174 696f 6e20 7365 6e64 7320 756e ication sends un\n-001b9980: 656e 6372 7970 7465 6420 7573 6572 6964 encrypted userid\n-001b9990: 7320 616e 6420 7061 7373 776f 7264 7320 s and passwords \n-001b99a0: 6f76 6572 2074 6865 206e 6574 2c20 7768 over the net, wh\n-001b99b0: 696c 6520 6469 6765 7374 2061 7574 6865 ile digest authe\n-001b99c0: 6e74 6963 6174 696f 6e20 646f 6573 206e ntication does n\n-001b99d0: 6f74 2065 7863 6861 6e67 6520 7061 7373 ot exchange pass\n-001b99e0: 776f 7264 7320 6275 7420 6578 6368 616e words but exchan\n-001b99f0: 6765 7320 6368 6563 6b73 756d 7320 6f66 ges checksums of\n-001b9a00: 2070 6173 7377 6f72 6473 2028 616e 6420 passwords (and \n-001b9a10: 6f74 6865 7220 6461 7461 2073 7563 6820 other data such \n-001b9a20: 6173 206e 6f6e 6365 7320 746f 2061 766f as nonces to avo\n-001b9a30: 6964 2072 6570 6c61 7920 6174 7461 636b id replay attack\n-001b9a40: 7329 2e20 466f 7220 6d6f 7265 2064 6574 s). For more det\n-001b9a50: 6169 6c73 2c20 706c 6561 7365 2073 6565 ails, please see\n-001b9a60: 2052 4643 2032 3631 372e 3c2f 703e 0a3c RFC 2617.

    .<\n-001b9a70: 703e 5468 6520 4854 5450 2064 6967 6573 p>The HTTP diges\n-001b9a80: 7420 6175 7468 656e 7469 6361 7469 6f6e t authentication\n-001b9a90: 2063 616e 2062 6520 7573 6564 206e 6578 can be used nex\n-001b9aa0: 7420 746f 2074 6865 2062 7569 6c74 2d69 t to the built-i\n-001b9ab0: 6e20 6261 7369 6320 6175 7468 656e 7469 n basic authenti\n-001b9ac0: 6361 7469 6f6e 2c20 6f72 2062 6173 6963 cation, or basic\n-001b9ad0: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n-001b9ae0: 6361 6e20 6265 2072 656a 6563 7465 6420 can be rejected \n-001b9af0: 746f 2074 6967 6874 656e 2073 6563 7572 to tighten secur\n-001b9b00: 6974 792e 2054 6865 2073 6572 7665 7220 ity. The server \n-001b9b10: 6d75 7374 2068 6176 6520 6120 6461 7461 must have a data\n-001b9b20: 6261 7365 2077 6974 6820 7573 6572 6964 base with userid\n-001b9b30: 2773 2061 6e64 2070 6173 7377 6f72 6473 's and passwords\n-001b9b40: 2028 696e 2070 6c61 696e 2074 6578 7420 (in plain text \n-001b9b50: 666f 726d 292e 2054 6865 2063 6c69 656e form). The clien\n-001b9b60: 742c 2077 6865 6e20 6368 616c 6c65 6e67 t, when challeng\n-001b9b70: 6564 2062 7920 7468 6520 7365 7276 6572 ed by the server\n-001b9b80: 2c20 6368 6563 6b73 2074 6865 2061 7574 , checks the aut\n-001b9b90: 6865 6e74 6963 6174 696f 6e20 7265 616c hentication real\n-001b9ba0: 6d20 7072 6f76 6964 6564 2062 7920 7468 m provided by th\n-001b9bb0: 6520 7365 7276 6572 2061 6e64 2073 6574 e server and set\n-001b9bc0: 7320 7468 6520 7573 6572 6964 2061 6e64 s the userid and\n-001b9bd0: 2070 6173 7377 6f72 6473 2066 6f72 2064 passwords for d\n-001b9be0: 6967 6573 7420 6175 7468 656e 7469 6361 igest authentica\n-001b9bf0: 7469 6f6e 2e20 5468 6520 636c 6965 6e74 tion. The client\n-001b9c00: 2061 7070 6c69 6361 7469 6f6e 2063 616e application can\n-001b9c10: 2074 656d 706f 7261 7269 6c79 2073 746f temporarily sto\n-001b9c20: 7265 2074 6865 2075 7365 7269 6420 616e re the userid an\n-001b9c30: 6420 7061 7373 776f 7264 2066 6f72 2061 d password for a\n-001b9c40: 2073 6571 7565 6e63 6520 6f66 206d 6573 sequence of mes\n-001b9c50: 7361 6765 2065 7863 6861 6e67 6573 2077 sage exchanges w\n-001b9c60: 6974 6820 7468 6520 7365 7276 6572 2c20 ith the server, \n-001b9c70: 7768 6963 6820 6973 2066 6173 7465 7220 which is faster \n-001b9c80: 7468 616e 2072 6570 6561 7465 6420 6175 than repeated au\n-001b9c90: 7468 6f72 697a 6174 696f 6e20 6368 616c thorization chal\n-001b9ca0: 6c65 6e67 6573 2061 6e64 2061 7574 6865 lenges and authe\n-001b9cb0: 6e74 6963 6174 696f 6e20 7265 7370 6f6e ntication respon\n-001b9cc0: 7365 732e 3c2f 703e 0a3c 703e 4174 2074 ses.

    .

    At t\n-001b9cd0: 6865 2063 6c69 656e 7420 7369 6465 2c20 he client side, \n-001b9ce0: 7468 6520 706c 7567 696e 2069 7320 7265 the plugin is re\n-001b9cf0: 6769 7374 6572 6564 2061 6e64 2073 6572 gistered and ser\n-001b9d00: 7669 6365 2069 6e76 6f63 6174 696f 6e73 vice invocations\n-001b9d10: 2061 7265 2063 6865 636b 6564 2066 6f72 are checked for\n-001b9d20: 2061 7574 686f 7269 7a61 7469 6f6e 2063 authorization c\n-001b9d30: 6861 6c6c 656e 6765 7320 2848 5454 5020 hallenges (HTTP \n-001b9d40: 6572 726f 7220 636f 6465 2034 3031 292e error code 401).\n-001b9d50: 2057 6865 6e20 7468 6520 7365 7276 6572 When the server\n-001b9d60: 2063 6861 6c6c 656e 6765 7320 7468 6520 challenges the \n-001b9d70: 636c 6965 6e74 2c20 7468 6520 636c 6965 client, the clie\n-001b9d80: 6e74 2073 686f 756c 6420 7365 7420 7468 nt should set th\n-001b9d90: 6520 7573 6572 6964 2061 6e64 2070 6173 e userid and pas\n-001b9da0: 7377 6f72 6420 616e 6420 7265 7472 7920 sword and retry \n-001b9db0: 7468 6520 696e 766f 6361 7469 6f6e 2e20 the invocation. \n-001b9dc0: 5468 6520 636c 6965 6e74 2063 616e 2064 The client can d\n-001b9dd0: 6574 6572 6d69 6e65 2074 6865 2075 7365 etermine the use\n-001b9de0: 7269 6420 616e 6420 7061 7373 776f 7264 rid and password\n-001b9df0: 2062 6173 6564 206f 6e20 7468 6520 6175 based on the au\n-001b9e00: 7468 656e 7469 6361 7469 6f6e 2072 6561 thentication rea\n-001b9e10: 6c6d 2070 6172 7420 6f66 2074 6865 2073 lm part of the s\n-001b9e20: 6572 7665 7227 7320 6368 616c 6c65 6e67 erver's challeng\n-001b9e30: 652e 2054 6865 2061 7574 6865 6e74 6963 e. The authentic\n-001b9e40: 6174 696f 6e20 696e 666f 726d 6174 696f ation informatio\n-001b9e50: 6e20 6361 6e20 6265 2074 656d 706f 7261 n can be tempora\n-001b9e60: 7269 6c79 2073 6176 6564 2066 6f72 206d rily saved for m\n-001b9e70: 756c 7469 706c 6520 696e 766f 6361 7469 ultiple invocati\n-001b9e80: 6f6e 732e 3c2f 703e 0a3c 703e 436c 6965 ons.

    .

    Clie\n-001b9e90: 6e74 2d73 6964 6520 6578 616d 706c 653a nt-side example:\n-001b9ea0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    #include\n-001b9ef0: 2026 7175 6f74 3b68 7474 7064 612e 6826 "httpda.h&\n-001b9f00: 7175 6f74 3b3c 2f73 7061 6e3e 203c 2f64 quot; .
    .\n-001b9f40: 3c73 7061 6e20 636c 6173 733d 226b 6579 int main().
    {
    . \n-001b9fa0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n-001b9ff0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n-001ba020: 3c2f 613e 203d 203c 6120 636c 6173 733d = soap\n-001ba080: 5f6e 6577 3c2f 613e 2829 3b3c 2f64 6976 _new();.
    \n-001ba0c0: 6966 3c2f 7370 616e 3e20 3c61 2063 6c61 if so\n-001ba120: 6170 5f72 6567 6973 7465 725f 706c 7567 ap_register_plug\n-001ba130: 696e 3c2f 613e 283c 6120 636c 6173 733d in(so\n-001ba160: 6170 3c2f 613e 2c20 6874 7470 5f64 6129 ap, http_da)\n-001ba170: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    e\n-001ba190: 7869 7428 4558 4954 5f46 4149 4c55 5245 xit(EXIT_FAILURE\n-001ba1a0: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // fail\n-001ba1c0: 6564 2074 6f20 7265 6769 7374 6572 203c ed to register <\n-001ba1d0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-001ba1f0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soap_call_\n-001ba220: 6e73 5f5f 7765 626d 6574 686f 6428 3c61 ns__webmethod(soap, .\n-001ba260: 2e2e 2929 203c 2f64 6976 3e0a 3c64 6976 ..))
    . \n-001ba280: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    if (soap->\n-001ba340: 6572 726f 723c 2f61 3e20 3d3d 2034 3031 error == 401\n-001ba350: 2920 3c73 7061 6e20 636c 6173 733d 2263 ) // chall\n-001ba370: 656e 6765 3a20 4854 5450 2061 7574 6865 enge: HTTP authe\n-001ba380: 6e74 6963 6174 696f 6e20 7265 7175 6972 ntication requir\n-001ba390: 6564 203c 2f73 7061 6e3e 3c2f 6469 763e ed
    \n-001ba3a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .<\n-001ba3c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001ba3d0: 3e20 2020 2020 203c 7370 616e 2063 6c61 > if (!str\n-001ba400: 636d 7028 3c61 2063 6c61 7373 3d22 636f cmp(soap<\n-001ba430: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->authrealm, \n-001ba490: 3c61 2063 6c61 7373 3d22 636f 6465 2220 authrea\n-001ba4e0: 6c6d 3c2f 613e 2929 203c 7370 616e 2063 lm)) /\n-001ba500: 2f20 6f70 7469 6f6e 616c 6c79 2064 6574 / optionally det\n-001ba510: 6572 6d69 6e65 2061 7574 6865 6e74 6963 ermine authentic\n-001ba520: 6174 696f 6e20 7265 616c 6d3c 2f73 7061 ation realm
    .
    \n-001ba550: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    \n-001ba570: 2020 203c 7370 616e 2063 6c61 7373 3d22 struct \n-001ba590: 3c2f 7370 616e 3e68 7474 705f 6461 5f69 http_da_i\n-001ba5a0: 6e66 6f20 696e 666f 3b20 3c73 7061 6e20 nfo info; \n-001ba5c0: 2f2f 2074 6f20 7374 6f72 6520 7573 6572 // to store user\n-001ba5d0: 6964 2061 6e64 2070 6173 7377 6420 3c2f id and passwd
    . \n-001ba600: 2020 2020 2020 6874 7470 5f64 615f 7361 http_da_sa\n-001ba610: 7665 283c 6120 636c 6173 733d 2263 6f64 ve(soap, &info, a\n-001ba650: 7574 6872 6561 6c6d 2c20 7573 6572 6964 uthrealm, userid\n-001ba660: 2c20 7061 7373 7764 293b 203c 7370 616e , passwd); // set userid a\n-001ba690: 6e64 2070 6173 7377 6420 666f 7220 7468 nd passwd for th\n-001ba6a0: 6973 2072 6561 6c6d 3c2f 7370 616e 3e3c is realm<\n-001ba6b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n-001ba6d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_call_n\n-001ba700: 735f 5f77 6562 6d65 7468 6f64 283c 6120 s__webmethod(soap, ..\n-001ba740: 2e29 2920 3c73 7061 6e20 636c 6173 733d .)) // ret\n-001ba760: 7279 203c 2f73 7061 6e3e 3c2f 6469 763e ry
    \n-001ba770: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {.
    .\n-001ba7b0: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. //
    .
    \n-001ba7f0: 2020 2020 203c 6120 636c 6173 733d 2263 soap_e\n-001ba850: 6e64 3c2f 613e 283c 6120 636c 6173 733d nd(so\n-001ba880: 6170 3c2f 613e 293b 203c 7370 616e 2063 ap); /\n-001ba8a0: 2f20 7573 6572 6964 2061 6e64 2070 6173 / userid and pas\n-001ba8b0: 7377 6420 7765 7265 2064 6561 6c6c 6f63 swd were dealloc\n-001ba8c0: 6174 6564 203c 2f73 7061 6e3e 3c2f 6469 ated .
    h\n-001ba8f0: 7474 705f 6461 5f72 6573 746f 7265 283c ttp_da_restore(<\n-001ba900: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001ba910: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001ba920: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001ba930: 2661 6d70 3b69 6e66 6f29 3b20 3c73 7061 &info); // restore use\n-001ba960: 7269 6420 616e 6420 7061 7373 7764 203c rid and passwd <\n-001ba970: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-001ba990: 2020 2020 2020 2020 203c 7370 616e 2063 if (!s\n-001ba9c0: 6f61 705f 6361 6c6c 5f6e 735f 5f77 6562 oap_call_ns__web\n-001ba9d0: 6d65 7468 6f64 283c 6120 636c 6173 733d method(so\n-001baa00: 6170 3c2f 613e 2c20 2e2e 2e29 2920 3c73 ap, ...)) // another c\n-001baa30: 616c 6c20 3c2f 7370 616e 3e3c 2f64 6976 all .
    \n-001baa60: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... //
    .
    \n-001baaa0: 2020 2020 7d3c 2f64 6976 3e0a 3c64 6976 }
    . \n-001baac0: 2020 2020 7d3c 2f64 6976 3e0a 3c64 6976 }
    . \n-001baae0: 2020 7d3c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    }<\n-001bab00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    http_d\n-001bab20: 615f 7265 6c65 6173 6528 3c61 2063 6c61 a_release(soap, &\n-001bab60: 696e 666f 293b 203c 7370 616e 2063 6c61 info); // \n-001bab80: 746f 2072 656d 6f76 6520 616c 6c20 7573 to remove all us\n-001bab90: 6572 6964 2061 6e64 2070 6173 7377 643c erid and passwd<\n-001baba0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-001babc0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_destr\n-001bac20: 6f79 3c2f 613e 283c 6120 636c 6173 733d oy(so\n-001bac50: 6170 3c2f 613e 293b 3c2f 6469 763e 0a3c ap);
    .<\n-001bac60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001bac70: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_end\n-001bacd0: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n-001bad00: 3c2f 613e 293b 3c2f 6469 763e 0a3c 6469 );
    . \n-001bad20: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_free<\n-001bad80: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n-001badb0: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    .}<\n-001badd0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n-001badf0: 5468 6973 2063 6f64 6520 7375 7070 6f72 This code suppor\n-001bae00: 7473 2062 6f74 6820 6261 7369 6320 616e ts both basic an\n-001bae10: 6420 6469 6765 7374 2061 7574 6865 6e74 d digest authent\n-001bae20: 6963 6174 696f 6e2e 3c2f 703e 0a3c 703e ication.

    .

    \n-001bae30: 5468 6520 7365 7276 6572 2063 616e 2063 The server can c\n-001bae40: 6861 6c6c 656e 6765 2061 2063 6c69 656e hallenge a clien\n-001bae50: 7420 7573 696e 6720 4854 5450 2063 6f64 t using HTTP cod\n-001bae60: 6520 3430 312e 2057 6974 6820 7468 6520 e 401. With the \n-001bae70: 706c 7567 696e 2c20 4854 5450 2064 6967 plugin, HTTP dig\n-001bae80: 6573 7420 6175 7468 656e 7469 6361 7469 est authenticati\n-001bae90: 6f6e 2063 6861 6c6c 656e 6765 7320 6172 on challenges ar\n-001baea0: 6520 7365 6e64 2e20 5769 7468 6f75 7420 e send. Without \n-001baeb0: 7468 6520 706c 7567 696e 2c20 6261 7369 the plugin, basi\n-001baec0: 6320 6175 7468 656e 7469 6361 7469 6f6e c authentication\n-001baed0: 2063 6861 6c6c 656e 6765 7320 6172 6520 challenges are \n-001baee0: 7365 6e64 2e3c 2f70 3e0a 3c70 3e45 6163 send.

    .

    Eac\n-001baef0: 6820 7365 7276 6572 206d 6574 686f 6420 h server method \n-001baf00: 6361 6e20 696d 706c 656d 656e 7420 6175 can implement au\n-001baf10: 7468 656e 7469 6361 7469 6f6e 2061 7320 thentication as \n-001baf20: 6465 7369 7265 6420 616e 6420 6d61 7920 desired and may \n-001baf30: 656e 666f 7263 6520 6469 6765 7374 2061 enforce digest a\n-001baf40: 7574 6865 6e74 6963 6174 696f 6e20 6f72 uthentication or\n-001baf50: 206d 6179 2061 6c73 6f20 6163 6365 7074 may also accept\n-001baf60: 2062 6173 6963 2061 7574 6865 6e74 6963 basic authentic\n-001baf70: 6174 696f 6e20 7265 7370 6f6e 7365 732e ation responses.\n-001baf80: 2054 6f20 7665 7269 6679 2064 6967 6573 To verify diges\n-001baf90: 7420 6175 7468 656e 7469 6361 7469 6f6e t authentication\n-001bafa0: 2072 6573 706f 6e73 6573 2c20 7468 6520 responses, the \n-001bafb0: 7365 7276 6572 2073 686f 756c 6420 636f server should co\n-001bafc0: 6d70 7574 6520 616e 6420 636f 6d70 6172 mpute and compar\n-001bafd0: 6520 7468 6520 6368 6563 6b73 756d 7320 e the checksums \n-001bafe0: 7573 696e 6720 7468 6520 706c 7567 696e using the plugin\n-001baff0: 2773 203c 636f 6465 3e68 7474 705f 6461 's http_da\n-001bb000: 5f76 6572 6966 795f 706f 7374 3c2f 636f _verify_post function for\n-001bb020: 2048 5454 5020 504f 5354 2072 6571 7565 HTTP POST reque\n-001bb030: 7374 7320 2861 6e64 203c 636f 6465 3e68 sts (and h\n-001bb040: 7474 705f 6461 5f76 6572 6966 795f 6765 ttp_da_verify_ge\n-001bb050: 743c 2f63 6f64 653e 2066 6f72 2048 5454 t for HTT\n-001bb060: 5020 4745 5420 7265 7175 6573 7473 2077 P GET requests w\n-001bb070: 6974 6820 7468 6520 4854 5450 2047 4554 ith the HTTP GET\n-001bb080: 2070 6c75 6769 6e29 2061 7320 666f 6c6c plugin) as foll\n-001bb090: 6f77 733a 3c2f 703e 0a3c 6469 7620 636c ows:

    .
    <\n-001bb0b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001bb0c0: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#inc\n-001bb0e0: 6c75 6465 2026 7175 6f74 3b68 7474 7064 lude "httpd\n-001bb0f0: 612e 6826 7175 6f74 3b3c 2f73 7061 6e3e a.h"\n-001bb100: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    in\n-001bb150: 743c 2f73 7061 6e3e 206d 6169 6e28 293c t main()<\n-001bb160: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n-001bb180: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct\n-001bb1b0: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 s\n-001bb1e0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n-001bb210: 736f 6170 3c2f 613e 203d 203c 6120 636c soap = \n-001bb270: 736f 6170 5f6e 6577 3c2f 613e 2829 3b3c soap_new();<\n-001bb280: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (<\n-001bb2c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001bb2d0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n-001bb2e0: 705f 5f70 6c75 6769 6e2e 6874 6d6c 2367 p__plugin.html#g\n-001bb2f0: 6164 3634 3565 3561 3538 6564 3434 3266 ad645e5a58ed442f\n-001bb300: 6534 3735 3364 6363 3233 3338 6338 6264 e4753dcc2338c8bd\n-001bb310: 6222 3e73 6f61 705f 7265 6769 7374 6572 b\">soap_register\n-001bb320: 5f70 6c75 6769 6e3c 2f61 3e28 3c61 2063 _plugin(soap, htt\n-001bb360: 705f 6461 2929 203c 2f64 6976 3e0a 3c64 p_da))
    .\n-001bb380: 2020 2020 6578 6974 2845 5849 545f 4641 exit(EXIT_FA\n-001bb390: 494c 5552 4529 3b20 3c73 7061 6e20 636c ILURE); //\n-001bb3b0: 2066 6169 6c65 6420 746f 2072 6567 6973 failed to regis\n-001bb3c0: 7465 7220 3c2f 7370 616e 3e3c 2f64 6976 ter .
    ... \n-001bb400: 2f2f 2075 7365 2073 6f61 705f 6269 6e64 // use soap_bind\n-001bb410: 2061 6e64 2073 6f61 705f 6163 6365 7074 and soap_accept\n-001bb420: 2069 6e20 6120 286d 756c 7469 2d74 6872 in a (multi-thr\n-001bb430: 6561 6465 6429 2073 6572 7669 6365 206c eaded) service l\n-001bb440: 6f6f 703c 2f73 7061 6e3e 3c2f 6469 763e oop
    \n-001bb450: 0a3c 6469 7620 636c 6173 733d 226c 696e .\n-001bb520: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_p\n-001bb590: 7269 6e74 5f66 6175 6c74 3c2f 613e 283c rint_fault(<\n-001bb5a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001bb5b0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001bb5c0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001bb5d0: 7374 6465 7272 293b 3c2f 6469 763e 0a3c stderr);
    .<\n-001bb5e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001bb5f0: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... //<\n-001bb610: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n-001bb630: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_destr\n-001bb690: 6f79 3c2f 613e 283c 6120 636c 6173 733d oy(so\n-001bb6c0: 6170 3c2f 613e 293b 3c2f 6469 763e 0a3c ap);
    .<\n-001bb6d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001bb6e0: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_end\n-001bb740: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n-001bb770: 3c2f 613e 293b 3c2f 6469 763e 0a3c 6469 );
    . \n-001bb790: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_free<\n-001bb7f0: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n-001bb820: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    .}<\n-001bb840: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .\n-001bb860: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    {
    \n-001bb950: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n-001bb980: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (soap->userid && soap->\n-001bba50: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;passwd\n-001bbaa0: 3c2f 613e 2920 3c73 7061 6e20 636c 6173 ) // c\n-001bbac0: 6c69 656e 7420 7573 6564 2062 6173 6963 lient used basic\n-001bbad0: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n-001bbae0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001bbb00: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n-001bbb20: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // may dec\n-001bbb40: 6964 6520 6e6f 7420 746f 2068 616e 646c ide not to handl\n-001bbb50: 652c 2062 7574 2069 6620 6f6b 2074 6865 e, but if ok the\n-001bbb60: 6e20 676f 2061 6865 6164 2061 6e64 2063 n go ahead and c\n-001bbb70: 6f6d 7061 7265 2069 6e66 6f3a 203c 2f73 ompare info:
    .
    \n-001bbba0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (!strcmp(soap-&g\n-001bbc00: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;useri\n-001bbc50: 643c 2f61 3e2c 203c 6120 636c 6173 733d d, \n-001bbca0: 7573 6572 6964 3c2f 613e 2920 2661 6d70 userid) &\n-001bbcb0: 3b26 616d 703b 2021 7374 7263 6d70 283c ;& !strcmp(<\n-001bbcc0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001bbcd0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001bbce0: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n-001bbcf0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;pass\n-001bbd40: 7764 3c2f 613e 2c20 3c61 2063 6c61 7373 wd, passwd)) .
    {.
    ... <\n-001bbde0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001bbdf0: 656e 7422 3e2f 2f20 6861 6e64 6c65 2072 ent\">// handle r\n-001bbe00: 6571 7565 7374 3c2f 7370 616e 3e3c 2f64 equest.. \n-001bbed0: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
    .
    }\n-001bbef0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    else if (so\n-001bbf80: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->authrealm && soap->\n-001bc020: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;userid\n-001bc070: 3c2f 613e 2920 3c73 7061 6e20 636c 6173 ) // D\n-001bc090: 6967 6573 7420 6175 7468 656e 7469 6361 igest authentica\n-001bc0a0: 7469 6f6e 203c 2f73 7061 6e3e 3c2f 6469 tion .
    {
    .<\n-001bc0d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001bc0e0: 3e20 2020 203c 6120 636c 6173 733d 2263 > pa\n-001bc130: 7373 7764 3c2f 613e 203d 202e 2e2e 3b20 sswd = ...; \n-001bc140: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // databas\n-001bc160: 6520 6c6f 6f6b 7570 206f 6e20 7573 6572 e lookup on user\n-001bc170: 6964 2061 6e64 2061 7574 6872 6561 6c6d id and authrealm\n-001bc180: 2074 6f20 6669 6e64 2070 6173 7377 6420 to find passwd \n-001bc190: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001bc1b0: 2020 2020 3c73 7061 6e20 636c 6173 733d if\n-001bc1d0: 3c2f 7370 616e 3e20 2821 7374 7263 6d70 (!strcmp\n-001bc1e0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n-001bc210: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->au\n-001bc260: 7468 7265 616c 6d3c 2f61 3e2c 203c 6120 threalm, authrealm<\n-001bc2c0: 2f61 3e29 2026 616d 703b 2661 6d70 3b20 /a>) && \n-001bc2d0: 2173 7472 636d 7028 3c61 2063 6c61 7373 !strcmp(s\n-001bc300: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->userid,\n-001bc360: 203c 6120 636c 6173 733d 2263 6f64 6522 userid\n-001bc3b0: 3c2f 613e 2929 203c 2f64 6976 3e0a 3c64 ))
    .\n-001bc3d0: 2020 2020 7b3c 2f64 6976 3e0a 3c64 6976 {
    . \n-001bc3f0: 2020 2020 3c73 7061 6e20 636c 6173 733d if\n-001bc410: 3c2f 7370 616e 3e20 2821 6874 7470 5f64 (!http_d\n-001bc420: 615f 7665 7269 6679 5f70 6f73 7428 3c61 a_verify_post(soap, <\n-001bc460: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001bc470: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001bc480: 6874 6d6c 2361 3232 6432 3139 6339 3866 html#a22d219c98f\n-001bc490: 3066 6366 3435 3636 3431 3237 3763 6336 0fcf456641277cc6\n-001bc4a0: 3431 3734 6133 223e 7061 7373 7764 3c2f 4174a3\">passwd))
    . \n-001bc4d0: 2020 2020 7b3c 2f64 6976 3e0a 3c64 6976 {
    . \n-001bc4f0: 2020 2020 2020 2e2e 2e20 3c73 7061 6e20 ... \n-001bc510: 2f2f 2068 616e 646c 6520 7265 7175 6573 // handle reques\n-001bc520: 743c 2f73 7061 6e3e 3c2f 6469 763e 0a3c t
    .<\n-001bc530: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001bc540: 3e20 2020 2020 2020 203c 7370 616e 2063 > return\n-001bc570: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_OK\n-001bc5d0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    \n-001bc5f0: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    \n-001bc610: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    } <\n-001bc630: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap->authrealm\n-001bc6d0: 3c2f 613e 203d 203c 6120 636c 6173 733d = \n-001bc720: 6175 7468 7265 616c 6d3c 2f61 3e3b 203c authrealm; <\n-001bc730: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001bc740: 656e 7422 3e2f 2f20 7365 7420 7265 616c ent\">// set real\n-001bc750: 6d20 666f 7220 6368 616c 6c65 6e67 6520 m for challenge \n-001bc760: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n-001bc780: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n-001bc7a0: 726e 3c2f 7370 616e 3e20 3430 313b 203c rn 401; <\n-001bc7b0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n-001bc7c0: 656e 7422 3e2f 2f20 4e6f 7420 6175 7468 ent\">// Not auth\n-001bc7d0: 6f72 697a 6564 2c20 6368 616c 6c65 6e67 orized, challeng\n-001bc7e0: 6520 6469 6765 7374 2061 7574 6865 6e74 e digest authent\n-001bc7f0: 6963 6174 696f 6e20 3c2f 7370 616e 3e3c ication <\n-001bc800: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    .\n-001bc820: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    For mo\n-001bc840: 7265 2064 6574 6169 6c73 2c20 696e 636c re details, incl\n-001bc850: 7564 696e 6720 686f 7720 746f 2063 6f6e uding how to con\n-001bc860: 6669 6775 7265 2048 5454 5020 4469 6765 figure HTTP Dige\n-001bc870: 7374 2061 7574 6865 6e74 6963 6174 696f st authenticatio\n-001bc880: 6e20 666f 7220 7072 6f78 6965 732c 2073 n for proxies, s\n-001bc890: 6565 2074 6865 203c 6120 6872 6566 3d22 ee the H\n-001bc8c0: 5454 5020 6469 6765 7374 2061 7574 6865 TTP digest authe\n-001bc8d0: 6e74 6963 6174 696f 6e20 706c 7567 696e ntication plugin\n-001bc8e0: 3c2f 613e 2064 6f63 756d 656e 7461 7469 documentati\n-001bc8f0: 6f6e 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 on.

    .

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

    ..The\n-001bc960: 2048 5454 5020 7365 7373 696f 6e73 2070 HTTP sessions p\n-001bc970: 6c75 6769 6e3c 2f68 333e 0a3c 703e 5468 lugin.

    Th\n-001bc980: 6520 706c 7567 696e 2063 6f64 6520 6973 e plugin code is\n-001bc990: 206c 6f63 6174 6564 2069 6e20 7468 6520 located in the \n-001bc9a0: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n-001bc9b0: 706c 7567 696e 3c2f 636f 6465 3e3c 2f65 plugin directory con\n-001bc9d0: 7461 696e 696e 6720 3c65 6d3e 3c63 6f64 taining sessions.h and sessions.\n-001bca10: 633c 2f63 6f64 653e 3c2f 656d 3e2e 3c2f c..

    For more d\n-001bca30: 6574 6169 6c73 2c20 7365 6520 7468 6520 etails, see the \n-001bca40: 3c61 2068 7265 663d 222e 2e2f 2e2e 2f73 HTTP se\n-001bca70: 7373 696f 6e73 2070 6c75 6769 6e3c 2f61 ssions plugin documentation.\n-001bca90: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to\n-001bcab0: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten\n-001bcac0: 7473 3c2f 613e 3c2f 703e 0a3c 6833 3e3c ts

    .

    <\n-001bcad0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n-001bcae0: 2069 643d 2261 7061 6368 6570 6c75 6769 id=\"apacheplugi\n-001bcaf0: 6e22 3e3c 2f61 3e0a 5468 6520 4170 6163 n\">.The Apac\n-001bcb00: 6865 206d 6f64 756c 6520 706c 7567 696e he module plugin\n-001bcb10: 3c2f 6833 3e0a 3c70 3e54 6865 2070 6c75

    .

    The plu\n-001bcb20: 6769 6e20 636f 6465 2069 7320 6c6f 6361 gin code is loca\n-001bcb30: 7465 6420 696e 2074 6865 203c 656d 3e3c ted in the <\n-001bcb40: 636f 6465 3e67 736f 6170 2f6d 6f64 5f67 code>gsoap/mod_g\n-001bcb50: 736f 6170 2f6d 6f64 5f67 736f 6170 2d30 soap/mod_gsoap-0\n-001bcb60: 2e39 2f61 7061 6368 655f 3230 3c2f 636f .9/apache_20 directo\n-001bcb80: 7279 2e3c 2f70 3e0a 3c70 3e46 6f72 206d ry.

    .

    For m\n-001bcb90: 6f72 6520 6465 7461 696c 732c 2073 6565 ore details, see\n-001bcba0: 2074 6865 203c 6120 6872 6566 3d22 2e2e the Apac\n-001bcbd0: 6865 206d 6f64 756c 653c 2f61 3e20 646f he module do\n-001bcbe0: 6375 6d65 6e74 6174 696f 6e2e 3c2f 703e cumentation.

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

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

    .

    .The ISAPI ext\n-001bcc60: 656e 7369 6f6e 2070 6c75 6769 6e3c 2f68 ension plugin.

    The plugin\n-001bcc80: 2063 6f64 6520 6973 206c 6f63 6174 6564 code is located\n-001bcc90: 2069 6e20 7468 6520 3c65 6d3e 3c63 6f64 in the gsoap/mod_gsoa\n-001bccb0: 702f 6773 6f61 705f 7769 6e2f 6973 6170 p/gsoap_win/isap\n-001bccc0: 693c 2f63 6f64 653e 3c2f 656d 3e20 6469 i di\n-001bccd0: 7265 6374 6f72 792e 3c2f 703e 0a3c 703e rectory.

    .

    \n-001bcce0: 466f 7220 6d6f 7265 2064 6574 6169 6c73 For more details\n-001bccf0: 2c20 7365 6520 7468 6520 3c61 2068 7265 , see the \n-001bcd20: 4953 4150 4920 6578 7465 6e73 696f 6e3c ISAPI extension<\n-001bcd30: 2f61 3e20 646f 6375 6d65 6e74 6174 696f /a> documentatio\n-001bcd40: 6e2e 3c2f 703e 0a3c 703e f09f 949d 203c n.

    .

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

    ..The CURL\n-001bcdb0: 2070 6c75 6769 6e3c 2f68 333e 0a3c 703e plugin

    .

    \n-001bcdc0: 5468 6520 706c 7567 696e 2063 6f64 6520 The plugin code \n-001bcdd0: 6973 206c 6f63 6174 6564 2069 6e20 7468 is located in th\n-001bcde0: 6520 3c65 6d3e 3c63 6f64 653e 6773 6f61 e gsoa\n-001bcdf0: 702f 706c 7567 696e 3c2f 636f 6465 3e3c p/plugin<\n-001bce00: 2f65 6d3e 2064 6972 6563 746f 7279 2063 /em> directory c\n-001bce10: 6f6e 7461 696e 696e 6720 3c65 6d3e 3c63 ontaining curlapi.h and curlapi.\n-001bce50: 633c 2f63 6f64 653e 3c2f 656d 3e2e 3c2f c..

    For more d\n-001bce70: 6574 6169 6c73 2c20 7365 6520 7468 6520 etails, see the \n-001bce80: 3c61 2068 7265 663d 222e 2e2f 2e2e 2f63 CURL plugin\n-001bceb0: 3c2f 613e 2064 6f63 756d 656e 7461 7469 documentati\n-001bcec0: 6f6e 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 on.

    .

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

    ..The \n-001bcf30: 5769 6e49 6e65 7420 706c 7567 696e 3c2f WinInet plugin.

    The plugi\n-001bcf50: 6e20 636f 6465 2069 7320 6c6f 6361 7465 n code is locate\n-001bcf60: 6420 696e 2074 6865 203c 656d 3e3c 636f d in the gsoap/mod_gso\n-001bcf80: 6170 2f67 736f 6170 5f77 696e 2f77 696e ap/gsoap_win/win\n-001bcf90: 696e 6574 3c2f 636f 6465 3e3c 2f65 6d3e inet\n-001bcfa0: 2064 6972 6563 746f 7279 2e3c 2f70 3e0a directory.

    .\n-001bcfb0: 3c70 3e46 6f72 206d 6f72 6520 6465 7461

    For more deta\n-001bcfc0: 696c 732c 2073 6565 2074 6865 203c 6120 ils, see the WinInet plu\n-001bd000: 6769 6e3c 2f61 3e20 646f 6375 6d65 6e74 gin document\n-001bd010: 6174 696f 6e2e 3c2f 703e 0a3c 703e f09f ation.

    .

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

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

    .The W\n-001bd080: 532d 4164 6472 6573 7369 6e67 2070 6c75 S-Addressing plu\n-001bd090: 6769 6e3c 2f68 333e 0a3c 703e 5468 6520 gin

    .

    The \n-001bd0a0: 706c 7567 696e 2063 6f64 6520 6973 206c plugin code is l\n-001bd0b0: 6f63 6174 6564 2069 6e20 7468 6520 3c65 ocated in the gsoap/pl\n-001bd0d0: 7567 696e 3c2f 636f 6465 3e3c 2f65 6d3e ugin\n-001bd0e0: 2064 6972 6563 746f 7279 2063 6f6e 7461 directory conta\n-001bd0f0: 696e 696e 6720 3c65 6d3e 3c63 6f64 653e ining \n-001bd100: 7773 6161 7069 2e68 3c2f 636f 6465 3e3c wsaapi.h<\n-001bd110: 2f65 6d3e 2061 6e64 203c 656d 3e3c 636f /em> and wsaapi.c (to be u\n-001bd140: 7365 6420 696e 2043 2061 6e64 2043 2b2b sed in C and C++\n-001bd150: 292e 3c2f 703e 0a3c 703e 546f 2065 6e61 ).

    .

    To ena\n-001bd160: 626c 6520 5753 2d41 6464 7265 7373 696e ble WS-Addressin\n-001bd170: 6720 3230 3035 2028 616e 6420 7375 7070 g 2005 (and supp\n-001bd180: 6f72 7420 666f 7220 382f 3230 3034 292c ort for 8/2004),\n-001bd190: 2074 6865 2073 6572 7669 6365 2064 6566 the service def\n-001bd1a0: 696e 6974 696f 6e73 2068 6561 6465 7220 initions header \n-001bd1b0: 6669 6c65 2066 6f72 2073 6f61 7063 7070 file for soapcpp\n-001bd1c0: 3220 7368 6f75 6c64 2069 6e63 6c75 6465 2 should include\n-001bd1d0: 2074 6865 2066 6f6c 6c6f 7769 6e67 2069 the following i\n-001bd1e0: 6d70 6f72 7473 3a3c 2f70 3e0a 3c64 6976 mports:

    .
    #\n-001bd230: 696d 706f 7274 2026 7175 6f74 3b69 6d70 import "imp\n-001bd240: 6f72 742f 7773 6135 2e68 2671 756f 743b ort/wsa5.h"\n-001bd250: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c2f
    .

    This imp\n-001bd280: 6f72 7473 2074 6865 2053 4f41 5020 6865 orts the SOAP he\n-001bd290: 6164 6572 2065 6c65 6d65 6e74 7320 7265 ader elements re\n-001bd2a0: 7175 6972 6564 2062 7920 5753 2d41 6464 quired by WS-Add\n-001bd2b0: 7265 7373 696e 672e 3c2f 703e 0a3c 703e ressing.

    .

    \n-001bd2c0: 466f 7220 6d6f 7265 2064 6574 6169 6c73 For more details\n-001bd2d0: 2c20 7365 6520 7468 6520 3c61 2068 7265 , see the WS\n-001bd300: 2d41 6464 7265 7373 696e 6720 706c 7567 -Addressing plug\n-001bd310: 696e 3c2f 613e 2064 6f63 756d 656e 7461 in documenta\n-001bd320: 7469 6f6e 2e3c 2f70 3e0a 3c70 3ef0 9f94 tion.

    .

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

    .\n-001bd360: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .The W\n-001bd390: 532d 5265 6c69 6162 6c65 4d65 7373 6167 S-ReliableMessag\n-001bd3a0: 696e 6720 706c 7567 696e 3c2f 6833 3e0a ing plugin

    .\n-001bd3b0: 3c70 3e54 6865 2070 6c75 6769 6e20 636f

    The plugin co\n-001bd3c0: 6465 2069 7320 6c6f 6361 7465 6420 696e de is located in\n-001bd3d0: 2074 6865 203c 656d 3e3c 636f 6465 3e67 the g\n-001bd3e0: 736f 6170 2f70 6c75 6769 6e3c 2f63 6f64 soap/plugin director\n-001bd400: 7920 636f 6e74 6169 6e69 6e67 203c 656d y containing wsrmapi.h\n-001bd420: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 6e64 and\n-001bd430: 203c 656d 3e3c 636f 6465 3e77 7372 6d61 wsrma\n-001bd440: 7069 2e63 3c2f 636f 6465 3e3c 2f65 6d3e pi.c\n-001bd450: 2028 746f 2062 6520 7573 6564 2069 6e20 (to be used in \n-001bd460: 4320 616e 6420 432b 2b29 2e3c 2f70 3e0a C and C++).

    .\n-001bd470: 3c70 3e41 6c73 6f20 6e65 6564 6564 2061

    Also needed a\n-001bd480: 7265 203c 656d 3e3c 636f 6465 3e74 6872 re thr\n-001bd490: 6561 6473 2e68 3c2f 636f 6465 3e3c 2f65 eads.h and threads.c for multi\n-001bd4d0: 2d74 6872 6561 6469 6e67 2061 6e64 206c -threading and l\n-001bd4e0: 6f63 6b69 6e67 2073 7570 706f 7274 2e3c ocking support.<\n-001bd4f0: 2f70 3e0a 3c70 3e54 6f20 656e 6162 6c65 /p>.

    To enable\n-001bd500: 2057 532d 5265 6c69 6162 6c65 4d65 7373 WS-ReliableMess\n-001bd510: 6167 696e 672c 2074 6865 2073 6572 7669 aging, the servi\n-001bd520: 6365 2064 6566 696e 6974 696f 6e73 2068 ce definitions h\n-001bd530: 6561 6465 7220 6669 6c65 2066 6f72 2073 eader file for s\n-001bd540: 6f61 7063 7070 3220 7368 6f75 6c64 2069 oapcpp2 should i\n-001bd550: 6e63 6c75 6465 2074 6865 2066 6f6c 6c6f nclude the follo\n-001bd560: 7769 6e67 2069 6d70 6f72 7473 3a3c 2f70 wing imports:.

    #import &qu\n-001bd5c0: 6f74 3b69 6d70 6f72 742f 7773 726d 2e68 ot;import/wsrm.h\n-001bd5d0: 2671 756f 743b 3c2f 7370 616e 3e20 3c2f " .
    #import "\n-001bd620: 696d 706f 7274 2f77 7361 352e 6826 7175 import/wsa5.h&qu\n-001bd630: 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 763e ot;
    \n-001bd640: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    This \n-001bd660: 696d 706f 7274 7320 7468 6520 534f 4150 imports the SOAP\n-001bd670: 2068 6561 6465 7220 656c 656d 656e 7473 header elements\n-001bd680: 2072 6571 7569 7265 6420 6279 2057 532d required by WS-\n-001bd690: 5265 6c69 6162 6c65 4d65 7373 6167 696e ReliableMessagin\n-001bd6a0: 672e 3c2f 703e 0a3c 703e 466f 7220 6d6f g.

    .

    For mo\n-001bd6b0: 7265 2064 6574 6169 6c73 2c20 7365 6520 re details, see \n-001bd6c0: 7468 6520 3c61 2068 7265 663d 222e 2e2f the WS-Rel\n-001bd6f0: 6961 626c 654d 6573 7361 6769 6e67 2070 iableMessaging p\n-001bd700: 6c75 6769 6e3c 2f61 3e20 646f 6375 6d65 lugin docume\n-001bd710: 6e74 6174 696f 6e2e 3c2f 703e 0a3c 703e ntation.

    .

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

    .Th\n-001bd780: 6520 5753 2d53 6563 7572 6974 7920 706c e WS-Security pl\n-001bd790: 7567 696e 3c2f 6833 3e0a 3c70 3e54 6865 ugin

    .

    The\n-001bd7a0: 2070 6c75 6769 6e20 636f 6465 2069 7320 plugin code is \n-001bd7b0: 6c6f 6361 7465 6420 696e 2074 6865 203c located in the <\n-001bd7c0: 656d 3e3c 636f 6465 3e67 736f 6170 2f70 em>gsoap/p\n-001bd7d0: 6c75 6769 6e3c 2f63 6f64 653e 3c2f 656d lugin directory cont\n-001bd7f0: 6169 6e69 6e67 203c 656d 3e3c 636f 6465 aining wsseapi.h and <\n-001bd820: 636f 6465 3e77 7373 6561 7069 2e63 3c2f code>wsseapi.c (to b\n-001bd840: 6520 7573 6564 2069 6e20 4320 616e 6420 e used in C and \n-001bd850: 432b 2b29 2e3c 2f70 3e0a 3c70 3e41 6c73 C++).

    .

    Als\n-001bd860: 6f20 6e65 6564 6564 2061 7265 3a20 3c65 o needed are: smdevp.h\n-001bd880: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 6e64 and\n-001bd890: 203c 656d 3e3c 636f 6465 3e73 6d64 6576 smdev\n-001bd8a0: 702e 633c 2f63 6f64 653e 3c2f 656d 3e20 p.c \n-001bd8b0: 666f 7220 7374 7265 616d 696e 6720 584d for streaming XM\n-001bd8c0: 4c20 7369 676e 6174 7572 6520 616e 6420 L signature and \n-001bd8d0: 6d65 7373 6167 6520 6469 6765 7374 2065 message digest e\n-001bd8e0: 6e67 696e 652c 203c 656d 3e3c 636f 6465 ngine, mecevp.h\n-001bd900: 3c2f 656d 3e20 616e 6420 3c65 6d3e 3c63 and mecevp.c for the\n-001bd930: 2073 7472 6561 6d69 6e67 2058 4d4c 2065 streaming XML e\n-001bd940: 6e63 7279 7074 696f 6e20 656e 6769 6e65 ncryption engine\n-001bd950: 2c20 3c65 6d3e 3c63 6f64 653e 7468 7265 , thre\n-001bd960: 6164 732e 683c 2f63 6f64 653e 3c2f 656d ads.h and \n-001bd980: 7468 7265 6164 732e 633c 2f63 6f64 653e threads.c\n-001bd990: 3c2f 656d 3e20 666f 7220 6d75 6c74 692d for multi-\n-001bd9a0: 7468 7265 6164 696e 6720 616e 6420 6c6f threading and lo\n-001bd9b0: 636b 696e 6720 7375 7070 6f72 742e 3c2f cking support..

    To enable \n-001bd9d0: 5753 2d53 6563 7572 6974 792c 2074 6865 WS-Security, the\n-001bd9e0: 2073 6572 7669 6365 2064 6566 696e 6974 service definit\n-001bd9f0: 696f 6e73 2068 6561 6465 7220 6669 6c65 ions header file\n-001bda00: 2066 6f72 2073 6f61 7063 7070 3220 7368 for soapcpp2 sh\n-001bda10: 6f75 6c64 2069 6e63 6c75 6465 2074 6865 ould include the\n-001bda20: 2066 6f6c 6c6f 7769 6e67 2069 6d70 6f72 following impor\n-001bda30: 7473 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ts:

    .
    \n-001bda60: 3c73 7061 6e20 636c 6173 733d 2270 7265 #impo\n-001bda80: 7274 2026 7175 6f74 3b69 6d70 6f72 742f rt "import/\n-001bda90: 7773 7365 2e68 2671 756f 743b 3c2f 7370 wsse.h"
    .
    \n-001bdab0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d
    \n-001be240: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    void\n-001be270: 3c2f 7370 616e 3e20 7773 6464 5f65 7665 wsdd_eve\n-001be280: 6e74 5f42 7965 283c 7370 616e 2063 6c61 nt_Bye(str\n-001be2a0: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, .
    \n-001be340: 756e 7369 676e 6564 3c2f 7370 616e 3e20 unsigned \n-001be350: 3c73 7061 6e20 636c 6173 733d 226b 6579 int InstanceId,\n-001be380: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    \n-001be3b0: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *SequenceId, \n-001be3f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    unsigned int\n-001be450: 3c2f 7370 616e 3e20 4d65 7373 6167 654e MessageN\n-001be460: 756d 6265 722c 203c 2f64 6976 3e0a 3c64 umber,
    .\n-001be480: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-001be4c0: 723c 2f73 7061 6e3e 202a 4d65 7373 6167 r *Messag\n-001be4d0: 6549 442c 203c 2f64 6976 3e0a 3c64 6976 eID,
    .const\n-001be510: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-001be530: 2f73 7061 6e3e 202a 5265 6c61 7465 7354 /span> *RelatesT\n-001be540: 6f2c 203c 2f64 6976 3e0a 3c64 6976 2063 o,
    .
    const <\n-001be580: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001be590: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *EndpointRe\n-001be5b0: 6665 7265 6e63 652c 203c 2f64 6976 3e0a ference,
    .\n-001be5c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    const c\n-001be610: 6861 723c 2f73 7061 6e3e 202a 5479 7065 har *Type\n-001be620: 732c 203c 2f64 6976 3e0a 3c64 6976 2063 s,
    .
    const <\n-001be660: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001be670: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *Scopes, .
    con\n-001be6c0: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n-001be6f0: 2a4d 6174 6368 4279 2c20 3c2f 6469 763e *MatchBy,
    \n-001be700: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    const \n-001be750: 6368 6172 3c2f 7370 616e 3e20 2a58 4164 char *XAd\n-001be760: 6472 732c 203c 2f64 6976 3e0a 3c64 6976 drs,
    .unsigned\n-001be7a0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c int Met\n-001be7d0: 6164 6174 6156 6572 7369 6f6e 293c 2f64 adataVersion).
    soap_wsdd_mod\n-001be830: 6520 7773 6464 5f65 7665 6e74 5f50 726f e wsdd_event_Pro\n-001be840: 6265 283c 7370 616e 2063 6c61 7373 3d22 be(struct<\n-001be860: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n-001be890: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n-001be8c0: 6f61 703c 2f61 3e2c 203c 2f64 6976 3e0a oap,
    .\n-001be8d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    const c\n-001be920: 6861 723c 2f73 7061 6e3e 202a 4d65 7373 har *Mess\n-001be930: 6167 6549 442c 203c 2f64 6976 3e0a 3c64 ageID,
    .\n-001be950: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n-001be990: 723c 2f73 7061 6e3e 202a 5265 706c 7954 r *ReplyT\n-001be9a0: 6f2c 203c 2f64 6976 3e0a 3c64 6976 2063 o,
    .
    const <\n-001be9e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001be9f0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *Types, .
    cons\n-001bea40: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n-001bea70: 5363 6f70 6573 2c20 3c2f 6469 763e 0a3c Scopes,
    .<\n-001bea80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001bea90: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >const ch\n-001bead0: 6172 3c2f 7370 616e 3e20 2a4d 6174 6368 ar *Match\n-001beae0: 4279 2c20 3c2f 6469 763e 0a3c 6469 7620 By,
    .
    struct\n-001beb20: 2077 7364 645f 5f50 726f 6265 4d61 7463 wsdd__ProbeMatc\n-001beb30: 6865 7354 7970 6520 2a50 726f 6265 4d61 hesType *ProbeMa\n-001beb40: 7463 6865 7329 3c2f 6469 763e 0a3c 2f64 tches)
    .
    void wsdd_event_Pro\n-001bebc0: 6265 4d61 7463 6865 7328 3c73 7061 6e20 beMatches(\n-001bebe0: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n-001bec20: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n-001bec30: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n-001bec40: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n-001bec50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    unsigned int\n-001becb0: 3c2f 7370 616e 3e20 496e 7374 616e 6365 Instance\n-001becc0: 4964 2c20 3c2f 6469 763e 0a3c 6469 7620 Id,
    .
    const \n-001bed00: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *SequenceI\n-001bed30: 642c 203c 2f64 6976 3e0a 3c64 6976 2063 d,
    .
    unsigned \n-001bed90: 696e 743c 2f73 7061 6e3e 204d 6573 7361 int Messa\n-001beda0: 6765 4e75 6d62 6572 2c20 3c2f 6469 763e geNumber,
    \n-001bedb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    const \n-001bee00: 6368 6172 3c2f 7370 616e 3e20 2a4d 6573 char *Mes\n-001bee10: 7361 6765 4944 2c20 3c2f 6469 763e 0a3c sageID,
    .<\n-001bee20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001bee30: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >const ch\n-001bee70: 6172 3c2f 7370 616e 3e20 2a52 656c 6174 ar *Relat\n-001bee80: 6573 546f 2c20 3c2f 6469 763e 0a3c 6469 esTo,
    .<\n-001beea0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001beeb0: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct wsdd__ProbeMa\n-001beed0: 7463 6865 7354 7970 6520 2a50 726f 6265 tchesType *Probe\n-001beee0: 4d61 7463 6865 7329 3c2f 6469 763e 0a3c Matches)
    .<\n-001beef0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>
    so\n-001bef30: 6170 5f77 7364 645f 6d6f 6465 2077 7364 ap_wsdd_mode wsd\n-001bef40: 645f 6576 656e 745f 5265 736f 6c76 6528 d_event_Resolve(\n-001bef50: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n-001befa0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n-001befd0: 3c2f 613e 2c20 3c2f 6469 763e 0a3c 6469 ,
    .<\n-001beff0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001bf000: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n-001bf030: 3c2f 7370 616e 3e20 2a4d 6573 7361 6765 *Message\n-001bf040: 4944 2c20 3c2f 6469 763e 0a3c 6469 7620 ID,
    .
    const \n-001bf080: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *ReplyTo, \n-001bf0b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    c\n-001bf0e0: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *EndpointRefer\n-001bf120: 656e 6365 2c20 3c2f 6469 763e 0a3c 6469 ence,
    .<\n-001bf140: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n-001bf150: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct wsdd__Resolve\n-001bf170: 4d61 7463 6865 7354 7970 6520 2a52 6573 MatchesType *Res\n-001bf180: 6f6c 7665 4d61 7463 6865 7329 3c2f 6469 olveMatches).
    \n-001bf1c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    void\n-001bf1f0: 3c2f 7370 616e 3e20 7773 6464 5f65 7665 wsdd_eve\n-001bf200: 6e74 5f52 6573 6f6c 7665 4d61 7463 6865 nt_ResolveMatche\n-001bf210: 7328 3c73 7061 6e20 636c 6173 733d 226b s(struct soa\n-001bf260: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n-001bf290: 6170 3c2f 613e 2c20 3c2f 6469 763e 0a3c ap,
    .<\n-001bf2a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n-001bf2b0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >unsig\n-001bf2d0: 6e65 643c 2f73 7061 6e3e 203c 7370 616e ned int \n-001bf300: 496e 7374 616e 6365 4964 2c20 3c2f 6469 InstanceId, .
    const\n-001bf340: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *S\n-001bf370: 6571 7565 6e63 6549 642c 203c 2f64 6976 equenceId, .
    un\n-001bf3b0: 7369 676e 6564 3c2f 7370 616e 3e20 3c73 signed int MessageNumber\n-001bf3f0: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    const char *MessageID, \n-001bf460: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    c\n-001bf490: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *RelatesTo, .
    con\n-001bf500: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n-001bf530: 2a45 6e64 706f 696e 7452 6566 6572 656e *EndpointReferen\n-001bf540: 6365 2c20 3c2f 6469 763e 0a3c 6469 7620 ce,
    .
    const \n-001bf580: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *Types, .
    con\n-001bf5e0: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n-001bf610: 2a53 636f 7065 732c 203c 2f64 6976 3e0a *Scopes,
    .\n-001bf620: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    const c\n-001bf670: 6861 723c 2f73 7061 6e3e 202a 4d61 7463 har *Matc\n-001bf680: 6842 792c 203c 2f64 6976 3e0a 3c64 6976 hBy,
    .const
    \n-001bf6c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n-001bf6e0: 2f73 7061 6e3e 202a 5841 6464 7273 2c20 /span> *XAddrs, \n-001bf6f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    unsigned int\n-001bf750: 3c2f 7370 616e 3e20 4d65 7461 6461 7461 Metadata\n-001bf760: 5665 7273 696f 6e29 3c2f 6469 763e 0a3c Version)
    .<\n-001bf770: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    These e\n-001bf790: 7665 6e74 2068 616e 646c 6572 7320 7769 vent handlers wi\n-001bf7a0: 6c6c 2062 6520 696e 766f 6b65 6420 7768 ll be invoked wh\n-001bf7b0: 656e 2069 6e62 6f75 6e64 2057 532d 4469 en inbound WS-Di\n-001bf7c0: 7363 6f76 6572 7920 6d65 7373 6167 6573 scovery messages\n-001bf7d0: 2061 7272 6976 6520 7573 696e 673a 3c2f arrive using:.

    if (\n-001bf830: 213c 6120 636c 6173 733d 2263 6f64 6522 !soap_valid_so\n-001bf890: 636b 6574 3c2f 613e 283c 6120 636c 6173 cket(soap_bi\n-001bf8f0: 6e64 3c2f 613e 283c 6120 636c 6173 733d nd(so\n-001bf920: 6170 3c2f 613e 2c20 4e55 4c4c 2c20 3c61 ap, NULL, port,\n-001bf980: 2042 4143 4b4c 4f47 2929 2920 3c2f 6469 BACKLOG))) .
    ... // error
    .
    if (s\n-001bfa10: 6f61 705f 7773 6464 5f6c 6973 7465 6e28 oap_wsdd_listen(\n-001bfa20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n-001bfa50: 2074 696d 656f 7574 2929 203c 2f64 6976 timeout)) .
    ... \n-001bfa90: 2f2f 2065 7272 6f72 3c2f 7370 616e 3e3c // error<\n-001bfaa0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n-001bfac0: 7768 6963 6820 7769 6c6c 206c 6973 7465 which will liste\n-001bfad0: 6e20 666f 7220 3c63 6f64 653e 7469 6d65 n for time\n-001bfae0: 6f75 743c 2f63 6f64 653e 2073 6563 6f6e out secon\n-001bfaf0: 6473 2074 6f20 696e 626f 756e 6420 5753 ds to inbound WS\n-001bfb00: 2d44 6973 636f 7665 7279 206d 6573 7361 -Discovery messa\n-001bfb10: 6765 7320 6f6e 2061 2070 6f72 7420 616e ges on a port an\n-001bfb20: 6420 6469 7370 6174 6368 6573 2074 6865 d dispatches the\n-001bfb30: 6d20 746f 2074 6865 2065 7665 6e74 2068 m to the event h\n-001bfb40: 616e 646c 6572 732e 2041 206e 6567 6174 andlers. A negat\n-001bfb50: 6976 6520 3c63 6f64 653e 7469 6d65 6f75 ive timeou\n-001bfb60: 743c 2f63 6f64 653e 2076 616c 7565 2073 t value s\n-001bfb70: 7065 6369 6669 6573 2074 6865 2074 696d pecifies the tim\n-001bfb80: 656f 7574 2069 6e20 6d69 6372 6f73 6563 eout in microsec\n-001bfb90: 6f6e 6473 2e3c 2f70 3e0a 3c70 3e46 6f72 onds.

    .

    For\n-001bfba0: 206d 6f72 6520 6465 7461 696c 732c 2073 more details, s\n-001bfbb0: 6565 2074 6865 203c 6120 6872 6566 3d22 ee the WS-\n-001bfbe0: 4469 7363 6f76 6572 7920 706c 7567 696e Discovery plugin\n-001bfbf0: 3c2f 613e 2064 6f63 756d 656e 7461 7469 documentati\n-001bfc00: 6f6e 2e3c 2f70 3e0a 3c68 313e 3c61 2063 on.

    .

    .Copyright

    \n-001bfc40: 0a3c 703e 3c65 6d3e 436f 7079 7269 6768 .

    Copyrigh\n-001bfc50: 7420 2863 2920 3230 3030 2d32 3032 302c t (c) 2000-2020,\n-001bfc60: 2052 6f62 6572 7420 412e 2076 616e 2045 Robert A. van E\n-001bfc70: 6e67 656c 656e 2c20 4765 6e69 7669 6120 ngelen, Genivia \n-001bfc80: 496e 632e 3c62 7220 202f 3e0a 416c 6c20 Inc.
    .All \n-001bfc90: 7269 6768 7473 2072 6573 6572 7665 642e rights reserved.\n-001bfca0: 3c2f 656d 3e20 3c2f 703e 0a3c 2f64 6976

    .
    .
    .\n-001bfce0: 3c2f 6469 763e 3c21 2d2d 2064 6f63 2d63
    .
    .<\n-001bfd10: 6164 6472 6573 7320 636c 6173 733d 2266 address class=\"f\n-001bfd20: 6f6f 7465 7222 3e0a 436f 7079 7269 6768 ooter\">.Copyrigh\n-001bfd30: 7420 2843 2920 3230 3231 2c20 526f 6265 t (C) 2021, Robe\n-001bfd40: 7274 2076 616e 2045 6e67 656c 656e 2c20 rt van Engelen, \n-001bfd50: 4765 6e69 7669 6120 496e 632e 2c20 416c Genivia Inc., Al\n-001bfd60: 6c20 5269 6768 7473 2052 6573 6572 7665 l Rights Reserve\n-001bfd70: 642e 0a3c 2f61 6464 7265 7373 3e0a 3c61 d....Co\n-001bfda0: 6e76 6572 7465 6420 6f6e 204d 6f6e 204d nverted on Mon M\n-001bfdb0: 6172 2038 2032 3032 3120 3133 3a30 363a ar 8 2021 13:06:\n-001bfdc0: 3233 2062 7920 3c61 2074 6172 6765 743d 23 by
    Doxygen 1.\n-001bfe10: 392e 313c 2f73 6d61 6c6c 3e3c 2f61 6464 9.1.
    .
    ...\n+001024a0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // no othe\n+001024c0: 7220 584d 4c20 6461 7461 203c 2f73 7061 r XML data
    .
    } .
    \n+00102520: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_FAULT\n+00102590: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // retur\n+001025b0: 6e20 6672 6f6d 2073 6572 7669 6365 206f n from service o\n+001025c0: 7065 7261 7469 6f6e 2063 616c 6c20 7769 peration call wi\n+001025d0: 7468 2074 6865 2066 6175 6c74 3c2f 7370 th the fault
    .
    sh\n+001026b0: 6f72 7420 7665 7273 696f 6e3c 2f64 6976 ort version
    SOAP version\n+001026e0: 2028 3020 3d20 6e6f 2053 4f41 502c 2031 (0 = no SOAP, 1\n+001026f0: 203d 2053 4f41 5020 312e 312c 2032 203d = SOAP 1.1, 2 =\n+00102700: 2053 4f41 5020 312e 3229 3c2f 6469 763e SOAP 1.2)
    \n+00102710: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n+00102730: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n+00102740: 3a32 3835 313c 2f64 6976 3e3c 2f64 6976 :2851
    .

    Here\n+00102770: 2c20 3c63 6f64 653e 3c61 2063 6c61 7373 , soap_rec\n+00102820: 6569 7665 725f 6661 756c 743c 2f61 3e3c eiver_fault<\n+00102830: 2f63 6f64 653e 2061 6c6c 6f63 6174 6573 /code> allocates\n+00102840: 2061 2066 6175 6c74 2073 7472 7563 7420 a fault struct \n+00102850: 7468 656e 2077 6520 7365 7420 7468 6520 then we set the \n+00102860: 534f 4150 2046 6175 6c74 2064 6574 6169 SOAP Fault detai\n+00102870: 6c73 2061 7320 7368 6f77 6e2e 3c2f 703e ls as shown.

    \n+00102880: 0a3c 703e 4e6f 7465 2074 6861 7420 534f .

    Note that SO\n+00102890: 4150 2031 2e32 2073 7570 706f 7274 7320 AP 1.2 supports \n+001028a0: 6e65 7374 6564 2066 6175 6c74 2073 7562 nested fault sub\n+001028b0: 2d63 6f64 6573 2e20 5468 6573 6520 6361 -codes. These ca\n+001028c0: 6e20 6265 2073 6574 2061 7320 666f 6c6c n be set as foll\n+001028d0: 6f77 733a 3c2f 703e 0a3c 6469 7620 636c ows:

    ..\n+001029d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n+00102a00: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>SOAP_ENV__Code\n+00102a50: 3c2f 613e 202a 7375 6263 6f64 6532 203d *subcode2 =\n+00102a60: 2073 6f61 705f 6e65 775f 534f 4150 5f45 soap_new_SOAP_E\n+00102a70: 4e56 5f5f 436f 6465 283c 6120 636c 6173 NV__Code(\n+00102aa0: 736f 6170 3c2f 613e 293b 3c2f 6469 763e soap);
    \n+00102ab0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_sende\n+00102b20: 725f 6661 756c 743c 2f61 3e28 3c61 2063 r_fault(soap, "T\n+00102b80: 6865 2072 6571 7565 7374 6564 2070 726f he requested pro\n+00102b90: 6669 6c65 2074 6f6b 656e 2050 726f 6669 file token Profi\n+00102ba0: 6c65 546f 6b65 6e20 646f 6573 206e 6f74 leToken does not\n+00102bb0: 2065 7869 7374 2e26 7175 6f74 3b3c 2f73 exist.", NULL); .
    subcode1-&\n+00102bf0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;SOAP_ENV__Value\n+00102c60: 3c2f 613e 203d 2028 3c73 7061 6e20 636c = (char*)<\n+00102c90: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+00102ca0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+00102cb0: 3b74 6572 3a49 6e76 616c 6964 4172 6773 ;ter:InvalidArgs\n+00102cc0: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n+00102cd0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00102ce0: 656e 7422 3e2f 2f20 6120 514e 616d 6520 ent\">// a QName \n+00102cf0: 7661 6c75 653c 2f73 7061 6e3e 3c2f 6469 value.
    subcode1-&g\n+00102d20: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;\n+00102d80: 534f 4150 5f45 4e56 5f5f 5375 6263 6f64 SOAP_ENV__Subcod\n+00102d90: 653c 2f61 3e20 3d20 7375 6263 6f64 6532 e = subcode2\n+00102da0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    subcod\n+00102dc0: 6532 2d26 6774 3b3c 6120 636c 6173 733d e2->SOAP_ENV__V\n+00102e30: 616c 7565 3c2f 613e 203d 2028 3c73 7061 alue = (char*)&\n+00102e80: 7175 6f74 3b74 6572 3a4e 6f50 726f 6669 quot;ter:NoProfi\n+00102e90: 6c65 2671 756f 743b 3c2f 7370 616e 3e3b le";\n+00102ea0: 203c 7370 616e 2063 6c61 7373 3d22 636f // a QNam\n+00102ec0: 6520 7661 6c75 653c 2f73 7061 6e3e 3c2f e value.
    subcode2-\n+00102ef0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >SOAP_ENV__Subc\n+00102f60: 6f64 653c 2f61 3e20 3d20 4e55 4c4c 3b3c ode = NULL;<\n+00102f70: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..<\n+00103110: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00103120: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >retur\n+00103140: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA\n+001031a0: 505f 4641 554c 543c 2f61 3e3b 3c2f 6469 P_FAULT;.

    Thi\n+001031d0: 7320 7072 6f64 7563 6573 3a3c 2f70 3e0a s produces:

    .\n+001031e0: 3c64 6976 2063 6c61 7373 3d22 616c 7422
    <SOAP-ENV\n+00103240: 3a46 6175 6c74 3c2f 7370 616e 3e26 6774 :Fault>\n+00103250: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    <\n+00103270: 3c73 7061 6e20 636c 6173 733d 226b 6579 SOAP-E\n+00103290: 4e56 3a43 6f64 653c 2f73 7061 6e3e 2667 NV:Code&g\n+001032a0: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    &\n+001032c0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;SOA\n+001032e0: 502d 454e 563a 5661 6c75 653c 2f73 7061 P-ENV:Value>SOAP\n+00103310: 2d45 4e56 3a53 656e 6465 723c 2f73 7061 -ENV:Sender</SOAP-ENV:Value<\n+00103350: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
    \n+00103360: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    <SOAP-ENV:Su\n+001033a0: 6263 6f64 653c 2f73 7061 6e3e 2667 743b bcode>\n+001033b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    &\n+001033d0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;SOA\n+001033f0: 502d 454e 563a 5661 6c75 653c 2f73 7061 P-ENV:Value>ter:\n+00103420: 496e 7661 6c69 6441 7267 733c 2f73 7061 InvalidArgs</SOAP-ENV:Value<\n+00103460: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
    \n+00103470: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    <SOAP-ENV:\n+001034b0: 5375 6263 6f64 653c 2f73 7061 6e3e 2667 Subcode&g\n+001034c0: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    \n+001034e0: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <SOAP-ENV:Value<\n+00103510: 2f73 7061 6e3e 2667 743b 3c73 7061 6e20 /span>>\n+00103530: 7465 723a 4e6f 5072 6f66 696c 653c 2f73 ter:NoProfile </SOAP-ENV:Val\n+00103570: 7565 3c2f 7370 616e 3e26 6774 3b3c 2f64 ue>.
    <\n+001035a0: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /SOAP-\n+001035c0: 454e 563a 5375 6263 6f64 653c 2f73 7061 ENV:Subcode>
    . \n+001035f0: 2020 2026 6c74 3b2f 3c73 7061 6e20 636c </SOAP-ENV:Subco\n+00103620: 6465 3c2f 7370 616e 3e26 6774 3b3c 2f64 de>.
    </SOAP-ENV:\n+00103670: 436f 6465 3c2f 7370 616e 3e26 6774 3b3c Code><\n+00103680: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <SOAP-ENV\n+001036c0: 3a52 6561 736f 6e3c 2f73 7061 6e3e 2667 :Reason&g\n+001036d0: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    &\n+001036f0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;SOA\n+00103710: 502d 454e 563a 5465 7874 3c2f 7370 616e P-ENV:Text xml:lang\n+00103740: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="en&quo\n+00103770: 743b 3c2f 7370 616e 3e26 6774 3b3c 7370 t;>The requested profi\n+001037e0: 6c65 3c2f 7370 616e 3e20 3c73 7061 6e20 le \n+00103800: 746f 6b65 6e3c 2f73 7061 6e3e 203c 7370 token ProfileToken<\n+00103830: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> doe\n+00103850: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s n\n+00103870: 6f74 3c2f 7370 616e 3e20 3c73 7061 6e20 ot \n+00103890: 6578 6973 742e 3c2f 7370 616e 3e26 6c74 exist.<\n+001038a0: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/SOAP\n+001038c0: 2d45 4e56 3a54 6578 743c 2f73 7061 6e3e -ENV:Text\n+001038d0: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
    .
    &\n+001038f0: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/SO\n+00103910: 4150 2d45 4e56 3a52 6561 736f 6e3c 2f73 AP-ENV:Reason>
    .<\n+00103930: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00103940: 3e26 6c74 3b2f 3c73 7061 6e20 636c 6173 ></\n+00103960: 534f 4150 2d45 4e56 3a46 6175 6c74 3c2f SOAP-ENV:Fault>
    .\n+00103980: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d
    Service operati\n+001039b0: 6f6e 7320 696d 706c 656d 656e 7461 7469 ons implementati\n+001039c0: 6f6e 2069 6e20 6120 5765 6220 7365 7276 on in a Web serv\n+001039d0: 6963 6520 6170 706c 6963 6174 696f 6e20 ice application \n+001039e0: 6361 6e20 7265 7475 726e 2076 6172 696f can return vario\n+001039f0: 7573 2053 4f41 5020 4661 756c 7473 2063 us SOAP Faults c\n+00103a00: 7573 746f 6d69 7a65 6420 696e 2074 6869 ustomized in thi\n+00103a10: 7320 7761 792e 3c2f 703e 0a3c 703e 534f s way.

    .

    SO\n+00103a20: 4150 2046 6175 6c74 2073 7472 7563 7475 AP Fault structu\n+00103a30: 7265 7320 6172 6520 6465 636c 6172 6564 res are declared\n+00103a40: 203c 636f 6465 3e6d 7574 6162 6c65 3c2f mutable, which mea\n+00103a60: 6e73 2074 6861 7420 7265 2d64 6563 6c61 ns that re-decla\n+00103a70: 7261 7469 6f6e 7320 6f66 2074 6865 2073 rations of the s\n+00103a80: 7472 7563 7475 7265 7320 6172 6520 7065 tructures are pe\n+00103a90: 726d 6974 7465 6420 616e 6420 6164 6469 rmitted and addi\n+00103aa0: 7469 6f6e 616c 206d 656d 6265 7273 2061 tional members a\n+00103ab0: 7265 2063 6f6c 6c65 6374 6564 2069 6e74 re collected int\n+00103ac0: 6f20 6f6e 6520 6669 6e61 6c20 7374 7275 o one final stru\n+00103ad0: 6374 7572 6520 6279 2074 6865 2073 6f61 cture by the soa\n+00103ae0: 7063 7070 3220 746f 6f6c 2e3c 2f70 3e0a pcpp2 tool.

    .\n+00103af0: 3c70 3e46 6f72 2061 6e20 6578 616d 706c

    For an exampl\n+00103b00: 6520 7468 6174 2075 7365 6420 7468 6520 e that used the \n+00103b10: 534f 4150 2046 6175 6c74 2064 6574 6169 SOAP Fault detai\n+00103b20: 6c20 7374 7275 6374 7572 653a 3c2f 703e l structure:

    \n+00103b30: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    s\n+00103b70: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct SOAP_\n+00103bc0: 454e 565f 5f44 6574 6169 6c3c 2f61 3e20 ENV__Detail \n+00103bd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+00103bf0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    con\n+00103c20: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+00103c50: 2a66 5f5f 696e 7661 6c69 643b 3c2f 6469 *f__invalid;.
    c\n+00103c90: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *f__unavailabl\n+00103cd0: 653b 3c2f 6469 763e 0a3c 6469 7620 636c e;
    .
    <\n+00103cf0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00103d00: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int __type;<\n+00103d80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    void *fault;.
    _XM\n+00103ea0: 4c3c 2f61 3e20 3c61 2063 6c61 7373 3d22 L __any;\n+00103f10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }; .
    //gso\n+00103f60: 6170 206e 7320 7365 7276 6963 6520 6d65 ap ns service me\n+00103f70: 7468 6f64 2d66 6175 6c74 3a20 6c6f 6769 thod-fault: logi\n+00103f80: 6e20 665f 5f69 6e76 616c 6964 203c 2f73 n f__invalid
    .
    //gsoap ns se\n+00103fd0: 7276 6963 6520 6d65 7468 6f64 2d66 6175 rvice method-fau\n+00103fe0: 6c74 3a20 6c6f 6769 6e20 665f 5f75 6e61 lt: login f__una\n+00103ff0: 7661 696c 6162 6c65 203c 2f73 7061 6e3e vailable \n+00104000: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ns\n+00104040: 5f5f 6c6f 6769 6e28 2e2e 2e29 3b3c 2f64 __login(...);.

    Se\n+00104070: 6520 616c 736f 2041 5049 2064 6f63 756d e also API docum\n+00104080: 656e 7461 7469 6f6e 204d 6f64 756c 6520 entation Module \n+00104090: 3c61 2063 6c61 7373 3d22 656c 2220 6872 Fa\n+001040c0: 756c 7420 7374 7275 6374 7572 6520 616e ult structure an\n+001040d0: 6420 6675 6e63 7469 6f6e 733c 2f61 3e2e d functions.\n+001040e0: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

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

    .

    <\n+00104120: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+00104130: 2069 643d 224d 494d 4522 3e3c 2f61 3e0a id=\"MIME\">.\n+00104140: 4d49 4d45 2061 7474 6163 686d 656e 7473 MIME attachments\n+00104150: 3c2f 6831 3e0a 3c70 3e54 6865 2067 534f

    .

    The gSO\n+00104160: 4150 2074 6f6f 6c6b 6974 2073 7570 706f AP toolkit suppo\n+00104170: 7274 7320 4d49 4d45 2061 7474 6163 686d rts MIME attachm\n+00104180: 656e 7473 2061 7320 7065 7220 534f 4150 ents as per SOAP\n+00104190: 2077 6974 6820 4174 7461 6368 6d65 6e74 with Attachment\n+001041a0: 7320 2853 7741 2920 7370 6563 6966 6963 s (SwA) specific\n+001041b0: 6174 696f 6e20 3c61 2068 7265 663d 2268 ation http://www\n+001041f0: 2e77 332e 6f72 672f 5452 2f53 4f41 502d .w3.org/TR/SOAP-\n+00104200: 6174 7461 6368 6d65 6e74 733c 2f61 3e2e attachments.\n+00104210: 3c2f 703e 0a3c 703e 4d54 4f4d 2061 7474

    .

    MTOM att\n+00104220: 6163 686d 656e 7473 2074 6861 7420 6172 achments that ar\n+00104230: 6520 6573 7365 6e74 6961 6c6c 7920 4d49 e essentially MI\n+00104240: 4d45 2061 7474 6163 686d 656e 7473 2074 ME attachments t\n+00104250: 6861 7420 636f 6e66 6f72 6d20 746f 2074 hat conform to t\n+00104260: 6865 204d 544f 4d20 7370 6563 6966 6963 he MTOM specific\n+00104270: 6174 696f 6e20 3c61 2068 7265 663d 2268 ation http://www.w3.o\n+001042b0: 7267 2f54 522f 736f 6170 3132 2d6d 746f rg/TR/soap12-mto\n+001042c0: 6d3c 2f61 3e20 6172 6520 616c 736f 2073 m are also s\n+001042d0: 7570 706f 7274 6564 2077 6869 6368 2061 upported which a\n+001042e0: 7265 2074 6865 2070 7265 6665 7272 6564 re the preferred\n+001042f0: 2077 6179 2074 6f20 696e 636c 7564 6520 way to include \n+00104300: 4d49 4d45 2061 7474 6163 686d 656e 7473 MIME attachments\n+00104310: 2077 6974 6820 534f 4150 206d 6573 7361 with SOAP messa\n+00104320: 6765 732c 2073 6565 2053 6563 7469 6f6e ges, see Section\n+00104330: 203c 6120 636c 6173 733d 2265 6c22 2068 MTOM attac\n+00104360: 686d 656e 7473 3c2f 613e 2e3c 2f70 3e0a hments.

    .\n+00104370: 3c70 3e49 6e20 7468 6520 666f 6c6c 6f77

    In the follow\n+00104380: 696e 6720 6469 7363 7573 7369 6f6e 2c20 ing discussion, \n+00104390: 4d49 4d45 2061 7474 6163 686d 656e 7420 MIME attachment \n+001043a0: 6461 7461 2069 7320 6173 7375 6d65 6420 data is assumed \n+001043b0: 746f 2062 6520 7265 7369 6465 6e74 2069 to be resident i\n+001043c0: 6e20 6d65 6d6f 7279 2066 6f72 2073 656e n memory for sen\n+001043d0: 6469 6e67 206f 7065 7261 7469 6f6e 7320 ding operations \n+001043e0: 616e 6420 4d49 4d45 2061 7474 6163 686d and MIME attachm\n+001043f0: 656e 7473 2072 6563 6569 7665 6420 7769 ents received wi\n+00104400: 6c6c 2062 6520 7374 6f72 6564 2069 6e20 ll be stored in \n+00104410: 6d65 6d6f 7279 206d 616e 6167 6564 2062 memory managed b\n+00104420: 7920 7468 6520 636f 6e74 6578 742e 204d y the context. M\n+00104430: 544f 4d20 616e 6420 4449 4d45 2061 7474 TOM and DIME att\n+00104440: 6163 686d 656e 7473 206f 6e20 7468 6520 achments on the \n+00104450: 6f74 6865 7220 6861 6e64 2063 616e 2062 other hand can b\n+00104460: 6520 7374 7265 616d 6564 2061 6e64 2074 e streamed and t\n+00104470: 6865 7265 666f 7265 204d 544f 4d2f 4449 herefore MTOM/DI\n+00104480: 4d45 2061 7474 6163 686d 656e 7420 6461 ME attachment da\n+00104490: 7461 2064 6f65 7320 6e6f 7420 6e65 6564 ta does not need\n+001044a0: 2074 6f20 6265 2073 746f 7265 6420 696e to be stored in\n+001044b0: 206d 656d 6f72 792c 2073 6565 2053 6563 memory, see Sec\n+001044c0: 7469 6f6e 7320 3c61 2063 6c61 7373 3d22 tions DIME \n+001044f0: 6174 7461 6368 6d65 6e74 733c 2f61 3e20 attachments \n+00104500: 616e 6420 3c61 2063 6c61 7373 3d22 656c and MTOM at\n+00104530: 7461 6368 6d65 6e74 733c 2f61 3e20 2e3c tachments .<\n+00104540: 2f70 3e0a 3c70 3e54 7261 6e73 6d69 7474 /p>.

    Transmitt\n+00104550: 696e 6720 6d75 6c74 6970 6172 742f 7265 ing multipart/re\n+00104560: 6c61 7465 6420 4d49 4d45 2061 7474 6163 lated MIME attac\n+00104570: 686d 656e 7473 2077 6974 6820 6120 534f hments with a SO\n+00104580: 4150 2f58 4d4c 206d 6573 7361 6765 2069 AP/XML message i\n+00104590: 7320 6163 636f 6d70 6c69 7368 6564 2077 s accomplished w\n+001045a0: 6974 6820 7477 6f20 6675 6e63 7469 6f6e ith two function\n+001045b0: 732c 203c 636f 6465 3e3c 6120 636c 6173 s, soap_s\n+00104630: 6574 5f6d 696d 653c 2f61 3e3c 2f63 6f64 et_mime and soap_set_mim\n+001046e0: 655f 6174 7461 6368 6d65 6e74 3c2f 613e e_attachment\n+001046f0: 3c2f 636f 6465 3e2e 2054 6865 2066 6972 . The fir\n+00104700: 7374 2066 756e 6374 696f 6e20 6973 2066 st function is f\n+00104710: 6f72 2069 6e69 7469 616c 697a 6174 696f or initializatio\n+00104720: 6e20 7075 7270 6f73 6573 2061 6e64 2074 n purposes and t\n+00104730: 6865 206c 6174 7465 7220 6675 6e63 7469 he latter functi\n+00104740: 6f6e 2069 7320 7573 6564 2074 6f20 7370 on is used to sp\n+00104750: 6563 6966 7920 6d65 7461 2064 6174 6120 ecify meta data \n+00104760: 616e 6420 636f 6e74 656e 7420 6461 7461 and content data\n+00104770: 2066 6f72 2065 6163 6820 6174 7461 6368 for each attach\n+00104780: 6d65 6e74 2e3c 2f70 3e0a 3c70 3e53 6565 ment.

    .

    See\n+00104790: 2061 6c73 6f20 4150 4920 646f 6375 6d65 also API docume\n+001047a0: 6e74 6174 696f 6e20 4d6f 6475 6c65 203c ntation Module <\n+001047b0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001047c0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+001047d0: 5f6d 696d 652e 6874 6d6c 223e 4d49 4d45 _mime.html\">MIME\n+001047e0: 2061 7474 6163 686d 656e 7420 6675 6e63 attachment func\n+001047f0: 7469 6f6e 733c 2f61 3e2e 3c2f 703e 0a3c tions.

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

    .

    .\n+00104860: 5365 6e64 696e 6720 6120 636f 6c6c 6563 Sending a collec\n+00104870: 7469 6f6e 206f 6620 4d49 4d45 2061 7474 tion of MIME att\n+00104880: 6163 686d 656e 7473 2028 5377 4129 3c2f achments (SwA).

    The follo\n+001048a0: 7769 6e67 2066 756e 6374 696f 6e73 2061 wing functions a\n+001048b0: 7265 2075 7365 6420 746f 2073 6574 2075 re used to set u\n+001048c0: 7020 6120 636f 6c6c 6563 7469 6f6e 206f p a collection o\n+001048d0: 6620 6d75 6c74 6970 6172 742f 7265 6c61 f multipart/rela\n+001048e0: 7465 6420 4d49 4d45 2061 7474 6163 686d ted MIME attachm\n+001048f0: 656e 7473 2066 6f72 2074 7261 6e73 6d69 ents for transmi\n+00104900: 7373 696f 6e20 7769 7468 2061 2053 4f41 ssion with a SOA\n+00104910: 5020 6f72 2058 4d4c 206d 6573 7361 6765 P or XML message\n+00104920: 2e3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e3c .

    .
    .

    When pr\n+00105720: 6f76 6964 696e 6720 6120 4d49 4d45 2062 oviding a MIME b\n+00105730: 6f75 6e64 6172 7920 7769 7468 203c 636f oundary with soap_set_mim\n+001057c0: 653c 2f61 3e3c 2f63 6f64 653e 2c20 796f e, yo\n+001057d0: 7520 6861 7665 2074 6f20 6d61 6b65 2073 u have to make s\n+001057e0: 7572 6520 7468 6520 626f 756e 6461 7279 ure the boundary\n+001057f0: 2063 616e 6e6f 7420 6d61 7463 6820 616e cannot match an\n+00105800: 7920 7061 7274 7320 6f66 2074 6865 206d y parts of the m\n+00105810: 6573 7361 6765 2061 6e64 2061 7474 6163 essage and attac\n+00105820: 686d 656e 7473 2074 6861 7420 796f 7520 hments that you \n+00105830: 6172 6520 7365 6e64 696e 672c 2062 6563 are sending, bec\n+00105840: 6175 7365 2074 6865 2062 6f75 6e64 6172 ause the boundar\n+00105850: 7920 6465 6c69 6e65 6174 6573 2074 6865 y delineates the\n+00105860: 2061 7474 6163 686d 656e 7473 2e3c 2f70 attachments..

    The interna\n+00105880: 6c20 6c69 7374 206f 6620 6174 7461 6368 l list of attach\n+00105890: 6d65 6e74 7320 7370 6563 6966 6965 6420 ments specified \n+001058a0: 7769 7468 203c 636f 6465 3e3c 6120 636c with soap_set_mime_\n+00105940: 6174 7461 6368 6d65 6e74 3c2f 613e 3c2f attachment is destroy\n+00105960: 6564 2077 6974 6820 3c63 6f64 653e 3c61 ed with soap_end or when a \n+00105a50: 6d65 7373 6167 6520 6973 2072 6563 6569 message is recei\n+00105a60: 7665 642e 2054 6865 7265 666f 7265 2c20 ved. Therefore, \n+00105a70: 6361 6c6c 203c 636f 6465 3e3c 6120 636c call soap_set_mime_\n+00105b10: 6174 7461 6368 6d65 6e74 3c2f 613e 3c2f attachment to set att\n+00105b30: 6163 686d 656e 7473 2062 6566 6f72 6520 achments before \n+00105b40: 7365 6e64 696e 6720 6120 6d65 7373 6167 sending a messag\n+00105b50: 652e 3c2f 703e 0a3c 703e 5468 6520 666f e.

    .

    The fo\n+00105b60: 6c6c 6f77 696e 6720 6578 616d 706c 6520 llowing example \n+00105b70: 7368 6f77 7320 686f 7720 6120 6d75 6c74 shows how a mult\n+00105b80: 6970 6172 742f 7265 6c61 7465 6420 4854 ipart/related HT\n+00105b90: 5450 206d 6573 7361 6765 2077 6974 6820 TP message with \n+00105ba0: 7468 7265 6520 4d49 4d45 2061 7474 6163 three MIME attac\n+00105bb0: 686d 656e 7473 2069 7320 7365 7420 7570 hments is set up\n+00105bc0: 2061 6e64 2074 7261 6e73 6d69 7474 6564 and transmitted\n+00105bd0: 2074 6f20 6120 7365 7276 6572 2e20 496e to a server. In\n+00105be0: 2074 6869 7320 6578 616d 706c 6520 7765 this example we\n+00105bf0: 206c 6574 2074 6865 206d 6573 7361 6765 let the message\n+00105c00: 2062 6f64 7920 7265 6665 7220 746f 2074 body refer to t\n+00105c10: 6865 2061 7474 6163 686d 656e 7473 2075 he attachments u\n+00105c20: 7369 6e67 2058 4d4c 203c 656d 3e3c 636f sing XML href attributes. \n+00105c50: 5468 6520 3c63 6f64 653e 7374 7275 6374 The struct\n+00105c60: 2063 6c61 696d 5f5f 666f 726d 3c2f 636f claim__form data type in\n+00105c80: 636c 7564 6573 2061 2064 6566 696e 6974 cludes a definit\n+00105c90: 696f 6e20 6f66 2061 203c 636f 6465 3e68 ion of a h\n+00105ca0: 7265 663c 2f63 6f64 653e 2061 7474 7269 ref attri\n+00105cb0: 6275 7465 2066 6f72 2074 6869 7320 7075 bute for this pu\n+00105cc0: 7270 6f73 652e 3c2f 703e 0a3c 6469 7620 rpose.

    .
    struct \n+00105d10: 3c2f 7370 616e 3e63 6c61 696d 5f5f 666f claim__fo\n+00105d20: 726d 2066 6f72 6d31 2c20 666f 726d 323b rm form1, form2;\n+00105d30: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    form1.\n+00105d50: 6872 6566 203d 203c 7370 616e 2063 6c61 href = "cid:cla\n+00105d80: 696d 3036 3134 3030 612e 7469 6666 4063 im061400a.tiff@c\n+00105d90: 6c61 696d 696e 672d 6974 2e63 6f6d 2671 laiming-it.com&q\n+00105da0: 756f 743b 3c2f 7370 616e 3e3b 203c 2f64 uot;; .
    form2.href\n+00105dd0: 203d 203c 7370 616e 2063 6c61 7373 3d22 = &\n+00105df0: 7175 6f74 3b63 6964 3a63 6c61 696d 3036 quot;cid:claim06\n+00105e00: 3134 3030 612e 6a70 6567 4063 6c61 696d 1400a.jpeg@claim\n+00105e10: 696e 672d 6974 2e63 6f6d 2671 756f 743b ing-it.com"\n+00105e20: 3c2f 7370 616e 3e3b 203c 2f64 6976 3e0a ;
    .\n+00105e30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    /* initi\n+00105e60: 616c 697a 6520 616e 6420 656e 6162 6c65 alize and enable\n+00105e70: 204d 494d 4520 2a2f 3c2f 7370 616e 3e20 MIME */ \n+00105e80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap_\n+00105ef0: 7365 745f 6d69 6d65 3c2f 613e 283c 6120 set_mime(soap, NU\n+00105f30: 4c4c 2c20 3c73 7061 6e20 636c 6173 733d LL, \n+00105f50: 2671 756f 743b 266c 743b 636c 6169 6d30 "<claim0\n+00105f60: 3631 3430 3061 2e78 6d6c 4063 6c61 696d 61400a.xml@claim\n+00105f70: 696e 672d 6974 2e63 6f6d 2667 743b 2671 ing-it.com>&q\n+00105f80: 756f 743b 3c2f 7370 616e 3e29 3b20 3c2f uot;); .
    /* \n+00105fc0: 6164 6420 6120 6261 7365 3634 2065 6e63 add a base64 enc\n+00105fd0: 6f64 6564 2074 6966 6620 696d 6167 6520 oded tiff image \n+00105fe0: 2874 6966 6649 6d61 6765 2070 6f69 6e74 (tiffImage point\n+00105ff0: 7320 746f 2062 6173 6536 3420 6461 7461 s to base64 data\n+00106000: 2920 2a2f 3c2f 7370 616e 3e20 3c2f 6469 ) */ ../* add a raw\n+00106240: 2062 696e 6172 7920 6a70 6567 2069 6d61 binary jpeg ima\n+00106250: 6765 2028 6a70 6567 496d 6167 6520 706f ge (jpegImage po\n+00106260: 696e 7473 2074 6f20 7261 7720 6461 7461 ints to raw data\n+00106270: 2920 2a2f 3c2f 7370 616e 3e20 3c2f 6469 ) */ ../* send the \n+001064b0: 666f 726d 7320 6173 204d 494d 4520 6174 forms as MIME at\n+001064c0: 7461 6368 6d65 6e74 7320 7769 7468 2074 tachments with t\n+001064d0: 6869 7320 696e 766f 6361 7469 6f6e 202a his invocation *\n+001064e0: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    .\n+001064f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if (soap_call\n+00106530: 5f63 6c61 696d 5f5f 696e 7375 7261 6e63 _claim__insuranc\n+00106540: 655f 636c 6169 6d5f 6175 746f 283c 6120 e_claim_auto(soap, fo\n+00106580: 726d 312c 2066 6f72 6d32 2c20 2e2e 2e29 rm1, form2, ...)\n+00106590: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    ...\n+001065b0: 203c 7370 616e 2063 6c61 7373 3d22 636f // an err\n+001065d0: 6f72 206f 6363 7572 7265 6420 3c2f 7370 or occurred
    .
    else
    .
    ...\n+00106640: 203c 7370 616e 2063 6c61 7373 3d22 636f // proces\n+00106660: 7320 7468 6520 7265 7370 6f6e 7365 3c2f s the response
    .\n+001066e0: 736f 6170 5f63 6c72 5f6d 696d 653c 2f61 soap_clr_mime(soap);
    .
    int s\n+00106810: 6f61 705f 7365 745f 6d69 6d65 5f61 7474 oap_set_mime_att\n+00106820: 6163 686d 656e 7428 7374 7275 6374 2073 achment(struct s\n+00106830: 6f61 7020 2a73 6f61 702c 2063 6f6e 7374 oap *soap, const\n+00106840: 2063 6861 7220 2a70 7472 2c20 7369 7a65 char *ptr, size\n+00106850: 5f74 2073 697a 652c 2065 6e75 6d20 736f _t size, enum so\n+00106860: 6170 5f6d 696d 655f 656e 636f 6469 6e67 ap_mime_encoding\n+00106870: 2065 6e63 6f64 696e 672c 2063 6f6e 7374 encoding, const\n+00106880: 2063 6861 7220 2a74 7970 652c 2063 6f6e char *type, con\n+00106890: 7374 2063 6861 7220 2a69 642c 2063 6f6e st char *id, con\n+001068a0: 7374 2063 6861 7220 2a6c 6f63 6174 696f st char *locatio\n+001068b0: 6e2c 2063 6f6e 7374 2063 6861 7220 2a64 n, const char *d\n+001068c0: 6573 6372 6970 7469 6f6e 293c 2f64 6976 escription)
    Add a MIME a\n+001068f0: 7474 6163 686d 656e 7420 746f 2074 6865 ttachment to the\n+00106900: 2053 4f41 502f 584d 4c20 6d65 7373 6167 SOAP/XML messag\n+00106910: 652e 3c2f 6469 763e 3c2f 6469 763e 0a3c e.
    .<\n+00106920: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+00106930: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n+00106940: 705f 5f6d 696d 655f 6874 6d6c 5f67 6138 p__mime_html_ga8\n+00106950: 3163 6564 6232 3436 3730 6562 6461 3438 1cedb24670ebda48\n+00106960: 6137 3936 3739 6434 3638 3232 3131 6622 a79679d4682211f\"\n+00106970: 3e3c 6469 7620 636c 6173 733d 2274 746e >
    soap_c\n+001069d0: 6c72 5f6d 696d 653c 2f61 3e3c 2f64 6976 lr_mime
    void soap_c\n+00106a00: 6c72 5f6d 696d 6528 7374 7275 6374 2073 lr_mime(struct s\n+00106a10: 6f61 7020 2a73 6f61 7029 3c2f 6469 763e oap *soap)
    \n+00106a20: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Disable MIME \n+00106a40: 6174 7461 6368 6d65 6e74 732e 3c2f 6469 attachments.
    .
    <\n+00106ac0: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n+00106ad0: 726f 7570 5f5f 6d69 6d65 2e68 746d 6c23 roup__mime.html#\n+00106ae0: 6761 3931 3830 6535 6261 3633 3462 3230 ga9180e5ba634b20\n+00106af0: 3330 3562 3735 3562 3431 3030 3435 6439 305b755b410045d9\n+00106b00: 6565 223e 736f 6170 5f73 6574 5f6d 696d ee\">soap_set_mim\n+00106b10: 653c 2f61 3e3c 2f64 6976 3e3c 6469 7620 e
    i\n+00106b30: 6e74 2073 6f61 705f 7365 745f 6d69 6d65 nt soap_set_mime\n+00106b40: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+00106b50: 6170 2c20 636f 6e73 7420 6368 6172 202a ap, const char *\n+00106b60: 626f 756e 6461 7279 2c20 636f 6e73 7420 boundary, const \n+00106b70: 6368 6172 202a 7374 6172 7429 3c2f 6469 char *start)
    Enable MIME\n+00106ba0: 2061 7474 6163 686d 656e 7473 2e3c 2f64 attachments.
    .
    SOAP_MI\n+00106cb0: 4d45 5f42 4153 4536 343c 2f61 3e3c 2f64 ME_BASE64
    @ SOAP_MI\n+00106ce0: 4d45 5f42 4153 4536 343c 2f64 6976 3e3c ME_BASE64
    <\n+00106cf0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+00106d00: 223e 6461 7461 2069 7320 666f 726d 6174 \">data is format\n+00106d10: 7465 6420 696e 2062 6173 6536 343c 2f64 ted in base64
    Definit\n+00106d40: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+00106d50: 322e 683a 3130 3232 393c 2f64 6976 3e3c 2.h:10229
    <\n+00106d60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    SOAP_MIME_B\n+00106e60: 494e 4152 593c 2f61 3e3c 2f64 6976 3e3c INARY
    <\n+00106e70: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+00106e80: 6922 3e40 2053 4f41 505f 4d49 4d45 5f42 i\">@ SOAP_MIME_B\n+00106e90: 494e 4152 593c 2f64 6976 3e3c 6469 7620 INARY
    bi\n+00106eb0: 6e61 7279 2072 6177 2064 6174 6120 636f nary raw data co\n+00106ec0: 6e74 656e 743c 2f64 6976 3e3c 6469 7620 ntent
    Definition:\n+00106ef0: 2073 7464 736f 6170 322e 683a 3130 3232 stdsoap2.h:1022\n+00106f00: 373c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 7
    .

    The claim__form struct is d\n+00106f50: 6563 6c61 7265 6420 696e 2074 6865 2069 eclared in the i\n+00106f60: 6e74 6572 6661 6365 2068 6561 6465 7220 nterface header \n+00106f70: 6669 6c65 2061 733a 3c2f 703e 0a3c 6469 file as:

    .
    struc\n+00106fc0: 7420 3c2f 7370 616e 3e63 6c61 696d 5f5f t claim__\n+00106fd0: 666f 726d 203c 2f64 6976 3e0a 3c64 6976 form
    .{<\n+00106ff0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    @ char *href;
    .\n+00107040: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    };
    .

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

    .<\n+00107d30: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.Retr\n+00107d60: 6965 7669 6e67 2061 2063 6f6c 6c65 6374 ieving a collect\n+00107d70: 696f 6e20 6f66 204d 494d 452f 4d54 4f4d ion of MIME/MTOM\n+00107d80: 2061 7474 6163 686d 656e 7473 2028 5377 attachments (Sw\n+00107d90: 4129 3c2f 6832 3e0a 3c70 3e4d 494d 4520 A)

    .

    MIME \n+00107da0: 6174 7461 6368 6d65 6e74 7320 6172 6520 attachments are \n+00107db0: 6175 746f 6d61 7469 6361 6c6c 7920 7061 automatically pa\n+00107dc0: 7273 6564 2061 6e64 2073 746f 7265 6420 rsed and stored \n+00107dd0: 696e 206d 656d 6f72 7920 6d61 6e61 6765 in memory manage\n+00107de0: 6420 6279 2074 6865 203c 636f 6465 3e3c d by the <\n+00107df0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00107e00: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00107e10: 6d6c 2220 7469 746c 653d 2243 6f6e 7465 ml\" title=\"Conte\n+00107e20: 7874 2077 6974 6820 7468 6520 656e 6769 xt with the engi\n+00107e30: 6e65 2073 7461 7465 2e22 3e73 6f61 703c ne state.\">soap<\n+00107e40: 2f61 3e3c 2f63 6f64 653e 2063 6f6e 7465 /a> conte\n+00107e50: 7874 2e20 4166 7465 7220 7265 6365 6976 xt. After receiv\n+00107e60: 696e 6720 6120 7365 7420 6f66 204d 494d ing a set of MIM\n+00107e70: 452f 4d54 4f4d 2061 7474 6163 686d 656e E/MTOM attachmen\n+00107e80: 7473 2c20 6569 7468 6572 2061 7420 7468 ts, either at th\n+00107e90: 6520 636c 6965 6e74 2d73 6964 6520 6f72 e client-side or\n+00107ea0: 2074 6865 2073 6572 7665 722d 7369 6465 the server-side\n+00107eb0: 2c20 7468 6520 6c69 7374 206f 6620 4d49 , the list of MI\n+00107ec0: 4d45 2f4d 544f 4d20 6174 7461 6368 6d65 ME/MTOM attachme\n+00107ed0: 6e74 7320 6361 6e20 6265 2074 7261 7665 nts can be trave\n+00107ee0: 7273 6564 2074 6f20 6578 7472 6163 7420 rsed to extract \n+00107ef0: 6d65 7461 2064 6174 6120 616e 6420 7468 meta data and th\n+00107f00: 6520 6174 7461 6368 6d65 6e74 2063 6f6e e attachment con\n+00107f10: 7465 6e74 2e20 5468 6520 6669 7273 7420 tent. The first \n+00107f20: 6174 7461 6368 6d65 6e74 2069 6e20 7468 attachment in th\n+00107f30: 6520 636f 6c6c 6563 7469 6f6e 206f 6620 e collection of \n+00107f40: 4d49 4d45 2f4d 544f 4d20 6174 7461 6368 MIME/MTOM attach\n+00107f50: 6d65 6e74 7320 616c 7761 7973 2063 6f6e ments always con\n+00107f60: 7461 696e 7320 6d65 7461 2064 6174 6120 tains meta data \n+00107f70: 6162 6f75 7420 7468 6520 534f 4150 206d about the SOAP m\n+00107f80: 6573 7361 6765 2069 7473 656c 6620 2862 essage itself (b\n+00107f90: 6563 6175 7365 2074 6865 2053 4f41 5020 ecause the SOAP \n+00107fa0: 6d65 7373 6167 6520 7761 7320 7072 6f63 message was proc\n+00107fb0: 6573 7365 6420 7468 6520 6174 7461 6368 essed the attach\n+00107fc0: 6d65 6e74 2064 6f65 7320 6e6f 7420 636f ment does not co\n+00107fd0: 6e74 6169 6e20 616e 7920 7573 6566 756c ntain any useful\n+00107fe0: 2064 6174 6129 2e3c 2f70 3e0a 3c70 3e54 data).

    .

    T\n+00107ff0: 6f20 7472 6176 6572 7365 2074 6865 206c o traverse the l\n+00108000: 6973 7420 6f66 204d 494d 4520 6174 7461 ist of MIME atta\n+00108010: 6368 6d65 6e74 7320 696e 2043 2c20 796f chments in C, yo\n+00108020: 7520 7573 6520 6120 6c6f 6f70 2073 696d u use a loop sim\n+00108030: 696c 6172 2074 6f3a 3c2f 703e 0a3c 6469 ilar to:

    .
    i\n+00108080: 6e74 3c2f 7370 616e 3e20 6e20 3d20 303b nt n = 0;\n+00108090: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s\n+001080c0: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct s\n+00108100: 6f61 705f 6d75 6c74 6970 6172 743c 2f61 oap_multipart *attachment;.
    for (att\n+00108160: 6163 686d 656e 7420 3d20 3c61 2063 6c61 achment = soap->mime.\n+001081f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 l\n+00108240: 6973 743c 2f61 3e3b 2061 7474 6163 686d ist; attachm\n+00108250: 656e 743b 2061 7474 6163 686d 656e 7420 ent; attachment \n+00108260: 3d20 6174 7461 6368 6d65 6e74 2d26 6774 = attachment->\n+00108270: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;next).
    {
    .<\n+001082f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00108300: 3e20 202b 2b6e 3b3c 2f64 6976 3e0a 3c64 > ++n;
    .\n+00108320: 2020 7072 696e 7466 283c 7370 616e 2063 printf("Part \n+00108350: 2564 3a5c 6e26 7175 6f74 3b3c 2f73 7061 %d:\\n", n);
    .\n+00108380: 2020 7072 696e 7466 283c 7370 616e 2063 printf("ptr \n+001083b0: 2020 2020 2020 3d25 705c 6e26 7175 6f74 =%p\\n"\n+001083c0: 3b3c 2f73 7061 6e3e 2c20 6174 7461 6368 ;, attach\n+001083d0: 6d65 6e74 2d26 6774 3b3c 6120 636c 6173 ment->ptr\n+00108430: 3c2f 613e 293b 3c2f 6469 763e 0a3c 6469 );
    . \n+00108450: 2070 7269 6e74 6628 3c73 7061 6e20 636c printf("size \n+00108480: 2020 2020 203d 2575 6c5c 6e26 7175 6f74 =%ul\\n"\n+00108490: 3b3c 2f73 7061 6e3e 2c20 6174 7461 6368 ;, attach\n+001084a0: 6d65 6e74 2d26 6774 3b3c 6120 636c 6173 ment->siz\n+00108500: 653c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 e);
    .\n+00108520: 2020 7072 696e 7466 283c 7370 616e 2063 printf("id \n+00108550: 2020 2020 2020 3d25 735c 6e26 7175 6f74 =%s\\n"\n+00108560: 3b3c 2f73 7061 6e3e 2c20 6174 7461 6368 ;, attach\n+00108570: 6d65 6e74 2d26 6774 3b3c 6120 636c 6173 ment->id<\n+001085d0: 2f61 3e20 3f20 6174 7461 6368 6d65 6e74 /a> ? attachment\n+001085e0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->id \n+00108640: 3a20 3c73 7061 6e20 636c 6173 733d 2273 : &q\n+00108660: 756f 743b 2671 756f 743b 3c2f 7370 616e uot;");
    .
    pr\n+00108690: 696e 7466 283c 7370 616e 2063 6c61 7373 intf("type \n+001086c0: 2020 3d25 735c 6e26 7175 6f74 3b3c 2f73 =%s\\n", attachment\n+001086e0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->type ? attachment-&\n+00108750: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;type \n+001087b0: 3a20 3c73 7061 6e20 636c 6173 733d 2273 : &q\n+001087d0: 756f 743b 2671 756f 743b 3c2f 7370 616e uot;");
    .
    pr\n+00108800: 696e 7466 283c 7370 616e 2063 6c61 7373 intf("location \n+00108830: 2020 3d25 735c 6e26 7175 6f74 3b3c 2f73 =%s\\n", attachment\n+00108850: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->locatio\n+001088b0: 6e3c 2f61 3e20 3f20 6174 7461 6368 6d65 n ? attachme\n+001088c0: 6e74 2d26 6774 3b3c 6120 636c 6173 733d nt->locat\n+00108920: 696f 6e3c 2f61 3e20 3a20 3c73 7061 6e20 ion : "&quo\n+00108950: 743b 3c2f 7370 616e 3e29 3b3c 2f64 6976 t;);.
    printf("d\n+001089a0: 6573 6372 6970 7469 6f6e 3d25 735c 6e26 escription=%s\\n&\n+001089b0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 6174 quot;, at\n+001089c0: 7461 6368 6d65 6e74 2d26 6774 3b3c 6120 tachment->description\n+00108a30: 203f 2061 7474 6163 686d 656e 742d 2667 ? attachment-&g\n+00108a40: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;descriptio\n+00108aa0: 6e3c 2f61 3e20 3a20 3c73 7061 6e20 636c n : ""\n+00108ad0: 3c2f 7370 616e 3e29 3b3c 2f64 6976 3e0a );
    .\n+00108ae0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    ..DIME/MIME/MTOM \n+00108d10: 6174 7461 6368 6d65 6e74 2064 6174 6120 attachment data \n+00108d20: 7265 6365 6976 6564 2062 7920 7468 6520 received by the \n+00108d30: 656e 6769 6e65 2e3c 2f64 6976 3e3c 6469 engine.
    \n+00108d50: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:10\n+00108d70: 3433 303c 2f64 6976 3e3c 2f64 6976 3e0a 430
    .\n+00108d80: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    DIME/\n+00108e90: 4d49 4d45 2f4d 544f 4d20 7479 7065 2028 MIME/MTOM type (\n+00108ea0: 4d49 4d45 2074 7970 6520 666f 726d 6174 MIME type format\n+00108eb0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Def\n+00108ed0: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n+00108ee0: 736f 6170 322e 683a 3130 3433 353c 2f64 soap2.h:10435
    .\n+00109010: 6e65 7874 2061 7474 6163 686d 656e 7420 next attachment \n+00109020: 696e 2074 6865 206c 696e 6b65 6420 6c69 in the linked li\n+00109030: 7374 3c2f 6469 763e 3c64 6976 2063 6c61 st
    .
    const\n+00109160: 2063 6861 7220 2a20 7074 723c 2f64 6976 char * ptr
    points to ra\n+00109190: 7720 6461 7461 2063 6f6e 7465 6e74 3c2f w data content
    Defini\n+001091c0: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+001091d0: 7032 2e68 3a31 3034 3332 3c2f 6469 763e p2.h:10432
    \n+001091e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    c\n+001092d0: 6f6e 7374 2063 6861 7220 2a20 6465 7363 onst char * desc\n+001092e0: 7269 7074 696f 6e3c 2f64 6976 3e3c 6469 ription
    \n+00109300: 4d49 4d45 2043 6f6e 7465 6e74 2d44 6573 MIME Content-Des\n+00109310: 6372 6970 7469 6f6e 2028 6f70 7469 6f6e cription (option\n+00109320: 616c 293c 2f64 6976 3e3c 6469 7620 636c al)
    D\n+00109340: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n+00109350: 7464 736f 6170 322e 683a 3130 3433 393c tdsoap2.h:10439<\n+00109360: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .\n+001093c0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 \n+00109460: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    DIME/MIME/MTO\n+00109480: 4d20 636f 6e74 656e 7420 4944 206f 7220 M content ID or \n+00109490: 666f 726d 2064 6174 6120 6e61 6d65 2e3c form data name.<\n+001094a0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+001094c0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+001094d0: 6170 322e 683a 3130 3433 343c 2f64 6976 ap2.h:10434
    .
    MIME \n+00109600: 436f 6e74 656e 742d 4c6f 6361 7469 6f6e Content-Location\n+00109610: 2028 6f70 7469 6f6e 616c 293c 2f64 6976 (optional)
    Definitio\n+00109640: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+00109650: 683a 3130 3433 383c 2f64 6976 3e3c 2f64 h:10438
    .
    soap_multipar\n+00109720: 743a 3a73 697a 653c 2f61 3e3c 2f64 6976 t::size
    size_t size\n+00109750: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    size of\n+00109770: 2064 6174 6120 636f 6e74 656e 743c 2f64 data content
    Definit\n+001097a0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+001097b0: 322e 683a 3130 3433 333c 2f64 6976 3e3c 2.h:10433
    <\n+001097c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n+00109810: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+00109820: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n+00109860: 6f61 703a 3a6d 696d 653c 2f61 3e3c 2f64 oap::mime
    struct so\n+00109890: 6170 5f6d 696d 6520 6d69 6d65 3c2f 6469 ap_mime mime
    MIME attach\n+001098c0: 6d65 6e74 7320 7265 6365 6976 6564 2e3c ments received.<\n+001098d0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+001098f0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+00109900: 6170 322e 683a 3431 3839 3c2f 6469 763e ap2.h:4189
    \n+00109910: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    C++ programmers\n+00109940: 2063 616e 2075 7365 2061 6e20 6974 6572 can use an iter\n+00109950: 6174 6f72 2069 6e73 7465 6164 3a3c 2f70 ator instead:.
    int n\n+001099b0: 203d 2030 3b3c 2f64 6976 3e0a 3c64 6976 = 0;
    .for (soap_mul\n+00109a50: 7469 7061 7274 3a3a 6974 6572 6174 6f72 tipart::iterator\n+00109a60: 3c2f 613e 2069 203d 203c 6120 636c 6173 i = \n+00109a90: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->mime.<\n+00109af0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00109b00: 7265 663d 2273 7472 7563 7473 6f61 705f ref=\"structsoap_\n+00109b10: 5f6d 696d 652e 6874 6d6c 2361 6539 3966 _mime.html#ae99f\n+00109b20: 6131 3963 3564 3234 3035 3161 3439 3562 a19c5d24051a495b\n+00109b30: 3739 6130 3234 6133 6635 6639 223e 6265 79a024a3f5f9\">be\n+00109b40: 6769 6e3c 2f61 3e28 293b 2069 2021 3d20 gin(); i != \n+00109b50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+00109b80: 2667 743b 3c61 2063 6c61 7373 3d22 636f >mim\n+00109bd0: 653c 2f61 3e2e 3c61 2063 6c61 7373 3d22 e.end(); \n+00109c30: 2b2b 6929 3c2f 6469 763e 0a3c 6469 7620 ++i)
    .
    {.
    ++n;.
    printf(<\n+00109c90: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+00109ca0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+00109cb0: 3b50 6172 7420 2564 3a5c 6e26 7175 6f74 ;Part %d:\\n"\n+00109cc0: 3b3c 2f73 7061 6e3e 2c20 6e29 3b3c 2f64 ;, n);.
    printf(<\n+00109cf0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+00109d00: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+00109d10: 3b70 7472 2020 2020 2020 2020 3d25 705c ;ptr =%p\\\n+00109d20: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", \n+00109d30: 692d 2667 743b 7074 7229 3b3c 2f64 6976 i->ptr);.
    ... \n+00109d70: 2f2f 2065 7463 3c2f 7370 616e 3e3c 2f64 // etc.
    }
    .soap_mime::be\n+00109e50: 6769 6e3c 2f61 3e3c 2f64 6976 3e3c 6469 gin
    soap_multipart:\n+00109e80: 3a69 7465 7261 746f 7220 6265 6769 6e28 :iterator begin(\n+00109e90: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    C++ on\n+00109eb0: 6c79 3a20 616e 2069 7465 7261 746f 7220 ly: an iterator \n+00109ec0: 6f76 6572 2073 6f61 705f 6d75 6c74 6970 over soap_multip\n+00109ed0: 6172 7420 6174 7461 6368 6d65 6e74 732e art attachments.\n+00109ee0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .\n+00109f50: 3c61 2068 7265 663d 2273 7472 7563 7473 soap_mime::end\n+00109fa0: 3c2f 613e 3c2f 6469 763e 3c64 6976 2063
    so\n+00109fc0: 6170 5f6d 756c 7469 7061 7274 3a3a 6974 ap_multipart::it\n+00109fd0: 6572 6174 6f72 2065 6e64 2829 3c2f 6469 erator end()
    C++ only: a\n+0010a000: 6e20 6974 6572 6174 6f72 206f 7665 7220 n iterator over \n+0010a010: 736f 6170 5f6d 756c 7469 7061 7274 2061 soap_multipart a\n+0010a020: 7474 6163 686d 656e 7473 2e3c 2f64 6976 ttachments.
    .
    soa\n+0010a120: 705f 6d75 6c74 6970 6172 745f 6974 6572 p_multipart_iter\n+0010a130: 6174 6f72 2069 7465 7261 746f 723c 2f64 ator iterator
    C++ only: \n+0010a160: 616e 2069 7465 7261 746f 7220 6f76 6572 an iterator over\n+0010a170: 2073 6f61 705f 6d75 6c74 6970 6172 7420 soap_multipart \n+0010a180: 6174 7461 6368 6d65 6e74 732e 3c2f 6469 attachments.
    Definiti\n+0010a1b0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+0010a1c0: 2e68 3a31 3034 3431 3c2f 6469 763e 3c2f .h:10441
    .

    N\n+0010a1f0: 6f74 653a 206b 6565 7020 696e 206d 696e ote: keep in min\n+0010a200: 6420 7468 6174 2074 6865 2066 6972 7374 d that the first\n+0010a210: 2061 7474 6163 686d 656e 7420 6973 2061 attachment is a\n+0010a220: 7373 6f63 6961 7465 6420 7769 7468 2074 ssociated with t\n+0010a230: 6865 2053 4f41 5020 6d65 7373 6167 6520 he SOAP message \n+0010a240: 616e 6420 796f 7520 6d61 7920 7761 6e74 and you may want\n+0010a250: 2074 6f20 6967 6e6f 7265 2069 742e 3c2f to ignore it..

    A call to \n+0010a270: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_e\n+0010a340: 6e64 3c2f 613e 3c2f 636f 6465 3e20 7265 nd re\n+0010a350: 6d6f 7665 7320 616c 6c20 6f66 2074 6865 moves all of the\n+0010a360: 2072 6563 6569 7665 6420 4d49 4d45 2064 received MIME d\n+0010a370: 6174 612e 2054 6f20 7072 6573 6572 7665 ata. To preserve\n+0010a380: 2061 6e20 6174 7461 6368 6d65 6e74 2069 an attachment i\n+0010a390: 6e20 6d65 6d6f 7279 2c20 7573 6520 3c63 n memory, use soap_unl\n+0010a470: 696e 6b3c 2f61 3e3c 2f63 6f64 653e 206f ink o\n+0010a480: 6e20 7468 6520 3c63 6f64 653e 7074 723c n the ptr<\n+0010a490: 2f63 6f64 653e 206d 656d 6265 7220 6f66 /code> member of\n+0010a4a0: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap_m\n+0010a520: 756c 7469 7061 7274 3c2f 613e 3c2f 636f ultipart struct. The \n+0010a540: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_u\n+0010a610: 6e6c 696e 6b3c 2f61 3e3c 2f63 6f64 653e nlink\n+0010a620: 2066 756e 6374 696f 6e20 6361 6e20 6265 function can be\n+0010a630: 2075 7365 6420 746f 2070 7265 7665 6e74 used to prevent\n+0010a640: 2064 6561 6c6c 6f63 6174 696f 6e20 6f66 deallocation of\n+0010a650: 2064 6573 6572 6961 6c69 7a65 6420 6461 deserialized da\n+0010a660: 7461 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 ta.

    .

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

    ..DIME attachme\n+0010a6d0: 6e74 733c 2f68 313e 0a3c 703e 4170 706c nts.

    Appl\n+0010a6e0: 6963 6174 696f 6e73 2064 6576 656c 6f70 ications develop\n+0010a6f0: 6564 2077 6974 6820 7468 6520 6753 4f41 ed with the gSOA\n+0010a700: 5020 746f 6f6c 7320 6361 6e20 7472 616e P tools can tran\n+0010a710: 736d 6974 2062 696e 6172 7920 4449 4d45 smit binary DIME\n+0010a720: 2061 7474 6163 686d 656e 7473 2073 746f attachments sto\n+0010a730: 7265 6420 696e 206d 656d 6f72 7920 6f72 red in memory or\n+0010a740: 2069 6e20 7374 7265 616d 696e 6720 6d6f in streaming mo\n+0010a750: 6465 2062 7920 6665 7463 6869 6e67 2064 de by fetching d\n+0010a760: 6174 6120 6672 6f6d 2061 2072 6573 6f75 ata from a resou\n+0010a770: 7263 6520 6f72 2073 656e 6469 6e67 2064 rce or sending d\n+0010a780: 6174 6120 746f 2061 2072 6573 6f75 7263 ata to a resourc\n+0010a790: 6520 7573 696e 6720 6361 6c6c 6261 636b e using callback\n+0010a7a0: 2066 756e 6374 696f 6e73 2e20 5468 6520 functions. The \n+0010a7b0: 6d61 7869 6d75 6d20 4449 4d45 2061 7474 maximum DIME att\n+0010a7c0: 6163 686d 656e 7420 7369 7a65 2069 7320 achment size is \n+0010a7d0: 6c69 6d69 7465 6420 746f 2038 204d 4220 limited to 8 MB \n+0010a7e0: 6279 2064 6566 6175 6c74 2061 7320 7365 by default as se\n+0010a7f0: 7420 7769 7468 203c 636f 6465 3e23 534f t with #SO\n+0010a800: 4150 5f4d 4158 4449 4d45 5349 5a45 3c2f AP_MAXDIMESIZE. This limi\n+0010a820: 7420 6361 6e20 6265 2063 6861 6e67 6564 t can be changed\n+0010a830: 2061 7320 6e65 6564 6564 2e20 5769 7468 as needed. With\n+0010a840: 2073 7472 6561 6d69 6e67 2044 494d 4520 streaming DIME \n+0010a850: 7573 696e 6720 6361 6c6c 6261 636b 2066 using callback f\n+0010a860: 756e 6374 696f 6e73 2c20 6461 7461 2068 unctions, data h\n+0010a870: 616e 646c 6572 7320 6172 6520 7573 6564 andlers are used\n+0010a880: 2074 6f20 7061 7373 2074 6865 2064 6174 to pass the dat\n+0010a890: 6120 746f 2061 6e64 2066 726f 6d20 6120 a to and from a \n+0010a8a0: 7265 736f 7572 6365 2066 726f 6d20 7768 resource from wh\n+0010a8b0: 6963 6820 746f 2066 6574 6368 2074 6865 ich to fetch the\n+0010a8c0: 2064 6174 6120 746f 2073 656e 6420 6f72 data to send or\n+0010a8d0: 2064 6174 6120 746f 2073 746f 7265 2c20 data to store, \n+0010a8e0: 7375 6368 2061 7320 6120 6669 6c65 206f such as a file o\n+0010a8f0: 7220 6465 7669 6365 2e20 5365 6520 5365 r device. See Se\n+0010a900: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction Streaming DI\n+0010a940: 4d45 3c2f 613e 202e 3c2f 703e 0a3c 703e ME .

    .

    \n+0010a950: 466f 7220 6465 7461 696c 7320 6f6e 2044 For details on D\n+0010a960: 494d 4520 6174 7461 6368 6d65 6e74 732c IME attachments,\n+0010a970: 2073 6565 203c 6120 6872 6566 3d22 6874 see http://msdn.mic\n+0010a9e0: 726f 736f 6674 2e63 6f6d 2f6c 6962 7261 rosoft.com/libra\n+0010a9f0: 7279 2f65 6e2d 7573 2f64 6e67 6c6f 6273 ry/en-us/dnglobs\n+0010aa00: 7065 632f 6874 6d6c 2f64 7261 6674 2d6e pec/html/draft-n\n+0010aa10: 6965 6c73 656e 2d64 696d 652d 3032 2e74 ielsen-dime-02.t\n+0010aa20: 7874 3c2f 613e 3c2f 703e 0a3c 703e 5365 xt

    .

    Se\n+0010aa30: 6520 616c 736f 2041 5049 2064 6f63 756d e also API docum\n+0010aa40: 656e 7461 7469 6f6e 204d 6f64 756c 6520 entation Module \n+0010aa50: 3c61 2063 6c61 7373 3d22 656c 2220 6872 DIM\n+0010aa80: 4520 6174 7461 6368 6d65 6e74 2066 756e E attachment fun\n+0010aa90: 6374 696f 6e73 3c2f 613e 2e3c 2f70 3e0a ctions.

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

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

    .

    .Sending a coll\n+0010ab10: 6563 7469 6f6e 206f 6620 4449 4d45 2061 ection of DIME a\n+0010ab20: 7474 6163 686d 656e 7473 3c2f 6832 3e0a ttachments

    .\n+0010ab30: 3c70 3e54 6865 2066 6f6c 6c6f 7769 6e67

    The following\n+0010ab40: 2066 756e 6374 696f 6e73 2063 616e 2062 functions can b\n+0010ab50: 6520 7573 6564 2074 6f20 6578 706c 6963 e used to explic\n+0010ab60: 6974 6c79 2073 6574 2075 7020 6120 636f itly set up a co\n+0010ab70: 6c6c 6563 7469 6f6e 206f 6620 4449 4d45 llection of DIME\n+0010ab80: 2061 7474 6163 686d 656e 7473 2066 6f72 attachments for\n+0010ab90: 2074 7261 6e73 6d69 7373 696f 6e20 7769 transmission wi\n+0010aba0: 7468 2061 206d 6573 7361 6765 2e20 5468 th a message. Th\n+0010abb0: 6573 6520 6174 7461 6368 6d65 6e74 7320 ese attachments \n+0010abc0: 6361 6e20 6265 2073 7472 6561 6d65 642c can be streamed,\n+0010abd0: 2061 7320 6465 7363 7269 6265 6420 696e as described in\n+0010abe0: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Streaming\n+0010ac20: 2044 494d 453c 2f61 3e20 2e20 5769 7468 DIME . With\n+0010ac30: 6f75 7420 7374 7265 616d 696e 672c 2065 out streaming, e\n+0010ac40: 6163 6820 6174 7461 6368 6d65 6e74 206d ach attachment m\n+0010ac50: 7573 7420 7265 6665 7220 746f 2061 2062 ust refer to a b\n+0010ac60: 6c6f 636b 206f 6620 6461 7461 2069 6e20 lock of data in \n+0010ac70: 6d65 6d6f 7279 2e3c 2f70 3e0a 3c75 6c3e memory.

    .
      \n+0010ac80: 0a3c 6c69 3e3c 636f 6465 3e76 6f69 6420 .
    • void \n+0010ac90: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_set_dime(s\n+0010ad10: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+0010ad20: 293c 2f61 3e3c 2f63 6f64 653e 2054 6869 ) Thi\n+0010ad30: 7320 6675 6e63 7469 6f6e 2065 6e61 626c s function enabl\n+0010ad40: 6573 2073 656e 6469 6e67 2044 494d 4520 es sending DIME \n+0010ad50: 6174 7461 6368 6d65 6e74 732e 2054 6869 attachments. Thi\n+0010ad60: 7320 6675 6e63 7469 6f6e 2069 7320 6765 s function is ge\n+0010ad70: 6e65 7261 6c6c 7920 6e6f 7420 7265 7175 nerally not requ\n+0010ad80: 6972 6564 2062 6563 6175 7365 2044 494d ired because DIM\n+0010ad90: 4520 6174 7461 6368 6d65 6e74 7320 6172 E attachments ar\n+0010ada0: 6520 6175 746f 6d61 7469 6361 6c6c 7920 e automatically \n+0010adb0: 6465 7465 6374 6564 2061 7320 3c63 6f64 detected as \n+0010ae30: 7873 645f 5f62 6173 6536 3442 696e 6172 xsd__base64Binar\n+0010ae40: 793c 2f61 3e3c 2f63 6f64 653e 2061 6e64 y and\n+0010ae50: 203c 636f 6465 3e3c 6120 636c 6173 733d _xo\n+0010aec0: 705f 5f49 6e63 6c75 6465 3c2f 613e 3c2f p__Include structures\n+0010aee0: 2069 6e20 7468 6520 6461 7461 2074 6f20 in the data to \n+0010aef0: 7365 7269 616c 697a 6520 6173 2061 6e20 serialize as an \n+0010af00: 584d 4c20 6d65 7373 6167 6520 7769 7468 XML message with\n+0010af10: 2074 6865 2061 7474 6163 686d 656e 7473 the attachments\n+0010af20: 2061 7574 6f6d 6174 6963 616c 6c79 2061 automatically a\n+0010af30: 6464 6564 206f 7220 4449 4d45 2061 7474 dded or DIME att\n+0010af40: 6163 686d 656e 7473 2063 616e 2062 6520 achments can be \n+0010af50: 6578 706c 6963 6974 6c79 2061 6464 6564 explicitly added\n+0010af60: 2077 6974 6820 3c63 6f64 653e 3c61 2063 with soap_set_dime\n+0010b000: 5f61 7474 6163 686d 656e 743c 2f61 3e3c _attachment<\n+0010b010: 2f63 6f64 653e 2e3c 2f6c 693e 0a3c 6c69 /code>.
    • .int soap_\n+0010b030: 7365 745f 6469 6d65 5f61 7474 6163 686d set_dime_attachm\n+0010b040: 656e 7428 7374 7275 6374 2073 6f61 7020 ent(struct soap \n+0010b050: 2a73 6f61 702c 2063 6861 7220 2a70 7472 *soap, char *ptr\n+0010b060: 2c20 7369 7a65 5f74 2073 697a 652c 2063 , size_t size, c\n+0010b070: 6f6e 7374 2063 6861 7220 2a74 7970 652c onst char *type,\n+0010b080: 2063 6f6e 7374 2063 6861 7220 2a69 642c const char *id,\n+0010b090: 2075 6e73 6967 6e65 6420 7368 6f72 7420 unsigned short \n+0010b0a0: 6f70 7479 7065 2c20 636f 6e73 7420 6368 optype, const ch\n+0010b0b0: 6172 202a 6f70 7469 6f6e 293c 2f63 6f64 ar *option) This function\n+0010b0d0: 2061 6464 7320 6120 4449 4d45 2061 7474 adds a DIME att\n+0010b0e0: 6163 686d 656e 7420 746f 2074 6865 2058 achment to the X\n+0010b0f0: 4d4c 206d 6573 7361 6765 2074 6f20 7365 ML message to se\n+0010b100: 6e64 2e20 5468 6520 7370 6563 6966 6965 nd. The specifie\n+0010b110: 6420 3c63 6f64 653e 7074 723c 2f63 6f64 d ptr points to the\n+0010b130: 2064 6174 6120 746f 2073 656e 6420 6f66 data to send of\n+0010b140: 206c 656e 6774 6820 7370 6563 6966 6965 length specifie\n+0010b150: 6420 6279 203c 636f 6465 3e73 697a 653c d by size<\n+0010b160: 2f63 6f64 653e 2e20 5468 6520 3c63 6f64 /code>. The type pa\n+0010b180: 7261 6d65 7465 7220 696e 6469 6361 7465 rameter indicate\n+0010b190: 7320 7468 6520 4d49 4d45 2074 7970 6520 s the MIME type \n+0010b1a0: 6f66 2074 6865 2064 6174 6120 6f72 2063 of the data or c\n+0010b1b0: 616e 2062 6520 4e55 4c4c 2e20 5468 6520 an be NULL. The \n+0010b1c0: 3c63 6f64 653e 6964 3c2f 636f 6465 3e20 id \n+0010b1d0: 7061 7261 6d65 7465 7220 756e 6971 7565 parameter unique\n+0010b1e0: 6c79 2069 6465 6e74 6966 6965 7320 7468 ly identifies th\n+0010b1f0: 6520 6174 7461 6368 6d65 6e74 2069 6e20 e attachment in \n+0010b200: 7468 6520 6d65 7373 6167 652c 2077 6869 the message, whi\n+0010b210: 6368 2063 616e 2062 6520 6f6d 6974 7465 ch can be omitte\n+0010b220: 6420 6279 2073 7065 6369 6679 696e 6720 d by specifying \n+0010b230: 4e55 4c4c 2e20 5468 6520 3c63 6f64 653e NULL. The \n+0010b240: 6f70 7469 6f6e 3c2f 636f 6465 3e20 7061 option pa\n+0010b250: 7261 6d65 7465 7220 6973 2061 6e20 6f70 rameter is an op\n+0010b260: 7469 6f6e 2073 7563 6820 6173 2061 2064 tion such as a d\n+0010b270: 6573 6372 6970 7469 6f6e 206f 6620 7468 escription of th\n+0010b280: 6520 6461 7461 2061 6e64 203c 636f 6465 e data and optype i\n+0010b2a0: 7320 6120 7573 6572 2d64 6566 696e 6564 s a user-defined\n+0010b2b0: 206f 7074 696f 6e20 7479 7065 2028 6173 option type (as\n+0010b2c0: 2070 6572 2044 494d 4520 6f70 7469 6f6e per DIME option\n+0010b2d0: 2073 7065 6369 6669 6361 7469 6f6e 2066 specification f\n+0010b2e0: 6f72 6d61 7429 2e20 5468 6520 3c63 6f64 ormat). The ptr par\n+0010b300: 616d 6574 6572 206d 7573 7420 6265 2070 ameter must be p\n+0010b310: 6572 7369 7374 656e 742e 2054 6865 203c ersistent. The <\n+0010b320: 636f 6465 3e70 7472 3c2f 636f 6465 3e20 code>ptr \n+0010b330: 7061 7261 6d65 7465 7220 7061 7373 6564 parameter passed\n+0010b340: 2074 6f20 7468 6973 2066 756e 6374 696f to this functio\n+0010b350: 6e20 6d75 7374 2062 6520 7065 7273 6973 n must be persis\n+0010b360: 7465 6e74 2069 6e20 6d65 6d6f 7279 2075 tent in memory u\n+0010b370: 6e74 696c 2074 6865 2061 7474 6163 686d ntil the attachm\n+0010b380: 656e 7420 7761 7320 7365 6e74 2e20 5265 ent was sent. Re\n+0010b390: 7475 726e 7320 3c63 6f64 653e 2353 4f41 turns #SOA\n+0010b3a0: 505f 4f4b 3c2f 636f 6465 3e20 6f72 2061 P_OK or a\n+0010b3b0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_sta\n+0010b470: 7475 733c 2f61 3e3c 2f63 6f64 653e 2065 tus e\n+0010b480: 7272 6f72 2063 6f64 652e 3c2f 6c69 3e0a rror code..\n+0010b490: 3c6c 693e 3c63 6f64 653e 766f 6964 203c
    • void <\n+0010b4a0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0010b4b0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0010b4c0: 5f64 696d 652e 6874 6d6c 2367 6137 6633 _dime.html#ga7f3\n+0010b4d0: 3139 3137 3062 6139 3530 6334 6234 3032 19170ba950c4b402\n+0010b4e0: 3563 3563 3137 3339 6132 3666 6322 2074 5c5c1739a26fc\" t\n+0010b4f0: 6974 6c65 3d22 4469 7361 626c 6520 4449 itle=\"Disable DI\n+0010b500: 4d45 2061 7474 6163 686d 656e 7473 2e22 ME attachments.\"\n+0010b510: 3e73 6f61 705f 636c 725f 6469 6d65 2873 >soap_clr_dime(s\n+0010b520: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+0010b530: 293c 2f61 3e3c 2f63 6f64 653e 2054 6869 ) Thi\n+0010b540: 7320 6675 6e63 7469 6f6e 2064 6973 6162 s function disab\n+0010b550: 6c65 7320 4449 4d45 2061 7474 6163 686d les DIME attachm\n+0010b560: 656e 7473 2c20 756e 6c65 7373 2074 6865 ents, unless the\n+0010b570: 2064 6174 6120 746f 2073 6572 6961 6c69 data to seriali\n+0010b580: 7a65 2061 7320 616e 2058 4d4c 206d 6573 ze as an XML mes\n+0010b590: 7361 6765 2063 6f6e 7461 696e 7320 6174 sage contains at\n+0010b5a0: 7461 6368 6d65 6e74 7320 6465 6669 6e65 tachments define\n+0010b5b0: 6420 6279 203c 636f 6465 3e3c 6120 636c d by xsd__ba\n+0010b630: 7365 3634 4269 6e61 7279 3c2f 613e 3c2f se64Binary and \n+0010b650: 3c61 2063 6c61 7373 3d22 656c 2220 6872 _xop__Incl\n+0010b6c0: 7564 653c 2f61 3e3c 2f63 6f64 653e 2073 ude s\n+0010b6d0: 7472 7563 7475 7265 732e 3c2f 6c69 3e0a tructures.
    • .\n+0010b6e0: 3c2f 756c 3e0a 3c70 3e54 6865 7365 2066
    .

    These f\n+0010b6f0: 756e 6374 696f 6e73 2061 6c6c 6f77 2044 unctions allow D\n+0010b700: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments \n+0010b710: 746f 2062 6520 6164 6465 6420 746f 2053 to be added to S\n+0010b720: 4f41 5020 6d65 7373 6167 6573 2077 6974 OAP messages wit\n+0010b730: 686f 7574 2072 6571 7569 7269 6e67 206d hout requiring m\n+0010b740: 6573 7361 6765 2062 6f64 7920 7265 6665 essage body refe\n+0010b750: 7265 6e63 6573 2e20 5468 6973 2069 7320 rences. This is \n+0010b760: 616c 736f 2072 6566 6572 7265 6420 746f also referred to\n+0010b770: 2061 7320 7468 6520 6f70 656e 2044 494d as the open DIM\n+0010b780: 4520 6174 7461 6368 6d65 6e74 2073 7479 E attachment sty\n+0010b790: 6c65 2e20 5468 6520 636c 6f73 6564 2061 le. The closed a\n+0010b7a0: 7474 6163 686d 656e 7420 7374 796c 6520 ttachment style \n+0010b7b0: 7265 7175 6972 6573 2061 6c6c 2044 494d requires all DIM\n+0010b7c0: 4520 6174 7461 6368 6d65 6e74 7320 746f E attachments to\n+0010b7d0: 2062 6520 7265 6665 7265 6e63 6564 2066 be referenced f\n+0010b7e0: 726f 6d20 7468 6520 534f 4150 206d 6573 rom the SOAP mes\n+0010b7f0: 7361 6765 2062 6f64 7920 7769 7468 203c sage body with <\n+0010b800: 656d 3e3c 636f 6465 3e68 7265 663c 2f63 em>href (or si\n+0010b820: 6d69 6c61 7229 2072 6566 6572 656e 6365 milar) reference\n+0010b830: 732e 2046 6f72 2074 6865 2063 6c6f 7365 s. For the close\n+0010b840: 6420 7374 796c 652c 2067 534f 4150 2073 d style, gSOAP s\n+0010b850: 7570 706f 7274 7320 616e 2061 7574 6f6d upports an autom\n+0010b860: 6174 6963 2062 696e 6172 7920 6461 7461 atic binary data\n+0010b870: 2073 6572 6961 6c69 7a61 7469 6f6e 206d serialization m\n+0010b880: 6574 686f 642c 2073 6565 2053 6563 7469 ethod, see Secti\n+0010b890: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on Se\n+0010b8c0: 7269 616c 697a 696e 6720 6269 6e61 7279 rializing binary\n+0010b8d0: 2064 6174 6120 7769 7468 2044 494d 4520 data with DIME \n+0010b8e0: 6174 7461 6368 6d65 6e74 733c 2f61 3e20 attachments \n+0010b8f0: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

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

    .

    \n+0010b930: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .Retrie\n+0010b960: 7669 6e67 2061 2063 6f6c 6c65 6374 696f ving a collectio\n+0010b970: 6e20 6f66 2044 494d 4520 6174 7461 6368 n of DIME attach\n+0010b980: 6d65 6e74 733c 2f68 323e 0a3c 703e 4449 ments

    .

    DI\n+0010b990: 4d45 2061 7474 6163 686d 656e 7473 2061 ME attachments a\n+0010b9a0: 7265 2061 7574 6f6d 6174 6963 616c 6c79 re automatically\n+0010b9b0: 2070 6172 7365 6420 616e 6420 7374 6f72 parsed and stor\n+0010b9c0: 6564 2069 6e20 6d65 6d6f 7279 2028 6f72 ed in memory (or\n+0010b9d0: 2070 6173 7365 6420 746f 2074 6865 2073 passed to the s\n+0010b9e0: 7472 6561 6d69 6e67 2068 616e 646c 6572 treaming handler\n+0010b9f0: 7320 7669 6120 7468 6520 4449 4d45 2063 s via the DIME c\n+0010ba00: 616c 6c62 6163 6b20 6675 6e63 7469 6f6e allback function\n+0010ba10: 7320 7768 656e 2064 6566 696e 6564 292e s when defined).\n+0010ba20: 2041 6674 6572 2072 6563 6569 7669 6e67 After receiving\n+0010ba30: 2061 2073 6574 206f 6620 4449 4d45 2061 a set of DIME a\n+0010ba40: 7474 6163 686d 656e 7473 2c20 6569 7468 ttachments, eith\n+0010ba50: 6572 2061 7420 7468 6520 636c 6965 6e74 er at the client\n+0010ba60: 2d73 6964 6520 6f72 2074 6865 2073 6572 -side or the ser\n+0010ba70: 7665 722d 7369 6465 2c20 7468 6520 6c69 ver-side, the li\n+0010ba80: 7374 206f 6620 4449 4d45 2061 7474 6163 st of DIME attac\n+0010ba90: 686d 656e 7473 2063 616e 2062 6520 7472 hments can be tr\n+0010baa0: 6176 6572 7365 6420 746f 2065 7874 7261 aversed to extra\n+0010bab0: 6374 206d 6574 6120 6461 7461 2061 6e64 ct meta data and\n+0010bac0: 2074 6865 2061 7474 6163 686d 656e 7420 the attachment \n+0010bad0: 636f 6e74 656e 742e 3c2f 703e 0a3c 703e content.

    .

    \n+0010bae0: 546f 2074 7261 7665 7273 6520 7468 6520 To traverse the \n+0010baf0: 6c69 7374 206f 6620 4449 4d45 2061 7474 list of DIME att\n+0010bb00: 6163 686d 656e 7473 2069 6e20 432c 2079 achments in C, y\n+0010bb10: 6f75 2075 7365 2061 206c 6f6f 7020 7369 ou use a loop si\n+0010bb20: 6d69 6c61 7220 746f 3a3c 2f70 3e0a 3c64 milar to:

    .
    \n+0010bb70: 696e 743c 2f73 7061 6e3e 206e 203d 2030 int n = 0\n+0010bb80: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    \n+0010bbb0: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct \n+0010bbf0: 736f 6170 5f6d 756c 7469 7061 7274 3c2f soap_multipart *attachment;<\n+0010bc10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    for (at\n+0010bc50: 7461 6368 6d65 6e74 203d 203c 6120 636c tachment = soap-><\n+0010bc90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0010bca0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0010bcb0: 6874 6d6c 2361 3338 3834 3561 3465 3063 html#a38845a4e0c\n+0010bcc0: 6330 3639 3637 3832 3736 3961 6339 3937 c0696782769ac997\n+0010bcd0: 3663 3464 6661 223e 6469 6d65 3c2f 613e 6c4dfa\">dime\n+0010bce0: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .\n+0010bd30: 6c69 7374 3c2f 613e 3b20 6174 7461 6368 list; attach\n+0010bd40: 6d65 6e74 3b20 6174 7461 6368 6d65 6e74 ment; attachment\n+0010bd50: 203d 2061 7474 6163 686d 656e 742d 2667 = attachment-&g\n+0010bd60: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;next)<\n+0010bdc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n+0010bde0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ++n;
    .<\n+0010be00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0010be10: 3e20 2070 7269 6e74 6628 3c73 7061 6e20 > printf("Part\n+0010be40: 2025 643a 5c6e 2671 756f 743b 3c2f 7370 %d:\\n", n);
    .<\n+0010be60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0010be70: 3e20 2070 7269 6e74 6628 3c73 7061 6e20 > printf("ptr \n+0010bea0: 2020 2020 2020 203d 2570 5c6e 2671 756f =%p\\n&quo\n+0010beb0: 743b 3c2f 7370 616e 3e2c 2061 7474 6163 t;, attac\n+0010bec0: 686d 656e 742d 2667 743b 3c61 2063 6c61 hment->pt\n+0010bf20: 723c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 r);
    .\n+0010bf40: 2020 7072 696e 7466 283c 7370 616e 2063 printf("size \n+0010bf70: 2020 2020 2020 3d25 756c 5c6e 2671 756f =%ul\\n&quo\n+0010bf80: 743b 3c2f 7370 616e 3e2c 2061 7474 6163 t;, attac\n+0010bf90: 686d 656e 742d 2667 743b 3c61 2063 6c61 hment->si\n+0010bff0: 7a65 3c2f 613e 293b 3c2f 6469 763e 0a3c ze);
    .<\n+0010c000: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0010c010: 3e20 2070 7269 6e74 6628 3c73 7061 6e20 > printf("id \n+0010c040: 2020 2020 2020 203d 2573 5c6e 2671 756f =%s\\n&quo\n+0010c050: 743b 3c2f 7370 616e 3e2c 2061 7474 6163 t;, attac\n+0010c060: 686d 656e 742d 2667 743b 3c61 2063 6c61 hment->id\n+0010c0c0: 3c2f 613e 203f 2061 7474 6163 686d 656e ? attachmen\n+0010c0d0: 742d 2667 743b 3c61 2063 6c61 7373 3d22 t->id\n+0010c130: 203a 203c 7370 616e 2063 6c61 7373 3d22 : &\n+0010c150: 7175 6f74 3b26 7175 6f74 3b3c 2f73 7061 quot;");
    .
    p\n+0010c180: 7269 6e74 6628 3c73 7061 6e20 636c 6173 rintf("type \n+0010c1b0: 2020 203d 2573 5c6e 2671 756f 743b 3c2f =%s\\n", attachmen\n+0010c1d0: 742d 2667 743b 3c61 2063 6c61 7373 3d22 t->type ? attachment-\n+0010c240: 2667 743b 3c61 2063 6c61 7373 3d22 636f >type\n+0010c2a0: 203a 203c 7370 616e 2063 6c61 7373 3d22 : &\n+0010c2c0: 7175 6f74 3b26 7175 6f74 3b3c 2f73 7061 quot;");
    .
    }.
    soap_d\n+0010c3a0: 696d 653a 3a6c 6973 743c 2f61 3e3c 2f64 ime::list
    struct so\n+0010c3d0: 6170 5f6d 756c 7469 7061 7274 202a 206c ap_multipart * l\n+0010c3e0: 6973 743c 2f64 6976 3e3c 6469 7620 636c ist
    list\n+0010c400: 206f 6620 4449 4d45 2061 7474 6163 686d of DIME attachm\n+0010c410: 656e 7473 2072 6563 6569 7665 643c 2f64 ents received
    Definit\n+0010c440: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+0010c450: 322e 683a 3939 3731 3c2f 6469 763e 3c2f 2.h:9971
    .
    so\n+0010c500: 6170 3a3a 6469 6d65 3c2f 613e 3c2f 6469 ap::dime
    struct soa\n+0010c530: 705f 6469 6d65 2064 696d 653c 2f64 6976 p_dime dime
    DIME attachm\n+0010c560: 656e 7473 2072 6563 6569 7665 642e 3c2f ents received.
    Defini\n+0010c590: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+0010c5a0: 7032 2e68 3a34 3138 343c 2f64 6976 3e3c p2.h:4184
    <\n+0010c5b0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+0010c5d0: 432b 2b20 7072 6f67 7261 6d6d 6572 7320 C++ programmers \n+0010c5e0: 6361 6e20 7573 6520 616e 2069 7465 7261 can use an itera\n+0010c5f0: 746f 7220 696e 7374 6561 643a 3c2f 703e tor instead:

    \n+0010c600: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    int n \n+0010c650: 3d20 303b 3c2f 6469 763e 0a3c 6469 7620 = 0;
    .
    for (soap_mult\n+0010c6f0: 6970 6172 743a 3a69 7465 7261 746f 723c ipart::iterator<\n+0010c700: 2f61 3e20 6920 3d20 3c61 2063 6c61 7373 /a> i = s\n+0010c730: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->dime.beg\n+0010c7e0: 696e 3c2f 613e 2829 3b20 6920 213d 203c in(); i != <\n+0010c7f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0010c800: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0010c810: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+0010c820: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;dime\n+0010c870: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .end(); +\n+0010c8d0: 2b69 293c 2f64 6976 3e0a 3c64 6976 2063 +i)
    .
    {.
    ++n;.
    printf("\n+0010c950: 5061 7274 2025 643a 5c6e 2671 756f 743b Part %d:\\n"\n+0010c960: 3c2f 7370 616e 3e2c 206e 293b 3c2f 6469 , n);.
    printf("\n+0010c9b0: 7074 7220 2020 2020 2020 203d 2570 5c6e ptr =%p\\n\n+0010c9c0: 2671 756f 743b 3c2f 7370 616e 3e2c 2069 ", i\n+0010c9d0: 2d26 6774 3b70 7472 293b 3c2f 6469 763e ->ptr);
    \n+0010c9e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... /\n+0010ca10: 2f20 6574 633c 2f73 7061 6e3e 3c2f 6469 / etc.
    }
    .\n+0010caa0: 3c61 2068 7265 663d 2273 7472 7563 7473 soap_dime::beg\n+0010caf0: 696e 3c2f 613e 3c2f 6469 763e 3c64 6976 in
    \n+0010cb10: 736f 6170 5f6d 756c 7469 7061 7274 3a3a soap_multipart::\n+0010cb20: 6974 6572 6174 6f72 2062 6567 696e 2829 iterator begin()\n+0010cb30: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    C++ onl\n+0010cb50: 793a 2061 6e20 6974 6572 6174 6f72 206f y: an iterator o\n+0010cb60: 7665 7220 736f 6170 5f6d 756c 7469 7061 ver soap_multipa\n+0010cb70: 7274 2061 7474 6163 686d 656e 7473 2e3c rt attachments.<\n+0010cb80: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    <\n+0010cbf0: 6120 6872 6566 3d22 7374 7275 6374 736f a href=\"structso\n+0010cc00: 6170 5f5f 6469 6d65 2e68 746d 6c23 6166 ap__dime.html#af\n+0010cc10: 3463 3038 3038 6564 3939 3564 3038 3535 4c0808ed995d0855\n+0010cc20: 3134 6366 6330 3936 3262 6234 3536 3522 14cfc0962bb4565\"\n+0010cc30: 3e73 6f61 705f 6469 6d65 3a3a 656e 643c >soap_dime::end<\n+0010cc40: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    soa\n+0010cc60: 705f 6d75 6c74 6970 6172 743a 3a69 7465 p_multipart::ite\n+0010cc70: 7261 746f 7220 656e 6428 293c 2f64 6976 rator end()
    C++ only: an\n+0010cca0: 2069 7465 7261 746f 7220 6f76 6572 2073 iterator over s\n+0010ccb0: 6f61 705f 6d75 6c74 6970 6172 7420 6174 oap_multipart at\n+0010ccc0: 7461 6368 6d65 6e74 732e 3c2f 6469 763e tachments.
    \n+0010ccd0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    The optio\n+0010cd00: 6e73 3c2f 636f 6465 3e20 6d65 6d62 6572 ns member\n+0010cd10: 2069 7320 6176 6169 6c61 626c 6520 6173 is available as\n+0010cd20: 2077 656c 6c2c 2062 7574 206e 6f74 2073 well, but not s\n+0010cd30: 686f 776e 2069 6e20 7468 6520 636f 6465 hown in the code\n+0010cd40: 2061 626f 7665 2e20 5468 6520 3c63 6f64 above. The options\n+0010cd60: 2063 6f6e 7465 6e74 2069 7320 666f 726d content is form\n+0010cd70: 6174 7465 6420 6163 636f 7264 696e 6720 atted according \n+0010cd80: 746f 2074 6865 2044 494d 4520 7370 6563 to the DIME spec\n+0010cd90: 6966 6963 6174 696f 6e3a 2074 6865 2066 ification: the f\n+0010cda0: 6972 7374 2074 776f 2062 7974 6573 2061 irst two bytes a\n+0010cdb0: 7265 2072 6573 6572 7665 6420 666f 7220 re reserved for \n+0010cdc0: 7468 6520 6f70 7469 6f6e 2074 7970 652c the option type,\n+0010cdd0: 2074 6865 206e 6578 7420 7477 6f20 6279 the next two by\n+0010cde0: 7465 7320 7374 6f72 6520 7468 6520 7369 tes store the si\n+0010cdf0: 7a65 206f 6620 7468 6520 6f70 7469 6f6e ze of the option\n+0010ce00: 2064 6174 612c 2066 6f6c 6c6f 7765 6420 data, followed \n+0010ce10: 6279 2074 6865 2028 6269 6e61 7279 2920 by the (binary) \n+0010ce20: 6f70 7469 6f6e 2064 6174 612e 3c2f 703e option data.

    \n+0010ce30: 0a3c 703e 4120 6361 6c6c 2074 6f20 3c63 .

    A call to soap_end\n+0010cf10: 3c2f 613e 3c2f 636f 6465 3e20 7265 6d6f remo\n+0010cf20: 7665 7320 616c 6c20 6f66 2074 6865 2072 ves all of the r\n+0010cf30: 6563 6569 7665 6420 4449 4d45 2064 6174 eceived DIME dat\n+0010cf40: 612e 2054 6f20 7072 6573 6572 7665 2061 a. To preserve a\n+0010cf50: 6e20 6174 7461 6368 6d65 6e74 2069 6e20 n attachment in \n+0010cf60: 6d65 6d6f 7279 2c20 7573 6520 3c63 6f64 memory, use soap_unlin\n+0010d040: 6b3c 2f61 3e3c 2f63 6f64 653e 206f 6e20 k on \n+0010d050: 7468 6520 3c63 6f64 653e 7074 723c 2f63 the ptr member of t\n+0010d070: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap_mul\n+0010d0f0: 7469 7061 7274 3c2f 613e 3c2f 636f 6465 tipart struct. The soap_unl\n+0010d1e0: 696e 6b3c 2f61 3e3c 2f63 6f64 653e 2066 ink f\n+0010d1f0: 756e 6374 696f 6e20 6361 6e20 6265 2075 unction can be u\n+0010d200: 7365 6420 746f 2070 7265 7665 6e74 2064 sed to prevent d\n+0010d210: 6561 6c6c 6f63 6174 696f 6e20 6f66 2064 eallocation of d\n+0010d220: 6573 6572 6961 6c69 7a65 6420 6461 7461 eserialized data\n+0010d230: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

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

    .

    \n+0010d270: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .Serializi\n+0010d2a0: 6e67 2062 696e 6172 7920 6461 7461 2077 ng binary data w\n+0010d2b0: 6974 6820 4449 4d45 2061 7474 6163 686d ith DIME attachm\n+0010d2c0: 656e 7473 3c2f 6832 3e0a 3c70 3e42 696e ents

    .

    Bin\n+0010d2d0: 6172 7920 6461 7461 2073 746f 7265 6420 ary data stored \n+0010d2e0: 696e 2065 7874 656e 6465 6420 3c63 6f64 in extended \n+0010d360: 7873 645f 5f62 6173 6536 3442 696e 6172 xsd__base64Binar\n+0010d370: 793c 2f61 3e3c 2f63 6f64 653e 2061 6e64 y and\n+0010d380: 203c 636f 6465 3e3c 6120 636c 6173 733d x\n+0010d3f0: 7364 5f5f 6865 7842 696e 6172 793c 2f61 sd__hexBinary types c\n+0010d410: 616e 2062 6520 7365 7269 616c 697a 6564 an be serialized\n+0010d420: 2061 6e64 2064 6573 6572 6961 6c69 7a65 and deserialize\n+0010d430: 6420 6173 2044 494d 4520 6174 7461 6368 d as DIME attach\n+0010d440: 6d65 6e74 7320 7768 656e 206f 6e65 206f ments when one o\n+0010d450: 7220 6d6f 7265 206f 6620 7468 6520 6578 r more of the ex\n+0010d460: 7472 6120 6d65 6d62 6572 7320 3c63 6f64 tra members id, type, \n+0010d490: 616e 6420 3c63 6f64 653e 6f70 7469 6f6e and option\n+0010d4a0: 733c 2f63 6f64 653e 2061 7265 206e 6f6e s are non\n+0010d4b0: 2d4e 554c 4c2e 2054 6865 7365 2061 7474 -NULL. These att\n+0010d4c0: 6163 686d 656e 7473 2077 696c 6c20 6265 achments will be\n+0010d4d0: 2061 7574 6f6d 6174 6963 616c 6c79 2074 automatically t\n+0010d4e0: 7261 6e73 6d69 7474 6564 2070 7269 6f72 ransmitted prior\n+0010d4f0: 2074 6f20 7468 6520 7365 7175 656e 6365 to the sequence\n+0010d500: 206f 6620 7365 636f 6e64 6172 7920 4449 of secondary DI\n+0010d510: 4d45 2061 7474 6163 686d 656e 7473 2064 ME attachments d\n+0010d520: 6566 696e 6564 2062 7920 7468 6520 7573 efined by the us\n+0010d530: 6572 2077 6974 6820 3c63 6f64 653e 3c61 er with soap_set_di\n+0010d5d0: 6d65 5f61 7474 6163 686d 656e 743c 2f61 me_attachment as expl\n+0010d5f0: 6169 6e65 6420 696e 2074 6865 2070 7265 ained in the pre\n+0010d600: 7669 6f75 7320 7365 6374 696f 6e2e 2054 vious section. T\n+0010d610: 6865 2073 6572 6961 6c69 7a61 7469 6f6e he serialization\n+0010d620: 2070 726f 6365 7373 2069 7320 6175 746f process is auto\n+0010d630: 6d61 7465 6420 666f 7220 534f 4150 2065 mated for SOAP e\n+0010d640: 6e63 6f64 6564 206d 6573 7361 6765 7320 ncoded messages \n+0010d650: 616e 6420 4449 4d45 2061 7474 6163 686d and DIME attachm\n+0010d660: 656e 7473 2077 696c 6c20 6265 2073 656e ents will be sen\n+0010d670: 6420 6576 656e 2077 6865 6e20 3c63 6f64 d even when soap_set_dime\n+0010d700: 3c2f 613e 3c2f 636f 6465 3e20 6f72 203c or <\n+0010d710: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n+0010d7a0: 5f73 6574 5f64 696d 655f 6174 7461 6368 _set_dime_attach\n+0010d7b0: 6d65 6e74 3c2f 613e 3c2f 636f 6465 3e20 ment \n+0010d7c0: 6172 6520 6e6f 7420 7573 6564 2e20 466f are not used. Fo\n+0010d7d0: 7220 6e6f 6e2d 534f 4150 2d65 6e63 6f64 r non-SOAP-encod\n+0010d7e0: 6564 206d 6573 7361 6765 7320 7375 6368 ed messages such\n+0010d7f0: 2061 7320 646f 6375 6d65 6e74 2f6c 6974 as document/lit\n+0010d800: 6572 616c 206d 6573 7361 6765 7320 796f eral messages yo\n+0010d810: 7520 6d75 7374 2073 7469 6c6c 2063 616c u must still cal\n+0010d820: 6c20 3c63 6f64 653e 3c61 2063 6c61 7373 l soap_se\n+0010d8a0: 745f 6469 6d65 3c2f 613e 3c2f 636f 6465 t_dime to enable send\n+0010d8c0: 696e 6720 6d65 7373 6167 6573 2077 6974 ing messages wit\n+0010d8d0: 6820 6174 7461 6368 6d65 6e74 732e 3c2f h attachments..

    To enable \n+0010d8f0: 7365 7269 616c 697a 6174 696f 6e20 6f66 serialization of\n+0010d900: 2074 6865 2064 6174 6120 6173 2044 494d the data as DIM\n+0010d910: 4520 6174 7461 6368 6d65 6e74 7320 696e E attachments in\n+0010d920: 7374 6561 6420 6f66 2069 6e6c 696e 6520 stead of inline \n+0010d930: 6261 7365 3634 2c20 7765 2065 7874 656e base64, we exten\n+0010d940: 6420 7468 6520 3c63 6f64 653e 3c61 2063 d the xsd__b\n+0010d9c0: 6173 6536 3442 696e 6172 793c 2f61 3e3c ase64Binary<\n+0010d9d0: 2f63 6f64 653e 2074 7970 6520 7769 7468 /code> type with\n+0010d9e0: 2074 6872 6565 2061 6464 6974 696f 6e61 three additiona\n+0010d9f0: 6c20 6d65 6d62 6572 733a 3c2f 703e 0a3c l members:

    .<\n+0010da00: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+0010da10: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    str\n+0010da40: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct xsd__base64Bin\n+0010da90: 6172 793c 2f61 3e20 3c2f 6469 763e 0a3c ary
    .<\n+0010daa0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0010dab0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    <\n+0010dad0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0010dae0: 6f72 6474 7970 6522 3e75 6e73 6967 6e65 ordtype\">unsigne\n+0010daf0: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d char *\n+0010db20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 __ptr;
    .
    \n+0010dba0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int _\n+0010dc20: 5f73 697a 653c 2f61 3e3b 203c 2f64 6976 _size; .
    char *<\n+0010dc70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0010dc80: 7265 663d 2273 7472 7563 7478 7364 5f5f ref=\"structxsd__\n+0010dc90: 5f5f 6261 7365 3634 5f62 696e 6172 792e __base64_binary.\n+0010dca0: 6874 6d6c 2361 3633 3938 6539 6438 3630 html#a6398e9d860\n+0010dcb0: 3739 3839 3666 6163 6333 3030 3538 3731 79896facc3005871\n+0010dcc0: 6437 6665 3237 223e 6964 3c2f 613e 3b20 d7fe27\">id; \n+0010dcd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..\n+0010dd90: 2020 2020 3c73 7061 6e20 636c 6173 733d ch\n+0010ddb0: 6172 3c2f 7370 616e 3e20 2a3c 6120 636c ar *options;\n+0010de20: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    };.\n+0010df20: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    char * optio\n+0010df40: 6e73 3c2f 6469 763e 3c64 6976 2063 6c61 ns
    extra\n+0010df60: 206d 656d 6265 723a 2044 494d 4520 6f70 member: DIME op\n+0010df70: 7469 6f6e 7320 6f72 2061 2064 6573 6372 tions or a descr\n+0010df80: 6970 7469 6f6e 206f 6620 7468 6520 4d49 iption of the MI\n+0010df90: 4d45 2061 7474 6163 686d 656e 7420 6f72 ME attachment or\n+0010dfa0: 204e 554c 4c3c 2f64 6976 3e3c 6469 7620 NULL
    Definition:\n+0010dfd0: 2073 7464 736f 6170 322e 683a 3938 3432 stdsoap2.h:9842\n+0010dfe0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    xsd__base6\n+0010e0b0: 3442 696e 6172 793a 3a69 643c 2f61 3e3c 4Binary::id<\n+0010e0c0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    char * \n+0010e0e0: 6964 3c2f 6469 763e 3c64 6976 2063 6c61 id
    extra\n+0010e100: 206d 656d 6265 723a 204e 554c 4c20 746f member: NULL to\n+0010e110: 2067 656e 6572 6174 6520 616e 2069 6420 generate an id \n+0010e120: 6f72 2061 7373 6967 6e20 7468 6973 206d or assign this m\n+0010e130: 656d 6265 7220 7661 7269 6162 6c65 2061 ember variable a\n+0010e140: 2075 6e69 7175 6520 5555 4944 3c2f 6469 unique UUID
    Definiti\n+0010e170: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+0010e180: 2e68 3a39 3834 303c 2f64 6976 3e3c 2f64 .h:9840
    .char * type
    extra memb\n+0010e2b0: 6572 3a20 4d49 4d45 2074 7970 6520 6f66 er: MIME type of\n+0010e2c0: 2074 6865 2064 6174 613c 2f64 6976 3e3c the data
    <\n+0010e2d0: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n+0010e2e0: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n+0010e2f0: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n+0010e300: 3938 3431 3c2f 6469 763e 3c2f 6469 763e 9841
    \n+0010e310: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    The <\n+0010e330: 636f 6465 3e69 643c 2f63 6f64 653e 206d code>id m\n+0010e340: 656d 6265 7220 6973 2066 6f72 2061 7474 ember is for att\n+0010e350: 6163 686d 656e 7420 7265 6665 7265 6e63 achment referenc\n+0010e360: 696e 672c 2074 7970 6963 616c 6c79 2061 ing, typically a\n+0010e370: 2063 6f6e 7465 6e74 2069 6420 2843 4944 content id (CID\n+0010e380: 2920 6f72 2061 2055 5549 4420 7768 6963 ) or a UUID whic\n+0010e390: 6820 6361 6e20 6265 206f 6274 6169 6e65 h can be obtaine\n+0010e3a0: 6420 7769 7468 203c 636f 6465 3e3c 6120 d with so\n+0010e430: 6170 5f72 616e 645f 7575 6964 3c2f 613e ap_rand_uuid\n+0010e440: 3c2f 636f 6465 3e2c 2061 203c 636f 6465 , a type mem\n+0010e460: 6265 7220 6973 2075 7365 6420 746f 2073 ber is used to s\n+0010e470: 7065 6369 6679 2074 6865 204d 494d 4520 pecify the MIME \n+0010e480: 7479 7065 206f 6620 7468 6520 6461 7461 type of the data\n+0010e490: 2c20 7468 6520 3c63 6f64 653e 6f70 7469 , the opti\n+0010e4a0: 6f6e 733c 2f63 6f64 653e 206d 656d 6265 ons membe\n+0010e4b0: 7220 6973 2075 7365 6420 746f 2070 6967 r is used to pig\n+0010e4c0: 6779 2d62 6163 6b20 6164 6469 7469 6f6e gy-back addition\n+0010e4d0: 616c 2069 6e66 6f72 6d61 7469 6f6e 2077 al information w\n+0010e4e0: 6974 6820 6120 4449 4d45 2061 7474 6163 ith a DIME attac\n+0010e4f0: 686d 656e 742e 2054 6865 206f 7264 6572 hment. The order\n+0010e500: 206f 6620 7468 6520 6465 636c 6172 6174 of the declarat\n+0010e510: 696f 6e20 6f66 2074 6865 206d 656d 6265 ion of the membe\n+0010e520: 7273 2069 7320 7369 676e 6966 6963 616e rs is significan\n+0010e530: 742e 2049 6e20 6164 6469 7469 6f6e 2c20 t. In addition, \n+0010e540: 6e6f 206f 7468 6572 206d 656d 6265 7273 no other members\n+0010e550: 206f 7220 6d65 7468 6f64 7320 6d61 7920 or methods may \n+0010e560: 6265 2064 6563 6c61 7265 6420 6265 666f be declared befo\n+0010e570: 7265 2061 6e79 206f 6620 7468 6573 6520 re any of these \n+0010e580: 6d65 6d62 6572 7320 696e 2074 6865 2073 members in the s\n+0010e590: 7472 7563 742f 636c 6173 732c 2062 7574 truct/class, but\n+0010e5a0: 2061 6464 6974 696f 6e61 6c20 6d65 6d62 additional memb\n+0010e5b0: 6572 7320 616e 6420 6d65 7468 6f64 7320 ers and methods \n+0010e5c0: 6d61 7920 6170 7065 6172 2061 6674 6572 may appear after\n+0010e5d0: 2074 6865 206d 656d 6265 7220 6465 636c the member decl\n+0010e5e0: 6172 6174 696f 6e73 2e20 5468 6520 6578 arations. The ex\n+0010e5f0: 7465 6e64 6564 203c 636f 6465 3e3c 6120 tended xsd__hexBin\n+0010e670: 6172 793c 2f61 3e3c 2f63 6f64 653e 2074 ary t\n+0010e680: 7970 6520 6973 2073 696d 696c 6172 2e3c ype is similar.<\n+0010e690: 2f70 3e0a 3c70 3e54 6865 203c 636f 6465 /p>.

    The id and <\n+0010e6b0: 636f 6465 3e74 7970 653c 2f63 6f64 653e code>type\n+0010e6c0: 206d 656d 6265 7273 2063 6f6e 7461 696e members contain\n+0010e6d0: 2074 6578 742e 2054 6865 2073 6574 2074 text. The set t\n+0010e6e0: 6865 2044 494d 452d 7370 6563 6966 6963 he DIME-specific\n+0010e6f0: 206f 7074 696f 6e73 206d 656d 6265 722c options member,\n+0010e700: 2079 6f75 2063 616e 2075 7365 2074 6865 you can use the\n+0010e710: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_dime_\n+0010e790: 6f70 7469 6f6e 3c2f 613e 3c2f 636f 6465 option function char *soap_dime\n+0010e7c0: 5f6f 7074 696f 6e28 7374 7275 6374 2073 _option(struct s\n+0010e7d0: 6f61 7020 2a73 6f61 702c 2075 6e73 6967 oap *soap, unsig\n+0010e7e0: 6e65 6420 7368 6f72 7420 7479 7065 2c20 ned short type, \n+0010e7f0: 636f 6e73 7420 6368 6172 202a 6f70 7469 const char *opti\n+0010e800: 6f6e 293c 2f63 6f64 653e 2e3c 2f70 3e0a on).

    .\n+0010e810: 3c70 3e54 6869 7320 6675 6e63 7469 6f6e

    This function\n+0010e820: 2072 6574 7572 6e73 2061 2073 7472 696e returns a strin\n+0010e830: 6720 7769 7468 2074 6869 7320 656e 636f g with this enco\n+0010e840: 6469 6e67 2e20 466f 7220 6578 616d 706c ding. For exampl\n+0010e850: 653c 2f70 3e0a 3c64 6976 2063 6c61 7373 e

    .
    struct xsd__ba\n+0010e8e0: 7365 3634 4269 6e61 7279 3c2f 613e 2069 se64Binary i\n+0010e8f0: 6d61 6765 3b20 3c2f 6469 763e 0a3c 6469 mage;
    .i\n+0010e910: 6d61 6765 2e3c 6120 636c 6173 733d 2263 mage.__\n+0010e970: 7074 723c 2f61 3e20 3d20 2e2e 2e3b 203c ptr = ...; <\n+0010e980: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    image.__\n+0010e9a0: 7369 7a65 203d 202e 2e2e 3b20 3c2f 6469 size = ...; .
    image.id = \n+0010e9d0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+0010e9f0: 743b 7575 6964 3a30 3932 3333 3532 332d t;uuid:09233523-\n+0010ea00: 3334 3562 2d34 3335 312d 6236 3233 2d35 345b-4351-b623-5\n+0010ea10: 6473 6633 3573 6773 3564 3626 7175 6f74 dsf35sgs5d6"\n+0010ea20: 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 763e ;;
    \n+0010ea30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    image.type = \n+0010ea50: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+0010ea70: 743b 696d 6167 652f 6a70 6567 2671 756f t;image/jpeg&quo\n+0010ea80: 743b 3c2f 7370 616e 3e3b 203c 2f64 6976 t;; .
    image.option\n+0010eab0: 7320 3d20 3c61 2063 6c61 7373 3d22 636f s = soap_dime_\n+0010eb10: 6f70 7469 6f6e 3c2f 613e 283c 6120 636c option(soap, 0, <\n+0010eb50: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+0010eb60: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+0010eb70: 3b4d 7920 7765 6464 696e 6720 7069 6374 ;My wedding pict\n+0010eb80: 7572 6526 7175 6f74 3b3c 2f73 7061 6e3e ure"\n+0010eb90: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    <\n+0010ec00: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n+0010ec10: 726f 7570 5f5f 6469 6d65 2e68 746d 6c23 roup__dime.html#\n+0010ec20: 6761 3438 3239 6638 3333 6162 6537 3466 ga4829f833abe74f\n+0010ec30: 6562 6362 3865 3566 6539 3336 3061 6235 ebcb8e5fe9360ab5\n+0010ec40: 3931 223e 736f 6170 5f64 696d 655f 6f70 91\">soap_dime_op\n+0010ec50: 7469 6f6e 3c2f 613e 3c2f 6469 763e 3c64 tion
    char * soap_di\n+0010ec80: 6d65 5f6f 7074 696f 6e28 7374 7275 6374 me_option(struct\n+0010ec90: 2073 6f61 7020 2a73 6f61 702c 2075 6e73 soap *soap, uns\n+0010eca0: 6967 6e65 6420 7368 6f72 7420 6f70 7479 igned short opty\n+0010ecb0: 7065 2c20 636f 6e73 7420 6368 6172 202a pe, const char *\n+0010ecc0: 6f70 7469 6f6e 293c 2f64 6976 3e3c 6469 option)
    \n+0010ece0: 4372 6561 7465 7320 6120 4449 4d45 206f Creates a DIME o\n+0010ecf0: 7074 696f 6e2e 3c2f 6469 763e 3c2f 6469 ption.
    .

    Whe\n+0010ed20: 6e20 6569 7468 6572 2074 6865 203c 636f n either the id or \n+0010ed40: 3c63 6f64 653e 7479 7065 3c2f 636f 6465 type member values \n+0010ed60: 6172 6520 6e6f 6e2d 4e55 4c4c 2061 7420 are non-NULL at \n+0010ed70: 7275 6e20 7469 6d65 2c20 7468 6520 6461 run time, the da\n+0010ed80: 7461 2077 696c 6c20 6265 2073 6572 6961 ta will be seria\n+0010ed90: 6c69 7a65 6420 6173 2061 2044 494d 4520 lized as a DIME \n+0010eda0: 6174 7461 6368 6d65 6e74 2e3c 2f70 3e0a attachment.

    .\n+0010edb0: 3c70 3e54 6865 2053 4f41 502f 584d 4c20

    The SOAP/XML \n+0010edc0: 6d65 7373 6167 6520 7265 6665 7273 2074 message refers t\n+0010edd0: 6f20 7468 6520 6174 7461 6368 6d65 6e74 o the attachment\n+0010ede0: 7320 7573 696e 6720 3c65 6d3e 3c63 6f64 s using href attributes. T\n+0010ee10: 6869 7320 6765 6e65 7261 6c6c 7920 776f his generally wo\n+0010ee20: 726b 7320 7769 6c6c 2077 6974 6820 534f rks will with SO\n+0010ee30: 4150 2052 5043 2065 6e63 6f64 6564 206d AP RPC encoded m\n+0010ee40: 6573 7361 6769 6e67 2c20 6265 6361 7573 essaging, becaus\n+0010ee50: 6520 3c65 6d3e 3c63 6f64 653e 6872 6566 e href\n+0010ee60: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 7474 att\n+0010ee70: 7269 6275 7465 7320 6172 6520 7065 726d ributes are perm\n+0010ee80: 6974 7465 642e 2048 6f77 6576 6572 2c20 itted. However, \n+0010ee90: 7769 7468 2064 6f63 756d 656e 742f 6c69 with document/li\n+0010eea0: 7465 7261 6c20 7374 796c 6520 7468 6520 teral style the \n+0010eeb0: 7265 6665 7265 6e63 696e 6720 6d65 6368 referencing mech\n+0010eec0: 616e 6973 6d20 6d75 7374 2062 6520 6578 anism must be ex\n+0010eed0: 706c 6963 6974 6c79 2064 6566 696e 6564 plicitly defined\n+0010eee0: 2069 6e20 7468 6520 7363 6865 6d61 206f in the schema o\n+0010eef0: 6620 7468 6520 6269 6e61 7279 2074 7970 f the binary typ\n+0010ef00: 652e 2054 6865 7265 666f 7265 2c20 4d54 e. Therefore, MT\n+0010ef10: 4f4d 2069 7320 7468 6520 7072 6566 6572 OM is the prefer\n+0010ef20: 7265 6420 6174 7461 6368 6d65 6e74 206d red attachment m\n+0010ef30: 6563 6861 6e69 736d 2066 6f72 2064 6f63 echanism for doc\n+0010ef40: 756d 656e 742f 6c69 7465 7261 6c20 7374 ument/literal st\n+0010ef50: 796c 6520 6d65 7373 6167 696e 672e 3c2f yle messaging..

    The declar\n+0010ef70: 6174 696f 6e20 6f66 2061 6e20 6578 7465 ation of an exte\n+0010ef80: 6e64 6564 2062 696e 6172 7920 7479 7065 nded binary type\n+0010ef90: 2069 6e20 7468 6520 696e 7465 7266 6163 in the interfac\n+0010efa0: 6520 6865 6164 6572 2066 696c 6520 666f e header file fo\n+0010efb0: 7220 736f 6170 6370 7032 2069 733a 3c2f r soapcpp2 is:.

    struct n\n+0010f010: 735f 5f6d 7942 696e 6172 7944 6174 6154 s__myBinaryDataT\n+0010f020: 7970 6520 3c2f 6469 763e 0a3c 6469 7620 ype
    .
    {.
    unsigned c\n+0010f0a0: 6861 723c 2f73 7061 6e3e 202a 5f5f 7074 har *__pt\n+0010f0b0: 723b 203c 2f64 6976 3e0a 3c64 6976 2063 r;
    .
    \n+0010f0d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int __size; .
    char \n+0010f140: 2a69 643b 203c 2f64 6976 3e0a 3c64 6976 *id;
    . \n+0010f160: 2020 3c73 7061 6e20 636c 6173 733d 226b char\n+0010f180: 3c2f 7370 616e 3e20 2a74 7970 653b 203c *type; <\n+0010f190: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char *options; .
    };
    .

    C++ prog\n+0010f220: 7261 6d6d 6572 7320 6361 6e20 7573 6520 rammers can use \n+0010f230: 696e 6865 7269 7461 6e63 6520 696e 7374 inheritance inst\n+0010f240: 6561 6420 6f66 2074 6578 7475 616c 2065 ead of textual e\n+0010f250: 7874 656e 7369 6f6e 2072 6571 7569 7265 xtension require\n+0010f260: 6420 696e 2043 3a3c 2f70 3e0a 3c64 6976 d in C:

    ..
    { <\n+0010f320: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0010f330: 6f72 6422 3e70 7562 6c69 633c 2f73 7061 ord\">public:
    .
    . \n+0010f430: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n+0010f450: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> \n+0010f4b0: 5f5f 7369 7a65 3c2f 613e 3b20 3c2f 6469 __size; .
    };
    .<\n+0010f4e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0010f4f0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >class ns__myBinary\n+0010f520: 4461 7461 5479 7065 203a 203c 7370 616e DataType : public <\n+0010f550: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0010f560: 7265 663d 2273 7472 7563 7478 7364 5f5f ref=\"structxsd__\n+0010f570: 5f5f 6261 7365 3634 5f62 696e 6172 792e __base64_binary.\n+0010f580: 6874 6d6c 223e 7873 645f 5f62 6173 6536 html\">xsd__base6\n+0010f590: 3442 696e 6172 793c 2f61 3e20 3c2f 6469 4Binary .
    { pub\n+0010f5d0: 6c69 633c 2f73 7061 6e3e 3a3c 2f64 6976 lic:.
    char *i\n+0010f620: 643b 203c 2f64 6976 3e0a 3c64 6976 2063 d;
    .
    \n+0010f640: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *type; .
    char \n+0010f6b0: 2a6f 7074 696f 6e73 3b20 3c2f 6469 763e *options;
    \n+0010f6c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .

    This defin\n+0010f700: 6573 2061 6e20 6578 7465 6e73 696f 6e20 es an extension \n+0010f710: 6f66 203c 656d 3e3c 636f 6465 3e78 7364 of xsd\n+0010f720: 3a62 6173 6536 3442 696e 6172 793c 2f63 :base64Binary, such \n+0010f740: 7468 6174 2074 6865 2064 6174 6120 6361 that the data ca\n+0010f750: 6e20 6265 2073 6572 6961 6c69 7a65 6420 n be serialized \n+0010f760: 6173 2044 494d 4520 6174 7461 6368 6d65 as DIME attachme\n+0010f770: 6e74 7320 7573 696e 6720 3c65 6d3e 3c63 nts using href<\n+0010f790: 2f65 6d3e 2061 7474 7269 6275 7465 7320 /em> attributes \n+0010f7a0: 666f 7220 7265 6665 7265 6e63 696e 672e for referencing.\n+0010f7b0: 2057 6865 6e20 6120 6469 6666 6572 656e When a differen\n+0010f7c0: 7420 6174 7472 6962 7574 6520 6973 2074 t attribute is t\n+0010f7d0: 6f20 6265 2075 7365 642c 2074 6869 7320 o be used, this \n+0010f7e0: 6d75 7374 2062 6520 6578 706c 6963 6974 must be explicit\n+0010f7f0: 6c79 2064 6566 696e 6564 3a3c 2f70 3e0a ly defined:

    .\n+0010f800: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    //\n+0010f840: 6773 6f61 7020 5753 7265 6620 7363 6865 gsoap WSref sche\n+0010f850: 6d61 2069 6d70 6f72 743a 2068 7474 703a ma import: http:\n+0010f860: 2f2f 7363 6865 6d61 732e 786d 6c73 6f61 //schemas.xmlsoa\n+0010f870: 702e 6f72 672f 7773 2f32 3030 322f 3034 p.org/ws/2002/04\n+0010f880: 2f72 6566 6572 656e 6365 2f20 3c2f 7370 /reference/
    .
    struct \n+0010f8d0: 6e73 5f5f 6d79 4269 6e61 7279 4461 7461 ns__myBinaryData\n+0010f8e0: 5479 7065 203c 2f64 6976 3e0a 3c64 6976 Type
    .{<\n+0010f900: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    unsigned \n+0010f960: 6368 6172 3c2f 7370 616e 3e20 2a5f 5f70 char *__p\n+0010f970: 7472 3b20 3c2f 6469 763e 0a3c 6469 7620 tr;
    .
    \n+0010f990: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int __size; .
    char\n+0010fa00: 202a 6964 3b20 3c2f 6469 763e 0a3c 6469 *id;
    . \n+0010fa20: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha\n+0010fa40: 723c 2f73 7061 6e3e 202a 7479 7065 3b20 r *type; \n+0010fa50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    char *options; .
    @ char \n+0010fae0: 2a57 5372 6566 5f5f 6c6f 6361 7469 6f6e *WSref__location\n+0010faf0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    };.

    Th\n+0010fb30: 6520 6578 616d 706c 6520 6162 6f76 6520 e example above \n+0010fb40: 7573 6573 2074 6865 203c 656d 3e3c 636f uses the location attribut\n+0010fb70: 6520 6465 6669 6e65 6420 696e 2074 6865 e defined in the\n+0010fb80: 2063 6f6e 7465 6e74 2072 6566 6572 656e content referen\n+0010fb90: 6365 2073 6368 656d 612c 2061 7320 6465 ce schema, as de\n+0010fba0: 6669 6e65 6420 696e 206f 6e65 206f 6620 fined in one of \n+0010fbb0: 7468 6520 7665 6e64 6f72 2773 2073 7065 the vendor's spe\n+0010fbc0: 6369 6669 6320 5753 444c 2065 7874 656e cific WSDL exten\n+0010fbd0: 7369 6f6e 7320 666f 7220 4449 4d45 203c sions for DIME <\n+0010fbe0: 6120 6872 6566 3d22 6874 7470 3a2f 2f77 a href=\"http://w\n+0010fbf0: 7777 2e67 6f74 646f 746e 6574 2e63 6f6d ww.gotdotnet.com\n+0010fc00: 2f74 6561 6d2f 786d 6c5f 7773 7370 6563 /team/xml_wsspec\n+0010fc10: 732f 6469 6d65 2f57 5344 4c2d 4578 7465 s/dime/WSDL-Exte\n+0010fc20: 6e73 696f 6e2d 666f 722d 4449 4d45 2e68 nsion-for-DIME.h\n+0010fc30: 746d 223e 6874 7470 3a2f 2f77 7777 2e67 tm\">http://www.g\n+0010fc40: 6f74 646f 746e 6574 2e63 6f6d 2f74 6561 otdotnet.com/tea\n+0010fc50: 6d2f 786d 6c5f 7773 7370 6563 732f 6469 m/xml_wsspecs/di\n+0010fc60: 6d65 2f57 5344 4c2d 4578 7465 6e73 696f me/WSDL-Extensio\n+0010fc70: 6e2d 666f 722d 4449 4d45 2e68 746d 3c2f n-for-DIME.htm.

    .

    When \n+0010fc90: 7265 6365 6976 696e 6720 4449 4d45 2061 receiving DIME a\n+0010fca0: 7474 6163 686d 656e 7473 2c20 7468 6520 ttachments, the \n+0010fcb0: 4449 4d45 206d 6574 6120 6461 7461 2061 DIME meta data a\n+0010fcc0: 6e64 2062 696e 6172 7920 636f 6e74 656e nd binary conten\n+0010fcd0: 7420 6172 6520 7374 6f72 6564 2069 6e20 t are stored in \n+0010fce0: 7468 6520 7370 6563 6966 6965 6420 3c63 the specified xsd__base64Bin\n+0010fd70: 6172 793c 2f61 3e3c 2f63 6f64 653e 2061 ary a\n+0010fd80: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd xsd__hexBinary<\n+0010fe00: 2f61 3e3c 2f63 6f64 653e 2062 696e 6172 /a> binar\n+0010fe10: 7920 6461 7461 2074 7970 6573 206f 6e6c y data types onl\n+0010fe20: 7920 7768 656e 2074 6865 2058 4d4c 2070 y when the XML p\n+0010fe30: 6172 7473 206f 6620 7468 6520 6d65 7373 arts of the mess\n+0010fe40: 6167 6520 7573 6573 203c 656d 3e3c 636f age uses href attributes t\n+0010fe70: 6f20 7265 6665 7220 746f 2074 6865 7365 o refer to these\n+0010fe80: 2061 7474 6163 686d 656e 7473 2e20 4966 attachments. If\n+0010fe90: 2073 6f2c 2074 6865 2062 696e 6172 7920 so, the binary \n+0010fea0: 6461 7461 2074 7970 6520 3c63 6f64 653e data type \n+0010feb0: 5f5f 7074 723c 2f63 6f64 653e 2061 6e64 __ptr and\n+0010fec0: 203c 636f 6465 3e5f 5f73 697a 653c 2f63 __size members are\n+0010fee0: 2073 6574 2074 6f20 7468 6520 6c6f 6361 set to the loca\n+0010fef0: 7469 6f6e 2069 6e20 6d65 6d6f 7279 206f tion in memory o\n+0010ff00: 6620 7468 6520 6174 7461 6368 6d65 6e74 f the attachment\n+0010ff10: 2064 6174 6120 616e 6420 6c65 6e67 7468 data and length\n+0010ff20: 2c20 7265 7370 6563 7469 7665 6c79 2e3c , respectively.<\n+0010ff30: 2f70 3e0a 3c70 3e4d 6573 7361 6765 7320 /p>.

    Messages \n+0010ff40: 6d61 7920 636f 6e74 6169 6e20 6269 6e61 may contain bina\n+0010ff50: 7279 2064 6174 6120 7468 6174 2072 6566 ry data that ref\n+0010ff60: 6572 656e 6365 7320 6578 7465 726e 616c erences external\n+0010ff70: 2072 6573 6f75 7263 6573 206e 6f74 2070 resources not p\n+0010ff80: 726f 7669 6465 6420 6173 2061 7474 6163 rovided as attac\n+0010ff90: 686d 656e 7473 2e20 496e 2074 6861 7420 hments. In that \n+0010ffa0: 6361 7365 2c20 7468 6520 3c63 6f64 653e case, the \n+0010ffb0: 5f5f 7074 723c 2f63 6f64 653e 206d 656d __ptr mem\n+0010ffc0: 6265 7220 6973 204e 554c 4c20 616e 6420 ber is NULL and \n+0010ffd0: 7468 6520 3c63 6f64 653e 6964 3c2f 636f the id member refer\n+0010fff0: 7320 746f 2074 6865 2065 7874 6572 6e61 s to the externa\n+00110000: 6c20 6461 7461 2073 6f75 7263 652e 3c2f l data source..

    The \n+00110020: 6469 6d65 5f69 645f 666f 726d 6174 3c2f dime_id_format attribute \n+00110040: 6f66 2074 6865 2063 7572 7265 6e74 2063 of the current c\n+00110050: 6f6e 7465 7874 2063 616e 2062 6520 7365 ontext can be se\n+00110060: 7420 746f 2074 6865 2064 6566 6175 6c74 t to the default\n+00110070: 2066 6f72 6d61 7420 6f66 2044 494d 4520 format of DIME \n+00110080: 6964 206d 656d 6265 7273 2e20 5468 6520 id members. The \n+00110090: 666f 726d 6174 2073 7472 696e 6720 6d75 format string mu\n+001100a0: 7374 2063 6f6e 7461 696e 2061 203c 636f st contain a d form\n+001100c0: 6174 2073 7065 6369 6669 6572 2028 6f72 at specifier (or\n+001100d0: 2061 6e79 206f 7468 6572 203c 636f 6465 any other int-base\n+001100f0: 6420 666f 726d 6174 2073 7065 6369 6669 d format specifi\n+00110100: 6572 292e 2054 6865 2076 616c 7565 206f er). The value o\n+00110110: 6620 7468 6973 2073 7065 6369 6669 6572 f this specifier\n+00110120: 2069 7320 6120 6e6f 6e2d 6e65 6761 7469 is a non-negati\n+00110130: 7665 2069 6e74 6567 6572 2c20 7769 7468 ve integer, with\n+00110140: 207a 6572 6f20 6265 696e 6720 7468 6520 zero being the \n+00110150: 7661 6c75 6520 6f66 2074 6865 2044 494d value of the DIM\n+00110160: 4520 6174 7461 6368 6d65 6e74 2069 6420 E attachment id \n+00110170: 666f 7220 7468 6520 534f 4150 206d 6573 for the SOAP mes\n+00110180: 7361 6765 2e20 466f 7220 6578 616d 706c sage. For exampl\n+00110190: 652c 3c2f 703e 0a3c 6469 7620 636c 6173 e,

    .\n+001102b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap->\n+00110340: 6469 6d65 5f69 645f 666f 726d 6174 3c2f dime_id_format = "id-%x&quo\n+00110380: 743b 3c2f 7370 616e 3e3b 203c 2f64 6976 t;; .
    <\n+001103f0: 6120 6872 6566 3d22 7374 7275 6374 736f a href=\"structso\n+00110400: 6170 2e68 746d 6c23 6138 3534 3162 6666 ap.html#a8541bff\n+00110410: 3039 3334 3433 3963 3966 3666 6565 3663 0934439c9f6fee6c\n+00110420: 3434 3934 3030 6662 6522 3e73 6f61 703a 449400fbe\">soap:\n+00110430: 3a64 696d 655f 6964 5f66 6f72 6d61 743c :dime_id_format<\n+00110440: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    con\n+00110460: 7374 2063 6861 7220 2a20 6469 6d65 5f69 st char * dime_i\n+00110470: 645f 666f 726d 6174 3c2f 6469 763e 3c64 d_format
    User-definable \n+001104a0: 666f 726d 6174 2073 7472 696e 6720 746f format string to\n+001104b0: 2067 656e 6572 6174 6520 4449 4d45 2063 generate DIME c\n+001104c0: 6f6e 7465 6e74 2049 4473 2e3c 2f64 6976 ontent IDs.
    Definitio\n+001104f0: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+00110500: 683a 3431 3732 3c2f 6469 763e 3c2f 6469 h:4172
    .

    As \n+00110530: 6120 7265 7375 6c74 2c20 616c 6c20 6174 a result, all at\n+00110540: 7461 6368 6d65 6e74 7320 7769 7468 2061 tachments with a\n+00110550: 204e 554c 4c20 3c63 6f64 653e 6964 3c2f NULL id member wil\n+00110570: 6c20 7573 6520 6120 6175 746f 2d67 656e l use a auto-gen\n+00110580: 6572 6174 6564 2069 6420 7661 6c75 6520 erated id value \n+00110590: 6261 7365 6420 6f6e 2074 6865 2066 6f72 based on the for\n+001105a0: 6d61 7420 7374 7269 6e67 2e3c 2f70 3e0a mat string.

    .\n+001105b0: 3c64 6c20 636c 6173 733d 2273 6563 7469
    \n+001105d0: 5761 726e 696e 673c 2f64 743e 3c64 643e Warning
    \n+001105e0: 4361 7265 206d 7573 7420 6265 2074 616b Care must be tak\n+001105f0: 656e 206e 6f74 2074 6f20 696e 7472 6f64 en not to introd\n+00110600: 7563 6520 6475 706c 6963 6174 6520 636f uce duplicate co\n+00110610: 6e74 656e 7420 6964 2076 616c 7565 732c ntent id values,\n+00110620: 2077 6865 6e20 6173 7369 676e 696e 6720 when assigning \n+00110630: 636f 6e74 656e 7420 6964 2076 616c 7565 content id value\n+00110640: 7320 746f 2074 6865 2069 6420 6d65 6d62 s to the id memb\n+00110650: 6572 7320 6f66 2044 494d 4520 6578 7465 ers of DIME exte\n+00110660: 6e64 6564 2062 696e 6172 7920 6461 7461 nded binary data\n+00110670: 2074 7970 6573 2e20 436f 6e74 656e 7420 types. Content \n+00110680: 6964 7320 6d75 7374 2062 6520 756e 6971 ids must be uniq\n+00110690: 7565 2e3c 2f64 643e 3c2f 646c 3e0a 3c70 ue.
    .....
    Back to table \n+001106c0: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents<\n+001106d0: 2f70 3e0a 3c68 323e 3c61 2063 6c61 7373 /p>.

    .Streaming DIME\n+00110710: 3c2f 6832 3e0a 3c70 3e53 7472 6561 6d69

    .

    Streami\n+00110720: 6e67 2044 494d 4520 6973 2061 6368 6965 ng DIME is achie\n+00110730: 7665 6420 7769 7468 2063 616c 6c62 6163 ved with callbac\n+00110740: 6b20 6675 6e63 7469 6f6e 7320 746f 2066 k functions to f\n+00110750: 6574 6368 2061 6e64 2073 746f 7265 2064 etch and store d\n+00110760: 6174 6120 6475 7269 6e67 2074 7261 6e73 ata during trans\n+00110770: 6d69 7373 696f 6e2e 2054 6872 6565 2066 mission. Three f\n+00110780: 756e 6374 696f 6e20 6361 6c6c 6261 636b unction callback\n+00110790: 7320 666f 7220 7374 7265 616d 696e 6720 s for streaming \n+001107a0: 4449 4d45 206f 7574 7075 7420 616e 6420 DIME output and \n+001107b0: 7468 7265 6520 6361 6c6c 6261 636b 7320 three callbacks \n+001107c0: 666f 7220 7374 7265 616d 696e 6720 4449 for streaming DI\n+001107d0: 4d45 2069 6e70 7574 2061 7265 2061 7661 ME input are ava\n+001107e0: 696c 6162 6c65 2e3c 2f70 3e0a 3c75 6c3e ilable.

    .
    .\n+001133f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    FILE *fd; .
    s\n+00113440: 7472 7563 7420 3c2f 7370 616e 3e73 7461 truct sta\n+00113450: 7420 7362 3b20 3c2f 6469 763e 0a3c 6469 t sb;
    . \n+00113470: 203c 6120 636c 6173 733d 2263 6f64 6522
    soap_init<\n+001134d0: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n+00113500: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); .
    \n+00113540: 6966 3c2f 7370 616e 3e20 2821 6673 7461 if (!fsta\n+00113550: 7428 6669 6c65 6e6f 2866 6429 2c20 2661 t(fileno(fd), &a\n+00113560: 6d70 3b73 6229 2026 616d 703b 2661 6d70 mp;sb) &&\n+00113570: 3b20 7362 2e73 745f 7369 7a65 2026 6774 ; sb.st_size >\n+00113580: 3b20 3029 203c 2f64 6976 3e0a 3c64 6976 ; 0)
    . \n+001135a0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    // because w\n+001135e0: 6520 6361 6e20 6765 7420 7468 6520 6c65 e can get the le\n+001135f0: 6e67 7468 206f 6620 7468 6520 6669 6c65 ngth of the file\n+00113600: 2c20 7765 2063 616e 2073 7472 6561 6d20 , we can stream \n+00113610: 6974 203c 2f73 7061 6e3e 3c2f 6469 763e it
    \n+00113620: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    so\n+00113660: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.fd\n+001136c0: 696d 6572 6561 646f 7065 6e3c 2f61 3e20 imereadopen \n+001136d0: 3d20 6469 6d65 5f72 6561 645f 6f70 656e = dime_read_open\n+001136e0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n+00113700: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00113710: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00113720: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n+00113730: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00113740: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00113750: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm\n+00113760: 6c23 6761 3135 3437 3532 6535 3533 6265 l#ga154752e553be\n+00113770: 3431 6564 3362 3130 6665 3361 3132 3733 41ed3b10fe3a1273\n+00113780: 6163 3731 223e 6664 696d 6572 6561 6463 ac71\">fdimereadc\n+00113790: 6c6f 7365 3c2f 613e 203d 2064 696d 655f lose = dime_\n+001137a0: 7265 6164 5f63 6c6f 7365 3b20 3c2f 6469 read_close; .
    \n+001137f0: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.\n+00113850: 6664 696d 6572 6561 643c 2f61 3e20 3d20 fdimeread = \n+00113860: 6469 6d65 5f72 6561 643b 203c 2f64 6976 dime_read; .
    image.__\n+00113890: 7074 7220 3d20 283c 7370 616e 2063 6c61 ptr = (unsigned\n+001138c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+001138e0: 2f73 7061 6e3e 2a29 6664 3b20 3c73 7061 /span>*)fd; // must set to\n+00113910: 206e 6f6e 2d4e 554c 4c20 2874 6869 7320 non-NULL (this \n+00113920: 6973 206f 7572 2066 6420 6861 6e64 6c65 is our fd handle\n+00113930: 2077 6869 6368 2077 6520 6e65 6564 2069 which we need i\n+00113940: 6e20 7468 6520 6361 6c6c 6261 636b 7329 n the callbacks)\n+00113950: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+00113960: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00113970: 3e20 2020 2069 6d61 6765 2e5f 5f73 697a > image.__siz\n+00113980: 6520 3d20 7362 2e73 745f 7369 7a65 3b20 e = sb.st_size; \n+00113990: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // must se\n+001139b0: 7420 7369 7a65 203c 2f73 7061 6e3e 3c2f t size .
    } .
    \n+00113a10: 656c 7365 3c2f 7370 616e 3e20 3c2f 6469 else .
    {
    .<\n+00113a40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00113a50: 3e20 2020 203c 7370 616e 2063 6c61 7373 > // do\n+00113a70: 6e26 2333 393b 7420 6b6e 6f77 2074 6865 n't know the\n+00113a80: 2073 697a 652c 2073 6f20 6275 6666 6572 size, so buffer\n+00113a90: 2069 7420 3c2f 7370 616e 3e3c 2f64 6976 it .
    size_t \n+00113ae0: 693b 203c 2f64 6976 3e0a 3c64 6976 2063 i;
    .
    \n+00113b00: 3c73 7061 6e20 636c 6173 733d 226b 6579 int c;
    .<\n+00113b30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00113b40: 3e20 2020 2069 6d61 6765 2e5f 5f70 7472 > image.__ptr\n+00113b50: 203d 2028 3c73 7061 6e20 636c 6173 733d = (un\n+00113b70: 7369 676e 6564 3c2f 7370 616e 3e20 3c73 signed char*)soap_m\n+00113c00: 616c 6c6f 633c 2f61 3e28 2661 6d70 3b3c alloc(&<\n+00113c10: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00113c20: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00113c30: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00113c40: 4d41 585f 4649 4c45 5f53 495a 4529 3b20 MAX_FILE_SIZE); \n+00113c50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    for (i = 0; i <\n+00113ca0: 204d 4158 5f46 494c 455f 5349 5a45 3b20 MAX_FILE_SIZE; \n+00113cb0: 692b 2b29 203c 2f64 6976 3e0a 3c64 6976 i++)
    . \n+00113cd0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n+00113cf0: 2020 3c73 7061 6e20 636c 6173 733d 226b if ((c = fget\n+00113d20: 6328 6664 2929 203d 3d20 454f 4629 203c c(fd)) == EOF) <\n+00113d30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    \n+00113d50: 3c73 7061 6e20 636c 6173 733d 226b 6579 break<\n+00113d70: 2f73 7061 6e3e 3b20 3c2f 6469 763e 0a3c /span>;
    .<\n+00113d80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00113d90: 3e20 2020 2020 2069 6d61 6765 2e5f 5f70 > image.__p\n+00113da0: 7472 5b69 5d20 3d20 633b 203c 2f64 6976 tr[i] = c; .
    }
    \n+00113dd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    fclose(fd\n+00113df0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    \n+00113e10: 696d 6167 652e 5f5f 7369 7a65 203d 2069 image.__size = i\n+00113e20: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } <\n+00113e40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    image.\n+00113e60: 7479 7065 203d 203c 7370 616e 2063 6c61 type = "image/j\n+00113e90: 7065 6726 7175 6f74 3b3c 2f73 7061 6e3e peg"\n+00113ea0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    ima\n+00113ec0: 6765 2e6f 7074 696f 6e73 203d 203c 6120 ge.options = s\n+00113f20: 6f61 705f 6469 6d65 5f6f 7074 696f 6e3c oap_dime_option<\n+00113f30: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n+00113f60: 736f 6170 3c2f 613e 2c20 302c 203c 7370 soap, 0, "M\n+00113f90: 7920 7069 6374 7572 6526 7175 6f74 3b3c y picture"<\n+00113fa0: 2f73 7061 6e3e 293b 203c 2f64 6976 3e0a /span>);
    .\n+00113fb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if\n+00113fe0: 3c2f 7370 616e 3e20 2873 6f61 705f 6361 (soap_ca\n+00113ff0: 6c6c 5f6e 735f 5f77 6562 6d65 7468 6f64 ll_ns__webmethod\n+00114000: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+00114030: 703c 2f61 3e2c 202e 2e2e 2929 3c2f 6469 p, ...)).
    ... // error
    .
    else
    .
    .\n+001140e0: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // succ\n+00114100: 6573 733c 2f73 7061 6e3e 3c2f 6469 763e ess
    \n+00114110: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . <\n+00114140: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..{<\n+00114370: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return handle;
    \n+001143c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . <\n+001143f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .
    {.
    fclose((\n+00114530: 4649 4c45 2a29 6861 6e64 6c65 293b 203c FILE*)handle); <\n+00114540: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    \n+00114560: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    size_t dime_read(<\n+001145c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001145d0: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n+00114640: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, v\n+00114660: 6f69 643c 2f73 7061 6e3e 202a 6861 6e64 oid *hand\n+00114670: 6c65 2c20 3c73 7061 6e20 636c 6173 733d le, ch\n+00114690: 6172 3c2f 7370 616e 3e20 2a62 7566 2c20 ar *buf, \n+001146a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t\n+001146c0: 3c2f 7370 616e 3e20 6c65 6e29 203c 2f64 len) .
    {
    .\n+00114700: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n+00114720: 726e 3c2f 7370 616e 3e20 6672 6561 6428 rn fread(\n+00114730: 6275 662c 2031 2c20 6c65 6e2c 2028 4649 buf, 1, len, (FI\n+00114740: 4c45 2a29 6861 6e64 6c65 293b 203c 2f64 LE*)handle); .
    }
    .
    \n+00114840: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    void *(* fdi\n+00114860: 6d65 7265 6164 6f70 656e 2928 7374 7275 mereadopen)(stru\n+00114870: 6374 2073 6f61 7020 2a73 6f61 702c 2076 ct soap *soap, v\n+00114880: 6f69 6420 2a68 616e 646c 652c 2063 6f6e oid *handle, con\n+00114890: 7374 2063 6861 7220 2a69 642c 2063 6f6e st char *id, con\n+001148a0: 7374 2063 6861 7220 2a74 7970 652c 2063 st char *type, c\n+001148b0: 6f6e 7374 2063 6861 7220 2a6f 7074 696f onst char *optio\n+001148c0: 6e73 293c 2f64 6976 3e3c 6469 7620 636c ns)
    Call\n+001148e0: 6261 636b 2074 6f20 6f70 656e 2061 2073 back to open a s\n+001148f0: 7472 6561 6d69 6e67 2044 494d 4520 6174 treaming DIME at\n+00114900: 7461 6368 6d65 6e74 2066 6f72 2072 6561 tachment for rea\n+00114910: 6469 6e67 2e3c 2f64 6976 3e3c 6469 7620 ding.
    Definition:\n+00114940: 2073 7464 736f 6170 322e 683a 3436 3934 stdsoap2.h:4694\n+00114950: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .\n+00114a30: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    void(* fdime\n+00114a50: 7265 6164 636c 6f73 6529 2873 7472 7563 readclose)(struc\n+00114a60: 7420 736f 6170 202a 736f 6170 2c20 766f t soap *soap, vo\n+00114a70: 6964 202a 6861 6e64 6c65 293c 2f64 6976 id *handle)
    Callback to \n+00114aa0: 636c 6f73 6520 6120 4449 4d45 2061 7474 close a DIME att\n+00114ab0: 6163 686d 656e 7420 7374 7265 616d 2061 achment stream a\n+00114ac0: 6674 6572 2072 6561 6469 6e67 2e3c 2f64 fter reading.
    Definit\n+00114af0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+00114b00: 322e 683a 3437 3339 3c2f 6469 763e 3c2f 2.h:4739
    .
    \n+00114b80: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap::\n+00114bd0: 6664 696d 6572 6561 643c 2f61 3e3c 2f64 fdimeread
    size_t(* \n+00114c00: 6664 696d 6572 6561 6429 2873 7472 7563 fdimeread)(struc\n+00114c10: 7420 736f 6170 202a 736f 6170 2c20 766f t soap *soap, vo\n+00114c20: 6964 202a 6861 6e64 6c65 2c20 6368 6172 id *handle, char\n+00114c30: 202a 6275 662c 2073 697a 655f 7420 6c65 *buf, size_t le\n+00114c40: 6e29 3c2f 6469 763e 3c64 6976 2063 6c61 n)
    Callb\n+00114c60: 6163 6b20 746f 2072 6561 6420 6461 7461 ack to read data\n+00114c70: 2069 6e20 6120 4449 4d45 2061 7474 6163 in a DIME attac\n+00114c80: 686d 656e 7420 7374 7265 616d 2e3c 2f64 hment stream.
    Definit\n+00114cb0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+00114cc0: 322e 683a 3437 3234 3c2f 6469 763e 3c2f 2.h:4724
    .
    soap_mallo\n+00114d90: 633c 2f61 3e3c 2f64 6976 3e3c 6469 7620 c
    v\n+00114db0: 6f69 6420 2a20 736f 6170 5f6d 616c 6c6f oid * soap_mallo\n+00114dc0: 6328 7374 7275 6374 2073 6f61 7020 2a73 c(struct soap *s\n+00114dd0: 6f61 702c 2073 697a 655f 7420 6c65 6e29 oap, size_t len)\n+00114de0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Allocat\n+00114e00: 6520 6120 626c 6f63 6b20 6f66 2068 6561 e a block of hea\n+00114e10: 7020 6d65 6d6f 7279 206d 616e 6167 6564 p memory managed\n+00114e20: 2062 7920 7468 6520 7370 6563 6966 6965 by the specifie\n+00114e30: 6420 736f 6170 2063 6f6e 7465 7874 2e3c d soap context.<\n+00114e40: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    The follow\n+00114e70: 696e 6720 6578 616d 706c 6520 696c 6c75 ing example illu\n+00114e80: 7374 7261 7465 7320 7468 6520 7374 7265 strates the stre\n+00114e90: 616d 696e 6720 6f66 2061 2044 494d 4520 aming of a DIME \n+00114ea0: 6174 7461 6368 6d65 6e74 2069 6e74 6f20 attachment into \n+00114eb0: 6120 6669 6c65 2062 7920 6120 636c 6965 a file by a clie\n+00114ec0: 6e74 3a3c 2f70 3e0a 3c64 6976 2063 6c61 nt:

    .
    \n+00114ef0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int main() .
    {
    . \n+00114f50: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct soap\n+00114fa0: 3c2f 613e 203c 6120 636c 6173 733d 2263 soap\n+00114fd0: 3c2f 613e 3b20 3c2f 6469 763e 0a3c 6469 ;
    . \n+00114ff0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_init<\n+00115050: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n+00115080: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); .
    soa\n+001150d0: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.fdi\n+00115130: 6d65 7772 6974 656f 7065 6e3c 2f61 3e20 mewriteopen \n+00115140: 3d20 6469 6d65 5f77 7269 7465 5f6f 7065 = dime_write_ope\n+00115150: 6e3b 203c 2f64 6976 3e0a 3c64 6976 2063 n;
    .
    soap.fdimewritec\n+00115200: 6c6f 7365 3c2f 613e 203d 2064 696d 655f lose = dime_\n+00115210: 7772 6974 655f 636c 6f73 653b 203c 2f64 write_close; .
    s\n+00115260: 6f61 703c 2f61 3e2e 3c61 2063 6c61 7373 oap.f\n+001152c0: 6469 6d65 7772 6974 653c 2f61 3e20 3d20 dimewrite = \n+001152d0: 6469 6d65 5f77 7269 7465 3b20 3c2f 6469 dime_write; .
    if (soap\n+00115320: 5f63 616c 6c5f 6e73 5f5f 7765 626d 6574 _call_ns__webmet\n+00115330: 686f 6428 2661 6d70 3b3c 6120 636c 6173 hod(&\n+00115360: 736f 6170 3c2f 613e 2c20 2e2e 2e29 293c soap, ...))<\n+00115370: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... \n+00115390: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // error
    . \n+001153d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 else
    . \n+00115410: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // s\n+00115430: 7563 6365 7373 3c2f 7370 616e 3e3c 2f64 uccess.
    }
    .<\n+00115460: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00115470: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    void\n+001154b0: 202a 6469 6d65 5f77 7269 7465 5f6f 7065 *dime_write_ope\n+001154c0: 6e28 3c73 7061 6e20 636c 6173 733d 226b n(struct soa\n+00115510: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+00115540: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, co\n+00115560: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n+00115590: 202a 3c73 7061 6e20 636c 6173 733d 226b *id, con\n+001155d0: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+00115600: 2a74 7970 652c 203c 7370 616e 2063 6c61 *type, con\n+00115620: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+00115650: 2a6f 7074 696f 6e73 2920 3c2f 6469 763e *options)
    \n+00115660: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    F\n+00115690: 494c 4520 2a68 616e 646c 6520 3d20 3c61 ILE *handle = fopen(<\n+00115700: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+00115710: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+00115720: 3b73 6f6d 6566 696c 6526 7175 6f74 3b3c ;somefile"<\n+00115730: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, "wb&quo\n+00115760: 743b 3c2f 7370 616e 3e29 3b20 3c2f 6469 t;); .
    if (!han\n+001157b0: 646c 6529 203c 2f64 6976 3e0a 3c64 6976 dle)
    . \n+001157d0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    ..\n+001158e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soa\n+00115920: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->errnum = \n+00115980: 6572 726e 6f3b 203c 7370 616e 2063 6c61 errno; // \n+001159a0: 6765 7420 7265 6173 6f6e 203c 2f73 7061 get reason
    .
    } <\n+001159d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return (voi\n+00115a30: 643c 2f73 7061 6e3e 2a29 6861 6e64 6c65 d*)handle\n+00115a40: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } .
    .\n+00115a90: 3c73 7061 6e20 636c 6173 733d 226b 6579 void dime_write\n+00115ac0: 5f63 6c6f 7365 283c 7370 616e 2063 6c61 _close(str\n+00115ae0: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, void *handle) .
    {
    . \n+00115bb0: 203c 6120 636c 6173 733d 2263 6f64 6522 fclose((FILE*)handle\n+00115c20: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    } .
    .<\n+00115c60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00115c70: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int dime_write\n+00115ca0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct
    soap\n+00115cf0: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+00115d20: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, void *ha\n+00115d50: 6e64 6c65 2c20 3c73 7061 6e20 636c 6173 ndle, cons\n+00115d70: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+00115da0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 buf\n+00115df0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , size\n+00115e10: 5f74 3c2f 7370 616e 3e20 6c65 6e29 203c _t len) <\n+00115e20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n+00115e40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    si\n+00115e70: 7a65 5f74 3c2f 7370 616e 3e20 6e77 7269 ze_t nwri\n+00115e80: 7474 656e 3b20 3c2f 6469 763e 0a3c 6469 tten;
    . \n+00115ea0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 while\n+00115ec0: 3c2f 7370 616e 3e20 286c 656e 2920 3c2f (len) .
    {
    \n+00115ef0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    nwritten \n+00115f10: 3d20 6677 7269 7465 283c 6120 636c 6173 = fwrite(buf, 1, le\n+00115f70: 6e2c 2028 4649 4c45 2a29 6861 6e64 6c65 n, (FILE*)handle\n+00115f80: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    \n+00115fa0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (!nwritten) \n+00115fd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    soap->\n+00116040: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;errnum\n+00116090: 3c2f 613e 203d 2065 7272 6e6f 3b20 3c73 = errno; // get reaso\n+001160c0: 6e20 3c2f 7370 616e 3e3c 2f64 6976 3e0a n
    .\n+001160d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    return \n+00116110: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_EOF\n+00116170: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    }\n+00116190: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    le\n+001161b0: 6e20 2d3d 206e 7772 6974 7465 6e3b 203c n -= nwritten; <\n+001161c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    buf += \n+00116230: 6e77 7269 7474 656e 3b20 3c2f 6469 763e nwritten;
    \n+00116240: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n+00116270: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n+00116290: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn SO\n+001162f0: 4150 5f4f 4b3c 2f61 3e3b 203c 2f64 6976 AP_OK; .
    }
    .
    i\n+00116400: 6e74 282a 2066 6469 6d65 7772 6974 6529 nt(* fdimewrite)\n+00116410: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+00116420: 6170 2c20 766f 6964 202a 2c20 636f 6e73 ap, void *, cons\n+00116430: 7420 6368 6172 202a 2c20 7369 7a65 5f74 t char *, size_t\n+00116440: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Callba\n+00116460: 636b 2074 6f20 7772 6974 6520 6461 7461 ck to write data\n+00116470: 2069 6e20 6120 4449 4d45 2061 7474 6163 in a DIME attac\n+00116480: 686d 656e 7420 7374 7265 616d 2e3c 2f64 hment stream.
    Definit\n+001164b0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+001164c0: 322e 683a 3438 3232 3c2f 6469 763e 3c2f 2.h:4822
    .\n+00116660: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:48\n+00116680: 3333 3c2f 6469 763e 3c2f 6469 763e 0a3c 33
    .<\n+00116690: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+001166a0: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n+001166b0: 705f 5f63 616c 6c62 6163 6b73 5f68 746d p__callbacks_htm\n+001166c0: 6c5f 6761 3362 3165 3461 6130 3436 6236 l_ga3b1e4aa046b6\n+001166d0: 3833 3533 3531 3130 6133 3466 6334 3661 83535110a34fc46a\n+001166e0: 6231 6562 223e 3c64 6976 2063 6c61 7373 b1eb\">
    soap::fdimew\n+00116750: 7269 7465 6f70 656e 3c2f 613e 3c2f 6469 riteopen
    void *(* f\n+00116780: 6469 6d65 7772 6974 656f 7065 6e29 2873 dimewriteopen)(s\n+00116790: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+001167a0: 2c20 636f 6e73 7420 6368 6172 202a 6964 , const char *id\n+001167b0: 2c20 636f 6e73 7420 6368 6172 202a 7479 , const char *ty\n+001167c0: 7065 2c20 636f 6e73 7420 6368 6172 202a pe, const char *\n+001167d0: 6f70 7469 6f6e 7329 3c2f 6469 763e 3c64 options)
    Callback to ope\n+00116800: 6e20 6120 7374 7265 616d 696e 6720 4449 n a streaming DI\n+00116810: 4d45 2061 7474 6163 686d 656e 7420 666f ME attachment fo\n+00116820: 7220 7772 6974 696e 672e 3c2f 6469 763e r writing.
    \n+00116830: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n+00116850: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n+00116860: 3a34 3831 303c 2f64 6976 3e3c 2f64 6976 :4810
    .
    \n+00116950: 534f 4150 5f53 4f43 4b45 5428 2a20 666f SOAP_SOCKET(* fo\n+00116960: 7065 6e29 2873 7472 7563 7420 736f 6170 pen)(struct soap\n+00116970: 202a 736f 6170 2c20 636f 6e73 7420 6368 *soap, const ch\n+00116980: 6172 202a 656e 6470 6f69 6e74 2c20 636f ar *endpoint, co\n+00116990: 6e73 7420 6368 6172 202a 686f 7374 2c20 nst char *host, \n+001169a0: 696e 7420 706f 7274 293c 2f64 6976 3e3c int port)
    <\n+001169b0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+001169c0: 223e 4361 6c6c 6261 636b 2074 6861 7420 \">Callback that \n+001169d0: 6f70 656e 7320 6120 736f 636b 6574 2063 opens a socket c\n+001169e0: 6f6e 6e65 6374 696f 6e20 746f 2061 2073 onnection to a s\n+001169f0: 6572 7665 7220 656e 6470 6f69 6e74 2e3c erver endpoint.<\n+00116a00: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+00116a20: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+00116a30: 6170 322e 683a 3434 3935 3c2f 6469 763e ap2.h:4495
    \n+00116a40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap\n+00116b00: 3a3a 6663 6c6f 7365 3c2f 613e 3c2f 6469 ::fclose
    int(* fclo\n+00116b30: 7365 2928 7374 7275 6374 2073 6f61 7020 se)(struct soap \n+00116b40: 2a73 6f61 7029 3c2f 6469 763e 3c64 6976 *soap)
    C\n+00116b60: 616c 6c62 6163 6b20 7468 6174 2063 6c6f allback that clo\n+00116b70: 7365 7320 7468 6520 6375 7272 656e 7420 ses the current \n+00116b80: 736f 636b 6574 2063 6f6e 6e65 6374 696f socket connectio\n+00116b90: 6e2e 3c2f 6469 763e 3c64 6976 2063 6c61 n.
    De\n+00116bb0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n+00116bc0: 6473 6f61 7032 2e68 3a34 3532 303c 2f64 dsoap2.h:4520
    .
    #\n+00116cb0: 6465 6669 6e65 2053 4f41 505f 454f 463c define SOAP_EOF<\n+00116cc0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    A soap_s\n+00116ce0: 7461 7475 7320 6572 726f 7220 636f 6465 tatus error code\n+00116cf0: 3a20 756e 6578 7065 6374 6564 2065 6e64 : unexpected end\n+00116d00: 206f 6620 6669 6c65 2c20 6e6f 2069 6e70 of file, no inp\n+00116d10: 7574 2c20 7472 616e 736d 6973 7369 6f6e ut, transmission\n+00116d20: 2069 6e74 6572 7275 7074 6564 206f 7220 interrupted or \n+00116d30: 7469 6d65 6420 6f75 7420 2873 612e 2e2e timed out (sa...\n+00116d40: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n+00116d60: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n+00116d70: 6f61 7032 2e68 3a32 3336 353c 2f64 6976 oap2.h:2365
    .
    <\n+00116da0: 703e 4d65 7373 6167 6520 636f 6d70 7265 p>Message compre\n+00116db0: 7373 696f 6e20 7769 7468 203c 636f 6465 ssion with #SOAP_ENC_ZLIB<\n+00116dd0: 2f63 6f64 653e 2063 616e 2062 6520 7573 /code> can be us\n+00116de0: 6564 2077 6974 6820 4449 4d45 2074 6f20 ed with DIME to \n+00116df0: 636f 6d70 7265 7373 2074 6865 2065 6e74 compress the ent\n+00116e00: 6972 6520 6d65 7373 6167 652e 2048 6f77 ire message. How\n+00116e10: 6576 6572 2c20 636f 6d70 7265 7373 696f ever, compressio\n+00116e20: 6e20 7265 7175 6972 6573 2062 7566 6665 n requires buffe\n+00116e30: 7269 6e67 2074 6f20 6465 7465 726d 696e ring to determin\n+00116e40: 6520 7468 6520 4854 5450 2063 6f6e 7465 e the HTTP conte\n+00116e50: 6e74 206c 656e 6774 6820 6865 6164 6572 nt length header\n+00116e60: 2c20 7768 6963 6820 6361 6e63 656c 7320 , which cancels \n+00116e70: 7468 6520 6265 6e65 6669 7473 206f 6620 the benefits of \n+00116e80: 7374 7265 616d 696e 6720 4449 4d45 2e20 streaming DIME. \n+00116e90: 546f 2061 766f 6964 2074 6869 732c 2079 To avoid this, y\n+00116ea0: 6f75 2073 686f 756c 6420 7573 6520 6368 ou should use ch\n+00116eb0: 756e 6b65 6420 4854 5450 2028 7769 7468 unked HTTP (with\n+00116ec0: 2074 6865 206f 7574 7075 742d 6d6f 6465 the output-mode\n+00116ed0: 203c 636f 6465 3e23 534f 4150 5f49 4f5f #SOAP_IO_\n+00116ee0: 4348 554e 4b3c 2f63 6f64 653e 2066 6c61 CHUNK fla\n+00116ef0: 6729 2077 6974 6820 636f 6d70 7265 7373 g) with compress\n+00116f00: 696f 6e20 616e 6420 7374 7265 616d 696e ion and streamin\n+00116f10: 6720 4449 4d45 2e20 4174 2074 6865 2073 g DIME. At the s\n+00116f20: 6572 7665 7220 7369 6465 2c20 7768 656e erver side, when\n+00116f30: 2079 6f75 2073 6574 203c 636f 6465 3e23 you set #\n+00116f40: 534f 4150 5f49 4f5f 4348 554e 4b3c 2f63 SOAP_IO_CHUNK before call\n+00116f60: 696e 6720 3c63 6f64 653e 3c61 2063 6c61 ing soap_se\n+00116fe0: 7276 653c 2f61 3e3c 2f63 6f64 653e 2c20 rve, \n+00116ff0: 7468 6520 656e 6769 6e65 2077 696c 6c20 the engine will \n+00117000: 6175 746f 6d61 7469 6361 6c6c 7920 7265 automatically re\n+00117010: 7665 7274 2074 6f20 6275 6666 6572 696e vert to bufferin\n+00117020: 6720 283c 636f 6465 3e23 534f 4150 5f49 g (#SOAP_I\n+00117030: 4f5f 5354 4f52 453c 2f63 6f64 653e 2066 O_STORE f\n+00117040: 6c61 6720 6973 2073 6574 292e 2059 6f75 lag is set). You\n+00117050: 2063 616e 2063 6865 636b 2074 6869 7320 can check this \n+00117060: 666c 6167 2077 6974 6820 3c63 6f64 653e flag with \n+00117070: 2873 6f61 702d 2667 743b 6f6d 6f64 6520 (soap->omode \n+00117080: 2661 6d70 3b20 534f 4150 5f49 4f29 203d & SOAP_IO) =\n+00117090: 3d20 534f 4150 5f49 4f5f 4348 554e 4b3c = SOAP_IO_CHUNK<\n+001170a0: 2f63 6f64 653e 2074 6f20 7365 6520 6966 /code> to see if\n+001170b0: 2074 6865 2063 6c69 656e 7420 6163 6365 the client acce\n+001170c0: 7074 7320 6368 756e 6b69 6e67 2e20 4d6f pts chunking. Mo\n+001170d0: 7265 2069 6e66 6f72 6d61 7469 6f6e 2061 re information a\n+001170e0: 626f 7574 2073 7472 6561 6d69 6e67 2063 bout streaming c\n+001170f0: 6875 6e6b 6564 2044 494d 4520 6361 6e20 hunked DIME can \n+00117100: 6265 2066 6f75 6e64 2069 6e20 5365 6374 be found in Sect\n+00117110: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion Streaming chunk\n+00117150: 6564 2044 494d 453c 2f61 3e20 2e3c 2f70 ed DIME ..
    WarningThe opti\n+001171a0: 6f6e 733c 2f63 6f64 653e 206d 656d 6265 ons membe\n+001171b0: 7220 6973 2061 2044 494d 452d 7370 6563 r is a DIME-spec\n+001171c0: 6966 6963 2064 6174 6120 7374 7275 6374 ific data struct\n+001171d0: 7572 652c 2063 6f6e 7369 7374 696e 6720 ure, consisting \n+001171e0: 6f66 2061 2034 2062 7974 6520 6865 6164 of a 4 byte head\n+001171f0: 6572 2063 6f6e 7461 696e 696e 6720 7468 er containing th\n+00117200: 6520 6f70 7469 6f6e 2074 7970 6520 696e e option type in\n+00117210: 666f 2028 6869 2062 7974 652c 206c 6f20 fo (hi byte, lo \n+00117220: 6279 7465 292c 206f 7074 696f 6e20 7374 byte), option st\n+00117230: 7269 6e67 206c 656e 6774 6820 2868 6920 ring length (hi \n+00117240: 6279 7465 2c20 6c6f 2062 7974 6529 2c20 byte, lo byte), \n+00117250: 666f 6c6c 6f77 6564 2062 7920 6120 6e6f followed by a no\n+00117260: 6e2d 275c 3027 2074 6572 6d69 6e61 7465 n-'\\0' terminate\n+00117270: 6420 7374 7269 6e67 2e20 5468 6520 4449 d string. The DI\n+00117280: 4d45 2068 616e 646c 6572 2072 6563 6f67 ME handler recog\n+00117290: 6e69 7a65 7320 6f6e 6520 6f70 7469 6f6e nizes one option\n+001172a0: 2061 7420 6d6f 7374 2e3c 2f64 643e 3c2f at most..

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

    .

    .Streaming\n+00117320: 2063 6875 6e6b 6564 2044 494d 453c 2f68 chunked DIME.

    To send DI\n+00117340: 4d45 2061 7474 6163 686d 656e 7473 2c20 ME attachments, \n+00117350: 7468 6520 6174 7461 6368 6d65 6e74 2073 the attachment s\n+00117360: 697a 6573 206d 7573 7420 6265 2064 6574 izes must be det\n+00117370: 6572 6d69 6e65 6420 696e 2061 6476 616e ermined in advan\n+00117380: 6365 2074 6f20 6361 6c63 756c 6174 6520 ce to calculate \n+00117390: 4854 5450 206d 6573 7361 6765 206c 656e HTTP message len\n+001173a0: 6774 6820 7265 7175 6972 6564 2074 6f20 gth required to \n+001173b0: 7374 7265 616d 2044 494d 4520 6f76 6572 stream DIME over\n+001173c0: 2048 5454 502e 2048 6f77 6576 6572 2c20 HTTP. However, \n+001173d0: 6368 756e 6b65 6420 4449 4d45 2074 6f67 chunked DIME tog\n+001173e0: 6574 6865 7220 7769 7468 2063 6875 6e6b ether with chunk\n+001173f0: 6564 2048 5454 5020 6361 6e20 6265 2075 ed HTTP can be u\n+00117400: 7365 6420 746f 206f 6d69 7420 7468 6973 sed to omit this\n+00117410: 2073 7465 702e 2046 6972 7374 2073 6574 step. First set\n+00117420: 2074 6865 203c 636f 6465 3e23 534f 4150 the #SOAP\n+00117430: 5f49 4f5f 4348 554e 4b3c 2f63 6f64 653e _IO_CHUNK\n+00117440: 2066 6c61 672e 2054 6865 6e2c 2074 6f20 flag. Then, to \n+00117450: 7374 7265 616d 2063 6875 6e6b 6564 2044 stream chunked D\n+00117460: 494d 452c 2073 6574 2074 6865 203c 636f IME, set the __size\n+00117480: 206d 656d 6265 7220 6f66 2061 6e20 6174 member of an at\n+00117490: 7461 6368 6d65 6e74 2074 6f20 7a65 726f tachment to zero\n+001174a0: 2061 6e64 2065 6e61 626c 6520 4449 4d45 and enable DIME\n+001174b0: 2063 6875 6e6b 696e 672e 2054 6865 2044 chunking. The D\n+001174c0: 494d 4520 3c63 6f64 653e 3c61 2063 6c61 IME soap::\n+00117560: 6664 696d 6572 6561 643c 2f61 3e3c 2f63 fdimeread callback th\n+00117580: 656e 2066 6574 6368 6573 2064 6174 6120 en fetches data \n+00117590: 696e 2063 6875 6e6b 7320 616e 6420 6974 in chunks and it\n+001175a0: 2069 7320 696d 706f 7274 616e 7420 746f is important to\n+001175b0: 2066 696c 6c20 7468 6520 656e 7469 7265 fill the entire\n+001175c0: 2062 7566 6665 7220 756e 6c65 7373 2074 buffer unless t\n+001175d0: 6865 2065 6e64 206f 6620 7468 6520 6461 he end of the da\n+001175e0: 7461 2068 6173 2062 6565 6e20 7265 6163 ta has been reac\n+001175f0: 6865 6420 616e 6420 7468 6520 6c61 7374 hed and the last\n+00117600: 2063 6875 6e6b 2069 7320 746f 2062 6520 chunk is to be \n+00117610: 7365 6e64 2e20 5468 6174 2069 732c 203c send. That is, <\n+00117620: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::fdime\n+001176c0: 7265 6164 3c2f 613e 3c2f 636f 6465 3e20 read \n+001176d0: 7368 6f75 6c64 2072 6574 7572 6e20 7468 should return th\n+001176e0: 6520 7661 6c75 6520 6f66 2074 6865 206c e value of the l\n+001176f0: 6173 7420 3c63 6f64 653e 6c65 6e3c 2f63 ast len parameter a\n+00117710: 6e64 2066 696c 6c20 7468 6520 656e 7469 nd fill the enti\n+00117720: 7265 2062 7566 6665 7220 3c63 6f64 653e re buffer \n+00117730: 6275 663c 2f63 6f64 653e 2066 6f72 2061 buf for a\n+00117740: 6c6c 2063 6875 6e6b 7320 6578 6365 7074 ll chunks except\n+00117750: 2074 6865 206c 6173 742e 2046 6f72 2074 the last. For t\n+00117760: 6865 206c 6173 7420 6974 2072 6574 7572 he last it retur\n+00117770: 6e73 2030 2e3c 2f70 3e0a 3c70 3e59 6f75 ns 0.

    .

    You\n+00117780: 2063 616e 2061 6c73 6f20 7573 6520 7468 can also use th\n+00117790: 6520 3c63 6f64 653e 2353 4f41 505f 494f e #SOAP_IO\n+001177a0: 5f53 544f 5245 3c2f 636f 6465 3e20 666c _STORE fl\n+001177b0: 6167 2c20 6275 7420 7468 6174 2063 616e ag, but that can\n+001177c0: 6365 6c73 2074 6865 2062 656e 6566 6974 cels the benefit\n+001177d0: 7320 6f66 2073 7472 6561 6d69 6e67 2044 s of streaming D\n+001177e0: 494d 452e 3c2f 703e 0a3c 703e f09f 949d IME.

    .

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

    .<\n+00117820: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.WSDL bin\n+00117850: 6469 6e67 7320 666f 7220 4449 4d45 2061 dings for DIME a\n+00117860: 7474 6163 686d 656e 7473 3c2f 6832 3e0a ttachments

    .\n+00117870: 3c70 3e54 6865 2077 7364 6c32 6820 746f

    The wsdl2h to\n+00117880: 6f6c 2072 6563 6f67 6e69 7a65 7320 4449 ol recognizes DI\n+00117890: 4d45 2061 7474 6163 686d 656e 7473 2061 ME attachments a\n+001178a0: 6e64 2070 726f 6475 6365 7320 616e 2061 nd produces an a\n+001178b0: 6e6e 6f74 6174 6564 2068 6561 6465 7220 nnotated header \n+001178c0: 6669 6c65 2e20 426f 7468 206f 7065 6e20 file. Both open \n+001178d0: 616e 6420 636c 6f73 6564 206c 6179 6f75 and closed layou\n+001178e0: 7473 2061 7265 2073 7570 706f 7274 6564 ts are supported\n+001178f0: 2066 6f72 2074 7261 6e73 6d69 7474 696e for transmittin\n+00117900: 6720 4449 4d45 2061 7474 6163 686d 656e g DIME attachmen\n+00117910: 7473 2e20 466f 7220 636c 6f73 6564 2066 ts. For closed f\n+00117920: 6f72 6d61 7473 2c20 616c 6c20 4449 4d45 ormats, all DIME\n+00117930: 2061 7474 6163 686d 656e 7473 206d 7573 attachments mus\n+00117940: 7420 6265 2072 6566 6572 656e 6365 6420 t be referenced \n+00117950: 6672 6f6d 2074 6865 2053 4f41 5020 6d65 from the SOAP me\n+00117960: 7373 6167 652c 2065 2e67 2e20 7573 696e ssage, e.g. usin\n+00117970: 6720 6872 6566 7320 7769 7468 2053 4f41 g hrefs with SOA\n+00117980: 5020 656e 636f 6469 6e67 2061 6e64 2075 P encoding and u\n+00117990: 7369 6e67 2074 6865 2061 7070 6c69 6361 sing the applica\n+001179a0: 7469 6f6e 2d73 7065 6369 6669 6320 7265 tion-specific re\n+001179b0: 6665 7265 6e63 6520 6174 7472 6962 7574 ference attribut\n+001179c0: 6520 696e 636c 7564 6564 2069 6e20 7468 e included in th\n+001179d0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e xsd__base6\n+00117a50: 3442 696e 6172 793c 2f61 3e3c 2f63 6f64 4Binary struct or cla\n+00117a70: 7373 2066 6f72 2064 6f63 756d 656e 742f ss for document/\n+00117a80: 6c69 7465 7261 6c20 6d65 7373 6167 696e literal messagin\n+00117a90: 672e 3c2f 703e 0a3c 703e 5468 6520 736f g.

    .

    The so\n+00117aa0: 6170 6370 7032 2074 6f6f 6c20 646f 6573 apcpp2 tool does\n+00117ab0: 206e 6f74 2070 726f 6475 6365 2061 2057 not produce a W\n+00117ac0: 5344 4c20 7769 7468 2044 494d 4520 6578 SDL with DIME ex\n+00117ad0: 7465 6e73 696f 6e73 2e20 4449 4d45 2069 tensions. DIME i\n+00117ae0: 7320 616e 206f 6c64 6572 2062 696e 6172 s an older binar\n+00117af0: 7920 666f 726d 6174 2074 6861 7420 6861 y format that ha\n+00117b00: 7320 6e6f 2057 5344 4c20 7072 6f74 6f63 s no WSDL protoc\n+00117b10: 6f6c 2073 7570 706f 7274 2c20 756e 6c69 ol support, unli\n+00117b20: 6b65 204d 494d 4520 616e 6420 4d54 4f4d ke MIME and MTOM\n+00117b30: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

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

    .

    \n+00117b70: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 \n+00117b90: 0a4d 544f 4d20 6174 7461 6368 6d65 6e74 .MTOM attachment\n+00117ba0: 733c 2f68 313e 0a3c 703e 4d54 4f4d 2028 s

    .

    MTOM (\n+00117bb0: 4d65 7373 6167 6520 5472 616e 736d 6973 Message Transmis\n+00117bc0: 7369 6f6e 204f 7074 696d 697a 6174 696f sion Optimizatio\n+00117bd0: 6e20 4d65 6368 616e 6973 6d29 2069 7320 n Mechanism) is \n+00117be0: 6120 7265 6c61 7469 7665 6c79 206e 6577 a relatively new\n+00117bf0: 2066 6f72 6d61 7420 666f 7220 7472 616e format for tran\n+00117c00: 736d 6974 7469 6e67 2061 7474 6163 686d smitting attachm\n+00117c10: 656e 7473 2077 6974 6820 534f 4150 206d ents with SOAP m\n+00117c20: 6573 7361 6765 7320 2873 6565 203c 6120 essages (see http://w\n+00117c60: 7777 2e77 332e 6f72 672f 5452 2f73 6f61 ww.w3.org/TR/soa\n+00117c70: 7031 322d 6d74 6f6d 3c2f 613e 292e 204d p12-mtom). M\n+00117c80: 544f 4d20 6174 7461 6368 6d65 6e74 7320 TOM attachments \n+00117c90: 6172 6520 6573 7365 6e74 6961 6c6c 7920 are essentially \n+00117ca0: 4d49 4d45 2061 7474 6163 686d 656e 7473 MIME attachments\n+00117cb0: 2077 6974 6820 7374 616e 6461 7264 697a with standardiz\n+00117cc0: 6564 206d 6563 6861 6e69 736d 7320 666f ed mechanisms fo\n+00117cd0: 7220 6372 6f73 7320 7265 6665 7265 6e63 r cross referenc\n+00117ce0: 696e 6720 6174 7461 6368 6d65 6e74 7320 ing attachments \n+00117cf0: 6672 6f6d 2074 6865 2053 4f41 5020 626f from the SOAP bo\n+00117d00: 6479 2c20 7768 6963 6820 6973 2061 6273 dy, which is abs\n+00117d10: 656e 7420 696e 2028 706c 6169 6e29 204d ent in (plain) M\n+00117d20: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments \n+00117d30: 616e 6420 6f70 7469 6f6e 616c 2077 6974 and optional wit\n+00117d40: 6820 4449 4d45 2061 7474 6163 686d 656e h DIME attachmen\n+00117d50: 7473 2e3c 2f70 3e0a 3c70 3e55 6e6c 696b ts.

    .

    Unlik\n+00117d60: 6520 7468 6520 6e61 6d65 2073 7567 6765 e the name sugge\n+00117d70: 7374 732c 2074 6865 2073 7065 6564 2062 sts, the speed b\n+00117d80: 7920 7768 6963 6820 6174 7461 6368 6564 y which attached\n+00117d90: 2064 6174 6120 6973 2074 7261 6e73 6d69 data is transmi\n+00117da0: 7474 6564 2069 7320 6e6f 7420 696e 6372 tted is not incr\n+00117db0: 6561 7365 6420 636f 6d70 6172 6564 2074 eased compared t\n+00117dc0: 6f20 4d49 4d45 2c20 4449 4d45 2c20 6f72 o MIME, DIME, or\n+00117dd0: 2065 7665 6e20 584d 4c20 656e 636f 6465 even XML encode\n+00117de0: 6420 6261 7365 3634 2064 6174 612c 2062 d base64 data, b\n+00117df0: 6563 6175 7365 2074 6865 2070 6572 666f ecause the perfo\n+00117e00: 726d 616e 6365 2064 6966 6665 7265 6e63 rmance differenc\n+00117e10: 6573 2077 6865 6e20 7573 696e 6720 6753 es when using gS\n+00117e20: 4f41 5020 7769 6c6c 2062 6520 736d 616c OAP will be smal\n+00117e30: 6c2e 2054 6865 2061 6476 616e 7461 6765 l. The advantage\n+00117e40: 206f 6620 7468 6520 666f 726d 6174 2069 of the format i\n+00117e50: 7320 7468 6520 7374 616e 6461 7264 697a s the standardiz\n+00117e60: 6564 2061 7474 6163 686d 656e 7420 7265 ed attachment re\n+00117e70: 6665 7265 6e63 6520 6d65 6368 616e 6973 ference mechanis\n+00117e80: 6d2c 2077 6869 6368 2073 686f 756c 6420 m, which should \n+00117e90: 696d 7072 6f76 6520 696e 7465 726f 7065 improve interope\n+00117ea0: 7261 6269 6c69 7479 2e3c 2f70 3e0a 3c70 rability.

    .The MTOM specif\n+00117ec0: 6963 6174 696f 6e20 6d61 6e64 6174 6573 ication mandates\n+00117ed0: 2053 4f41 5020 312e 3220 616e 6420 7468 SOAP 1.2 and th\n+00117ee0: 6520 7573 6520 6f66 2074 6865 2058 4f50 e use of the XOP\n+00117ef0: 206e 616d 6573 7061 6365 2e20 5468 6520 namespace. The \n+00117f00: 584f 5020 496e 636c 7564 6520 656c 656d XOP Include elem\n+00117f10: 656e 7420 3c65 6d3e 3c63 6f64 653e 786f ent xo\n+00117f20: 703a 496e 636c 7564 653c 2f63 6f64 653e p:Include\n+00117f30: 3c2f 656d 3e20 6973 2064 6566 696e 6564 is defined\n+00117f40: 2069 6e20 7468 6520 696e 7465 7266 6163 in the interfac\n+00117f50: 6520 6865 6164 6572 2066 696c 6520 6173 e header file as\n+00117f60: 2061 203c 636f 6465 3e3c 6120 636c 6173 a _\n+00117fd0: 786f 705f 5f49 6e63 6c75 6465 3c2f 613e xop__Include\n+00117fe0: 3c2f 636f 6465 3e20 7374 7275 6374 206f struct o\n+00117ff0: 7220 636c 6173 732c 2074 6861 7420 6973 r class, that is\n+00118000: 2075 7365 6420 746f 2072 6566 6572 656e used to referen\n+00118010: 6365 2061 7474 6163 686d 656e 7428 7329 ce attachment(s)\n+00118020: 2066 726f 6d20 7468 6520 534f 4150 206d from the SOAP m\n+00118030: 6573 7361 6765 2062 6f64 792e 3c2f 703e essage body.

    \n+00118040: 0a3c 703e 4265 6361 7573 6520 7265 6665 .

    Because refe\n+00118050: 7265 6e63 6573 2066 726f 6d20 7769 7468 rences from with\n+00118060: 696e 2074 6865 2053 4f41 5020 6d65 7373 in the SOAP mess\n+00118070: 6167 6520 626f 6479 2074 6f20 6174 7461 age body to atta\n+00118080: 6368 6d65 6e74 7320 6172 6520 6d61 6e64 chments are mand\n+00118090: 6174 6f72 7920 7769 7468 204d 544f 4d2c atory with MTOM,\n+001180a0: 2074 6865 2069 6d70 6c65 6d65 6e74 6174 the implementat\n+001180b0: 696f 6e20 6f66 2074 6865 2073 6572 6961 ion of the seria\n+001180c0: 6c69 7a61 7469 6f6e 2061 6e64 2064 6573 lization and des\n+001180d0: 6572 6961 6c69 7a61 7469 6f6e 206f 6620 erialization of \n+001180e0: 4d54 4f4d 204d 494d 4520 6174 7461 6368 MTOM MIME attach\n+001180f0: 6d65 6e74 7320 7573 6573 2074 6865 2065 ments uses the e\n+00118100: 7874 656e 6465 6420 6269 6e61 7279 2074 xtended binary t\n+00118110: 7970 6520 636f 6d70 6172 6162 6c65 2074 ype comparable t\n+00118120: 6f20 4449 4d45 2073 7570 706f 7274 2e20 o DIME support. \n+00118130: 5468 6973 2062 696e 6172 7920 7479 7065 This binary type\n+00118140: 2069 7320 7072 6564 6566 696e 6564 2069 is predefined i\n+00118150: 6e20 7468 6520 3c65 6d3e 3c63 6f64 653e n the \n+00118160: 696d 706f 7274 2f78 6f70 2e68 3c2f 636f import/xop.h file:.

    //gsoap xop sch\n+001181d0: 656d 6120 696d 706f 7274 3a20 6874 7470 ema import: http\n+001181e0: 3a2f 2f77 7777 2e77 332e 6f72 672f 3230 ://www.w3.org/20\n+001181f0: 3034 2f30 382f 786f 702f 696e 636c 7564 04/08/xop/includ\n+00118200: 6520 3c2f 7370 616e 3e3c 2f64 6976 3e0a e
    .\n+00118210: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n+00118240: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>_xop__\n+00118280: 496e 636c 7564 653c 2f61 3e20 3c2f 6469 Include .
    {
    . \n+001182c0: 2020 203c 7370 616e 2063 6c61 7373 3d22 uns\n+001182e0: 6967 6e65 643c 2f73 7061 6e3e 203c 7370 igned char *__ptr<\n+00118370: 2f61 3e3b 203c 2f64 6976 3e0a 3c64 6976 /a>;
    . \n+00118390: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n+001183b0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> __s\n+00118410: 697a 653c 2f61 3e3b 203c 2f64 6976 3e0a ize;
    .\n+00118420: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+00118450: 6368 6172 3c2f 7370 616e 3e20 2a3c 6120 char *id; .
    char *<\n+00118500: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00118510: 7265 663d 2273 7472 7563 745f 5f78 6f70 ref=\"struct__xop\n+00118520: 5f5f 5f5f 5f69 6e63 6c75 6465 2e68 746d _____include.htm\n+00118530: 6c23 6130 6437 3061 6630 6432 6331 3233 l#a0d70af0d2c123\n+00118540: 3736 3663 6531 3838 6366 3264 6431 3538 766ce188cf2dd158\n+00118550: 3333 6122 3e74 7970 653c 2f61 3e3b 203c 33a\">type; <\n+00118560: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..}\n+00118620: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    typedef \n+00118660: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct _xop__In\n+001186c0: 636c 7564 653c 2f61 3e20 3c61 2063 6c61 clude _x\n+00118700: 6f70 5f5f 496e 636c 7564 653c 2f61 3e3b op__Include;\n+00118710: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n+00118760: 6120 6872 6566 3d22 7374 7275 6374 5f5f a href=\"struct__\n+00118770: 786f 705f 5f5f 5f5f 696e 636c 7564 652e xop_____include.\n+00118780: 6874 6d6c 223e 5f78 6f70 5f5f 496e 636c html\">_xop__Incl\n+00118790: 7564 653c 2f61 3e3c 2f64 6976 3e3c 6469 ude
    \n+001187b0: 584f 5020 696e 636c 7564 6520 7374 7275 XOP include stru\n+001187c0: 6374 7572 6520 7769 7468 2061 7474 6163 cture with attac\n+001187d0: 686d 656e 7420 6461 7461 2e3c 2f64 6976 hment data.
    Definitio\n+00118800: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+00118810: 683a 3938 3833 3c2f 6469 763e 3c2f 6469 h:9883
    .
    _xop__Incl\n+001188e0: 7564 653a 3a74 7970 653c 2f61 3e3c 2f64 ude::type
    char * ty\n+00118910: 7065 3c2f 6469 763e 3c64 6976 2063 6c61 pe
    MIME \n+00118930: 7479 7065 206f 6620 7468 6520 6461 7461 type of the data\n+00118940: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def\n+00118960: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n+00118970: 736f 6170 322e 683a 3938 3837 3c2f 6469 soap2.h:9887
    .
    <\n+001189e0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+001189f0: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">_xop\n+00118a40: 5f5f 496e 636c 7564 653a 3a69 643c 2f61 __Include::id
    .\n+00118c00: 6368 6172 202a 206f 7074 696f 6e73 3c2f char * options
    descripti\n+00118c30: 6f6e 206f 6620 7468 6520 4d49 4d45 2f4d on of the MIME/M\n+00118c40: 544f 4d20 6174 7461 6368 6d65 6e74 206f TOM attachment o\n+00118c50: 7220 4e55 4c4c 3c2f 6469 763e 3c64 6976 r NULL
    <\n+00118c70: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:988\n+00118c90: 383c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 8
    .\n+00118d70: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    int __sizeThe additional \n+00118fa0: 3c63 6f64 653e 6964 3c2f 636f 6465 3e2c id,\n+00118fb0: 203c 636f 6465 3e74 7970 653c 2f63 6f64 type, and op\n+00118fd0: 7469 6f6e 3c2f 636f 6465 3e20 6d65 6d62 tion memb\n+00118fe0: 6572 7320 656e 6162 6c65 204d 544f 4d20 ers enable MTOM \n+00118ff0: 6174 7461 6368 6d65 6e74 7320 666f 7220 attachments for \n+00119000: 7468 6520 6461 7461 2070 6f69 6e74 6564 the data pointed\n+00119010: 2074 6f20 6279 203c 636f 6465 3e5f 5f70 to by __p\n+00119020: 7472 3c2f 636f 6465 3e20 6f66 2073 697a tr of siz\n+00119030: 6520 3c63 6f64 653e 5f5f 7369 7a65 3c2f e __size. The proce\n+00119050: 7373 2066 6f72 2073 656e 6469 6e67 2061 ss for sending a\n+00119060: 6e64 2072 6563 6569 7669 6e67 204d 544f nd receiving MTO\n+00119070: 4d20 584f 5020 6174 7461 6368 6d65 6e74 M XOP attachment\n+00119080: 7320 6973 2066 756c 6c79 2061 7574 6f6d s is fully autom\n+00119090: 6174 6564 2e20 5468 6520 3c63 6f64 653e ated. The \n+001190a0: 6964 3c2f 636f 6465 3e20 6d65 6d62 6572 id member\n+001190b0: 2072 6566 6572 656e 6365 7320 7468 6520 references the \n+001190c0: 6174 7461 6368 6d65 6e74 2c20 7479 7069 attachment, typi\n+001190d0: 6361 6c6c 7920 6120 636f 6e74 656e 7420 cally a content \n+001190e0: 6964 2043 4944 206f 7220 5555 4944 2077 id CID or UUID w\n+001190f0: 6869 6368 2063 616e 2062 6520 6f62 7461 hich can be obta\n+00119100: 696e 6564 2077 6974 6820 3c63 6f64 653e ined with \n+00119110: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_rand_uuid<\n+001191a0: 2f61 3e3c 2f63 6f64 653e 2e20 5768 656e /a>. When\n+001191b0: 2073 6574 2074 6f20 4e55 4c4c 2c20 6120 set to NULL, a \n+001191c0: 756e 6971 7565 2043 4944 2069 7320 6175 unique CID is au\n+001191d0: 746f 6d61 7469 6361 6c6c 7920 7573 6564 tomatically used\n+001191e0: 2e20 5468 6520 3c63 6f64 653e 7479 7065 . The type\n+001191f0: 3c2f 636f 6465 3e20 6669 656c 6420 7370 field sp\n+00119200: 6563 6966 6965 7320 7468 6520 7265 7175 ecifies the requ\n+00119210: 6972 6564 204d 494d 4520 7479 7065 206f ired MIME type o\n+00119220: 6620 7468 6520 6269 6e61 7279 2064 6174 f the binary dat\n+00119230: 612c 2061 6e64 2074 6865 206f 7074 696f a, and the optio\n+00119240: 6e61 6c20 3c63 6f64 653e 6f70 7469 6f6e nal option\n+00119250: 733c 2f63 6f64 653e 206d 656d 6265 7220 s member \n+00119260: 6361 6e20 6265 2075 7365 6420 746f 2070 can be used to p\n+00119270: 6967 6779 2d62 6163 6b20 6465 7363 7269 iggy-back descri\n+00119280: 7074 6976 6520 7465 7874 2077 6974 6820 ptive text with \n+00119290: 616e 2061 7474 6163 686d 656e 742e 2054 an attachment. T\n+001192a0: 6865 206f 7264 6572 206f 6620 7468 6520 he order of the \n+001192b0: 6465 636c 6172 6174 696f 6e20 6f66 2074 declaration of t\n+001192c0: 6865 206d 656d 6265 7273 2069 7320 7369 he members is si\n+001192d0: 676e 6966 6963 616e 742e 3c2f 703e 0a3c gnificant.

    .<\n+001192e0: 703e 596f 7520 6361 6e20 696d 706f 7274 p>You can import\n+001192f0: 203c 656d 3e3c 636f 6465 3e78 6f70 2e68 xop.h\n+00119300: 3c2f 636f 6465 3e3c 2f65 6d3e 2069 6e20 in \n+00119310: 796f 7572 2069 6e74 6572 6661 6365 2068 your interface h\n+00119320: 6561 6465 7220 6669 6c65 2074 6f20 7573 eader file to us\n+00119330: 6520 7468 6520 4d54 4f4d 2061 7474 6163 e the MTOM attac\n+00119340: 686d 656e 7473 2c20 666f 7220 6578 616d hments, for exam\n+00119350: 706c 653a 3c2f 703e 0a3c 6469 7620 636c ple:

    .
    <\n+00119370: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00119380: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#imp\n+001193a0: 6f72 7420 2671 756f 743b 696d 706f 7274 ort "import\n+001193b0: 2f78 6f70 2e68 2671 756f 743b 3c2f 7370 /xop.h"
    .
    #import \n+00119400: 2671 756f 743b 696d 706f 7274 2f78 6d69 "import/xmi\n+00119410: 6d65 352e 6826 7175 6f74 3b3c 2f73 7061 me5.h"
    .
    #import &\n+00119460: 7175 6f74 3b69 6d70 6f72 742f 736f 6170 quot;import/soap\n+00119470: 3132 2e68 2671 756f 743b 3c2f 7370 616e 12.h"
    .
    /* alternativel\n+001194c0: 792c 2077 6974 686f 7574 2074 6865 2069 y, without the i\n+001194d0: 6d70 6f72 7420 6162 6f76 652c 2075 7365 mport above, use\n+001194e0: 3a20 3c2f 7370 616e 3e3c 2f64 6976 3e0a :
    .\n+001194f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n+00119520: 534f 4150 2d45 4e56 2073 6368 656d 6120 SOAP-ENV schema \n+00119530: 6e61 6d65 7370 6163 653a 2068 7474 703a namespace: http:\n+00119540: 2f2f 7777 772e 7733 2e6f 7267 2f32 3030 //www.w3.org/200\n+00119550: 332f 3035 2f73 6f61 702d 656e 7665 6c6f 3/05/soap-envelo\n+00119560: 7065 203c 2f73 7061 6e3e 3c2f 6469 763e pe
    \n+00119570: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n+001195a0: 2053 4f41 502d 454e 4320 7363 6865 6d61 SOAP-ENC schema\n+001195b0: 206e 616d 6573 7061 6365 3a20 6874 7470 namespace: http\n+001195c0: 3a2f 2f77 7777 2e77 332e 6f72 672f 3230 ://www.w3.org/20\n+001195d0: 3033 2f30 352f 736f 6170 2d65 6e63 6f64 03/05/soap-encod\n+001195e0: 696e 6720 3c2f 7370 616e 3e3c 2f64 6976 ing .
    */
    .
    .
    //g\n+00119670: 736f 6170 2078 2073 6368 656d 6120 6e61 soap x schema na\n+00119680: 6d65 7370 6163 653a 2068 7474 703a 2f2f mespace: http://\n+00119690: 6d79 2e66 6972 7374 2e6d 746f 6d2e 6e65 my.first.mtom.ne\n+001196a0: 7420 3c2f 7370 616e 3e3c 2f64 6976 3e0a t
    .\n+001196b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct <\n+001196e0: 2f73 7061 6e3e 785f 5f6d 7944 6174 6120 /span>x__myData \n+001196f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+00119710: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    _xop_\n+00119760: 5f49 6e63 6c75 6465 3c2f 613e 2078 6f70 _Include xop\n+00119770: 5f5f 496e 636c 7564 653b 203c 7370 616e __Include; // attachment <\n+001197a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+001197c0: 2040 203c 7370 616e 2063 6c61 7373 3d22 @ cha\n+001197e0: 723c 2f73 7061 6e3e 202a 786d 696d 6535 r *xmime5\n+001197f0: 5f5f 636f 6e74 656e 7454 7970 653b 2020 __contentType; \n+00119800: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // and its\n+00119820: 2063 6f6e 7465 6e74 5479 7065 203c 2f73 contentType
    .
    }; \n+00119850: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int x_\n+00119890: 5f6d 794d 544f 4d74 6573 7428 3c73 7061 _myMTOMtest(struct \n+001198c0: 785f 5f6d 7944 6174 6120 2a69 6e2c 203c x__myData *in, <\n+001198d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001198e0: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct x__myData *ou\n+00119900: 7429 3b3c 2f64 6976 3e0a 3c2f 6469 763e t);
    .
    \n+00119910: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    Witho\n+00119d80: 7574 2074 6869 7320 666c 6167 2c20 7468 ut this flag, th\n+00119d90: 6520 6174 7461 6368 6d65 6e74 7320 7769 e attachments wi\n+00119da0: 6c6c 2062 6520 7472 616e 736d 6974 7465 ll be transmitte\n+00119db0: 6420 696e 2044 494d 4520 666f 726d 6174 d in DIME format\n+00119dc0: 2c20 7768 6963 6820 6973 206e 6f74 2077 , which is not w\n+00119dd0: 6861 7420 7765 2077 616e 742e 2049 6620 hat we want. If \n+00119de0: 796f 7572 2063 7572 7265 6e74 2063 6c69 your current cli\n+00119df0: 656e 7473 2061 6e64 2073 6572 7669 6365 ents and service\n+00119e00: 7320 6172 6520 6261 7365 6420 6f6e 206e s are based on n\n+00119e10: 6f6e 2d73 7472 6561 6d69 6e67 2044 494d on-streaming DIM\n+00119e20: 4520 6174 7461 6368 6d65 6e74 7320 7573 E attachments us\n+00119e30: 696e 6720 7468 6520 534f 4150 2062 6f64 ing the SOAP bod\n+00119e40: 7920 7265 6665 7265 6e63 6520 6d65 6368 y reference mech\n+00119e50: 616e 6973 6d20 2874 6875 732c 2077 6974 anism (thus, wit\n+00119e60: 686f 7574 2075 7369 6e67 2074 6865 203c hout using the <\n+00119e70: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n+00119f00: 5f73 6574 5f64 696d 655f 6174 7461 6368 _set_dime_attach\n+00119f10: 6d65 6e74 3c2f 613e 3c2f 636f 6465 3e20 ment \n+00119f20: 6675 6e63 7469 6f6e 2920 6f72 2070 6c61 function) or pla\n+00119f30: 696e 2062 6173 6536 3420 6269 6e61 7279 in base64 binary\n+00119f40: 2058 4d4c 2064 6174 6120 656c 656d 656e XML data elemen\n+00119f50: 7473 2c20 6974 2069 7320 7665 7279 2065 ts, it is very e\n+00119f60: 6173 7920 746f 2061 646f 7074 204d 544f asy to adopt MTO\n+00119f70: 4d20 6279 2072 656e 616d 696e 6720 7468 M by renaming th\n+00119f80: 6520 6269 6e61 7279 2074 7970 6573 2074 e binary types t\n+00119f90: 6f20 3c63 6f64 653e 786f 705f 5f49 6e63 o xop__Inc\n+00119fa0: 6c75 6465 3c2f 636f 6465 3e20 616e 6420 lude and \n+00119fb0: 7573 696e 6720 7468 6520 3c63 6f64 653e using the \n+00119fc0: 2353 4f41 505f 454e 435f 4d54 4f4d 3c2f #SOAP_ENC_MTOM flag with \n+00119fe0: 7468 6520 534f 4150 2031 2e32 206e 616d the SOAP 1.2 nam\n+00119ff0: 6573 7061 6365 2e3c 2f70 3e0a 3c70 3e53 espace.

    .

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

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

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

    .

    .\n+0011a0d0: 4765 6e65 7261 7469 6e67 204d 756c 7469 Generating Multi\n+0011a0e0: 7061 7274 5265 6c61 7465 6420 4d49 4d45 partRelated MIME\n+0011a0f0: 2061 7474 6163 686d 656e 7420 6269 6e64 attachment bind\n+0011a100: 696e 6773 2069 6e20 5753 444c 3c2f 6832 ings in WSDL.

    To generate\n+0011a120: 206d 756c 7469 7061 7274 5265 6c61 7465 multipartRelate\n+0011a130: 6420 6269 6e64 696e 6773 2069 6e20 7468 d bindings in th\n+0011a140: 6520 5753 444c 2066 696c 6520 696e 6469 e WSDL file indi\n+0011a150: 6361 7469 6e67 2074 6865 2075 7365 206f cating the use o\n+0011a160: 6620 4d49 4d45 2061 7474 6163 686d 656e f MIME attachmen\n+0011a170: 7473 2c20 7573 653a 3c2f 703e 0a3c 6469 ts, use:

    .
    //gso\n+0011a1c0: 6170 2026 6c74 3b70 7265 6669 7826 6774 ap <prefix>\n+0011a1d0: 3b20 7365 7276 6963 6520 6d65 7468 6f64 ; service method\n+0011a1e0: 2d6d 696d 652d 7479 7065 3a20 2e2e 2e3c -mime-type: ...<\n+0011a1f0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 2f64 /span>
    .

    This dire\n+0011a220: 6374 6976 6520 6469 7265 6374 6976 6520 ctive directive \n+0011a230: 6361 6e20 6265 2072 6570 6561 7465 6420 can be repeated \n+0011a240: 666f 7220 6561 6368 2061 7474 6163 686d for each attachm\n+0011a250: 656e 7420 796f 7520 7761 6e74 2074 6f20 ent you want to \n+0011a260: 6173 736f 6369 6174 6520 7769 7468 2061 associate with a\n+0011a270: 206d 6574 686f 6427 7320 7265 7175 6573 method's reques\n+0011a280: 7420 616e 6420 7265 7370 6f6e 7365 206d t and response m\n+0011a290: 6573 7361 6765 2e20 7365 6520 616c 736f essage. see also\n+0011a2a0: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Directives .

    .

    For \n+0011a2f0: 6578 616d 706c 653a 3c2f 703e 0a3c 6469 example:

    .
    \n+0011a340: 2369 6d70 6f72 7420 2671 756f 743b 696d #import "im\n+0011a350: 706f 7274 2f78 6f70 2e68 2671 756f 743b port/xop.h"\n+0011a360: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n+0011a370: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011a380: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#imp\n+0011a3a0: 6f72 7420 2671 756f 743b 696d 706f 7274 ort "import\n+0011a3b0: 2f78 6d69 6d65 352e 6826 7175 6f74 3b3c /xmime5.h"<\n+0011a3c0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>

    .\n+0011a3e0: 3c73 7061 6e20 636c 6173 733d 2270 7265 #impo\n+0011a400: 7274 2026 7175 6f74 3b69 6d70 6f72 742f rt "import/\n+0011a410: 736f 6170 3132 2e68 2671 756f 743b 3c2f soap12.h"
    . \n+0011a440: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n+0011a470: 2f67 736f 6170 2078 2073 6368 656d 6120 /gsoap x schema \n+0011a480: 6e61 6d65 7370 6163 653a 2068 7474 703a namespace: http:\n+0011a490: 2f2f 6d79 2e66 6972 7374 2e6d 746f 6d2e //my.first.mtom.\n+0011a4a0: 6e65 7420 3c2f 7370 616e 3e3c 2f64 6976 net .
    struct\n+0011a4e0: 203c 2f73 7061 6e3e 785f 5f6d 7944 6174 x__myDat\n+0011a4f0: 6120 3c2f 6469 763e 0a3c 6469 7620 636c a
    .
    {.
    _xo\n+0011a560: 705f 5f49 6e63 6c75 6465 3c2f 613e 2078 p__Include x\n+0011a570: 6f70 5f5f 496e 636c 7564 653b 203c 7370 op__Include; // attachment\n+0011a5a0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+0011a5b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011a5c0: 3e20 2040 203c 7370 616e 2063 6c61 7373 > @ c\n+0011a5e0: 6861 723c 2f73 7061 6e3e 202a 786d 696d har *xmim\n+0011a5f0: 6535 5f5f 636f 6e74 656e 7454 7970 653b e5__contentType;\n+0011a600: 2020 3c73 7061 6e20 636c 6173 733d 2263 // and i\n+0011a620: 7473 2063 6f6e 7465 6e74 5479 7065 203c ts contentType <\n+0011a630: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .}\n+0011a650: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    //gsoap x servi\n+0011a690: 6365 206d 6574 686f 642d 6d69 6d65 2d74 ce method-mime-t\n+0011a6a0: 7970 653a 206d 794d 544f 4d74 6573 7420 ype: myMTOMtest \n+0011a6b0: 7465 7874 2f78 6d6c 203c 2f73 7061 6e3e text/xml \n+0011a6c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int x_\n+0011a700: 5f6d 794d 544f 4d74 6573 7428 3c73 7061 _myMTOMtest(struct \n+0011a730: 785f 5f6d 7944 6174 6120 2a69 6e2c 203c x__myData *in, <\n+0011a740: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0011a750: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct x__myData *ou\n+0011a770: 7429 3b3c 2f64 6976 3e0a 3c2f 6469 763e t);
    .
    \n+0011a780: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    S\n+0011aa10: 696d 696c 6172 6c79 2c20 746f 2062 696e imilarly, to bin\n+0011aa20: 6420 6174 7461 6368 6d65 6e74 7320 6f6e d attachments on\n+0011aa30: 6c79 2074 6f20 7468 6520 7265 7370 6f6e ly to the respon\n+0011aa40: 7365 206d 6573 7361 6765 206f 6620 616e se message of an\n+0011aa50: 206f 7065 7261 7469 6f6e 2c20 7573 653a operation, use:\n+0011aa60: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    //gsoap <p\n+0011aab0: 7265 6669 7826 6774 3b20 7365 7276 6963 refix> servic\n+0011aac0: 6520 6d65 7468 6f64 2d6f 7574 7075 742d e method-output-\n+0011aad0: 6d69 6d65 2d74 7970 653a 202e 2e2e 3c2f mime-type: ...
    .

    The wsdl2h\n+0011ab10: 2074 6f6f 6c20 7265 636f 676e 697a 6573 tool recognizes\n+0011ab20: 204d 494d 4520 6174 7461 6368 6d65 6e74 MIME attachment\n+0011ab30: 7320 616e 6420 7072 6f64 7563 6573 2061 s and produces a\n+0011ab40: 6e20 616e 6e6f 7461 7465 6420 6865 6164 n annotated head\n+0011ab50: 6572 2066 696c 652e 3c2f 703e 0a3c 703e er file.

    .

    \n+0011ab60: 596f 7520 6361 6e20 7265 7065 6174 2074 You can repeat t\n+0011ab70: 6865 7365 2064 6972 6563 7469 7665 7320 hese directives \n+0011ab80: 666f 7220 616c 6c20 6d75 6c74 6970 6172 for all multipar\n+0011ab90: 7452 656c 6174 6564 204d 494d 4520 6174 tRelated MIME at\n+0011aba0: 7461 6368 6d65 6e74 7320 796f 7520 7761 tachments you wa\n+0011abb0: 6e74 2074 6f20 6173 736f 6369 6174 6520 nt to associate \n+0011abc0: 7769 7468 2074 6865 2073 6572 7669 6365 with the service\n+0011abd0: 206f 7065 7261 7469 6f6e 2069 6e70 7574 operation input\n+0011abe0: 2061 6e64 206f 7574 7075 742e 3c2f 703e and output.

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

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

    .

    .Send\n+0011ac60: 696e 6720 616e 6420 7265 6365 6976 696e ing and receivin\n+0011ac70: 6720 4d54 4f4d 2061 7474 6163 686d 656e g MTOM attachmen\n+0011ac80: 7473 3c2f 6832 3e0a 3c70 3e41 2072 6563 ts

    .

    A rec\n+0011ac90: 6569 7665 7220 6d75 7374 2062 6520 696e eiver must be in\n+0011aca0: 666f 726d 6564 2074 6f20 7265 636f 676e formed to recogn\n+0011acb0: 697a 6520 4d54 4f4d 2061 7474 6163 686d ize MTOM attachm\n+0011acc0: 656e 7473 2062 7920 7365 7474 696e 6720 ents by setting \n+0011acd0: 7468 6520 3c63 6f64 653e 2353 4f41 505f the #SOAP_\n+0011ace0: 454e 435f 4d54 4f4d 3c2f 636f 6465 3e20 ENC_MTOM \n+0011acf0: 666c 6167 206f 6620 7468 6520 3c63 6f64 flag of the so\n+0011ad50: 6170 3c2f 613e 3c2f 636f 6465 3e20 636f ap co\n+0011ad60: 6e74 6578 742e 204f 7468 6572 7769 7365 ntext. Otherwise\n+0011ad70: 2c20 7468 6520 7265 6775 6c61 7220 4d49 , the regular MI\n+0011ad80: 4d45 2061 7474 6163 686d 656e 7420 6d65 ME attachment me\n+0011ad90: 6368 616e 6973 6d20 2853 7741 2920 7769 chanism (SwA) wi\n+0011ada0: 6c6c 2062 6520 7573 6564 2074 6f20 7374 ll be used to st\n+0011adb0: 6f72 6520 6174 7461 6368 6d65 6e74 732e ore attachments.\n+0011adc0: 3c2f 703e 0a3c 703e 5768 656e 2075 7369

    .

    When usi\n+0011add0: 6e67 2077 7364 6c32 6820 746f 2062 7569 ng wsdl2h to bui\n+0011ade0: 6c64 2063 6c69 656e 7473 2061 6e64 2f6f ld clients and/o\n+0011adf0: 7220 7365 7276 6963 6573 2c20 796f 7520 r services, you \n+0011ae00: 7368 6f75 6c64 2075 7365 2074 6865 203c should use the <\n+0011ae10: 656d 3e3c 636f 6465 3e74 7970 656d 6170 em>typemap\n+0011ae20: 2e64 6174 3c2f 636f 6465 3e3c 2f65 6d3e .dat\n+0011ae30: 2066 696c 6520 696e 636c 7564 6564 2069 file included i\n+0011ae40: 6e20 7468 6520 6753 4f41 5020 736f 7572 n the gSOAP sour\n+0011ae50: 6365 2063 6f64 6520 7061 636b 6167 652e ce code package.\n+0011ae60: 2054 6865 203c 656d 3e3c 636f 6465 3e74 The t\n+0011ae70: 7970 656d 6170 2e64 6174 3c2f 636f 6465 ypemap.dat file defi\n+0011ae90: 6e65 7320 7468 6520 584f 5020 6e61 6d65 nes the XOP name\n+0011aea0: 7370 6163 6520 616e 6420 584d 4c20 4d49 space and XML MI\n+0011aeb0: 4d45 206e 616d 6573 7061 6365 7320 6173 ME namespaces as\n+0011aec0: 2069 6d70 6f72 7465 6420 6e61 6d65 7370 imported namesp\n+0011aed0: 6163 6573 3a20 3c2f 703e 3c70 7265 2063 aces:

    \n+0011aef0: 786f 7020 2020 203d 2026 6c74 3b68 7474  xop    = <htt\n+0011af00: 703a 2f2f 7777 772e 7733 2e6f 7267 2f32  p://www.w3.org/2\n+0011af10: 3030 342f 3038 2f78 6f70 2f69 6e63 6c75  004/08/xop/inclu\n+0011af20: 6465 2667 743b 200a 786d 696d 6535 203d  de> .xmime5 =\n+0011af30: 2026 6c74 3b68 7474 703a 2f2f 7777 772e   <http://www.\n+0011af40: 7733 2e6f 7267 2f32 3030 352f 3035 2f78  w3.org/2005/05/x\n+0011af50: 6d6c 6d69 6d65 2667 743b 200a 786d 696d  mlmime> .xmim\n+0011af60: 6534 203d 2026 6c74 3b68 7474 703a 2f2f  e4 = <http://\n+0011af70: 7777 772e 7733 2e6f 7267 2f32 3030 342f  www.w3.org/2004/\n+0011af80: 3131 2f78 6d6c 6d69 6d65 2667 743b 0a3c  11/xmlmime>.<\n+0011af90: 2f70 7265 3e3c 703e 2054 6865 2077 7364  /pre>

    The wsd\n+0011afa0: 6c32 6820 746f 6f6c 2075 7365 7320 7468 l2h tool uses th\n+0011afb0: 6520 3c65 6d3e 3c63 6f64 653e 7479 7065 e type\n+0011afc0: 6d61 702e 6461 743c 2f63 6f64 653e 3c2f map.dat file to conv\n+0011afe0: 6572 7420 5753 444c 2069 6e74 6f20 616e ert WSDL into an\n+0011aff0: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n+0011b000: 7220 6669 6c65 2e20 496e 2074 6869 7320 r file. In this \n+0011b010: 6361 7365 2077 6520 646f 6e27 7420 7761 case we don't wa\n+0011b020: 6e74 2074 6865 2077 7364 6c32 6820 746f nt the wsdl2h to\n+0011b030: 6f6c 2074 6f20 7265 6164 2074 6865 2058 ol to read the X\n+0011b040: 4f50 2073 6368 656d 6120 616e 6420 7472 OP schema and tr\n+0011b050: 616e 736c 6174 6520 6974 2c20 7369 6e63 anslate it, sinc\n+0011b060: 6520 7765 2068 6176 6520 6120 7072 652d e we have a pre-\n+0011b070: 6465 6669 6e65 6420 3c63 6f64 653e 3c61 defined _xop__Includ\n+0011b0f0: 653c 2f61 3e3c 2f63 6f64 653e 2065 6c65 e ele\n+0011b100: 6d65 6e74 2074 6f20 6861 6e64 6c65 2058 ment to handle X\n+0011b110: 4f50 2066 6f72 204d 544f 4d2e 2054 6869 OP for MTOM. Thi\n+0011b120: 7320 3c63 6f64 653e 3c61 2063 6c61 7373 s _x\n+0011b190: 6f70 5f5f 496e 636c 7564 653c 2f61 3e3c op__Include<\n+0011b1a0: 2f63 6f64 653e 2065 6c65 6d65 6e74 2069 /code> element i\n+0011b1b0: 7320 6465 6669 6e65 6420 696e 203c 656d s defined in xop.h. Theref\n+0011b1e0: 6f72 652c 2074 6865 2062 696e 6469 6e67 ore, the binding\n+0011b1f0: 7320 7368 6f77 6e20 6162 6f76 6520 7769 s shown above wi\n+0011b200: 6c6c 206e 6f74 2074 7261 6e73 6c61 7465 ll not translate\n+0011b210: 2074 6865 2058 4f50 2061 6e64 2058 4d4c the XOP and XML\n+0011b220: 204d 494d 4520 7363 6865 6d61 7320 746f MIME schemas to\n+0011b230: 2063 6f64 652c 2062 7574 2067 656e 6572 code, but gener\n+0011b240: 6174 6573 203c 636f 6465 3e23 696d 706f ates #impo\n+0011b250: 7274 3c2f 636f 6465 3e20 7374 6174 656d rt statem\n+0011b260: 656e 7473 2069 6e73 7465 6164 2069 6e20 ents instead in \n+0011b270: 7468 6520 6765 6e65 7261 7465 6420 696e the generated in\n+0011b280: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f\n+0011b290: 696c 653a 3c2f 703e 0a3c 6469 7620 636c ile:

    .
    <\n+0011b2b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011b2c0: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#imp\n+0011b2e0: 6f72 7420 2671 756f 743b 786f 702e 6826 ort "xop.h&\n+0011b2f0: 7175 6f74 3b3c 2f73 7061 6e3e 203c 2f64 quot; .
    #import "x\n+0011b340: 6d69 6d65 352e 6826 7175 6f74 3b3c 2f73 mime5.h"
    .

    \n+0011b6a0: 5375 7070 6f73 6520 7468 6520 5753 444c Suppose the WSDL\n+0011b6b0: 2064 6566 696e 6573 2061 6e20 6f70 6572 defines an oper\n+0011b6c0: 6174 696f 6e3a 3c2f 703e 0a3c 6469 7620 ation:

    .
    int\n+0011b710: 3c2f 7370 616e 3e20 6e73 5f5f 6563 686f ns__echo\n+0011b720: 4461 7461 283c 7370 616e 2063 6c61 7373 Data(struc\n+0011b740: 743c 2f73 7061 6e3e 206e 735f 5f44 6174 t ns__Dat\n+0011b750: 6120 2a69 6e2c 203c 7370 616e 2063 6c61 a *in, str\n+0011b770: 7563 743c 2f73 7061 6e3e 206e 735f 5f44 uct ns__D\n+0011b780: 6174 6120 2a6f 7574 293b 3c2f 6469 763e ata *out);
    \n+0011b790: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    After\n+0011b7b0: 2067 656e 6572 6174 696e 6720 7468 6520 generating the \n+0011b7c0: 7374 7562 2066 756e 6374 696f 6e73 2077 stub functions w\n+0011b7d0: 6974 6820 7468 6520 736f 6170 6370 7032 ith the soapcpp2\n+0011b7e0: 2074 6f6f 6c2c 2077 6520 6361 6e20 696e tool, we can in\n+0011b7f0: 766f 6b65 2074 6865 2073 7475 6220 6174 voke the stub at\n+0011b800: 2074 6865 2063 6c69 656e 7420 7369 6465 the client side\n+0011b810: 2077 6974 683a 3c2f 703e 0a3c 6469 7620 with:

    .
    .
    struct ns__Data data; \n+0011b9e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    data.xo\n+0011ba00: 705f 5f49 6e63 6c75 6465 2e5f 5f70 7472 p__Include.__ptr\n+0011ba10: 203d 2028 3c73 7061 6e20 636c 6173 733d = (un\n+0011ba30: 7369 676e 6564 3c2f 7370 616e 3e20 3c73 signed char*)"<b>\n+0011ba90: 4865 6c6c 6f20 776f 726c 6421 266c 743b Hello world!<\n+0011baa0: 2f62 2667 743b 2671 756f 743b 3c2f 7370 /b>";
    .da\n+0011bad0: 7461 2e78 6f70 5f5f 496e 636c 7564 652e ta.xop__Include.\n+0011bae0: 5f5f 7369 7a65 203d 2032 303b 203c 2f64 __size = 20; .
    data.xop__\n+0011bb10: 496e 636c 7564 652e 6964 203d 204e 554c Include.id = NUL\n+0011bb20: 4c3b 2020 2020 2020 2020 2020 2020 3c73 L; // CID autom\n+0011bb50: 6174 6963 616c 6c79 2067 656e 6572 6174 atically generat\n+0011bb60: 6564 2062 7920 656e 6769 6e65 203c 2f73 ed by engine
    .
    dat\n+0011bb90: 612e 786f 705f 5f49 6e63 6c75 6465 2e74 a.xop__Include.t\n+0011bba0: 7970 6520 3d20 3c73 7061 6e20 636c 6173 ype = "text/htm\n+0011bbd0: 6c26 7175 6f74 3b3c 2f73 7061 6e3e 3b20 l"; \n+0011bbe0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // MIME \n+0011bc00: 7479 7065 203c 2f73 7061 6e3e 3c2f 6469 type .
    data.xop__I\n+0011bc30: 6e63 6c75 6465 2e6f 7074 696f 6e73 203d nclude.options =\n+0011bc40: 204e 554c 4c3b 2020 2020 2020 203c 7370 NULL; // no descrip\n+0011bc70: 7469 7665 2069 6e66 6f20 6164 6465 6420 tive info added \n+0011bc80: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0011bca0: 6461 7461 2e78 6d69 6d65 355f 5f63 6f6e data.xmime5__con\n+0011bcb0: 7465 6e74 5479 7065 203d 203c 7370 616e tentType = "tex\n+0011bce0: 742f 6874 6d6c 2671 756f 743b 3c2f 7370 t/html"; // MI\n+0011bd10: 4d45 2074 7970 6520 3c2f 7370 616e 3e3c ME type <\n+0011bd20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (soa\n+0011bd60: 705f 6361 6c6c 5f6e 735f 5f65 6368 6f44 p_call_ns__echoD\n+0011bd70: 6174 6128 3c61 2063 6c61 7373 3d22 636f ata(soap<\n+0011bda0: 2f61 3e2c 2065 6e64 706f 696e 742c 2061 /a>, endpoint, a\n+0011bdb0: 6374 696f 6e2c 2026 616d 703b 6461 7461 ction, &data\n+0011bdc0: 2c20 2661 6d70 3b64 6174 6129 293c 2f64 , &data)).
    soap_\n+0011be40: 7072 696e 745f 6661 756c 743c 2f61 3e28 print_fault(\n+0011be50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+0011be80: 2073 7464 6572 7229 3b3c 2f64 6976 3e0a stderr);
    .\n+0011be90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    else\n+0011bec0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n+0011bed0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011bee0: 3e20 2070 7269 6e74 6628 3c73 7061 6e20 > printf("Got \n+0011bf10: 6461 7461 5c6e 2671 756f 743b 3c2f 7370 data\\n");
    .<\n+0011bf40: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0011bf50: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0011bf60: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+0011bf70: 6761 6637 6430 3137 3631 3631 6539 6465 gaf7d0176161e9de\n+0011bf80: 6633 3639 3831 6532 3466 6161 3139 3133 f36981e24faa1913\n+0011bf90: 6439 223e 736f 6170 5f64 6573 7472 6f79 d9\">soap_destroy\n+0011bfa0: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n+0011bfd0: 3c2f 613e 293b 3c2f 6469 763e 0a3c 6469 );
    .<\n+0011bff0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0011c000: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0011c010: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+0011c020: 6761 3831 6130 3039 6165 3165 6138 3235 ga81a009ae1ea825\n+0011c030: 6130 3565 3532 3431 6532 6237 6138 6563 a05e5241e2b7a8ec\n+0011c040: 6539 223e 736f 6170 5f65 6e64 3c2f 613e e9\">soap_end\n+0011c050: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+0011c080: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    \n+0011c0f0: 736f 6170 5f66 7265 653c 2f61 3e28 3c61 soap_free(soap);<\n+0011c130: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    \n+0011c150: 4e6f 7465 2074 6861 7420 7468 6520 3c63 Note that the xop__Include\n+0011c170: 2e74 7970 653c 2f63 6f64 653e 206d 656d .type mem\n+0011c180: 6265 7220 6d75 7374 2062 6520 7365 7420 ber must be set \n+0011c190: 746f 2074 7261 6e73 6d69 7420 4d54 4f4d to transmit MTOM\n+0011c1a0: 2061 7474 6163 686d 656e 7473 2c20 6f74 attachments, ot\n+0011c1b0: 6865 7277 6973 6520 696e 6c69 6e65 2062 herwise inline b\n+0011c1c0: 6173 6536 3420 584d 4c20 7769 6c6c 2062 ase64 XML will b\n+0011c1d0: 6520 7365 6e74 2e3c 2f70 3e0a 3c70 3e41 e sent.

    .

    A\n+0011c1e0: 7420 7468 6520 7365 7276 6572 2073 6964 t the server sid\n+0011c1f0: 652c 2077 6520 7368 6f77 2061 6e20 6578 e, we show an ex\n+0011c200: 616d 706c 6520 6f66 2061 6e20 6f70 6572 ample of an oper\n+0011c210: 6174 696f 6e20 6861 6e64 6c65 7220 7468 ation handler th\n+0011c220: 6174 206a 7573 7420 636f 7069 6573 2074 at just copies t\n+0011c230: 6865 2069 6e70 7574 2064 6174 6120 746f he input data to\n+0011c240: 206f 7574 7075 743a 3c2f 703e 0a3c 6469 output:

    .
    i\n+0011c290: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 6563 nt ns__ec\n+0011c2a0: 686f 4461 7461 283c 7370 616e 2063 6c61 hoData(str\n+0011c2c0: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, struct\n+0011c350: 206e 735f 5f44 6174 6120 2a69 6e2c 203c ns__Data *in, <\n+0011c360: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0011c370: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct ns__data *out\n+0011c390: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    *out = *i\n+0011c3d0: 6e3b 203c 2f64 6976 3e0a 3c64 6976 2063 n;
    ..\n+0011c490: 7d3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 }
    .
    <\n+0011c4b0: 703e 5468 6520 7365 7276 6572 206d 7573 p>The server mus\n+0011c4c0: 7420 7573 6520 7468 6520 3c63 6f64 653e t use the \n+0011c4d0: 2353 4f41 505f 454e 435f 4d54 4f4d 3c2f #SOAP_ENC_MTOM flag to in\n+0011c4f0: 6974 6961 6c69 7a65 2074 6865 203c 636f itialize the s\n+0011c550: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c\n+0011c560: 6f6e 7465 7874 2074 6f20 7265 6365 6976 ontext to receiv\n+0011c570: 6520 616e 6420 7365 6e64 204d 544f 4d20 e and send MTOM \n+0011c580: 6174 7461 6368 6d65 6e74 732e 3c2f 703e attachments.

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

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

    .

    \n+0011c5f0: 3c2f 613e 0a53 7472 6561 6d69 6e67 204d .Streaming M\n+0011c600: 494d 452f 4d54 4f4d 3c2f 6832 3e0a 3c70 IME/MTOM

    .Streaming MIME/\n+0011c620: 4d54 4f4d 2069 7320 6163 6869 6576 6564 MTOM is achieved\n+0011c630: 2077 6974 6820 6361 6c6c 6261 636b 2066 with callback f\n+0011c640: 756e 6374 696f 6e73 2074 6f20 6665 7463 unctions to fetc\n+0011c650: 6820 616e 6420 7374 6f72 6520 6461 7461 h and store data\n+0011c660: 2064 7572 696e 6720 7472 616e 736d 6973 during transmis\n+0011c670: 7369 6f6e 2e20 5468 7265 6520 6675 6e63 sion. Three func\n+0011c680: 7469 6f6e 2063 616c 6c62 6163 6b73 2066 tion callbacks f\n+0011c690: 6f72 2073 7472 6561 6d69 6e67 204d 494d or streaming MIM\n+0011c6a0: 452f 4d54 4f4d 206f 7574 7075 7420 616e E/MTOM output an\n+0011c6b0: 6420 7468 7265 6520 6361 6c6c 6261 636b d three callback\n+0011c6c0: 7320 666f 7220 7374 7265 616d 696e 6720 s for streaming \n+0011c6d0: 4d49 4d45 2f4d 544f 4d20 696e 7075 7420 MIME/MTOM input \n+0011c6e0: 6172 6520 6176 6169 6c61 626c 652e 3c2f are available..
      .
    • void *(*soap.f\n+0011c710: 6d69 6d65 7265 6164 6f70 656e 2928 7374 mimereadopen)(st\n+0011c720: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n+0011c730: 2076 6f69 6420 2a68 616e 646c 652c 2063 void *handle, c\n+0011c740: 6f6e 7374 2063 6861 7220 2a69 642c 2063 onst char *id, c\n+0011c750: 6f6e 7374 2063 6861 7220 2a74 7970 652c onst char *type,\n+0011c760: 2063 6f6e 7374 2063 6861 7220 2a64 6573 const char *des\n+0011c770: 6372 6970 7469 6f6e 293c 2f63 6f64 653e cription)\n+0011c780: 2054 6869 7320 6361 6c6c 6261 636b 2069 This callback i\n+0011c790: 7320 6361 6c6c 6564 2062 7920 7468 6520 s called by the \n+0011c7a0: 656e 6769 6e65 2074 6f20 7374 6172 7420 engine to start \n+0011c7b0: 7365 6e64 696e 6720 6120 7374 7265 616d sending a stream\n+0011c7c0: 696e 6720 4d49 4d45 2f4d 544f 4d20 6174 ing MIME/MTOM at\n+0011c7d0: 7461 6368 6d65 6e74 2e20 5468 6973 2063 tachment. This c\n+0011c7e0: 616c 6c62 6163 6b20 6f70 656e 7320 6120 allback opens a \n+0011c7f0: 7374 7265 616d 2074 6f20 7374 6172 7420 stream to start \n+0011c800: 7265 6164 696e 6720 7468 6520 6174 7461 reading the atta\n+0011c810: 6368 6d65 6e74 2064 6174 6120 746f 2073 chment data to s\n+0011c820: 656e 642e 2054 6865 2061 6374 7561 6c20 end. The actual \n+0011c830: 6461 7461 2073 7472 6561 6d20 7769 6c6c data stream will\n+0011c840: 2062 6520 7265 6164 2069 6e20 6368 756e be read in chun\n+0011c850: 6b73 2075 7369 6e67 2074 6865 203c 636f ks using the soap::fm\n+0011c900: 696d 6572 6561 643c 2f61 3e3c 2f63 6f64 imeread callback unti\n+0011c920: 6c20 6e6f 206d 6f72 6520 6461 7461 2069 l no more data i\n+0011c930: 7320 6176 6169 6c61 626c 6520 616e 6420 s available and \n+0011c940: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap::fmim\n+0011c9f0: 6572 6561 6463 6c6f 7365 3c2f 613e 3c2f ereadclose callback i\n+0011ca10: 7320 6361 6c6c 6564 2074 6f20 636c 6f73 s called to clos\n+0011ca20: 6520 7468 6520 7374 7265 616d 2e20 5468 e the stream. Th\n+0011ca30: 6520 3c63 6f64 653e 6861 6e64 6c65 3c2f e handle parameter \n+0011ca50: 636f 6e74 6169 6e73 2074 6865 2076 616c contains the val\n+0011ca60: 7565 206f 6620 7468 6520 3c63 6f64 653e ue of the \n+0011ca70: 5f5f 7074 723c 2f63 6f64 653e 206d 656d __ptr mem\n+0011ca80: 6265 7220 7661 7269 6162 6c65 206f 6620 ber variable of \n+0011ca90: 7468 6520 6174 7461 6368 6d65 6e74 2073 the attachment s\n+0011caa0: 7472 7563 742f 636c 6173 7320 7769 7468 truct/class with\n+0011cab0: 2064 6174 6120 2865 2e67 2e20 3c63 6f64 data (e.g. \n+0011cb30: 7873 645f 5f62 6173 6536 3442 696e 6172 xsd__base64Binar\n+0011cb40: 793c 2f61 3e3c 2f63 6f64 653e 206f 7220 y or \n+0011cb50: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 _xop\n+0011cbc0: 5f5f 496e 636c 7564 653c 2f61 3e3c 2f63 __Include with \n+0011cbe0: 5f5f 7074 723c 2f63 6f64 653e 2c20 3c63 __ptr, __size, id, type and \n+0011cc30: 6f70 7469 6f6e 733c 2f63 6f64 653e 206d options m\n+0011cc40: 656d 6265 7273 292c 2077 6869 6368 2073 embers), which s\n+0011cc50: 686f 756c 6420 6265 2061 2070 6f69 6e74 hould be a point\n+0011cc60: 6572 2074 6f20 7370 6563 6966 6963 2069 er to specific i\n+0011cc70: 6e66 6f72 6d61 7469 6f6e 2073 7563 6820 nformation such \n+0011cc80: 6173 2061 2066 696c 6520 6465 7363 7269 as a file descri\n+0011cc90: 7074 6f72 206f 7220 6120 706f 696e 7465 ptor or a pointe\n+0011cca0: 7220 746f 2061 2073 6f6d 6520 6170 706c r to a some appl\n+0011ccb0: 6963 6174 696f 6e2d 7370 6563 6966 6963 ication-specific\n+0011ccc0: 2064 6174 6120 746f 2062 6520 7061 7373 data to be pass\n+0011ccd0: 6564 2074 6f20 7468 6973 2063 616c 6c62 ed to this callb\n+0011cce0: 6163 6b2e 2042 6f74 6820 7468 6520 3c63 ack. Both the __ptr\n+0011cd00: 2061 6e64 203c 636f 6465 3e5f 5f73 697a and __siz\n+0011cd10: 653c 2f63 6f64 653e 206d 656d 6265 7273 e members\n+0011cd20: 206f 6620 7468 6520 6174 7461 6368 6d65 of the attachme\n+0011cd30: 6e74 2073 7472 7563 742f 636c 6173 7320 nt struct/class \n+0011cd40: 7368 6f75 6c64 2068 6176 6520 6265 656e should have been\n+0011cd50: 2073 6574 2062 7920 7468 6520 6170 706c set by the appl\n+0011cd60: 6963 6174 696f 6e20 7072 696f 7220 746f ication prior to\n+0011cd70: 2074 6865 2073 6572 6961 6c69 7a61 7469 the serializati\n+0011cd80: 6f6e 206f 6620 7468 6520 6d65 7373 6167 on of the messag\n+0011cd90: 6520 7769 7468 2061 7474 6163 686d 656e e with attachmen\n+0011cda0: 7473 2e20 4966 2074 6865 203c 636f 6465 ts. If the __size i\n+0011cdc0: 7320 7a65 726f 2061 6e64 2048 5454 5020 s zero and HTTP \n+0011cdd0: 6368 756e 6b69 6e67 2069 7320 656e 6162 chunking is enab\n+0011cde0: 6c65 6420 2877 6974 6820 3c63 6f64 653e led (with \n+0011cdf0: 2353 4f41 505f 494f 5f43 4855 4e4b 3c2f #SOAP_IO_CHUNK), then chu\n+0011ce10: 6e6b 6564 204d 494d 452f 4d54 4f4d 2061 nked MIME/MTOM a\n+0011ce20: 7474 6163 686d 656e 7473 2061 7265 2073 ttachments are s\n+0011ce30: 656e 742c 2073 6565 203c 636f 6465 3e3c ent, see <\n+0011ce40: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0011ce50: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0011ce60: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+0011ce70: 6761 6666 3430 6131 6361 3666 6266 3037 gaff40a1ca6fbf07\n+0011ce80: 3562 3534 6363 6266 3437 3930 3039 6365 5b54ccbf479009ce\n+0011ce90: 3734 2220 7469 746c 653d 2243 616c 6c62 74\" title=\"Callb\n+0011cea0: 6163 6b20 746f 2072 6561 6420 6461 7461 ack to read data\n+0011ceb0: 2069 6e20 6120 4d49 4d45 2f4d 544f 4d20 in a MIME/MTOM \n+0011cec0: 6174 7461 6368 6d65 6e74 2073 7472 6561 attachment strea\n+0011ced0: 6d2e 223e 736f 6170 3a3a 666d 696d 6572 m.\">soap::fmimer\n+0011cee0: 6561 643c 2f61 3e3c 2f63 6f64 653e 2e20 ead. \n+0011cef0: 5468 6520 3c63 6f64 653e 6964 3c2f 636f The id, type<\n+0011cf10: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and options \n+0011cf30: 7061 7261 6d65 7465 7273 2061 7265 2074 parameters are t\n+0011cf40: 6865 203c 636f 6465 3e69 643c 2f63 6f64 he id (an optional \n+0011cf60: 4944 292c 203c 636f 6465 3e74 7970 653c ID), type<\n+0011cf70: 2f63 6f64 653e 2028 6120 4d49 4d45 2074 /code> (a MIME t\n+0011cf80: 7970 6529 2061 6e64 203c 636f 6465 3e6f ype) and o\n+0011cf90: 7074 696f 6e73 3c2f 636f 6465 3e20 2861 ptions (a\n+0011cfa0: 2064 6573 6372 6970 7469 7665 2073 7472 descriptive str\n+0011cfb0: 696e 6729 206f 6620 7468 6520 6174 7461 ing) of the atta\n+0011cfc0: 6368 6d65 6e74 2073 7472 7563 742f 636c chment struct/cl\n+0011cfd0: 6173 732c 2072 6573 7065 6374 6976 656c ass, respectivel\n+0011cfe0: 792c 206f 6620 7768 6963 6820 6174 206c y, of which at l\n+0011cff0: 6561 7374 206f 6e65 206d 656d 6265 7220 east one member \n+0011d000: 7368 6f75 6c64 2062 6520 6e6f 6e2d 4e55 should be non-NU\n+0011d010: 4c4c 2e20 5468 6520 6361 6c6c 6261 636b LL. The callback\n+0011d020: 2073 686f 756c 6420 7265 7475 726e 2074 should return t\n+0011d030: 6865 203c 636f 6465 3e68 616e 646c 653c he handle<\n+0011d040: 2f63 6f64 653e 2070 6172 616d 6574 6572 /code> parameter\n+0011d050: 2076 616c 7565 206f 7220 616e 6f74 6865 value or anothe\n+0011d060: 7220 706f 696e 7465 7220 7661 6c75 652c r pointer value,\n+0011d070: 2077 6869 6368 2069 7320 7061 7373 6564 which is passed\n+0011d080: 2061 7320 7468 6520 6e65 7720 3c63 6f64 as the new handle \n+0011d0a0: 7061 7261 6d65 7465 7220 746f 203c 636f parameter to soap::fm\n+0011d150: 696d 6572 6561 643c 2f61 3e3c 2f63 6f64 imeread and soap::f\n+0011d210: 6d69 6d65 7265 6164 636c 6f73 653c 2f61 mimereadclose callbac\n+0011d230: 6b73 2e20 5768 656e 2061 6e20 6572 726f ks. When an erro\n+0011d240: 7220 6f63 6375 7272 6564 2069 6e20 7468 r occurred in th\n+0011d250: 6973 2063 616c 6c62 6163 6b2c 2074 6865 is callback, the\n+0011d260: 2063 616c 6c62 6163 6b20 7368 6f75 6c64 callback should\n+0011d270: 2072 6574 7572 6e20 4e55 4c4c 2061 6e64 return NULL and\n+0011d280: 2073 6574 203c 636f 6465 3e3c 6120 636c set soap::error\n+0011d340: 3c2f 636f 6465 3e20 746f 2061 6e20 6572 to an er\n+0011d350: 726f 7220 636f 6465 2c20 652e 672e 2075 ror code, e.g. u\n+0011d360: 7369 6e67 203c 636f 6465 3e3c 6120 636c sing soap_\n+0011d410: 7265 6365 6976 6572 5f66 6175 6c74 3c2f receiver_fault. The c\n+0011d430: 616c 6c62 6163 6b20 6d61 7920 7265 7475 allback may retu\n+0011d440: 726e 204e 554c 4c20 616e 6420 7365 7420 rn NULL and set \n+0011d450: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap\n+0011d500: 3a3a 6572 726f 723c 2f61 3e3c 2f63 6f64 ::error to #SOA\n+0011d520: 505f 4f4b 3c2f 636f 6465 3e20 7768 656e P_OK when\n+0011d530: 2074 6869 7320 7370 6563 6966 6963 204d this specific M\n+0011d540: 494d 452f 4d54 4f4d 2061 7474 6163 686d IME/MTOM attachm\n+0011d550: 656e 7420 7368 6f75 6c64 206e 6f74 2074 ent should not t\n+0011d560: 6f20 6265 2073 7472 6561 6d65 6420 616e o be streamed an\n+0011d570: 6420 7468 6520 656e 6769 6e65 2077 696c d the engine wil\n+0011d580: 6c20 7369 6d70 6c79 2073 6b69 7020 6974 l simply skip it\n+0011d590: 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f 6465 .
    • .
    • size_t (*soap.f\n+0011d5b0: 6d69 6d65 7265 6164 2928 7374 7275 6374 mimeread)(struct\n+0011d5c0: 2073 6f61 7020 2a73 6f61 702c 2076 6f69 soap *soap, voi\n+0011d5d0: 6420 2a68 616e 646c 652c 2063 6861 7220 d *handle, char \n+0011d5e0: 2a62 7566 2c20 7369 7a65 5f74 206c 656e *buf, size_t len\n+0011d5f0: 293c 2f63 6f64 653e 2054 6869 7320 6361 ) This ca\n+0011d600: 6c6c 6261 636b 2069 7320 6361 6c6c 6564 llback is called\n+0011d610: 2062 7920 7468 6520 656e 6769 6e65 2074 by the engine t\n+0011d620: 6f20 7265 6164 2061 2063 6875 6e6b 206f o read a chunk o\n+0011d630: 6620 6174 7461 6368 6d65 6e74 2064 6174 f attachment dat\n+0011d640: 6120 746f 2074 7261 6e73 6d69 742e 2054 a to transmit. T\n+0011d650: 6865 203c 636f 6465 3e68 616e 646c 653c he handle<\n+0011d660: 2f63 6f64 653e 2070 6172 616d 6574 6572 /code> parameter\n+0011d670: 2063 6f6e 7461 696e 7320 7468 6520 6861 contains the ha\n+0011d680: 6e64 6c65 2072 6574 7572 6e65 6420 6279 ndle returned by\n+0011d690: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap::fmi\n+0011d740: 6d65 7265 6164 6f70 656e 3c2f 613e 3c2f mereadopen callback. \n+0011d760: 5468 6520 3c63 6f64 653e 6275 663c 2f63 The buf parameter i\n+0011d780: 7320 7468 6520 6275 6666 6572 206f 6620 s the buffer of \n+0011d790: 6c65 6e67 7468 203c 636f 6465 3e6c 656e length len\n+0011d7a0: 3c2f 636f 6465 3e20 696e 746f 2077 6869 into whi\n+0011d7b0: 6368 2061 2063 6875 6e6b 206f 6620 6461 ch a chunk of da\n+0011d7c0: 7461 2073 686f 756c 6420 6265 2077 7269 ta should be wri\n+0011d7d0: 7474 656e 2062 7920 7468 6520 6361 6c6c tten by the call\n+0011d7e0: 6261 636b 2e20 5468 6520 6163 7475 616c back. The actual\n+0011d7f0: 2061 6d6f 756e 7420 6f66 2064 6174 6120 amount of data \n+0011d800: 7772 6974 7465 6e20 696e 746f 2074 6865 written into the\n+0011d810: 2062 7566 6665 7220 6d61 7920 6265 206c buffer may be l\n+0011d820: 6573 7320 7468 616e 203c 636f 6465 3e6c ess than l\n+0011d830: 656e 3c2f 636f 6465 3e20 616e 6420 7468 en and th\n+0011d840: 6973 2061 6374 7561 6c20 616d 6f75 6e74 is actual amount\n+0011d850: 2073 686f 756c 6420 6265 2072 6574 7572 should be retur\n+0011d860: 6e65 6420 6279 2074 6865 2063 616c 6c62 ned by the callb\n+0011d870: 6163 6b2e 2041 2072 6574 7572 6e20 7661 ack. A return va\n+0011d880: 6c75 6520 6f66 207a 6572 6f20 696e 6469 lue of zero indi\n+0011d890: 6361 7465 7320 616e 2065 7272 6f72 2061 cates an error a\n+0011d8a0: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd s\n+0011d950: 6f61 703a 3a65 7272 6f72 3c2f 613e 3c2f oap::error should be \n+0011d970: 7365 742e 2054 6865 203c 636f 6465 3e5f set. The _\n+0011d980: 5f73 697a 653c 2f63 6f64 653e 206d 656d _size mem\n+0011d990: 6265 7220 7661 7269 6162 6c65 206f 6620 ber variable of \n+0011d9a0: 7468 6520 6174 7461 6368 6d65 6e74 2073 the attachment s\n+0011d9b0: 7472 7563 742f 636c 6173 7320 7769 7468 truct/class with\n+0011d9c0: 2064 6174 6120 2865 2e67 2e20 3c63 6f64 data (e.g. \n+0011da40: 7873 645f 5f62 6173 6536 3442 696e 6172 xsd__base64Binar\n+0011da50: 793c 2f61 3e3c 2f63 6f64 653e 206f 7220 y or \n+0011da60: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 _xop\n+0011dad0: 5f5f 496e 636c 7564 653c 2f61 3e3c 2f63 __Include with \n+0011daf0: 5f5f 7074 723c 2f63 6f64 653e 2c20 3c63 __ptr, __size, id, type and \n+0011db40: 6f70 7469 6f6e 733c 2f63 6f64 653e 206d options m\n+0011db50: 656d 6265 7273 2920 7368 6f75 6c64 2062 embers) should b\n+0011db60: 6520 7365 7420 6279 2074 6865 2061 7070 e set by the app\n+0011db70: 6c69 6361 7469 6f6e 2070 7269 6f72 2074 lication prior t\n+0011db80: 6f20 7468 6520 7365 7269 616c 697a 6174 o the serializat\n+0011db90: 696f 6e20 6f66 2074 6865 206d 6573 7361 ion of the messa\n+0011dba0: 6765 2077 6974 6820 6174 7461 6368 6d65 ge with attachme\n+0011dbb0: 6e74 732e 2054 6865 2076 616c 7565 206f nts. The value o\n+0011dbc0: 6620 3c63 6f64 653e 5f5f 7369 7a65 3c2f f __size indicates \n+0011dbe0: 7468 6520 746f 7461 6c20 7369 7a65 206f the total size o\n+0011dbf0: 6620 7468 6520 6174 7461 6368 6d65 6e74 f the attachment\n+0011dc00: 2064 6174 6120 746f 2062 6520 7472 616e data to be tran\n+0011dc10: 736d 6974 7465 642e 2049 6620 7468 6520 smitted. If the \n+0011dc20: 3c63 6f64 653e 5f5f 7369 7a65 3c2f 636f __size member varia\n+0011dc40: 626c 6520 6973 207a 6572 6f20 616e 6420 ble is zero and \n+0011dc50: 4854 5450 2063 6875 6e6b 696e 6720 6973 HTTP chunking is\n+0011dc60: 2065 6e61 626c 6564 2028 7769 7468 203c enabled (with <\n+0011dc70: 636f 6465 3e23 534f 4150 5f49 4f5f 4348 code>#SOAP_IO_CH\n+0011dc80: 554e 4b3c 2f63 6f64 653e 292c 2074 6865 UNK), the\n+0011dc90: 6e20 4d49 4d45 2f4d 544f 4d20 6368 756e n MIME/MTOM chun\n+0011dca0: 6b65 6420 7472 616e 7366 6572 7320 6172 ked transfers ar\n+0011dcb0: 6520 6163 7469 7661 7465 6420 6279 2074 e activated by t\n+0011dcc0: 6865 2065 6e67 696e 652c 2077 6869 6368 he engine, which\n+0011dcd0: 2069 7320 6d6f 7265 2066 6c65 7869 626c is more flexibl\n+0011dce0: 6520 7369 6e63 6520 7468 6520 6174 7461 e since the atta\n+0011dcf0: 6368 6d65 6e74 2064 6174 6120 7369 7a65 chment data size\n+0011dd00: 2064 6f65 7320 6e6f 7420 6e65 6564 2074 does not need t\n+0011dd10: 6f20 6265 2064 6574 6572 6d69 6e65 6420 o be determined \n+0011dd20: 696e 2061 6476 616e 6365 2e20 546f 2075 in advance. To u\n+0011dd30: 7365 204d 494d 452f 4d54 4f4d 2063 6875 se MIME/MTOM chu\n+0011dd40: 6e6b 6564 2074 7261 6e73 6665 7273 2c20 nked transfers, \n+0011dd50: 656e 6162 6c65 2048 5454 5020 6368 756e enable HTTP chun\n+0011dd60: 6b69 6e67 2077 6974 6820 3c63 6f64 653e king with \n+0011dd70: 2353 4f41 505f 494f 5f43 4855 4e4b 3c2f #SOAP_IO_CHUNK (also #SOAP_IO_STORE\n+0011dda0: 3c2f 636f 6465 3e20 6361 6e20 6265 2075 can be u\n+0011ddb0: 7365 642c 2062 7574 2074 6869 7320 6275 sed, but this bu\n+0011ddc0: 6666 6572 7320 7468 6520 656e 7469 7265 ffers the entire\n+0011ddd0: 206d 6573 7361 6765 2069 6e20 6d65 6d6f message in memo\n+0011dde0: 7279 2062 6566 6f72 6520 7472 616e 736d ry before transm\n+0011ddf0: 6973 7369 6f6e 2920 616e 6420 7365 7420 ission) and set \n+0011de00: 7468 6520 3c63 6f64 653e 5f5f 7369 7a65 the __size\n+0011de10: 3c2f 636f 6465 3e20 6d65 6d62 6572 2076 member v\n+0011de20: 6172 6961 626c 6520 6f66 2074 6865 2061 ariable of the a\n+0011de30: 7474 6163 686d 656e 7420 7374 7275 6374 ttachment struct\n+0011de40: 2f63 6c61 7373 2074 6f20 7a65 726f 2e20 /class to zero. \n+0011de50: 5768 656e 204d 494d 452f 4d54 4f4d 2061 When MIME/MTOM a\n+0011de60: 7474 6163 686d 656e 7420 6368 756e 6b69 ttachment chunki\n+0011de70: 6e67 2069 7320 656e 6162 6c65 642c 2074 ng is enabled, t\n+0011de80: 6869 7320 6361 6c6c 6261 636b 2073 686f his callback sho\n+0011de90: 756c 6420 636f 6d70 6c65 7465 6c79 2066 uld completely f\n+0011dea0: 696c 6c20 7468 6520 3c63 6f64 653e 6275 ill the bu\n+0011deb0: 663c 2f63 6f64 653e 2062 7566 6665 7220 f buffer \n+0011dec0: 7769 7468 203c 636f 6465 3e6c 656e 3c2f with len bytes unle\n+0011dee0: 7373 2074 6865 206c 6173 7420 6461 7461 ss the last data\n+0011def0: 2063 6875 6e6b 2069 7320 7265 6163 6865 chunk is reache\n+0011df00: 6420 616e 6420 6665 7765 7220 6279 7465 d and fewer byte\n+0011df10: 7320 6172 6520 7265 7475 726e 6564 2e3c s are returned.<\n+0011df20: 2f6c 693e 0a3c 6c69 3e3c 636f 6465 3e76 /li>.
    • v\n+0011df30: 6f69 6420 282a 736f 6170 2e66 6d69 6d65 oid (*soap.fmime\n+0011df40: 7265 6164 636c 6f73 6529 2873 7472 7563 readclose)(struc\n+0011df50: 7420 736f 6170 202a 736f 6170 2c20 766f t soap *soap, vo\n+0011df60: 6964 202a 6861 6e64 6c65 293c 2f63 6f64 id *handle) This callback\n+0011df80: 2069 7320 6361 6c6c 6564 2062 7920 7468 is called by th\n+0011df90: 6520 656e 6769 6e65 2074 6f20 636c 6f73 e engine to clos\n+0011dfa0: 6520 7468 6520 4d49 4d45 2f4d 544f 4d20 e the MIME/MTOM \n+0011dfb0: 6174 7461 6368 6d65 6e74 2073 7472 6561 attachment strea\n+0011dfc0: 6d20 6166 7465 7220 7265 6164 696e 672e m after reading.\n+0011dfd0: 2054 6865 203c 636f 6465 3e68 616e 646c The handl\n+0011dfe0: 653c 2f63 6f64 653e 2070 6172 616d 6574 e paramet\n+0011dff0: 6572 2063 6f6e 7461 696e 7320 7468 6520 er contains the \n+0011e000: 6861 6e64 6c65 2072 6574 7572 6e65 6420 handle returned \n+0011e010: 6279 2074 6865 203c 636f 6465 3e3c 6120 by the soap::f\n+0011e0c0: 6d69 6d65 7265 6164 6f70 656e 3c2f 613e mimereadopen\n+0011e0d0: 3c2f 636f 6465 3e20 6361 6c6c 6261 636b callback\n+0011e0e0: 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f 6465 .
    • .
    • void *(*soap.fm\n+0011e100: 696d 6577 7269 7465 6f70 656e 2928 7374 imewriteopen)(st\n+0011e110: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n+0011e120: 2076 6f69 6420 2a68 616e 646c 652c 2063 void *handle, c\n+0011e130: 6f6e 7374 2063 6861 7220 2a69 642c 2063 onst char *id, c\n+0011e140: 6f6e 7374 2063 6861 7220 2a74 7970 652c onst char *type,\n+0011e150: 2063 6f6e 7374 2063 6861 7220 2a64 6573 const char *des\n+0011e160: 6372 6970 7469 6f6e 2c20 656e 756d 2073 cription, enum s\n+0011e170: 6f61 705f 6d69 6d65 5f65 6e63 6f64 696e oap_mime_encodin\n+0011e180: 6720 656e 636f 6469 6e67 293c 2f63 6f64 g encoding) Called by the\n+0011e1a0: 2074 6f20 7374 6172 7420 7265 6365 6976 to start receiv\n+0011e1b0: 696e 6720 6120 7374 7265 616d 696e 6720 ing a streaming \n+0011e1c0: 4d49 4d45 2f4d 544f 4d20 6174 7461 6368 MIME/MTOM attach\n+0011e1d0: 6d65 6e74 2e20 5468 6973 2063 616c 6c62 ment. This callb\n+0011e1e0: 6163 6b20 6f70 656e 7320 6120 7374 7265 ack opens a stre\n+0011e1f0: 616d 2074 6f20 7374 6172 7420 7772 6974 am to start writ\n+0011e200: 696e 6720 7468 6520 6174 7461 6368 6d65 ing the attachme\n+0011e210: 6e74 2064 6174 6120 7265 6365 6976 6564 nt data received\n+0011e220: 2e20 5468 6520 6163 7475 616c 2064 6174 . The actual dat\n+0011e230: 6120 7374 7265 616d 2077 696c 6c20 6265 a stream will be\n+0011e240: 2077 7269 7474 656e 2069 6e20 6368 756e written in chun\n+0011e250: 6b73 2075 7369 6e67 2074 6865 203c 636f ks using the soap::fmimew\n+0011e300: 7269 7465 3c2f 613e 3c2f 636f 6465 3e20 rite \n+0011e310: 6361 6c6c 6261 636b 2075 6e74 696c 206e callback until n\n+0011e320: 6f20 6d6f 7265 2064 6174 6120 6973 2061 o more data is a\n+0011e330: 7661 696c 6162 6c65 2061 6e64 2074 6865 vailable and the\n+0011e340: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::fmimewr\n+0011e3f0: 6974 6563 6c6f 7365 3c2f 613e 3c2f 636f iteclose callback is \n+0011e410: 6361 6c6c 6564 2074 6f20 636c 6f73 6520 called to close \n+0011e420: 7468 6520 7374 7265 616d 2e20 5468 6520 the stream. The \n+0011e430: 3c63 6f64 653e 6964 3c2f 636f 6465 3e2c id,\n+0011e440: 203c 636f 6465 3e74 7970 653c 2f63 6f64 type and opt\n+0011e460: 696f 6e73 3c2f 636f 6465 3e20 7061 7261 ions para\n+0011e470: 6d65 7465 7273 2061 7265 2074 6865 203c meters are the <\n+0011e480: 636f 6465 3e69 643c 2f63 6f64 653e 2c20 code>id, \n+0011e490: 3c63 6f64 653e 7479 7065 3c2f 636f 6465 type and opti\n+0011e4b0: 6f6e 733c 2f63 6f64 653e 206f 6620 7468 ons of th\n+0011e4c0: 6520 6174 7461 6368 6d65 6e74 2073 7472 e attachment str\n+0011e4d0: 7563 742f 636c 6173 7320 2865 2e67 2e20 uct/class (e.g. \n+0011e4e0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 xsd__base64B\n+0011e560: 696e 6172 793c 2f61 3e3c 2f63 6f64 653e inary\n+0011e570: 206f 7220 3c63 6f64 653e 3c61 2063 6c61 or \n+0011e5e0: 5f78 6f70 5f5f 496e 636c 7564 653c 2f61 _xop__Include with __ptr\n+0011e610: 2c20 3c63 6f64 653e 5f5f 7369 7a65 3c2f , __size, id<\n+0011e630: 2f63 6f64 653e 2c20 3c63 6f64 653e 7479 /code>, ty\n+0011e640: 7065 3c2f 636f 6465 3e20 616e 6420 3c63 pe and options members), res\n+0011e670: 7065 6374 6976 656c 792e 2054 6865 2063 pectively. The c\n+0011e680: 616c 6c62 6163 6b20 7368 6f75 6c64 2072 allback should r\n+0011e690: 6574 7572 6e20 6120 6861 6e64 6c65 2c20 eturn a handle, \n+0011e6a0: 7768 6963 6820 6973 2070 6173 7365 6420 which is passed \n+0011e6b0: 746f 2074 6865 203c 636f 6465 3e3c 6120 to the so\n+0011e750: 6170 3a3a 666d 696d 6577 7269 7465 3c2f ap::fmimewrite and \n+0011e810: 736f 6170 3a3a 666d 696d 6577 7269 7465 soap::fmimewrite\n+0011e820: 636c 6f73 653c 2f61 3e3c 2f63 6f64 653e close\n+0011e830: 2063 616c 6c62 6163 6b73 2e20 5468 6520 callbacks. The \n+0011e840: 3c63 6f64 653e 5f5f 7074 723c 2f63 6f64 __ptr member variab\n+0011e860: 6c65 206f 6620 7468 6520 6174 7461 6368 le of the attach\n+0011e870: 6d65 6e74 2073 7472 7563 742f 636c 6173 ment struct/clas\n+0011e880: 7320 6973 2073 6574 2062 7920 7468 6520 s is set by the \n+0011e890: 656e 6769 6e65 2074 6f20 7468 6520 7661 engine to the va\n+0011e8a0: 6c75 6520 6f66 2074 6869 7320 6861 6e64 lue of this hand\n+0011e8b0: 6c65 2e20 5468 6520 3c63 6f64 653e 5f5f le. The __\n+0011e8c0: 7369 7a65 3c2f 636f 6465 3e20 6d65 6d62 size memb\n+0011e8d0: 6572 2076 6172 6961 626c 6520 6973 2073 er variable is s\n+0011e8e0: 6574 2074 6f20 7468 6520 7369 7a65 206f et to the size o\n+0011e8f0: 6620 7468 6520 6174 7461 6368 6d65 6e74 f the attachment\n+0011e900: 2072 6563 6569 7665 642e 3c2f 6c69 3e0a received.
    • .\n+0011e910: 3c6c 693e 3c63 6f64 653e 696e 7420 282a
    • int (*\n+0011e920: 736f 6170 2e66 6d69 6d65 7772 6974 6529 soap.fmimewrite)\n+0011e930: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+0011e940: 6170 2c20 766f 6964 202a 6861 6e64 6c65 ap, void *handle\n+0011e950: 2c20 636f 6e73 7420 6368 6172 202a 6275 , const char *bu\n+0011e960: 662c 2073 697a 655f 7420 6c65 6e29 3c2f f, size_t len) This callb\n+0011e980: 6163 6b20 6973 2063 616c 6c65 6420 6279 ack is called by\n+0011e990: 2074 6865 2065 6e67 696e 6520 746f 2077 the engine to w\n+0011e9a0: 7269 7465 2061 2063 6875 6e6b 206f 6620 rite a chunk of \n+0011e9b0: 6174 7461 6368 6d65 6e74 2064 6174 6120 attachment data \n+0011e9c0: 7265 6365 6976 6564 2e20 5468 6520 3c63 received. The handle parameter cont\n+0011e9f0: 6169 6e73 2074 6865 2068 616e 646c 6520 ains the handle \n+0011ea00: 7265 7475 726e 6564 2062 7920 7468 6520 returned by the \n+0011ea10: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fmimewri\n+0011eac0: 7465 6f70 656e 3c2f 613e 3c2f 636f 6465 teopen callback. The \n+0011eae0: 3c63 6f64 653e 6275 663c 2f63 6f64 653e buf\n+0011eaf0: 2070 6172 616d 6574 6572 2063 6f6e 7461 parameter conta\n+0011eb00: 696e 7320 7468 6520 6461 7461 206f 6620 ins the data of \n+0011eb10: 6c65 6e67 7468 203c 636f 6465 3e6c 656e length len\n+0011eb20: 3c2f 636f 6465 3e2e 2052 6574 7572 6e73 . Returns\n+0011eb30: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK<\n+0011eb40: 2f63 6f64 653e 206f 7220 6120 3c63 6f64 /code> or a soap_status (int) \n+0011ec20: 6572 726f 7220 636f 6465 2e3c 2f6c 693e error code.
    • \n+0011ec30: 0a3c 6c69 3e3c 636f 6465 3e76 6f69 6420 .
    • void \n+0011ec40: 282a 736f 6170 2e66 6d69 6d65 7772 6974 (*soap.fmimewrit\n+0011ec50: 6563 6c6f 7365 2928 7374 7275 6374 2073 eclose)(struct s\n+0011ec60: 6f61 7020 2a73 6f61 702c 2076 6f69 6420 oap *soap, void \n+0011ec70: 2a68 616e 646c 6529 3c2f 636f 6465 3e20 *handle) \n+0011ec80: 5468 6973 2063 616c 6c62 6163 6b20 6973 This callback is\n+0011ec90: 2063 616c 6c65 6420 6279 2074 6865 2065 called by the e\n+0011eca0: 6e67 696e 6520 746f 2063 6c6f 7365 2074 ngine to close t\n+0011ecb0: 6865 204d 494d 452f 4d54 4f4d 2061 7474 he MIME/MTOM att\n+0011ecc0: 6163 686d 656e 7420 7374 7265 616d 2061 achment stream a\n+0011ecd0: 6674 6572 2077 7269 7469 6e67 2e20 5468 fter writing. Th\n+0011ece0: 6520 3c63 6f64 653e 6861 6e64 6c65 3c2f e handle parameter \n+0011ed00: 636f 6e74 6169 6e73 2074 6865 2068 616e contains the han\n+0011ed10: 646c 6520 7265 7475 726e 6564 2062 7920 dle returned by \n+0011ed20: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap::fmim\n+0011edd0: 6577 7269 7465 6f70 656e 3c2f 613e 3c2f ewriteopen callback.<\n+0011edf0: 2f6c 693e 0a3c 2f75 6c3e 0a3c 703e 496e /li>.
    .

    In\n+0011ee00: 2061 6464 6974 696f 6e2c 2061 203c 636f addition, a void* soap::user<\n+0011eee0: 2f63 6f64 653e 206d 656d 6265 7220 6973 /code> member is\n+0011eef0: 2061 7661 696c 6162 6c65 2074 6f20 7061 available to pa\n+0011ef00: 7373 2075 7365 722d 6465 6669 6e65 6420 ss user-defined \n+0011ef10: 6461 7461 2074 6f20 7468 6520 6361 6c6c data to the call\n+0011ef20: 6261 636b 732e 2054 6869 7320 7761 792c backs. This way,\n+0011ef30: 2079 6f75 2063 616e 2073 6574 203c 636f you can set void* soap::user<\n+0011f010: 2f63 6f64 653e 2074 6f20 706f 696e 7420 /code> to point \n+0011f020: 746f 2061 7070 6c69 6361 7469 6f6e 2064 to application d\n+0011f030: 6174 6120 7468 6174 2074 6865 2063 616c ata that the cal\n+0011f040: 6c62 6163 6b73 206e 6565 6420 7375 6368 lbacks need such\n+0011f050: 2061 7320 6120 6669 6c65 206e 616d 6520 as a file name \n+0011f060: 666f 7220 6578 616d 706c 652e 3c2f 703e for example.

    \n+0011f070: 0a3c 703e 5468 6520 666f 6c6c 6f77 696e .

    The followin\n+0011f080: 6720 6578 616d 706c 6520 696c 6c75 7374 g example illust\n+0011f090: 7261 7465 7320 7468 6520 636c 6965 6e74 rates the client\n+0011f0a0: 2d73 6964 6520 696e 6974 6961 6c69 7a61 -side initializa\n+0011f0b0: 7469 6f6e 206f 6620 616e 2069 6d61 6765 tion of an image\n+0011f0c0: 2061 7474 6163 686d 656e 7420 7374 7275 attachment stru\n+0011f0d0: 6374 2074 6f20 7374 7265 616d 2061 2066 ct to stream a f\n+0011f0e0: 696c 6520 696e 746f 2061 204d 544f 4d20 ile into a MTOM \n+0011f0f0: 6174 7461 6368 6d65 6e74 2077 6974 686f attachment witho\n+0011f100: 7574 2048 5454 5020 6368 756e 6b69 6e67 ut HTTP chunking\n+0011f110: 2028 4854 5450 2073 7472 6561 6d69 6e67 (HTTP streaming\n+0011f120: 2063 6875 6e6b 6564 204d 544f 4d20 7472 chunked MTOM tr\n+0011f130: 616e 7366 6572 2069 7320 7072 6573 656e ansfer is presen\n+0011f140: 7465 6420 696e 2053 6563 7469 6f6e 203c ted in Section <\n+0011f150: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0011f160: 663d 2269 6e64 6578 2e68 746d 6c23 6d69 f=\"index.html#mi\n+0011f170: 6d65 6368 756e 6b69 6e67 223e 5374 7265 mechunking\">Stre\n+0011f180: 616d 696e 6720 6368 756e 6b65 6420 4d49 aming chunked MI\n+0011f190: 4d45 2f4d 544f 4d3c 2f61 3e20 293a 3c2f ME/MTOM ):.

    int \n+0011f1f0: 6d61 696e 2829 203c 2f64 6976 3e0a 3c64 main()
    .\n+0011f210: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    struct \n+0011f250: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+0011f280: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap;\n+0011f2b0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    struct \n+0011f2f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 xsd__base\n+0011f330: 3634 4269 6e61 7279 3c2f 613e 2069 6d61 64Binary ima\n+0011f340: 6765 3b20 3c2f 6469 763e 0a3c 6469 7620 ge;
    .
    F\n+0011f360: 494c 4520 2a66 643b 203c 2f64 6976 3e0a ILE *fd;
    .\n+0011f370: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct\n+0011f3a0: 203c 2f73 7061 6e3e 7374 6174 2073 623b stat sb;\n+0011f3b0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap_init1(\n+0011f430: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n+0011f460: 3c2f 613e 2c20 3c61 2063 6c61 7373 3d22 , SOAP_EN\n+0011f4c0: 435f 4d54 4f4d 3c2f 613e 293b 203c 7370 C_MTOM); // mandatory \n+0011f4f0: 746f 2065 6e61 626c 6520 4d54 4f4d 203c to enable MTOM <\n+0011f500: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+0011f520: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (!fstat(fil\n+0011f550: 656e 6f28 6664 292c 2026 616d 703b 7362 eno(fd), &sb\n+0011f560: 2920 2661 6d70 3b26 616d 703b 2073 622e ) && sb.\n+0011f570: 7374 5f73 697a 6520 2667 743b 2030 2920 st_size > 0) \n+0011f580: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    /\n+0011f5d0: 2f20 6265 6361 7573 6520 7765 2063 616e / because we can\n+0011f5e0: 2067 6574 2074 6865 206c 656e 6774 6820 get the length \n+0011f5f0: 6f66 2074 6865 2066 696c 652c 2077 6520 of the file, we \n+0011f600: 6361 6e20 7374 7265 616d 2069 7420 7769 can stream it wi\n+0011f610: 7468 6f75 7420 6368 756e 6b69 6e67 203c thout chunking <\n+0011f620: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+0011f640: 2020 203c 6120 636c 6173 733d 2263 6f64 soap.fmimer\n+0011f6d0: 6561 646f 7065 6e3c 2f61 3e20 3d20 6d69 eadopen = mi\n+0011f6e0: 6d65 5f72 6561 645f 6f70 656e 3b20 3c2f me_read_open; .
    soap.fmimereadclose\n+0011f7a0: 3c2f 613e 203d 206d 696d 655f 7265 6164 = mime_read\n+0011f7b0: 5f63 6c6f 7365 3b20 3c2f 6469 763e 0a3c _close;
    .<\n+0011f7c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011f7d0: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap\n+0011f800: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .fmim\n+0011f860: 6572 6561 643c 2f61 3e20 3d20 6d69 6d65 eread = mime\n+0011f870: 5f72 6561 643b 203c 2f64 6976 3e0a 3c64 _read;
    .\n+0011f890: 2020 2020 696d 6167 652e 5f5f 7074 7220 image.__ptr \n+0011f8a0: 3d20 283c 7370 616e 2063 6c61 7373 3d22 = (uns\n+0011f8c0: 6967 6e65 643c 2f73 7061 6e3e 203c 7370 igned char*)fd; //\n+0011f910: 206d 7573 7420 7365 7420 746f 206e 6f6e must set to non\n+0011f920: 2d4e 554c 4c20 2874 6869 7320 6973 206f -NULL (this is o\n+0011f930: 7572 2066 6420 6861 6e64 6c65 2077 6869 ur fd handle whi\n+0011f940: 6368 2077 6520 6e65 6564 2069 6e20 7468 ch we need in th\n+0011f950: 6520 6361 6c6c 6261 636b 7329 203c 2f73 e callbacks)
    .
    \n+0011f980: 2069 6d61 6765 2e5f 5f73 697a 6520 3d20 image.__size = \n+0011f990: 7362 2e73 745f 7369 7a65 3b20 3c73 7061 sb.st_size; // must set si\n+0011f9c0: 7a65 203c 2f73 7061 6e3e 3c2f 6469 763e ze
    \n+0011f9d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n+0011fa00: 2020 3c73 7061 6e20 636c 6173 733d 226b else\n+0011fa20: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n+0011fa30: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011fa40: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
    .
    \n+0011fa60: 203c 7370 616e 2063 6c61 7373 3d22 636f // don\n+0011fa80: 393b 7420 6b6e 6f77 2074 6865 2073 697a 9;t know the siz\n+0011fa90: 652c 2073 6f20 6275 6666 6572 2069 7420 e, so buffer it \n+0011faa0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0011fac0: 2020 2020 3c73 7061 6e20 636c 6173 733d si\n+0011fae0: 7a65 5f74 3c2f 7370 616e 3e20 693b 203c ze_t i; <\n+0011faf0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int\n+0011fb30: 2063 3b20 3c2f 6469 763e 0a3c 6469 7620 c;
    .
    \n+0011fb50: 2069 6d61 6765 2e5f 5f70 7472 203d 2028 image.__ptr = (\n+0011fb60: 3c73 7061 6e20 636c 6173 733d 226b 6579 unsign\n+0011fb80: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed char*\n+0011fbb0: 293c 6120 636c 6173 733d 2263 6f64 6522 )soap_mallo\n+0011fc10: 633c 2f61 3e28 2661 6d70 3b3c 6120 636c c(&soap, MAX_\n+0011fc50: 4649 4c45 5f53 495a 4529 3b20 3c2f 6469 FILE_SIZE); .
    for (i\n+0011fca0: 203d 2030 3b20 6920 266c 743b 204d 4158 = 0; i < MAX\n+0011fcb0: 5f46 494c 455f 5349 5a45 3b20 692b 2b29 _FILE_SIZE; i++)\n+0011fcc0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {<\n+0011fce0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if ((c = fgetc(fd\n+0011fd30: 2929 203d 3d20 454f 4629 203c 2f64 6976 )) == EOF) .
    break;
    .
    \n+0011fda0: 2020 2069 6d61 6765 2e5f 5f70 7472 5b69 image.__ptr[i\n+0011fdb0: 5d20 3d20 633b 203c 2f64 6976 3e0a 3c64 ] = c;
    .\n+0011fdd0: 2020 2020 7d20 3c2f 6469 763e 0a3c 6469 }
    . \n+0011fdf0: 2020 2066 636c 6f73 6528 6664 293b 203c fclose(fd); <\n+0011fe00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    imag\n+0011fe20: 652e 5f5f 7369 7a65 203d 2069 3b20 3c2f e.__size = i; .
    } .
    image.type\n+0011fe70: 203d 203c 7370 616e 2063 6c61 7373 3d22 = &\n+0011fe90: 7175 6f74 3b69 6d61 6765 2f6a 7065 6726 quot;image/jpeg&\n+0011fea0: 7175 6f74 3b3c 2f73 7061 6e3e 3b20 3c73 quot;; // MIME type\n+0011fed0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+0011fee0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0011fef0: 3e20 2069 6d61 6765 2e6f 7074 696f 6e73 > image.options\n+0011ff00: 203d 203c 7370 616e 2063 6c61 7373 3d22 = &\n+0011ff20: 7175 6f74 3b54 6869 7320 6973 206d 7920 quot;This is my \n+0011ff30: 7069 6374 7572 6526 7175 6f74 3b3c 2f73 picture"; // d\n+0011ff60: 6573 6372 6970 7469 6f6e 206f 6620 6f62 escription of ob\n+0011ff70: 6a65 6374 203c 2f73 7061 6e3e 3c2f 6469 ject .
    if (soap\n+0011ffc0: 5f63 616c 6c5f 6e73 5f5f 7765 626d 6574 _call_ns__webmet\n+0011ffd0: 686f 6428 2661 6d70 3b3c 6120 636c 6173 hod(&\n+00120000: 736f 6170 3c2f 613e 2c20 2e2e 2e29 293c soap, ...))<\n+00120010: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... \n+00120030: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // error
    . \n+00120070: 3c73 7061 6e20 636c 6173 733d 226b 6579 else
    . \n+001200b0: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // s\n+001200d0: 7563 6365 7373 3c2f 7370 616e 3e3c 2f64 uccess.
    }
    .<\n+00120100: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00120110: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    void\n+00120150: 202a 6d69 6d65 5f72 6561 645f 6f70 656e *mime_read_open\n+00120160: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap\n+001201b0: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+001201e0: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, void *ha\n+00120210: 6e64 6c65 2c20 3c73 7061 6e20 636c 6173 ndle, cons\n+00120230: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+00120260: 3c73 7061 6e20 636c 6173 733d 226b 6579 id, const\n+001202a0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *t\n+001202d0: 7970 652c 203c 7370 616e 2063 6c61 7373 ype, const\n+001202f0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *d\n+00120320: 6573 6372 6970 7469 6f6e 2920 3c2f 6469 escription) .
    {
    . \n+00120360: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n+00120380: 6e3c 2f73 7061 6e3e 2068 616e 646c 653b n handle;\n+00120390: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } .
    .<\n+001203e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001203f0: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void mime_read_c\n+00120410: 6c6f 7365 283c 7370 616e 2063 6c61 7373 lose(struc\n+00120430: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n+00120460: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, void\n+001204c0: 202a 6861 6e64 6c65 2920 3c2f 6469 763e *handle)
    \n+001204d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    f\n+00120500: 636c 6f73 6528 2846 494c 452a 2968 616e close((FILE*)han\n+00120510: 646c 6529 3b20 3c2f 6469 763e 0a3c 6469 dle);
    .}\n+00120530: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    si\n+00120580: 7a65 5f74 3c2f 7370 616e 3e20 6d69 6d65 ze_t mime\n+00120590: 5f72 6561 6428 3c73 7061 6e20 636c 6173 _read(stru\n+001205b0: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, void *handle, char\n+00120670: 202a 6275 662c 203c 7370 616e 2063 6c61 *buf, size_t l\n+001206a0: 656e 2920 3c2f 6469 763e 0a3c 6469 7620 en)
    .
    {.
    return\n+00120700: 2066 7265 6164 2862 7566 2c20 312c 206c fread(buf, 1, l\n+00120710: 656e 2c20 2846 494c 452a 2968 616e 646c en, (FILE*)handl\n+00120720: 6529 3b20 3c2f 6469 763e 0a3c 6469 7620 e);
    .
    }.
    \n+001207b0: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap::\n+00120800: 666d 696d 6572 6561 646f 7065 6e3c 2f61 fmimereadopen
    \n+001208a0: 4361 6c6c 6261 636b 2074 6f20 6f70 656e Callback to open\n+001208b0: 2061 2073 7472 6561 6d69 6e67 204d 494d a streaming MIM\n+001208c0: 452f 4d54 4f4d 2061 7474 6163 686d 656e E/MTOM attachmen\n+001208d0: 7420 666f 7220 7265 6164 696e 672e 3c2f t for reading.
    Defini\n+00120900: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+00120910: 7032 2e68 3a34 3839 363c 2f64 6976 3e3c p2.h:4896
    <\n+00120920: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Cal\n+00120a60: 6c62 6163 6b20 746f 2063 6c6f 7365 2061 lback to close a\n+00120a70: 204d 494d 452f 4d54 4f4d 2061 7474 6163 MIME/MTOM attac\n+00120a80: 686d 656e 7420 7374 7265 616d 2061 6674 hment stream aft\n+00120a90: 6572 2072 6561 6469 6e67 2e3c 2f64 6976 er reading.
    Definitio\n+00120ac0: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+00120ad0: 683a 3439 3239 3c2f 6469 763e 3c2f 6469 h:4929
    .
    soap::fm\n+00120ba0: 696d 6572 6561 643c 2f61 3e3c 2f64 6976 imeread
    size_t(* fm\n+00120bd0: 696d 6572 6561 6429 2873 7472 7563 7420 imeread)(struct \n+00120be0: 736f 6170 202a 736f 6170 2c20 766f 6964 soap *soap, void\n+00120bf0: 202a 6861 6e64 6c65 2c20 6368 6172 202a *handle, char *\n+00120c00: 6275 662c 2073 697a 655f 7420 6c65 6e29 buf, size_t len)\n+00120c10: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Callbac\n+00120c30: 6b20 746f 2072 6561 6420 6461 7461 2069 k to read data i\n+00120c40: 6e20 6120 4d49 4d45 2f4d 544f 4d20 6174 n a MIME/MTOM at\n+00120c50: 7461 6368 6d65 6e74 2073 7472 6561 6d2e tachment stream.\n+00120c60: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n+00120c80: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n+00120c90: 6f61 7032 2e68 3a34 3931 343c 2f64 6976 oap2.h:4914
    .
    <\n+00120cc0: 703e 5468 6520 666f 6c6c 6f77 696e 6720 p>The following \n+00120cd0: 6578 616d 706c 6520 696c 6c75 7374 7261 example illustra\n+00120ce0: 7465 7320 7468 6520 7374 7265 616d 696e tes the streamin\n+00120cf0: 6720 6f66 2061 204d 494d 452f 4d54 4f4d g of a MIME/MTOM\n+00120d00: 2061 7474 6163 686d 656e 7420 696e 746f attachment into\n+00120d10: 2061 2066 696c 6520 6279 2061 2063 6c69 a file by a cli\n+00120d20: 656e 743a 3c2f 703e 0a3c 6469 7620 636c ent:

    .
    <\n+00120d40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00120d50: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int main() .
    {
    .\n+00120db0: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n+00120dd0: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n+00120e00: 703c 2f61 3e20 3c61 2063 6c61 7373 3d22 p soa\n+00120e30: 703c 2f61 3e3b 203c 2f64 6976 3e0a 3c64 p;
    .\n+00120e50: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_init\n+00120eb0: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap); .
    so\n+00120f30: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.fm\n+00120f90: 696d 6577 7269 7465 6f70 656e 3c2f 613e imewriteopen\n+00120fa0: 203d 206d 696d 655f 7772 6974 655f 6f70 = mime_write_op\n+00120fb0: 656e 3b20 3c2f 6469 763e 0a3c 6469 7620 en;
    .
    <\n+00120fd0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00120fe0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00120ff0: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html\">soap.<\n+00121000: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00121010: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00121020: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm\n+00121030: 6c23 6761 3861 6638 3834 3039 3662 3231 l#ga8af884096b21\n+00121040: 6365 6131 6236 3931 3333 3834 3331 3331 cea1b69133843131\n+00121050: 6134 3762 223e 666d 696d 6577 7269 7465 a47b\">fmimewrite\n+00121060: 636c 6f73 653c 2f61 3e20 3d20 6d69 6d65 close = mime\n+00121070: 5f77 7269 7465 5f63 6c6f 7365 3b20 3c2f _write_close; .
    \n+001210c0: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.\n+00121120: 666d 696d 6577 7269 7465 3c2f 613e 203d fmimewrite =\n+00121130: 206d 696d 655f 7772 6974 653b 203c 2f64 mime_write; .
    if (soa\n+00121180: 705f 6361 6c6c 5f6e 735f 5f77 6562 6d65 p_call_ns__webme\n+00121190: 7468 6f64 2826 616d 703b 3c61 2063 6c61 thod(&soap, ...))\n+001211d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ...\n+001211f0: 203c 7370 616e 2063 6c61 7373 3d22 636f // error<\n+00121210: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+00121230: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else<\n+00121250: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . \n+00121270: 2020 202e 2e2e 203c 7370 616e 2063 6c61 ... // \n+00121290: 7375 6363 6573 733c 2f73 7061 6e3e 3c2f success.
    }
    .\n+001212c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    void *mime_write_op\n+00121320: 656e 283c 7370 616e 2063 6c61 7373 3d22 en(struct<\n+00121340: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n+00121370: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+001213a0: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, c\n+001213c0: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *id<\n+00121410: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, co\n+00121430: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n+00121460: 202a 7479 7065 2c20 3c73 7061 6e20 636c *type, co\n+00121480: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n+001214b0: 202a 6465 7363 7269 7074 696f 6e2c 203c *description, <\n+001214c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001214d0: 6f72 6422 3e65 6e75 6d3c 2f73 7061 6e3e ord\">enum\n+001214e0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_mime_enc\n+00121540: 6f64 696e 673c 2f61 3e20 656e 636f 6469 oding encodi\n+00121550: 6e67 2920 3c2f 6469 763e 0a3c 6469 7620 ng)
    .
    {.
    FILE *h\n+00121590: 616e 646c 6520 3d20 3c61 2063 6c61 7373 andle = f\n+001215f0: 6f70 656e 3c2f 613e 283c 7370 616e 2063 open("somef\n+00121620: 696c 6526 7175 6f74 3b3c 2f73 7061 6e3e ile"\n+00121630: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n+00121650: 756f 743b 7762 2671 756f 743b 3c2f 7370 uot;wb");
    . \n+00121680: 203c 7370 616e 2063 6c61 7373 3d22 636f // We ign\n+001216a0: 6f72 6520 7468 6520 4d49 4d45 2063 6f6e ore the MIME con\n+001216b0: 7465 6e74 2074 7261 6e73 6665 7220 656e tent transfer en\n+001216c0: 636f 6469 6e67 2068 6572 652c 2062 7574 coding here, but\n+001216d0: 2073 686f 756c 6420 6368 6563 6b20 3c2f should check
    . \n+00121700: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (!handle) .
    {
    \n+00121750: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    so\n+00121790: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->error = \n+001217f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_EOF\n+00121850: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n+00121870: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00121880: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00121890: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+001218a0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;errn\n+001218f0: 756d 3c2f 613e 203d 2065 7272 6e6f 3b20 um = errno; \n+00121900: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // get rea\n+00121920: 736f 6e20 3c2f 7370 616e 3e3c 2f64 6976 son .
    }
    .<\n+00121950: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00121960: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret\n+00121980: 7572 6e3c 2f73 7061 6e3e 2028 3c73 7061 urn (void*)handle; .
    }
    . \n+001219f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    void m\n+00121a30: 696d 655f 7772 6974 655f 636c 6f73 6528 ime_write_close(\n+00121a40: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+00121a90: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+00121ac0: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , \n+00121ae0: 766f 6964 3c2f 7370 616e 3e20 2a68 616e void *han\n+00121af0: 646c 6529 203c 2f64 6976 3e0a 3c64 6976 dle)
    .{<\n+00121b10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    fclose((FIL\n+00121b90: 452a 2968 616e 646c 6529 3b20 3c2f 6469 E*)handle); .
    }
    .\n+00121bd0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int m\n+00121c10: 696d 655f 7772 6974 6528 3c73 7061 6e20 ime_write(\n+00121c30: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n+00121c70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00121c80: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00121c90: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00121ca0: 3c73 7061 6e20 636c 6173 733d 226b 6579 void *handle, <\n+00121cd0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00121ce0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n+00121d10: 3c2f 7370 616e 3e20 2a3c 6120 636c 6173 *buf, size_t len)
    .<\n+00121da0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00121db0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    size_t nwritten; <\n+00121e00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    while\n+00121e40: 2028 6c65 6e29 203c 2f64 6976 3e0a 3c64 (len)
    .\n+00121e60: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n+00121e80: 6e77 7269 7474 656e 203d 2066 7772 6974 nwritten = fwrit\n+00121e90: 6528 3c61 2063 6c61 7373 3d22 636f 6465 e(buf, 1, len, (FIL\n+00121ef0: 452a 2968 616e 646c 6529 3b20 3c2f 6469 E*)handle); .
    if (!n\n+00121f40: 7772 6974 7465 6e29 203c 2f64 6976 3e0a written)
    .\n+00121f50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .\n+00121f80: 2020 2020 2020 3c61 2063 6c61 7373 3d22
    soa\n+00121fb0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->errnum = \n+00122010: 6572 726e 6f3b 203c 7370 616e 2063 6c61 errno; // \n+00122030: 6765 7420 7265 6173 6f6e 203c 2f73 7061 get reason
    .
    \n+00122060: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n+00122080: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA\n+001220e0: 505f 454f 463c 2f61 3e3b 203c 2f64 6976 P_EOF; .
    }
    \n+00122110: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    len -= nw\n+00122130: 7269 7474 656e 3b20 3c2f 6469 763e 0a3c ritten;
    .<\n+00122140: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00122150: 3e20 2020 203c 6120 636c 6173 733d 2263 > bu\n+001221a0: 663c 2f61 3e20 2b3d 206e 7772 6974 7465 f += nwritte\n+001221b0: 6e3b 203c 2f64 6976 3e0a 3c64 6976 2063 n;
    .
    } \n+001221d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return SOAP_OK;
    .
    }.
    Ca\n+001223d0: 6c6c 6261 636b 2074 6f20 636c 6f73 6520 llback to close \n+001223e0: 6120 4d49 4d45 2f4d 544f 4d20 6174 7461 a MIME/MTOM atta\n+001223f0: 6368 6d65 6e74 2073 7472 6561 6d20 6166 chment stream af\n+00122400: 7465 7220 7772 6974 696e 672e 3c2f 6469 ter writing.
    Definiti\n+00122430: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+00122440: 2e68 3a35 3032 303c 2f64 6976 3e3c 2f64 .h:5020
    .
    <\n+001224c0: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n+001224d0: 726f 7570 5f5f 6361 6c6c 6261 636b 732e roup__callbacks.\n+001224e0: 6874 6d6c 2367 6139 3038 3466 3033 3932 html#ga9084f0392\n+001224f0: 6534 6135 3432 3837 3336 3631 3231 6433 e4a54287366121d3\n+00122500: 3062 6334 3833 3022 3e73 6f61 703a 3a66 0bc4830\">soap::f\n+00122510: 6d69 6d65 7772 6974 653c 2f61 3e3c 2f64 mimewrite
    int(* fmi\n+00122540: 6d65 7772 6974 6529 2873 7472 7563 7420 mewrite)(struct \n+00122550: 736f 6170 202a 736f 6170 2c20 766f 6964 soap *soap, void\n+00122560: 202a 6861 6e64 6c65 2c20 636f 6e73 7420 *handle, const \n+00122570: 6368 6172 202a 6275 662c 2073 697a 655f char *buf, size_\n+00122580: 7420 6c65 6e29 3c2f 6469 763e 3c64 6976 t len)
    C\n+001225a0: 616c 6c62 6163 6b20 746f 2077 7269 7465 allback to write\n+001225b0: 2064 6174 6120 696e 2061 204d 494d 4520 data in a MIME \n+001225c0: 6174 7461 6368 6d65 6e74 2073 7472 6561 attachment strea\n+001225d0: 6d2e 3c2f 6469 763e 3c64 6976 2063 6c61 m.
    De\n+001225f0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n+00122600: 6473 6f61 7032 2e68 3a35 3030 393c 2f64 dsoap2.h:5009
    .
    void *(* fmimew\n+00122710: 7269 7465 6f70 656e 2928 7374 7275 6374 riteopen)(struct\n+00122720: 2073 6f61 7020 2a73 6f61 702c 2076 6f69 soap *soap, voi\n+00122730: 6420 2a68 616e 646c 652c 2063 6f6e 7374 d *handle, const\n+00122740: 2063 6861 7220 2a69 642c 2063 6f6e 7374 char *id, const\n+00122750: 2063 6861 7220 2a74 7970 652c 2063 6f6e char *type, con\n+00122760: 7374 2063 6861 7220 2a64 6573 6372 6970 st char *descrip\n+00122770: 7469 6f6e 2c20 656e 756d 2073 6f61 705f tion, enum soap_\n+00122780: 6d69 6d65 5f65 6e63 6f64 696e 6720 656e mime_encoding en\n+00122790: 636f 6469 6e67 293c 2f64 6976 3e3c 6469 coding)
    \n+001227b0: 4361 6c6c 6261 636b 2074 6f20 6f70 656e Callback to open\n+001227c0: 2061 2073 7472 6561 6d69 6e67 204d 494d a streaming MIM\n+001227d0: 452f 4d54 4f4d 2061 7474 6163 686d 656e E/MTOM attachmen\n+001227e0: 7420 666f 7220 7772 6974 696e 672e 3c2f t for writing.
    Defini\n+00122810: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+00122820: 7032 2e68 3a34 3939 383c 2f64 6976 3e3c p2.h:4998
    <\n+00122830: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_mime_encod\n+00122920: 696e 673c 2f64 6976 3e3c 6469 7620 636c ing
    RFC2\n+00122940: 3034 3520 4d49 4d45 2063 6f6e 7465 6e74 045 MIME content\n+00122950: 2074 7261 6e73 6665 7220 656e 636f 6469 transfer encodi\n+00122960: 6e67 732e 3c2f 6469 763e 3c64 6976 2063 ngs.
    \n+00122980: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+00122990: 7374 6473 6f61 7032 2e68 3a31 3032 3233 stdsoap2.h:10223\n+001229a0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    Message c\n+001229d0: 6f6d 7072 6573 7369 6f6e 2077 6974 6820 ompression with \n+001229e0: 3c63 6f64 653e 2353 4f41 505f 454e 435f #SOAP_ENC_\n+001229f0: 5a4c 4942 3c2f 636f 6465 3e20 6361 6e20 ZLIB can \n+00122a00: 6265 2075 7365 6420 7769 7468 204d 494d be used with MIM\n+00122a10: 4520 746f 2063 6f6d 7072 6573 7320 7468 E to compress th\n+00122a20: 6520 656e 7469 7265 206d 6573 7361 6765 e entire message\n+00122a30: 2e20 486f 7765 7665 722c 2063 6f6d 7072 . However, compr\n+00122a40: 6573 7369 6f6e 2072 6571 7569 7265 7320 ession requires \n+00122a50: 6275 6666 6572 696e 6720 746f 2064 6574 buffering to det\n+00122a60: 6572 6d69 6e65 2074 6865 2048 5454 5020 ermine the HTTP \n+00122a70: 636f 6e74 656e 7420 6c65 6e67 7468 2068 content length h\n+00122a80: 6561 6465 722c 2077 6869 6368 2063 616e eader, which can\n+00122a90: 6365 6c73 2074 6865 2062 656e 6566 6974 cels the benefit\n+00122aa0: 7320 6f66 2073 7472 6561 6d69 6e67 204d s of streaming M\n+00122ab0: 494d 452e 2054 6f20 6176 6f69 6420 7468 IME. To avoid th\n+00122ac0: 6973 2c20 796f 7520 7368 6f75 6c64 2075 is, you should u\n+00122ad0: 7365 2063 6875 6e6b 6564 2048 5454 5020 se chunked HTTP \n+00122ae0: 2877 6974 6820 7468 6520 6f75 7470 7574 (with the output\n+00122af0: 2d6d 6f64 6520 3c63 6f64 653e 2353 4f41 -mode #SOA\n+00122b00: 505f 494f 5f43 4855 4e4b 3c2f 636f 6465 P_IO_CHUNK flag) with com\n+00122b20: 7072 6573 7369 6f6e 2061 6e64 2073 7472 pression and str\n+00122b30: 6561 6d69 6e67 204d 494d 452e 2041 7420 eaming MIME. At \n+00122b40: 7468 6520 7365 7276 6572 2073 6964 652c the server side,\n+00122b50: 2077 6865 6e20 796f 7520 7365 7420 3c63 when you set #SOAP_IO_CHU\n+00122b70: 4e4b 3c2f 636f 6465 3e20 6265 666f 7265 NK before\n+00122b80: 2063 616c 6c69 6e67 203c 636f 6465 3e3c calling <\n+00122b90: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00122ba0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00122bb0: 5f69 6f2e 6874 6d6c 2367 6135 3164 6261 _io.html#ga51dba\n+00122bc0: 3737 3036 6135 3035 3234 3062 6438 3933 7706a505240bd893\n+00122bd0: 3563 3062 3238 6534 3139 6422 2074 6974 5c0b28e419d\" tit\n+00122be0: 6c65 3d22 5365 7276 6520 6120 7065 6e64 le=\"Serve a pend\n+00122bf0: 696e 6720 7265 7175 6573 742e 223e 736f ing request.\">so\n+00122c00: 6170 5f73 6572 7665 3c2f 613e 3c2f 636f ap_serve, the engine \n+00122c20: 7769 6c6c 2061 7574 6f6d 6174 6963 616c will automatical\n+00122c30: 6c79 2072 6576 6572 7420 746f 2062 7566 ly revert to buf\n+00122c40: 6665 7269 6e67 2028 3c63 6f64 653e 2353 fering (#S\n+00122c50: 4f41 505f 494f 5f53 544f 5245 3c2f 636f OAP_IO_STORE flag is set)\n+00122c70: 2e20 596f 7520 6361 6e20 6368 6563 6b20 . You can check \n+00122c80: 7468 6973 2066 6c61 6720 7769 7468 203c this flag with <\n+00122c90: 636f 6465 3e28 736f 6170 2d26 6774 3b6f code>(soap->o\n+00122ca0: 6d6f 6465 2026 616d 703b 2053 4f41 505f mode & SOAP_\n+00122cb0: 494f 2920 3d3d 2053 4f41 505f 494f 5f43 IO) == SOAP_IO_C\n+00122cc0: 4855 4e4b 3c2f 636f 6465 3e20 746f 2073 HUNK to s\n+00122cd0: 6565 2069 6620 7468 6520 636c 6965 6e74 ee if the client\n+00122ce0: 2061 6363 6570 7473 2063 6875 6e6b 696e accepts chunkin\n+00122cf0: 672e 204d 6f72 6520 696e 666f 726d 6174 g. More informat\n+00122d00: 696f 6e20 6162 6f75 7420 7374 7265 616d ion about stream\n+00122d10: 696e 6720 6368 756e 6b65 6420 4d49 4d45 ing chunked MIME\n+00122d20: 2063 616e 2062 6520 666f 756e 6420 696e can be found in\n+00122d30: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Streaming \n+00122d70: 6368 756e 6b65 6420 4d49 4d45 2f4d 544f chunked MIME/MTO\n+00122d80: 4d3c 2f61 3e20 2e2e 3c2f 703e 0a3c 703e M ..

    .

    \n+00122d90: 4e6f 7465 2074 6861 7420 7468 6520 6578 Note that the ex\n+00122da0: 616d 706c 6520 6162 6f76 6520 666f 7220 ample above for \n+00122db0: 3c63 6f64 653e 6d69 6d65 5f72 6561 643c mime_read<\n+00122dc0: 2f63 6f64 653e 2075 7365 7320 6120 6861 /code> uses a ha\n+00122dd0: 6e64 6c65 2074 6861 7420 706f 696e 7473 ndle that points\n+00122de0: 2074 6f20 7468 6520 6f70 656e 2066 696c to the open fil\n+00122df0: 6520 3c63 6f64 653e 4649 4c45 2a3c 2f63 e FILE*. The simple\n+00122e10: 2065 7861 6d70 6c65 2061 626f 7665 2069 example above i\n+00122e20: 7320 6e6f 7420 7265 636f 6d6d 656e 6465 s not recommende\n+00122e30: 6420 7768 656e 2074 6865 2070 6c61 7466 d when the platf\n+00122e40: 6f72 6d20 696d 706f 7365 7320 6120 6c69 orm imposes a li\n+00122e50: 6d69 7420 6f6e 2074 6865 206e 756d 6265 mit on the numbe\n+00122e60: 7220 6f66 206f 7065 6e20 6669 6c65 2064 r of open file d\n+00122e70: 6573 6372 6970 746f 7273 2e20 596f 7520 escriptors. You \n+00122e80: 6361 6e20 7573 6520 7468 6520 6861 6e64 can use the hand\n+00122e90: 6c65 2074 6f20 7061 7373 2061 6c6f 6e67 le to pass along\n+00122ea0: 206d 6f72 6520 696e 666f 726d 6174 696f more informatio\n+00122eb0: 6e20 7468 616e 206a 7573 7420 7468 6520 n than just the \n+00122ec0: 6669 6c65 2064 6573 6372 6970 746f 722e file descriptor.\n+00122ed0: 2053 6f20 666f 7220 6578 616d 706c 652c So for example,\n+00122ee0: 2077 6865 6e20 7468 6520 6e75 6d62 6572 when the number\n+00122ef0: 206f 6620 6f70 656e 2066 696c 6520 6465 of open file de\n+00122f00: 7363 7269 7074 6f72 7320 6973 206c 696d scriptors is lim\n+00122f10: 6974 6564 206f 6e20 796f 7572 2070 6c61 ited on your pla\n+00122f20: 7466 6f72 6d2c 2079 6f75 2073 686f 756c tform, you shoul\n+00122f30: 6420 6c65 7420 7468 6520 6861 6e64 6c65 d let the handle\n+00122f40: 2070 6f69 6e74 2074 6f20 6120 7374 7275 point to a stru\n+00122f50: 6374 7572 6520 7769 7468 2066 696c 652d cture with file-\n+00122f60: 7265 6c61 7465 6420 696e 666f 726d 6174 related informat\n+00122f70: 696f 6e2e 2054 6865 2043 2b2b 2065 7861 ion. The C++ exa\n+00122f80: 6d70 6c65 2062 656c 6f77 2069 6c6c 7573 mple below illus\n+00122f90: 7472 6174 6573 2074 6869 733a 3c2f 703e trates this:

    \n+00122fa0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    file.xo\n+00122fd0: 705f 5f49 6e63 6c75 6465 203d 2073 6f61 p__Include = soa\n+00122fe0: 705f 6e65 775f 5f78 6f70 5f5f 496e 636c p_new__xop__Incl\n+00122ff0: 7564 6528 3c61 2063 6c61 7373 3d22 636f ude(soap<\n+00123020: 2f61 3e29 3b20 3c2f 6469 763e 0a3c 6469 /a>);
    .f\n+00123040: 696c 652e 786f 705f 5f49 6e63 6c75 6465 ile.xop__Include\n+00123050: 2d26 6774 3b69 6420 3d20 4e55 4c4c 3b20 ->id = NULL; \n+00123060: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    file.xo\n+00123080: 705f 5f49 6e63 6c75 6465 2d26 6774 3b74 p__Include->t\n+00123090: 7970 6520 3d20 7479 7065 3b20 3c2f 6469 ype = type; .
    file.xop__I\n+001230c0: 6e63 6c75 6465 2d26 6774 3b6f 7074 696f nclude->optio\n+001230d0: 6e73 203d 204e 554c 4c3b 203c 2f64 6976 ns = NULL; .
    .fi\n+00123110: 6c65 2e78 6d69 6d65 355f 5f63 6f6e 7465 le.xmime5__conte\n+00123120: 6e74 5479 7065 203d 2074 7970 653b 203c ntType = type; <\n+00123130: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    file.fil\n+00123150: 656e 616d 6520 3d20 6669 6c65 6e61 6d65 ename = filename\n+00123160: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    .
    // Th\n+001231b0: 6520 6f62 6a65 6374 2068 6f6c 6469 6e67 e object holding\n+001231c0: 2061 6c6c 2069 6e66 6f72 6d61 7469 6f6e all information\n+001231d0: 2074 6f20 7265 6164 2064 6174 6120 3c2f to read data
    .Fi\n+00123200: 6c65 5374 7265 616d 496e 202a 696e 7320 leStreamIn *ins \n+00123210: 3d20 3c73 7061 6e20 636c 6173 733d 226b = new FileStreamIn(\n+00123240: 6572 726f 7268 616e 646c 6572 293b 203c errorhandler); <\n+00123250: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ins->\n+00123270: 7365 7446 696c 6550 6174 6828 3c61 2063 setFilePath(path); \n+001232d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ins->\n+001232f0: 3b73 6574 4669 6c65 4e61 6d65 2866 696c ;setFileName(fil\n+00123300: 656e 616d 6529 3b20 3c2f 6469 763e 0a3c ename);
    .<\n+00123310: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00123320: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    file.\n+00123340: 786f 705f 5f49 6e63 6c75 6465 2d26 6774 xop__Include->\n+00123350: 3b5f 5f73 697a 6520 3d20 7369 7a65 3b20 ;__size = size; \n+00123360: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    file.xo\n+00123380: 705f 5f49 6e63 6c75 6465 2d26 6774 3b5f p__Include->_\n+00123390: 5f70 7472 203d 2028 3c73 7061 6e20 636c _ptr = (unsigned char\n+001233e0: 3c2f 7370 616e 3e2a 2969 6e73 3b3c 2f64 *)ins;.
    soa\n+00123490: 703a 3a70 6174 683c 2f61 3e3c 2f64 6976 p::path
    char path[S\n+001234c0: 4f41 505f 5441 474c 454e 5d3c 2f64 6976 OAP_TAGLEN]
    The client r\n+001234f0: 6571 7565 7374 2070 6174 6820 6173 2072 equest path as r\n+00123500: 6563 6569 7665 6420 6f6e 2074 6865 2073 eceived on the s\n+00123510: 6572 7665 7220 7369 6465 2e3c 2f64 6976 erver side.
    Definitio\n+00123540: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+00123550: 683a 3430 3332 3c2f 6469 763e 3c2f 6469 h:4032
    .

    To \n+00123580: 7265 6164 2074 6865 204d 544f 4d20 6461 read the MTOM da\n+00123590: 7461 2066 6f72 2074 7261 6e73 6d69 7373 ta for transmiss\n+001235a0: 696f 6e3a 3c2f 703e 0a3c 6469 7620 636c ion:

    .
    <\n+001235c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001235d0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void<\n+001235f0: 2f73 7061 6e3e 202a 6d69 6d65 5f72 6561 /span> *mime_rea\n+00123600: 645f 6f70 656e 283c 7370 616e 2063 6c61 d_open(str\n+00123620: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, void *handle, const <\n+001236e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001236f0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *\n+00123720: 6964 3c2f 7370 616e 3e2c 203c 7370 616e id, const char *type, const char *description\n+001237d0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    if (!han\n+00123830: 646c 6529 203c 2f64 6976 3e0a 3c64 6976 dle)
    . \n+00123850: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n+00123870: 726e 3c2f 7370 616e 3e20 4e55 4c4c 3b20 rn NULL; \n+00123880: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    FileS\n+001238a0: 7472 6561 6d49 6e20 2a69 6e73 203d 2028 treamIn *ins = (\n+001238b0: 4669 6c65 5374 7265 616d 496e 2a29 6861 FileStreamIn*)ha\n+001238c0: 6e64 6c65 3b20 3c2f 6469 763e 0a3c 6469 ndle;
    . \n+001238e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (!ins->o\n+00123910: 7065 6e28 2929 203c 2f64 6976 3e0a 3c64 pen())
    .\n+00123930: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    \n+00123950: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+00123980: 2667 743b 3c61 2063 6c61 7373 3d22 636f >err\n+001239d0: 6f72 3c2f 613e 203d 203c 6120 636c 6173 or = SOA\n+00123a30: 505f 4552 523c 2f61 3e3b 203c 2f64 6976 P_ERR; .
    return \n+00123a80: 4e55 4c4c 3b20 3c2f 6469 763e 0a3c 6469 NULL;
    . \n+00123aa0: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    return handle; .
    }
    .\n+00123b10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    void\n+00123b40: 3c2f 7370 616e 3e20 6d69 6d65 5f72 6561 mime_rea\n+00123b50: 645f 636c 6f73 6528 3c73 7061 6e20 636c d_close(st\n+00123b70: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, void *handle) .
    {
    .\n+00123c40: 2020 3c73 7061 6e20 636c 6173 733d 226b if (!handle) \n+00123c70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return;
    . \n+00123cd0: 2046 696c 6553 7472 6561 6d49 6e20 2a69 FileStreamIn *i\n+00123ce0: 6e73 203d 2028 4669 6c65 5374 7265 616d ns = (FileStream\n+00123cf0: 496e 2a29 6861 6e64 6c65 3b20 3c2f 6469 In*)handle; .
    del\n+00123d30: 6574 653c 2f73 7061 6e3e 2069 6e73 3b20 ete ins; \n+00123d40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    si\n+00123d90: 7a65 5f74 3c2f 7370 616e 3e20 6d69 6d65 ze_t mime\n+00123da0: 5f72 6561 6428 3c73 7061 6e20 636c 6173 _read(stru\n+00123dc0: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, void *handle, char\n+00123e80: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *buf, si\n+00123ef0: 7a65 5f74 3c2f 7370 616e 3e20 6c65 6e29 ze_t len)\n+00123f00: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    \n+00123f50: 6966 3c2f 7370 616e 3e20 2821 6861 6e64 if (!hand\n+00123f60: 6c65 2920 3c2f 6469 763e 0a3c 6469 7620 le)
    .
    \n+00123f80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n+00123fa0: 6e3c 2f73 7061 6e3e 2030 3b20 3c2f 6469 n 0; .
    FileStrea\n+00123fd0: 6d49 6e20 2a69 6e73 203d 2028 4669 6c65 mIn *ins = (File\n+00123fe0: 5374 7265 616d 496e 2a29 6861 6e64 6c65 StreamIn*)handle\n+00123ff0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    size_t nread = ins\n+00124040: 2d26 6774 3b72 6561 6428 3c61 2063 6c61 ->read(buf, len)\n+001240a0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    if\n+001240e0: 2028 696e 732d 2667 743b 7374 7265 616d (ins->stream\n+001240f0: 4572 726f 7228 2929 203c 2f64 6976 3e0a Error())
    .\n+00124100: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    . \n+00124130: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->e\n+001241b0: 7272 6f72 3c2f 613e 203d 2069 6e73 2d26 rror = ins-&\n+001241c0: 6774 3b73 7472 6561 6d45 7272 6f72 2829 gt;streamError()\n+001241d0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    <\n+001241f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00124200: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+00124210: 2f73 7061 6e3e 2030 3b20 3c2f 6469 763e /span> 0;
    \n+00124220: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .\n+00124250: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n+00124270: 726e 3c2f 7370 616e 3e20 6e72 6561 643b rn nread;\n+00124280: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    }.
    SOAP_ERR
    #define S\n+00124380: 4f41 505f 4552 523c 2f64 6976 3e3c 6469 OAP_ERR
    \n+001243a0: 4120 736f 6170 5f73 7461 7475 7320 6572 A soap_status er\n+001243b0: 726f 7220 636f 6465 3a20 616e 2075 6e73 ror code: an uns\n+001243c0: 7065 6369 6669 6564 2065 7272 6f72 206f pecified error o\n+001243d0: 6363 7572 7265 642e 3c2f 6469 763e 3c64 ccurred.
    Definition:<\n+00124400: 2f62 3e20 7374 6473 6f61 7032 2e68 3a32 /b> stdsoap2.h:2\n+00124410: 3337 343c 2f64 6976 3e3c 2f64 6976 3e0a 374
    .\n+00124420: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

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

    ..R\n+001244a0: 6564 6972 6563 7469 6e67 2069 6e62 6f75 edirecting inbou\n+001244b0: 6e64 204d 494d 452f 4d54 4f4d 2073 7472 nd MIME/MTOM str\n+001244c0: 6561 6d73 2062 6173 6564 206f 6e20 534f eams based on SO\n+001244d0: 4150 2062 6f64 7920 636f 6e74 656e 743c AP body content<\n+001244e0: 2f68 323e 0a3c 703e 5768 656e 2069 7420 /h2>.

    When it \n+001244f0: 6973 2070 7265 6665 7261 626c 6520 6f72 is preferable or\n+00124500: 2072 6571 7569 7265 6420 746f 2072 6564 required to red\n+00124510: 6972 6563 7420 696e 626f 756e 6420 4d49 irect inbound MI\n+00124520: 4d45 2f4d 544f 4d20 6174 7461 6368 6d65 ME/MTOM attachme\n+00124530: 6e74 2073 7472 6561 6d73 2062 6173 6564 nt streams based\n+00124540: 206f 6e20 534f 4150 206d 6573 7361 6765 on SOAP message\n+00124550: 2062 6f64 7920 636f 6e74 656e 742c 2077 body content, w\n+00124560: 6865 7265 2066 6f72 2065 7861 6d70 6c65 here for example\n+00124570: 2074 6865 206e 616d 6573 206f 6620 7468 the names of th\n+00124580: 6520 7265 736f 7572 6365 7320 6172 6520 e resources are \n+00124590: 6c69 7374 6564 2069 6e20 7468 6520 534f listed in the SO\n+001245a0: 4150 206d 6573 7361 6765 2062 6f64 792c AP message body,\n+001245b0: 2061 6e20 616c 7465 726e 6174 6976 6520 an alternative \n+001245c0: 6d65 6368 616e 6973 6d20 6d75 7374 2062 mechanism must b\n+001245d0: 6520 7573 6564 2074 6f20 6861 6e64 6c65 e used to handle\n+001245e0: 2074 6865 2061 7474 6163 686d 656e 7473 the attachments\n+001245f0: 2e20 5468 6973 206d 6563 6861 6e69 736d . This mechanism\n+00124600: 2063 616e 2062 6520 7573 6564 2061 7420 can be used at \n+00124610: 7468 6520 636c 6965 6e74 2061 6e64 2073 the client and s\n+00124620: 6572 7665 7220 7369 6465 2e3c 2f70 3e0a erver side.

    .\n+00124630: 3c70 3e42 6563 6175 7365 2074 6865 2072

    Because the r\n+00124640: 6f75 7469 6e67 206f 6620 7468 6520 7374 outing of the st\n+00124650: 7265 616d 7320 6973 2061 6363 6f6d 706c reams is accompl\n+00124660: 6973 6865 6420 7769 7468 2065 7870 6c69 ished with expli\n+00124670: 6369 7420 6675 6e63 7469 6f6e 2063 616c cit function cal\n+00124680: 6c73 2c20 7468 6973 206d 6574 686f 6420 ls, this method \n+00124690: 7368 6f75 6c64 206f 6e6c 7920 6265 2075 should only be u\n+001246a0: 7365 6420 7768 656e 2072 6571 7569 7265 sed when require\n+001246b0: 6420 616e 6420 7368 6f75 6c64 206e 6f74 d and should not\n+001246c0: 2062 6520 636f 6e73 6964 6572 6564 206f be considered o\n+001246d0: 7074 696f 6e61 6c2e 2054 6861 7420 6973 ptional. That is\n+001246e0: 2c20 7768 656e 2079 6f75 2065 6e61 626c , when you enabl\n+001246f0: 6520 7468 6973 206d 6574 686f 642c 2079 e this method, y\n+00124700: 6f75 206d 7573 7420 6368 6563 6b20 666f ou must check fo\n+00124710: 7220 7065 6e64 696e 6720 4d49 4d45 2f4d r pending MIME/M\n+00124720: 544f 4d20 6174 7461 6368 6d65 6e74 7320 TOM attachments \n+00124730: 616e 6420 6861 6e64 6c65 2074 6865 6d20 and handle them \n+00124740: 6170 7072 6f70 7269 6174 656c 792e 2054 appropriately. T\n+00124750: 6869 7320 6973 2074 7275 6520 6576 656e his is true even\n+00124760: 2077 6865 6e20 796f 7520 646f 6e27 7420 when you don't \n+00124770: 6578 7065 6374 204d 494d 452f 4d54 4f4d expect MIME/MTOM\n+00124780: 2061 7474 6163 686d 656e 7473 2069 6e20 attachments in \n+00124790: 7468 6520 7061 796c 6f61 642c 2062 6563 the payload, bec\n+001247a0: 6175 7365 2074 6865 2070 6565 7220 6d61 ause the peer ma\n+001247b0: 7920 7472 6963 6b20 796f 7520 6279 2073 y trick you by s\n+001247c0: 656e 6469 6e67 2061 7474 6163 686d 656e ending attachmen\n+001247d0: 7473 2061 6e79 7761 7920 616e 6420 796f ts anyway and yo\n+001247e0: 7520 7368 6f75 6c64 2062 6520 7072 6570 u should be prep\n+001247f0: 6172 6564 2074 6f20 6163 6365 7074 206f ared to accept o\n+00124800: 7220 7265 6a65 6374 2074 6865 6d2e 3c2f r reject them..

    The explic\n+00124820: 6974 204d 494d 452f 4d54 4f4d 2073 7472 it MIME/MTOM str\n+00124830: 6561 6d69 6e67 206d 6563 6861 6e69 736d eaming mechanism\n+00124840: 2063 6f6e 7369 7374 7320 6f66 2074 6872 consists of thr\n+00124850: 6565 2041 5049 2066 756e 6374 696f 6e73 ee API functions\n+00124860: 3a3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e3c :

    .
    .

    Example\n+00125250: 2063 6c69 656e 7420 696e 2043 3a3c 2f70 client in C:.

    \n+001252a0: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap *<\n+001252e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001252f0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00125300: 6874 6d6c 223e 736f 6170 3c2f 613e 203d html\">soap =\n+00125310: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_new1<\n+00125370: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(SOAP_ENC_\n+001253d0: 4d54 4f4d 3c2f 613e 293b 203c 2f64 6976 MTOM); .
    soap_post_\n+00125450: 6368 6563 6b5f 6d69 6d65 5f61 7474 6163 check_mime_attac\n+00125460: 686d 656e 7473 3c2f 613e 283c 6120 636c hments(soap); .
    \n+001254d0: 6966 3c2f 7370 616e 3e20 2873 6f61 705f if (soap_\n+001254e0: 6361 6c6c 5f6e 735f 5f6d 794d 6574 686f call_ns__myMetho\n+001254f0: 6428 3c61 2063 6c61 7373 3d22 636f 6465 d(soap, ...))
    .\n+00125530: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    soap_print_faul\n+001255c0: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soa\n+001255f0: 703c 2f61 3e2c 2073 7464 6572 7229 3b20 p, stderr); \n+00125600: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // an erro\n+00125620: 7220 6f63 6375 7272 6564 203c 2f73 7061 r occurred
    .
    }..<\n+00125790: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001257a0: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
    .
    \n+001257c0: 203c 7370 616e 2063 6c61 7373 3d22 636f // attach\n+001257e0: 6d65 6e74 7320 6172 6520 7072 6573 656e ments are presen\n+001257f0: 742c 2063 6861 6e6e 656c 2069 7320 7374 t, channel is st\n+00125800: 696c 6c20 6f70 656e 203c 2f73 7061 6e3e ill open \n+00125810: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    do\n+00125850: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    ...\n+00125890: 203c 7370 616e 2063 6c61 7373 3d22 636f // get da\n+001258b0: 7461 2026 2333 393b 6861 6e64 6c65 2623 ta 'handle&#\n+001258c0: 3339 3b20 6672 6f6d 2053 4f41 5020 7265 39; from SOAP re\n+001258d0: 7370 6f6e 7365 2061 6e64 2070 6173 7320 sponse and pass \n+001258e0: 746f 2063 616c 6c62 6163 6b73 203c 2f73 to callbacks
    .
    \n+00125910: 2020 202e 2e2e 203c 7370 616e 2063 6c61 ... // \n+00125930: 7365 7420 7468 6520 666d 696d 6520 6361 set the fmime ca\n+00125940: 6c6c 6261 636b 732c 2069 6620 6e65 6564 llbacks, if need\n+00125950: 6564 203c 2f73 7061 6e3e 3c2f 6469 763e ed
    \n+00125960: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    s\n+00125990: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct s\n+001259d0: 6f61 705f 6d75 6c74 6970 6172 743c 2f61 oap_multipart *content = s\n+00125a40: 6f61 705f 7265 6376 5f6d 696d 655f 6174 oap_recv_mime_at\n+00125a50: 7461 6368 6d65 6e74 3c2f 613e 283c 6120 tachment(soap, (<\n+00125a90: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00125aa0: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void*)handle); <\n+00125ac0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    pr\n+00125ae0: 696e 7466 283c 7370 616e 2063 6c61 7373 intf("Received \n+00125b10: 6174 7461 6368 6d65 6e74 2077 6974 6820 attachment with \n+00125b20: 6964 3d25 7320 616e 6420 7479 7065 3d25 id=%s and type=%\n+00125b30: 735c 6e26 7175 6f74 3b3c 2f73 7061 6e3e s\\n"\n+00125b40: 2c20 636f 6e74 656e 742d 2667 743b 3c61 , content->id?content\n+00125bb0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->id:\n+00125c10: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+00125c30: 743b 2671 756f 743b 3c2f 7370 616e 3e2c t;",\n+00125c40: 2063 6f6e 7465 6e74 2d26 6774 3b3c 6120 content->type?conten\n+00125cb0: 742d 2667 743b 3c61 2063 6c61 7373 3d22 t->type:&\n+00125d30: 7175 6f74 3b26 7175 6f74 3b3c 2f73 7061 quot;");
    . \n+00125d60: 2020 7d20 3c73 7061 6e20 636c 6173 733d } wh\n+00125d80: 696c 653c 2f73 7061 6e3e 2028 636f 6e74 ile (cont\n+00125d90: 656e 7429 3b20 3c2f 6469 763e 0a3c 6469 ent);
    . \n+00125db0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if<\n+00125dd0: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (s\n+00125e00: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->error) \n+00125e60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    <\n+00125e80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00125e90: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00125ea0: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga\n+00125eb0: 3933 3161 3461 6236 6466 3235 3533 6234 931a4ab6df2553b4\n+00125ec0: 3861 3063 3237 3066 3861 3061 3838 6166 8a0c270f8a0a88af\n+00125ed0: 223e 736f 6170 5f70 7269 6e74 5f66 6175 \">soap_print_fau\n+00125ee0: 6c74 3c2f 613e 283c 6120 636c 6173 733d lt(so\n+00125f10: 6170 3c2f 613e 2c20 7374 6465 7272 293b ap, stderr);\n+00125f20: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    }.
    }
    .<\n+00125f60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00125f70: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_destr\n+00125fd0: 6f79 3c2f 613e 283c 6120 636c 6173 733d oy(so\n+00126000: 6170 3c2f 613e 293b 203c 2f64 6976 3e0a ap);
    .\n+00126010: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .<\n+001260d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001260e0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001260f0: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+00126100: 6761 3537 3130 3863 6134 3638 3131 3836 ga57108ca4681186\n+00126110: 6535 3862 3562 3138 3963 3335 3238 6631 e58b5b189c3528f1\n+00126120: 3061 223e 736f 6170 5f66 7265 653c 2f61 0a\">soap_free(soap);
    ..<\n+001262e0: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+001262f0: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n+00126300: 705f 5f6d 696d 655f 6874 6d6c 5f67 6135 p__mime_html_ga5\n+00126310: 3763 6632 6139 3538 6232 6365 3665 3935 7cf2a958b2ce6e95\n+00126320: 3738 3935 3634 3263 6434 6330 3936 3622 7895642cd4c0966\"\n+00126330: 3e3c 6469 7620 636c 6173 733d 2274 746e >
    soap_p\n+00126390: 6f73 745f 6368 6563 6b5f 6d69 6d65 5f61 ost_check_mime_a\n+001263a0: 7474 6163 686d 656e 7473 3c2f 613e 3c2f ttachments
    int soap\n+001263d0: 5f70 6f73 745f 6368 6563 6b5f 6d69 6d65 _post_check_mime\n+001263e0: 5f61 7474 6163 686d 656e 7473 2873 7472 _attachments(str\n+001263f0: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)<\n+00126400: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Enable p\n+00126420: 6f73 742d 7072 6f63 6573 7369 6e67 206f ost-processing o\n+00126430: 6620 4d49 4d45 2f4d 544f 4d20 6174 7461 f MIME/MTOM atta\n+00126440: 6368 6d65 6e74 732e 3c2f 6469 763e 3c2f chments.
    .
    \n+00126500: 736f 6170 5f63 6865 636b 5f6d 696d 655f soap_check_mime_\n+00126510: 6174 7461 6368 6d65 6e74 733c 2f61 3e3c attachments<\n+00126520: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int soa\n+00126540: 705f 6368 6563 6b5f 6d69 6d65 5f61 7474 p_check_mime_att\n+00126550: 6163 686d 656e 7473 2873 7472 7563 7420 achments(struct \n+00126560: 736f 6170 202a 736f 6170 293c 2f64 6976 soap *soap)
    Check for a \n+00126590: 4d49 4d45 2f4d 544f 4d20 6174 7461 6368 MIME/MTOM attach\n+001265a0: 6d65 6e74 2e3c 2f64 6976 3e3c 2f64 6976 ment.
    .

    The \n+001265d0: 7365 7276 6572 2d73 6964 6520 7365 7276 server-side serv\n+001265e0: 6963 6520 6f70 6572 6174 696f 6e73 2061 ice operations a\n+001265f0: 7265 2069 6d70 6c65 6d65 6e74 6564 2061 re implemented a\n+00126600: 7320 7573 7561 6c2c 2062 7574 2077 6974 s usual, but wit\n+00126610: 6820 6164 6469 7469 6f6e 616c 2063 6865 h additional che\n+00126620: 636b 7320 666f 7220 4d49 4d45 2f4d 544f cks for MIME/MTO\n+00126630: 4d20 6174 7461 6368 6d65 6e74 733a 3c2f M attachments:.

    int \n+00126690: 6d61 696e 2829 3c2f 6469 763e 0a3c 6469 main()
    .{\n+001266b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct <\n+001266f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00126700: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00126710: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+00126720: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+00126750: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new1\n+001267b0: 3c2f 613e 283c 6120 636c 6173 733d 2263 (SOAP_ENC\n+00126810: 5f4d 544f 4d3c 2f61 3e29 3b20 3c2f 6469 _MTOM); ..
    soap_\n+00126950: 7365 7276 653c 2f61 3e28 3c61 2063 6c61 serve(soap); .
    }
    . \n+001269c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ns\n+00126a00: 5f5f 6d79 4d65 7468 6f64 283c 7370 616e __myMethod(struct <\n+00126a30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00126a40: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00126a50: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+00126a60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00126a90: 202e 2e2e 2920 3c2f 6469 763e 0a3c 6469 ...)
    .{\n+00126ab0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... <\n+00126ad0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00126ae0: 656e 7422 3e2f 2f20 7365 7276 6572 2d73 ent\">// server-s\n+00126af0: 6964 6520 7072 6f63 6573 7369 6e67 206c ide processing l\n+00126b00: 6f67 6963 203c 2f73 7061 6e3e 3c2f 6469 ogic .
    if (so\n+00126ba0: 6170 5f63 6865 636b 5f6d 696d 655f 6174 ap_check_mime_at\n+00126bb0: 7461 6368 6d65 6e74 733c 2f61 3e28 3c61 tachments(soap))<\n+00126bf0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    //\n+00126c40: 2061 7474 6163 686d 656e 7473 2061 7265 attachments are\n+00126c50: 2070 7265 7365 6e74 2c20 6368 616e 6e65 present, channe\n+00126c60: 6c20 6973 2073 7469 6c6c 206f 7065 6e20 l is still open \n+00126c70: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00126c90: 2020 2020 3c73 7061 6e20 636c 6173 733d do\n+00126cb0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .<\n+00126cc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00126cd0: 3e20 2020 207b 3c2f 6469 763e 0a3c 6469 > {
    . \n+00126cf0: 2020 2020 202e 2e2e 203c 7370 616e 2063 ... /\n+00126d10: 2f20 6765 7420 6461 7461 2026 2333 393b / get data '\n+00126d20: 6861 6e64 6c65 2623 3339 3b20 6672 6f6d handle' from\n+00126d30: 2053 4f41 5020 7265 7175 6573 7420 616e SOAP request an\n+00126d40: 6420 7061 7373 2074 6f20 6361 6c6c 6261 d pass to callba\n+00126d50: 636b 7320 3c2f 7370 616e 3e3c 2f64 6976 cks .
    ... // set the f\n+00126da0: 6d69 6d65 2063 616c 6c62 6163 6b73 2c20 mime callbacks, \n+00126db0: 6966 206e 6565 6465 6420 3c2f 7370 616e if needed
    .. \n+00126f40: 2020 2020 2070 7269 6e74 6628 3c73 7061 printf("Re\n+00126f70: 6365 6976 6564 2061 7474 6163 686d 656e ceived attachmen\n+00126f80: 7420 7769 7468 2069 643d 2573 2061 6e64 t with id=%s and\n+00126f90: 2074 7970 653d 2573 5c6e 2671 756f 743b type=%s\\n"\n+00126fa0: 3c2f 7370 616e 3e2c 2063 6f6e 7465 6e74 , content\n+00126fb0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->id?\n+00127010: 636f 6e74 656e 742d 2667 743b 3c61 2063 content->\n+00127070: 6964 3c2f 613e 3a3c 7370 616e 2063 6c61 id:""<\n+001270a0: 2f73 7061 6e3e 2c20 636f 6e74 656e 742d /span>, content-\n+001270b0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >type\n+00127110: 3f63 6f6e 7465 6e74 2d26 6774 3b3c 6120 ?content->type:"&quo\n+001271a0: 743b 3c2f 7370 616e 3e29 3b20 3c2f 6469 t;); .
    } while (content); .
    if (<\n+00127240: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00127250: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00127260: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+00127270: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;erro\n+001272c0: 723c 2f61 3e29 203c 2f64 6976 3e0a 3c64 r)
    .\n+001272e0: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n+00127300: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return soap-&g\n+00127340: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;error\n+00127390: 3c2f 613e 3b20 3c2f 6469 763e 0a3c 6469 ;
    . \n+001273b0: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    ..\n+001273d0: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // serve\n+001273f0: 722d 7369 6465 2070 726f 6365 7373 696e r-side processin\n+00127400: 6720 6c6f 6769 6320 3c2f 7370 616e 3e3c g logic <\n+00127410: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return SOAP_OK;
    .
    }.

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

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

    .St\n+00127550: 7265 616d 696e 6720 6368 756e 6b65 6420 reaming chunked \n+00127560: 4d49 4d45 2f4d 544f 4d3c 2f68 323e 0a3c MIME/MTOM

    .<\n+00127570: 703e 546f 2073 656e 6420 4d49 4d45 2f4d p>To send MIME/M\n+00127580: 544f 4d20 6174 7461 6368 6d65 6e74 732c TOM attachments,\n+00127590: 2074 6865 2061 7474 6163 686d 656e 7420 the attachment \n+001275a0: 7369 7a65 7320 6d75 7374 2062 6520 6465 sizes must be de\n+001275b0: 7465 726d 696e 6564 2069 6e20 6164 7661 termined in adva\n+001275c0: 6e63 6520 746f 2063 616c 6375 6c61 7465 nce to calculate\n+001275d0: 2048 5454 5020 6d65 7373 6167 6520 6c65 HTTP message le\n+001275e0: 6e67 7468 2072 6571 7569 7265 6420 746f ngth required to\n+001275f0: 2073 7472 6561 6d20 4d49 4d45 2f4d 544f stream MIME/MTO\n+00127600: 4d20 6f76 6572 2048 5454 502e 2048 6f77 M over HTTP. How\n+00127610: 6576 6572 2c20 6368 756e 6b65 6420 4d49 ever, chunked MI\n+00127620: 4d45 2f4d 544f 4d20 746f 6765 7468 6572 ME/MTOM together\n+00127630: 2077 6974 6820 6368 756e 6b65 6420 4854 with chunked HT\n+00127640: 5450 2063 616e 2062 6520 7573 6564 2074 TP can be used t\n+00127650: 6f20 6f6d 6974 2074 6869 7320 7374 6570 o omit this step\n+00127660: 2e20 4669 7273 7420 7365 7420 7468 6520 . First set the \n+00127670: 3c63 6f64 653e 2353 4f41 505f 494f 5f43 #SOAP_IO_C\n+00127680: 4855 4e4b 3c2f 636f 6465 3e20 666c 6167 HUNK flag\n+00127690: 2e20 5468 656e 2c20 746f 2073 7472 6561 . Then, to strea\n+001276a0: 6d20 6368 756e 6b65 6420 4d49 4d45 2f4d m chunked MIME/M\n+001276b0: 544f 4d2c 2073 6574 2074 6865 203c 636f TOM, set the __size\n+001276d0: 206d 656d 6265 7220 6f66 2061 6e20 6174 member of an at\n+001276e0: 7461 6368 6d65 6e74 2074 6f20 7a65 726f tachment to zero\n+001276f0: 2061 6e64 2065 6e61 626c 6520 4d49 4d45 and enable MIME\n+00127700: 2f4d 544f 4d20 6368 756e 6b69 6e67 2e20 /MTOM chunking. \n+00127710: 5468 6520 4d49 4d45 2f4d 544f 4d20 3c63 The MIME/MTOM soap::f\n+001277c0: 6d69 6d65 7265 6164 3c2f 613e 3c2f 636f mimeread callback the\n+001277e0: 6e20 6665 7463 6865 7320 6461 7461 2069 n fetches data i\n+001277f0: 6e20 6368 756e 6b73 2061 6e64 2069 7420 n chunks and it \n+00127800: 6973 2069 6d70 6f72 7461 6e74 2074 6f20 is important to \n+00127810: 6669 6c6c 2074 6865 2065 6e74 6972 6520 fill the entire \n+00127820: 6275 6666 6572 2075 6e6c 6573 7320 7468 buffer unless th\n+00127830: 6520 656e 6420 6f66 2074 6865 2064 6174 e end of the dat\n+00127840: 6120 6861 7320 6265 656e 2072 6561 6368 a has been reach\n+00127850: 6564 2061 6e64 2074 6865 206c 6173 7420 ed and the last \n+00127860: 6368 756e 6b20 6973 2074 6f20 6265 2073 chunk is to be s\n+00127870: 656e 642e 2054 6861 7420 6973 2c20 3c63 end. That is, soap::f\n+00127920: 6d69 6d65 7265 6164 3c2f 613e 3c2f 636f mimeread should retur\n+00127940: 6e20 7468 6520 7661 6c75 6520 6f66 2074 n the value of t\n+00127950: 6865 206c 6173 7420 3c63 6f64 653e 6c65 he last le\n+00127960: 6e3c 2f63 6f64 653e 2070 6172 616d 6574 n paramet\n+00127970: 6572 2061 6e64 2066 696c 6c20 7468 6520 er and fill the \n+00127980: 656e 7469 7265 2062 7566 6665 7220 3c63 entire buffer buf f\n+001279a0: 6f72 2061 6c6c 2063 6875 6e6b 7320 6578 or all chunks ex\n+001279b0: 6365 7074 2074 6865 206c 6173 742e 2046 cept the last. F\n+001279c0: 6f72 2074 6865 206c 6173 7420 6974 2072 or the last it r\n+001279d0: 6574 7572 6e73 2030 2e3c 2f70 3e0a 3c70 eturns 0.

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

    .SOAP/XML\n+00127a40: 206f 7665 7220 5544 503c 2f68 313e 0a3c over UDP

    .<\n+00127a50: 703e 5544 5020 6973 2061 2073 696d 706c p>UDP is a simpl\n+00127a60: 652c 2075 6e72 656c 6961 626c 6520 6461 e, unreliable da\n+00127a70: 7461 6772 616d 2070 726f 746f 636f 6c3a tagram protocol:\n+00127a80: 2055 4450 2073 6f63 6b65 7473 2061 7265 UDP sockets are\n+00127a90: 2063 6f6e 6e65 6374 696f 6e6c 6573 732e connectionless.\n+00127aa0: 2055 4450 2061 6464 7265 7373 2066 6f72 UDP address for\n+00127ab0: 6d61 7473 2061 7265 2069 6465 6e74 6963 mats are identic\n+00127ac0: 616c 2074 6f20 7468 6f73 6520 7573 6564 al to those used\n+00127ad0: 2062 7920 5443 502e 2049 6e20 7061 7274 by TCP. In part\n+00127ae0: 6963 756c 6172 2055 4450 2070 726f 7669 icular UDP provi\n+00127af0: 6465 7320 6120 706f 7274 2069 6465 6e74 des a port ident\n+00127b00: 6966 6965 7220 696e 2061 6464 6974 696f ifier in additio\n+00127b10: 6e20 746f 2074 6865 206e 6f72 6d61 6c20 n to the normal \n+00127b20: 496e 7465 726e 6574 2061 6464 7265 7373 Internet address\n+00127b30: 2066 6f72 6d61 742e 2054 6865 2055 4450 format. The UDP\n+00127b40: 2070 6f72 7420 7370 6163 6520 6973 2073 port space is s\n+00127b50: 6570 6172 6174 6520 6672 6f6d 2074 6865 eparate from the\n+00127b60: 2054 4350 2070 6f72 7420 7370 6163 6520 TCP port space \n+00127b70: 2869 2e65 2e20 6120 5544 5020 706f 7274 (i.e. a UDP port\n+00127b80: 206d 6179 206e 6f74 2062 6520 2263 6f6e may not be \"con\n+00127b90: 6e65 6374 6564 2220 746f 2061 2054 4350 nected\" to a TCP\n+00127ba0: 2070 6f72 7429 2e20 496e 2061 6464 6974 port). In addit\n+00127bb0: 696f 6e20 6272 6f61 6463 6173 7420 7061 ion broadcast pa\n+00127bc0: 636b 6574 7320 6d61 7920 6265 2073 656e ckets may be sen\n+00127bd0: 7420 2861 7373 756d 696e 6720 7468 6520 t (assuming the \n+00127be0: 756e 6465 726c 7969 6e67 206e 6574 776f underlying netwo\n+00127bf0: 726b 2073 7570 706f 7274 7320 7468 6973 rk supports this\n+00127c00: 2920 6279 2075 7369 6e67 2061 2072 6573 ) by using a res\n+00127c10: 6572 7665 6420 2262 726f 6164 6361 7374 erved \"broadcast\n+00127c20: 0a61 6464 7265 7373 223b 2074 6869 7320 .address\"; this \n+00127c30: 6164 6472 6573 7320 6973 206e 6574 776f address is netwo\n+00127c40: 726b 2069 6e74 6572 6661 6365 2064 6570 rk interface dep\n+00127c50: 656e 6465 6e74 2e3c 2f70 3e0a 3c70 3e43 endent.

    .

    C\n+00127c60: 6c69 656e 742d 7369 6465 206d 6573 7361 lient-side messa\n+00127c70: 6765 7320 7769 7468 2053 4f41 502d 6f76 ges with SOAP-ov\n+00127c80: 6572 2d55 4450 2065 6e64 706f 696e 7420 er-UDP endpoint \n+00127c90: 5552 4c73 2028 3c63 6f64 653e 736f 6170 URLs (soap\n+00127ca0: 2e75 6470 3a2f 2f2e 2e2e 3c2f 636f 6465 .udp://...) are automatic\n+00127cc0: 616c 6c79 2074 7261 6e73 6d69 7474 6564 ally transmitted\n+00127cd0: 2061 7320 6461 7461 6772 616d 732e 2053 as datagrams. S\n+00127ce0: 6572 7665 722d 7369 6465 2061 7070 6c69 erver-side appli\n+00127cf0: 6361 7469 6f6e 7320 7368 6f75 6c64 2073 cations should s\n+00127d00: 6574 2074 6865 203c 636f 6465 3e23 534f et the #SO\n+00127d10: 4150 5f49 4f5f 5544 503c 2f63 6f64 653e AP_IO_UDP\n+00127d20: 206d 6f64 6520 666c 6167 2074 6f20 6163 mode flag to ac\n+00127d30: 6365 7074 2055 4450 2072 6571 7565 7374 cept UDP request\n+00127d40: 732c 2065 2e67 2e20 7573 696e 6720 3c63 s, e.g. using soap_new1, soap_in\n+00127ed0: 6974 313c 2f61 3e3c 2f63 6f64 653e 2c20 it1, \n+00127ee0: 6f72 203c 636f 6465 3e3c 6120 636c 6173 or soap_set_mod\n+00127f90: 653c 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 e..

    The maximum\n+00127fb0: 206d 6573 7361 6765 206c 656e 6774 6820 message length \n+00127fc0: 666f 7220 6461 7461 6772 616d 2070 6163 for datagram pac\n+00127fd0: 6b65 7473 2069 7320 7265 7374 7269 6374 kets is restrict\n+00127fe0: 6564 2062 7920 7468 6520 6275 6666 6572 ed by the buffer\n+00127ff0: 2073 697a 6520 3c63 6f64 653e 2353 4f41 size #SOA\n+00128000: 505f 4255 464c 454e 3c2f 636f 6465 3e2c P_BUFLEN,\n+00128010: 2077 6869 6368 2069 7320 3635 3533 3620 which is 65536 \n+00128020: 6279 2064 6566 6175 6c74 2c20 756e 6c65 by default, unle\n+00128030: 7373 2063 6f6d 7069 6c65 6420 7769 7468 ss compiled with\n+00128040: 203c 636f 6465 3e23 5749 5448 5f4c 4541 #WITH_LEA\n+00128050: 4e3c 2f63 6f64 653e 2074 6f20 7375 7070 N to supp\n+00128060: 6f72 7420 736d 616c 6c2d 7363 616c 6520 ort small-scale \n+00128070: 656d 6265 6464 6564 2073 7973 7465 6d73 embedded systems\n+00128080: 2e20 466f 7220 5544 5020 7472 616e 7370 . For UDP transp\n+00128090: 6f72 7420 3c63 6f64 653e 2353 4f41 505f ort #SOAP_\n+001280a0: 4255 464c 454e 3c2f 636f 6465 3e20 6d75 BUFLEN mu\n+001280b0: 7374 206e 6f74 2065 7863 6565 6420 7468 st not exceed th\n+001280c0: 6520 6d61 7869 6d75 6d20 5544 5020 7061 e maximum UDP pa\n+001280d0: 636b 6574 2073 697a 6520 3635 3533 3620 cket size 65536 \n+001280e0: 2874 6865 2073 697a 6520 6f66 2064 6174 (the size of dat\n+001280f0: 6167 7261 6d20 6d65 7373 6167 6573 2069 agram messages i\n+00128100: 7320 636f 6e73 7472 6169 6e65 6420 6279 s constrained by\n+00128110: 2074 6865 2055 4450 2070 6163 6b65 7420 the UDP packet \n+00128120: 7369 7a65 2032 5e31 363d 3635 3533 3620 size 2^16=65536 \n+00128130: 6173 2070 6572 2055 4450 2073 7461 6e64 as per UDP stand\n+00128140: 6172 6429 2e20 596f 7520 6361 6e20 7573 ard). You can us\n+00128150: 6520 636f 6d70 7265 7373 696f 6e20 7769 e compression wi\n+00128160: 7468 203c 636f 6465 3e23 534f 4150 5f45 th #SOAP_E\n+00128170: 4e43 5f5a 4c49 423c 2f63 6f64 653e 2074 NC_ZLIB t\n+00128180: 6f20 7265 6475 6365 2074 6865 206d 6573 o reduce the mes\n+00128190: 7361 6765 2073 697a 652c 2062 7574 206e sage size, but n\n+001281a0: 6f74 6520 7468 6174 2063 6f6d 7072 6573 ote that compres\n+001281b0: 7365 6420 534f 4150 2d6f 7665 722d 5544 sed SOAP-over-UD\n+001281c0: 5020 6973 2061 2067 534f 4150 2d73 7065 P is a gSOAP-spe\n+001281d0: 6369 6669 6320 6665 6174 7572 6520 6265 cific feature be\n+001281e0: 6361 7573 6520 6974 2069 7320 6e6f 7420 cause it is not \n+001281f0: 7061 7274 206f 6620 7468 6520 534f 4150 part of the SOAP\n+00128200: 2d6f 7665 722d 5544 5020 7370 6563 6966 -over-UDP specif\n+00128210: 6963 6174 696f 6e2e 3c2f 703e 0a3c 703e ication.

    .

    \n+00128220: 5468 6520 534f 4150 2d6f 7665 722d 5544 The SOAP-over-UD\n+00128230: 5020 7370 6563 6966 6963 6174 696f 6e20 P specification \n+00128240: 7265 6c69 6573 206f 6e20 5753 2d41 6464 relies on WS-Add\n+00128250: 7265 7373 696e 672e 2054 6865 203c 656d ressing. The wsa.h file in\n+00128280: 2074 6865 203c 636f 6465 3e69 6d70 6f72 the impor\n+00128290: 743c 2f63 6f64 653e 2064 6972 6563 746f t directo\n+001282a0: 7279 2064 6566 696e 6573 2074 6865 2057 ry defines the W\n+001282b0: 532d 4164 6472 6573 7369 6e67 2065 6c65 S-Addressing ele\n+001282c0: 6d65 6e74 7320 666f 7220 636c 6965 6e74 ments for client\n+001282d0: 2061 6e64 2073 6572 7665 7220 6170 706c and server appl\n+001282e0: 6963 6174 696f 6e73 2e3c 2f70 3e0a 3c70 ications.

    .The gSOAP imple\n+00128300: 6d65 6e74 6174 696f 6e20 636f 6e66 6f72 mentation confor\n+00128310: 6d73 2074 6f20 7468 6520 534f 4150 2d6f ms to the SOAP-o\n+00128320: 7665 722d 5544 5020 7265 7175 6972 656d ver-UDP requirem\n+00128330: 656e 7473 3a3c 2f70 3e0a 3c75 6c3e 0a3c ents:

    .
      .<\n+00128340: 6c69 3e53 4f41 502d 6f76 6572 2d55 4450 li>SOAP-over-UDP\n+00128350: 2073 6572 7665 7220 656e 6470 6f69 6e74 server endpoint\n+00128360: 2055 524c 2066 6f72 6d61 743a 203c 656d URL format: soap.udp:\n+00128380: 2f2f 686f 7374 3a70 6f72 742f 7061 7468 //host:port/path\n+00128390: 3c2f 636f 6465 3e3c 2f65 6d3e 3c2f 6c69 .
    • Support on\n+001283b0: 652d 7761 7920 6d65 7373 6167 652d 6578 e-way message-ex\n+001283c0: 6368 616e 6765 2070 6174 7465 726e 2028 change pattern (\n+001283d0: 4d45 5029 2077 6865 7265 2061 2053 4f41 MEP) where a SOA\n+001283e0: 5020 656e 7665 6c6f 7065 2069 7320 6361 P envelope is ca\n+001283f0: 7272 6965 6420 696e 2061 2075 7365 7220 rried in a user \n+00128400: 6461 7461 6772 616d 2e3c 2f6c 693e 0a3c datagram.
    • .<\n+00128410: 6c69 3e53 7570 706f 7274 2072 6571 7565 li>Support reque\n+00128420: 7374 2d72 6573 706f 6e73 6520 6d65 7373 st-response mess\n+00128430: 6167 652d 6578 6368 616e 6765 2070 6174 age-exchange pat\n+00128440: 7465 726e 2028 4d45 5029 2077 6865 7265 tern (MEP) where\n+00128450: 2053 4f41 5020 656e 7665 6c6f 7065 7320 SOAP envelopes \n+00128460: 6172 6520 6361 7272 6965 6420 696e 2075 are carried in u\n+00128470: 7365 7220 6461 7461 6772 616d 732e 3c2f ser datagrams..
    • Support \n+00128490: 6d75 6c74 6963 6173 7420 7472 616e 736d multicast transm\n+001284a0: 6973 7369 6f6e 206f 6620 534f 4150 2065 ission of SOAP e\n+001284b0: 6e76 656c 6f70 6573 2063 6172 7269 6564 nvelopes carried\n+001284c0: 2069 6e20 7573 6572 2064 6174 6167 7261 in user datagra\n+001284d0: 6d73 2e3c 2f6c 693e 0a3c 6c69 3e53 7570 ms.
    • .
    • Sup\n+001284e0: 706f 7274 2062 6f74 6820 534f 4150 2031 port both SOAP 1\n+001284f0: 2e31 2061 6e64 2053 4f41 5020 312e 3220 .1 and SOAP 1.2 \n+00128500: 656e 7665 6c6f 7065 732e 3c2f 6c69 3e0a envelopes.
    • .\n+00128510: 3c2f 756c 3e0a 3c70 3e54 6865 2066 6f6c
    .

    The fol\n+00128520: 6c6f 7769 6e67 2061 6464 6974 696f 6e61 lowing additiona\n+00128530: 6c20 6665 6174 7572 6573 2061 7265 2061 l features are a\n+00128540: 6c73 6f20 6176 6169 6c61 626c 652c 2062 lso available, b\n+00128550: 7574 2061 7265 206e 6f74 2073 7570 706f ut are not suppo\n+00128560: 7274 6564 2062 7920 7468 6520 534f 4150 rted by the SOAP\n+00128570: 2d6f 7665 722d 5544 5020 7370 6563 6966 -over-UDP specif\n+00128580: 6963 6174 696f 6e3a 3c2f 703e 0a3c 756c ication:

    ..
  • Zlib/gzip \n+001285a0: 6d65 7373 6167 6520 636f 6d70 7265 7373 message compress\n+001285b0: 696f 6e20 2875 7365 2063 6f6d 7069 6c65 ion (use compile\n+001285c0: 2d74 696d 6520 666c 6167 203c 636f 6465 -time flag #WITH_GZIP).
  • .
  • SO\n+001285f0: 4150 2077 6974 6820 4449 4d45 2061 7474 AP with DIME att\n+00128600: 6163 686d 656e 7473 206f 7665 7220 5544 achments over UD\n+00128610: 502e 3c2f 6c69 3e0a 3c6c 693e 534f 4150 P.
  • .
  • SOAP\n+00128620: 2077 6974 6820 4d49 4d45 2f4d 544f 4d20 with MIME/MTOM \n+00128630: 6174 7461 6368 6d65 6e74 7320 6f76 6572 attachments over\n+00128640: 2055 4450 2e3c 2f6c 693e 0a3c 6c69 3e53 UDP.
  • .
  • S\n+00128650: 7570 706f 7274 2066 6f72 2049 5076 3620 upport for IPv6 \n+00128660: 2875 7365 2063 6f6d 7069 6c65 2d74 696d (use compile-tim\n+00128670: 6520 666c 6167 203c 636f 6465 3e23 5749 e flag #WI\n+00128680: 5448 5f49 5056 363c 2f63 6f64 653e 293c TH_IPV6)<\n+00128690: 2f6c 693e 0a3c 2f75 6c3e 0a3c 703e f09f /li>..

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

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

    .Using WS\n+00128700: 2d41 6464 7265 7373 696e 6720 7769 7468 -Addressing with\n+00128710: 2053 4f41 502d 6f76 6572 2d55 4450 3c2f SOAP-over-UDP.

    A SOAP-ov\n+00128730: 6572 2d55 4450 2061 7070 6c69 6361 7469 er-UDP applicati\n+00128740: 6f6e 206d 6179 2075 7365 2057 532d 4164 on may use WS-Ad\n+00128750: 6472 6573 7369 6e67 2074 6f20 636f 6e74 dressing to cont\n+00128760: 726f 6c20 6d65 7373 6167 6520 6465 6c69 rol message deli\n+00128770: 7665 7279 2061 7320 7065 7220 534f 4150 very as per SOAP\n+00128780: 2d6f 7665 722d 5544 5020 7370 6563 6966 -over-UDP specif\n+00128790: 6963 6174 696f 6e2e 3c2f 703e 0a3c 703e ication.

    .

    \n+001287a0: 5468 6520 3c65 6d3e 3c63 6f64 653e 7773 The ws\n+001287b0: 612e 683c 2f63 6f64 653e 3c2f 656d 3e20 a.h \n+001287c0: 6669 6c65 2069 6e20 7468 6520 3c63 6f64 file in the import \n+001287e0: 6469 7265 6374 6f72 7920 6465 6669 6e65 directory define\n+001287f0: 7320 7468 6520 5753 2d41 6464 7265 7373 s the WS-Address\n+00128800: 696e 6720 656c 656d 656e 7473 2e20 546f ing elements. To\n+00128810: 2069 6e63 6c75 6465 2074 6865 2057 532d include the WS-\n+00128820: 4164 6472 6573 7369 6e67 2065 6c65 6d65 Addressing eleme\n+00128830: 6e74 7320 696e 2074 6865 2053 4f41 5020 nts in the SOAP \n+00128840: 4865 6164 6572 2066 6f72 206d 6573 7361 Header for messa\n+00128850: 6769 6e67 2c20 6120 5753 2d41 6464 7265 ging, a WS-Addre\n+00128860: 7373 696e 6720 6361 7061 626c 6520 3c63 ssing capable S\n+001288d0: 4f41 505f 454e 565f 5f48 6561 6465 723c OAP_ENV__Header<\n+001288e0: 2f61 3e3c 2f63 6f64 653e 2073 7472 7563 /a> struc\n+001288f0: 7420 7368 6f75 6c64 2062 6520 6465 6669 t should be defi\n+00128900: 6e65 6420 696e 2079 6f75 7220 6865 6164 ned in your head\n+00128910: 6572 2066 696c 6520 6279 2069 6d70 6f72 er file by impor\n+00128920: 7469 6e67 203c 656d 3e3c 636f 6465 3e67 ting g\n+00128930: 736f 6170 2f69 6d70 6f72 742f 7773 612e soap/import/wsa.\n+00128940: 683c 2f63 6f64 653e 3c2f 656d 3e20 6f72 h or\n+00128950: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n+00128960: 2f69 6d70 6f72 742f 7773 6135 2e68 3c2f /import/wsa5.h:

    .\n+00128980: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    #import "\n+001289d0: 3b77 7361 2e68 2671 756f 743b 3c2f 7370 ;wsa.h"
    .

    \n+00128f40: 5265 7175 6573 742d 7265 7370 6f6e 7365 Request-response\n+00128f50: 2053 4f41 502d 6f76 6572 2d55 4450 206d SOAP-over-UDP m\n+00128f60: 6573 7361 6765 7320 7368 6f75 6c64 2062 essages should b\n+00128f70: 6520 6465 636c 6172 6564 2074 6f20 696e e declared to in\n+00128f80: 636c 7564 6520 7468 6520 3c65 6d3e 3c63 clude the wsa:MessageI\n+00128fa0: 443c 2f63 6f64 653e 3c2f 656d 3e2c 203c D, <\n+00128fb0: 656d 3e3c 636f 6465 3e77 7361 3a54 6f3c em>wsa:To<\n+00128fc0: 2f63 6f64 653e 3c2f 656d 3e2c 203c 656d /code>, wsa:Actio\n+00128fe0: 6e3c 2f63 6f64 653e 3c2f 656d 3e2c 2061 n, a\n+00128ff0: 6e64 203c 656d 3e3c 636f 6465 3e77 7361 nd wsa\n+00129000: 3a52 6570 6c79 546f 3c2f 636f 6465 3e3c :ReplyTo<\n+00129010: 2f65 6d3e 2065 6c65 6d65 6e74 7320 696e /em> elements in\n+00129020: 2074 6865 2053 4f41 5020 4865 6164 6572 the SOAP Header\n+00129030: 206f 6620 7468 6520 7265 7175 6573 7420 of the request \n+00129040: 6d65 7373 6167 652c 2061 6e64 2074 6865 message, and the\n+00129050: 2074 6865 203c 656d 3e3c 636f 6465 3e77 the w\n+00129060: 7361 3a4d 6573 7361 6765 4944 3c2f 636f sa:MessageID, wsa:To, wsa:Action, and wsa:Rela\n+001290d0: 7465 7354 6f3c 2f63 6f64 653e 3c2f 656d tesTo elements in th\n+001290f0: 6520 534f 4150 2048 6561 6465 7220 6f66 e SOAP Header of\n+00129100: 2074 6865 2072 6573 706f 6e73 6520 6d65 the response me\n+00129110: 7373 6167 653a 3c2f 703e 0a3c 6469 7620 ssage:

    .
    //gsoap\n+00129160: 206e 7320 7365 7276 6963 6520 6d65 7468 ns service meth\n+00129170: 6f64 2d68 6561 6465 722d 7061 7274 3a20 od-header-part: \n+00129180: 2020 2020 2020 2020 2065 6368 6f53 7472 echoStr\n+00129190: 696e 6720 7773 615f 5f4d 6573 7361 6765 ing wsa__Message\n+001291a0: 4944 203c 2f73 7061 6e3e 3c2f 6469 763e ID
    \n+001291b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n+001291e0: 206e 7320 7365 7276 6963 6520 6d65 7468 ns service meth\n+001291f0: 6f64 2d68 6561 6465 722d 7061 7274 3a20 od-header-part: \n+00129200: 2020 2020 2020 2020 2065 6368 6f53 7472 echoStr\n+00129210: 696e 6720 7773 615f 5f54 6f20 3c2f 7370 ing wsa__To
    .
    //gsoap ns ser\n+00129260: 7669 6365 206d 6574 686f 642d 6865 6164 vice method-head\n+00129270: 6572 2d70 6172 743a 2020 2020 2020 2020 er-part: \n+00129280: 2020 6563 686f 5374 7269 6e67 2077 7361 echoString wsa\n+00129290: 5f5f 4163 7469 6f6e 203c 2f73 7061 6e3e __Action \n+001292a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n+001292d0: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n+001292e0: 6520 6d65 7468 6f64 2d69 6e70 7574 2d68 e method-input-h\n+001292f0: 6561 6465 722d 7061 7274 3a20 2020 2065 eader-part: e\n+00129300: 6368 6f53 7472 696e 6720 7773 615f 5f52 choString wsa__R\n+00129310: 6570 6c79 546f 203c 2f73 7061 6e3e 3c2f eplyTo .

    .\n+0012a2d0: 3c70 3e54 6869 7320 6578 616d 706c 6520

    This example \n+0012a2e0: 6973 2073 696d 696c 6172 2074 6f20 7468 is similar to th\n+0012a2f0: 6520 6f6e 652d 7761 7920 756e 6963 6173 e one-way unicas\n+0012a300: 7420 6578 616d 706c 6520 6469 7363 7573 t example discus\n+0012a310: 7365 6420 6162 6f76 652c 2062 7574 2075 sed above, but u\n+0012a320: 7365 7320 6120 6272 6f61 6463 6173 7420 ses a broadcast \n+0012a330: 6164 6472 6573 7320 616e 6420 7468 6520 address and the \n+0012a340: 3c63 6f64 653e 534f 5f42 524f 4144 4341 SO_BROADCA\n+0012a350: 5354 3c2f 636f 6465 3e20 736f 636b 6574 ST socket\n+0012a360: 206f 7074 696f 6e3a 3c2f 703e 0a3c 6469 option:

    .
    \n+0012a3b0: 2369 6e63 6c75 6465 2026 7175 6f74 3b70 #include "p\n+0012a3c0: 6c75 6769 6e2f 7773 6161 7069 2e68 2671 lugin/wsaapi.h&q\n+0012a3d0: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;.
    .struct soap soap;
    .
    in_a\n+0012a4b0: 6464 725f 7420 6164 6472 203d 2069 6e65 ddr_t addr = ine\n+0012a4c0: 745f 6164 6472 283c 7370 616e 2063 6c61 t_addr("1.2.3.4\n+0012a4f0: 2671 756f 743b 3c2f 7370 616e 3e29 3b20 "); \n+0012a500: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // optiona\n+0012a520: 6c20 3c2f 7370 616e 3e3c 2f64 6976 3e0a l
    .\n+0012a530: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_init\n+0012a5a0: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap); ..
    soap.send_timeout\n+0012a740: 3c2f 613e 203d 2035 3b20 3c73 7061 6e20 = 5; \n+0012a760: 2f2f 2035 2073 6563 6f6e 6473 206d 6178 // 5 seconds max\n+0012a770: 2073 6f63 6b65 7420 6465 6c61 793c 2f73 socket delay
    .
    soap.connect_fl\n+0012a820: 6167 733c 2f61 3e20 3d20 534f 5f42 524f ags = SO_BRO\n+0012a830: 4144 4341 5354 3b20 3c73 7061 6e20 636c ADCAST; //\n+0012a850: 2072 6571 7569 7265 6420 666f 7220 6272 required for br\n+0012a860: 6f61 6463 6173 7420 3c2f 7370 616e 3e3c oadcast <\n+0012a870: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s\n+0012a8b0: 6f61 703c 2f61 3e2e 3c61 2063 6c61 7373 oap.ipv4_multicast_\n+0012a910: 6966 3c2f 613e 203d 2026 616d 703b 6164 if = &ad\n+0012a920: 6472 3b20 3c73 7061 6e20 636c 6173 733d dr; // opt\n+0012a940: 696f 6e61 6c20 666f 7220 4950 7634 3a20 ional for IPv4: \n+0012a950: 7365 6520 7365 7473 6f63 6b6f 7074 2049 see setsockopt I\n+0012a960: 5050 524f 544f 5f49 5020 4950 5f4d 554c PPROTO_IP IP_MUL\n+0012a970: 5449 4341 5354 5f49 4620 3c2f 7370 616e TICAST_IF
    .
    soap.ipv6_multicas\n+0012aa20: 745f 6966 3c2f 613e 203d 2061 6464 723b t_if = addr;\n+0012aa30: 203c 7370 616e 2063 6c61 7373 3d22 636f // option\n+0012aa50: 616c 2066 6f72 2049 5076 363a 206d 756c al for IPv6: mul\n+0012aa60: 7469 6361 7374 2073 696e 365f 7363 6f70 ticast sin6_scop\n+0012aa70: 655f 6964 203c 2f73 7061 6e3e 3c2f 6469 e_id .
    soap\n+0012aac0: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .ip\n+0012ab10: 7634 5f6d 756c 7469 6361 7374 5f74 746c v4_multicast_ttl\n+0012ab20: 3c2f 613e 203d 2031 3b20 3c73 7061 6e20 = 1; \n+0012ab40: 2f2f 206f 7074 696f 6e61 6c2c 2073 6565 // optional, see\n+0012ab50: 2073 6574 736f 636b 6f70 7420 4950 5052 setsockopt IPPR\n+0012ab60: 4f54 4f5f 4950 2c20 4950 5f4d 554c 5449 OTO_IP, IP_MULTI\n+0012ab70: 4341 5354 5f54 544c 203c 2f73 7061 6e3e CAST_TTL \n+0012ab80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n+0012abb0: 2f20 7365 7420 7570 2057 532d 4164 6472 / set up WS-Addr\n+0012abc0: 6573 7369 6e67 2068 6561 6465 723c 2f73 essing header
    ..
    // Send the m\n+0012ad20: 6573 7361 6765 206f 7665 7220 5544 5020 essage over UDP \n+0012ad30: 746f 2061 2062 726f 6164 6361 7374 2061 to a broadcast a\n+0012ad40: 6464 7265 7373 3a20 3c2f 7370 616e 3e3c ddress: <\n+0012ad50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (soa\n+0012ad90: 705f 7365 6e64 5f6e 735f 5f65 6368 6f53 p_send_ns__echoS\n+0012ada0: 7472 696e 6728 2661 6d70 3b3c 6120 636c tring(&soap, "so\n+0012ae00: 6170 2e75 6470 3a2f 2f65 6e64 706f 696e ap.udp://endpoin\n+0012ae10: 7426 7175 6f74 3b3c 2f73 7061 6e3e 2c20 t", \n+0012ae20: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+0012ae40: 743b 534f 4150 2061 6374 696f 6e26 7175 t;SOAP action&qu\n+0012ae50: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "he\n+0012ae80: 6c6c 6f20 776f 726c 6421 2671 756f 743b llo world!"\n+0012ae90: 3c2f 7370 616e 3e29 2920 3c2f 6469 763e ))
    \n+0012aea0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..\n+0012af90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_dest\n+0012b000: 726f 793c 2f61 3e28 2661 6d70 3b3c 6120 roy(&soap);.
    soap\n+0012b0b0: 5f65 6e64 3c2f 613e 2826 616d 703b 3c61 _end(&soap);<\n+0012b0f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa\n+0012b160: 705f 646f 6e65 3c2f 613e 2826 616d 703b p_done(&\n+0012b170: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+0012b1a0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    soap::ipv6_mult\n+0012b250: 6963 6173 745f 6966 3c2f 613e 3c2f 6469 icast_if
    unsigned i\n+0012b280: 6e74 2069 7076 365f 6d75 6c74 6963 6173 nt ipv6_multicas\n+0012b290: 745f 6966 3c2f 6469 763e 3c64 6976 2063 t_if
    Use\n+0012b2b0: 722d 6465 6669 6e61 626c 6520 7661 6c75 r-definable valu\n+0012b2c0: 6520 746f 2073 6574 2073 6f63 6b61 6464 e to set sockadd\n+0012b2d0: 725f 696e 363a 3a73 696e 365f 7363 6f70 r_in6::sin6_scop\n+0012b2e0: 655f 6964 2077 6865 6e20 6e6f 6e7a 6572 e_id when nonzer\n+0012b2f0: 6f2e 3c2f 6469 763e 3c64 6976 2063 6c61 o.
    De\n+0012b310: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n+0012b320: 6473 6f61 7032 2e68 3a33 3539 323c 2f64 dsoap2.h:3592
    .
    \n+0012b3f0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    int connect_\n+0012b410: 666c 6167 733c 2f64 6976 3e3c 6469 7620 flags
    Us\n+0012b430: 6572 2d64 6566 696e 6162 6c65 2073 6574 er-definable set\n+0012b440: 736f 636b 6f70 7420 6c65 7665 6c20 534f sockopt level SO\n+0012b450: 4c5f 534f 434b 4554 2066 6c61 6773 2077 L_SOCKET flags w\n+0012b460: 6865 6e20 636f 6e6e 6563 7469 6e67 2073 hen connecting s\n+0012b470: 6f61 703a 3a73 6f63 6b65 7420 746f 2061 oap::socket to a\n+0012b480: 2073 6572 7665 7220 2874 6865 2076 616c server (the val\n+0012b490: 7565 202e 2e2e 3c2f 6469 763e 3c64 6976 ue ...
    <\n+0012b4b0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:337\n+0012b4d0: 373c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 7
    .
    uns\n+0012b5b0: 6967 6e65 6420 6368 6172 2069 7076 345f igned char ipv4_\n+0012b5c0: 6d75 6c74 6963 6173 745f 7474 6c3c 2f64 multicast_ttl
    User-defin\n+0012b5f0: 6162 6c65 2076 616c 7565 2074 6f20 7365 able value to se\n+0012b600: 7420 7365 7473 6f63 6b6f 7074 206c 6576 t setsockopt lev\n+0012b610: 656c 2049 5050 524f 544f 5f49 5020 746f el IPPROTO_IP to\n+0012b620: 2049 505f 4d55 4c54 4943 4153 545f 5454 IP_MULTICAST_TT\n+0012b630: 4c20 7768 656e 206e 6f6e 7a65 726f 2e3c L when nonzero.<\n+0012b640: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+0012b660: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+0012b670: 6170 322e 683a 3336 3230 3c2f 6469 763e ap2.h:3620
    \n+0012b680: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+0012b6d0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    \n+0012b720: 736f 6170 3a3a 6970 7634 5f6d 756c 7469 soap::ipv4_multi\n+0012b730: 6361 7374 5f69 663c 2f61 3e3c 2f64 6976 cast_if
    char * ipv4\n+0012b760: 5f6d 756c 7469 6361 7374 5f69 663c 2f64 _multicast_if
    User-defin\n+0012b790: 6162 6c65 2076 616c 7565 2074 6f20 7365 able value to se\n+0012b7a0: 7420 7365 7473 6f63 6b6f 7074 206c 6576 t setsockopt lev\n+0012b7b0: 656c 2049 5050 524f 544f 5f49 5020 746f el IPPROTO_IP to\n+0012b7c0: 2049 505f 4d55 4c54 4943 4153 545f 4946 IP_MULTICAST_IF\n+0012b7d0: 2077 6865 6e20 6e6f 6e2d 4e55 4c4c 2e3c when non-NULL.<\n+0012b7e0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin\n+0012b800: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+0012b810: 6170 322e 683a 3335 3939 3c2f 6469 763e ap2.h:3599
    \n+0012b820: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    Please refer to\n+0012b850: 2074 6865 2073 6f63 6b65 7420 6f70 7469 the socket opti\n+0012b860: 6f6e 7320 666f 7220 3c63 6f64 653e 4950 ons for IP\n+0012b870: 5052 4f54 4f5f 4950 3c2f 636f 6465 3e20 PROTO_IP \n+0012b880: 3c63 6f64 653e 4950 5f4d 554c 5449 4341 IP_MULTICA\n+0012b890: 5354 5f49 463c 2f63 6f64 653e 2074 6f20 ST_IF to \n+0012b8a0: 7370 6563 6966 7920 7468 6520 6465 6661 specify the defa\n+0012b8b0: 756c 7420 696e 7465 7266 6163 6520 666f ult interface fo\n+0012b8c0: 7220 6d75 6c74 6963 6173 7420 6461 7461 r multicast data\n+0012b8d0: 6772 616d 7320 746f 2062 6520 7365 6e74 grams to be sent\n+0012b8e0: 2066 726f 6d2e 2054 6869 7320 6973 2061 from. This is a\n+0012b8f0: 203c 636f 6465 3e73 7472 7563 7420 696e struct in\n+0012b900: 5f61 6464 723c 2f63 6f64 653e 2028 3c63 _addr (in_addr_t for s\n+0012b930: 696e 365f 7363 6f70 655f 6964 3c2f 636f in6_scope_id) interface v\n+0012b950: 616c 7565 2e20 4f74 6865 7277 6973 652c alue. Otherwise,\n+0012b960: 2074 6865 2064 6566 6175 6c74 2069 6e74 the default int\n+0012b970: 6572 6661 6365 2073 6574 2062 7920 7468 erface set by th\n+0012b980: 6520 7379 7374 656d 2061 646d 696e 6973 e system adminis\n+0012b990: 7472 6174 6f72 2077 696c 6c20 6265 2075 trator will be u\n+0012b9a0: 7365 6420 2869 6620 616e 7929 2e3c 2f70 sed (if any)..

    Please refe\n+0012b9c0: 7220 746f 2074 6865 2073 6f63 6b65 7420 r to the socket \n+0012b9d0: 6f70 7469 6f6e 7320 666f 7220 3c63 6f64 options for IPPROTO_IP IP_MUL\n+0012ba00: 5449 4341 5354 5f54 544c 3c2f 636f 6465 TICAST_TTL to limit the l\n+0012ba20: 6966 6574 696d 6520 6f66 2074 6865 2070 ifetime of the p\n+0012ba30: 6163 6b65 742e 204d 756c 7469 6361 7374 acket. Multicast\n+0012ba40: 2064 6174 6167 7261 6d73 2061 7265 2073 datagrams are s\n+0012ba50: 656e 7420 7769 7468 2061 2064 6566 6175 ent with a defau\n+0012ba60: 6c74 2076 616c 7565 206f 6620 312c 2074 lt value of 1, t\n+0012ba70: 6f20 7072 6576 656e 7420 7468 656d 2074 o prevent them t\n+0012ba80: 6f20 6265 2066 6f72 7761 7264 6564 2062 o be forwarded b\n+0012ba90: 6579 6f6e 6420 7468 6520 6c6f 6361 6c20 eyond the local \n+0012baa0: 6e65 7477 6f72 6b2e 2054 6869 7320 7061 network. This pa\n+0012bab0: 7261 6d65 7465 7220 6361 6e20 6265 2073 rameter can be s\n+0012bac0: 6574 2062 6574 7765 656e 2031 2074 6f20 et between 1 to \n+0012bad0: 3235 352e 3c2f 703e 0a3c 703e f09f 949d 255.

    .

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

    .<\n+0012bb10: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.Client-sid\n+0012bb50: 6520 7265 7175 6573 742d 7265 7370 6f6e e request-respon\n+0012bb60: 7365 2055 4450 2075 6e69 6361 7374 3c2f se UDP unicast.

    This exam\n+0012bb80: 706c 6520 6173 7375 6d65 7320 7468 6174 ple assumes that\n+0012bb90: 2074 6865 2069 6e74 6572 6661 6365 2068 the interface h\n+0012bba0: 6561 6465 7220 6669 6c65 2066 6f72 2073 eader file for s\n+0012bbb0: 6f61 7063 7070 3220 696e 636c 7564 6573 oapcpp2 includes\n+0012bbc0: 2074 6865 2053 4f41 5020 4865 6164 6572 the SOAP Header\n+0012bbd0: 2077 6974 6820 5753 2d41 6464 7265 7373 with WS-Address\n+0012bbe0: 696e 6720 656c 656d 656e 7473 2069 6d70 ing elements imp\n+0012bbf0: 6f72 7465 6420 7769 7468 203c 636f 6465 orted with #import \"wsa.h\"\n+0012bc10: 3c2f 636f 6465 3e20 616e 6420 7468 6520 and the \n+0012bc20: 3c63 6f64 653e 6e73 5f5f 6563 686f 5374 ns__echoSt\n+0012bc30: 7269 6e67 3c2f 636f 6465 3e20 6675 6e63 ring func\n+0012bc40: 7469 6f6e 2064 6973 6375 7373 6564 2069 tion discussed i\n+0012bc50: 6e20 5365 6374 696f 6e20 3c61 2063 6c61 n Section Using WS-Addres\n+0012bc90: 7369 6e67 2077 6974 6820 534f 4150 2d6f sing with SOAP-o\n+0012bca0: 7665 722d 5544 503c 2f61 3e20 2e3c 2f70 ver-UDP ..

    #include &q\n+0012bd00: 756f 743b 706c 7567 696e 2f77 7361 6170 uot;plugin/wsaap\n+0012bd10: 692e 6826 7175 6f74 3b3c 2f73 7061 6e3e i.h"\n+0012bd20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+0012bd40: 0a3c 6469 7620 636c 6173 733d 226c 696e ..<\n+0012bde0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012bdf0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct wsa__Endpoi\n+0012be20: 6e74 5265 6665 7265 6e63 6554 7970 6520 ntReferenceType \n+0012be30: 7265 706c 7954 6f3b 203c 7370 616e 2063 replyTo; /\n+0012be50: 2f20 2861 6e6f 6e79 6d6f 7573 2920 7265 / (anonymous) re\n+0012be60: 706c 7920 6164 6472 6573 7320 3c2f 7370 ply address
    .
    char *res; //\n+0012bed0: 2073 6572 7665 7220 7265 7370 6f6e 7365 server response\n+0012bee0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+0012bef0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012bf00: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_init<\n+0012bf60: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n+0012bf90: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); .
    soap_reg\n+0012c010: 6973 7465 725f 706c 7567 696e 3c2f 613e ister_plugin\n+0012c020: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+0012c050: 703c 2f61 3e2c 2073 6f61 705f 7773 6129 p, soap_wsa)\n+0012c060: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    ..
    soap.recv_timeo\n+0012c1e0: 7574 3c2f 613e 203d 2035 3b20 3c73 7061 ut = 5; // 5 seconds m\n+0012c210: 6178 2073 6f63 6b65 7420 6465 6c61 7920 ax socket delay \n+0012c220: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0012c240: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // set up \n+0012c260: 5753 2d41 6464 7265 7373 696e 6720 6865 WS-Addressing he\n+0012c270: 6164 6572 3c2f 7370 616e 3e3c 2f64 6976 ader.
    soap_wsa_req\n+0012c2a0: 7565 7374 2826 616d 703b 3c61 2063 6c61 uest(&soap, "mes\n+0012c300: 7361 6765 2049 4426 7175 6f74 3b3c 2f73 sage ID", "endpoint\n+0012c340: 2671 756f 743b 3c2f 7370 616e 3e2c 203c ", <\n+0012c350: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+0012c360: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+0012c370: 3b53 4f41 5020 6163 7469 6f6e 2671 756f ;SOAP action&quo\n+0012c380: 743b 3c2f 7370 616e 3e29 3b3c 2f64 6976 t;);.
    soap_wsa_add\n+0012c3b0: 5f52 6570 6c79 546f 2826 616d 703b 3c61 _ReplyTo(&soap, N\n+0012c3f0: 554c 4c29 3b20 3c73 7061 6e20 636c 6173 ULL); // a\n+0012c410: 6e6f 6e79 6d6f 7573 2052 6570 6c79 546f nonymous ReplyTo\n+0012c420: 2061 6464 7265 7373 3c2f 7370 616e 3e3c address<\n+0012c430: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    //\n+0012c460: 2053 656e 6420 616e 6420 7265 6365 6976 Send and receiv\n+0012c470: 6520 6d65 7373 6167 6573 206f 7665 7220 e messages over \n+0012c480: 5544 503a 203c 2f73 7061 6e3e 3c2f 6469 UDP: .
    i\n+0012c4c0: 663c 2f73 7061 6e3e 2028 736f 6170 5f63 f (soap_c\n+0012c4d0: 616c 6c5f 6e73 5f5f 6563 686f 5374 7269 all_ns__echoStri\n+0012c4e0: 6e67 2826 616d 703b 3c61 2063 6c61 7373 ng(&s\n+0012c510: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, "soap.\n+0012c540: 7564 703a 2f2f 656e 6470 6f69 6e74 2026 udp://endpoint &\n+0012c550: 7175 6f74 3b3c 2f73 7061 6e3e 534f 4150 quot;SOAP\n+0012c560: 2061 6374 696f 6e3c 7370 616e 2063 6c61 action", "\n+0012c590: 3b3c 2f73 7061 6e3e 6865 6c6c 6f20 776f ;hello wo\n+0012c5a0: 726c 6421 3c73 7061 6e20 636c 6173 733d rld!\n+0012c5c0: 2671 756f 743b 2c20 2661 6d70 3b72 6573 ", &res\n+0012c5d0: 2929 203c 2f73 7061 6e3e 3c2f 6469 763e ))
    \n+0012c5e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {\n+0012c610: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0012c630: 3c73 7061 6e20 636c 6173 733d 2273 7472 if\n+0012c650: 2028 736f 6170 2e65 7272 6f72 203d 3d20 (soap.error == \n+0012c660: 534f 4150 5f45 4f46 2026 616d 703b 2661 SOAP_EOF &&a\n+0012c670: 6d70 3b20 736f 6170 2e65 7272 6e75 6d20 mp; soap.errnum \n+0012c680: 3d3d 2030 2920 3c2f 7370 616e 3e3c 2f64 == 0) .
    ... // Tim\n+0012c6d0: 656f 7574 3a20 6e6f 2072 6573 706f 6e73 eout: no respons\n+0012c6e0: 6520 6672 6f6d 2073 6572 7665 7220 286d e from server (m\n+0012c6f0: 6573 7361 6765 2061 6c72 6561 6479 2064 essage already d\n+0012c700: 656c 6976 6572 6564 3f29 203c 2f73 7061 elivered?)
    .
    else
    . so\n+0012c790: 6170 5f70 7269 6e74 5f66 6175 6c74 2826 ap_print_fault(&\n+0012c7a0: 616d 703b 736f 6170 2c20 7374 6465 7272 amp;soap, stderr\n+0012c7b0: 293b 203c 2f73 7061 6e3e 3c2f 6469 763e );
    \n+0012c7c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }\n+0012c7f0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+0012c800: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012c810: 3e3c 7370 616e 2063 6c61 7373 3d22 7374 >els\n+0012c830: 6520 3c2f 7370 616e 3e3c 2f64 6976 3e0a e
    .\n+0012c840: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+0012c870: 2e2e 2e20 2f2f 2055 4450 2073 6572 7665 ... // UDP serve\n+0012c880: 7220 7265 7370 6f6e 7365 2069 7320 7374 r response is st\n+0012c890: 6f72 6564 2069 6e20 2623 3339 3b72 6573 ored in 'res\n+0012c8a0: 2623 3339 3b20 3c2f 7370 616e 3e3c 2f64 ' .
    // check SOAP \n+0012c8f0: 6865 6164 6572 2072 6563 6569 7665 642c header received,\n+0012c900: 2069 6620 6170 706c 6963 6162 6c65 203c if applicable <\n+0012c910: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+0012c930: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+0012c940: 6e67 6c69 7465 7261 6c22 3e63 6865 636b ngliteral\">check\n+0012c950: 5f68 6561 6465 7228 2661 6d70 3b73 6f61 _header(&soa\n+0012c960: 702e 6865 6164 6572 293b 203c 2f73 7061 p.header);
    .
    soap_dest\n+0012c9b0: 726f 7928 2661 6d70 3b73 6f61 7029 3b3c roy(&soap);<\n+0012c9c0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+0012c9e0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+0012c9f0: 6e67 6c69 7465 7261 6c22 3e73 6f61 705f ngliteral\">soap_\n+0012ca00: 656e 6428 2661 6d70 3b73 6f61 7029 3b3c end(&soap);<\n+0012ca10: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .<\n+0012ca30: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+0012ca40: 6e67 6c69 7465 7261 6c22 3e73 6f61 705f ngliteral\">soap_\n+0012ca50: 646f 6e65 2826 616d 703b 736f 6170 293b done(&soap);\n+0012ca60: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c2f
    .

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

    .

    <\n+0012cac0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+0012cad0: 2069 643d 2272 6571 7565 7374 7265 7370 id=\"requestresp\n+0012cae0: 6f6e 7365 6d75 6c74 6963 6173 7422 3e3c onsemulticast\"><\n+0012caf0: 2f61 3e0a 436c 6965 6e74 2d73 6964 6520 /a>.Client-side \n+0012cb00: 7265 7175 6573 742d 7265 7370 6f6e 7365 request-response\n+0012cb10: 206d 756c 7469 6361 7374 3c2f 6833 3e0a multicast

    .\n+0012cb20: 3c70 3e54 6869 7320 6578 616d 706c 6520

    This example \n+0012cb30: 6973 2073 696d 696c 6172 2074 6f20 7468 is similar to th\n+0012cb40: 6520 7265 7175 6573 742d 7265 7370 6f6e e request-respon\n+0012cb50: 7365 2075 6e69 6361 7374 2065 7861 6d70 se unicast examp\n+0012cb60: 6c65 2064 6973 6375 7373 6564 2061 626f le discussed abo\n+0012cb70: 7665 2c20 6275 7420 7573 6573 2061 2062 ve, but uses a b\n+0012cb80: 726f 6164 6361 7374 2061 6464 7265 7373 roadcast address\n+0012cb90: 2061 6e64 2074 6865 203c 636f 6465 3e53 and the S\n+0012cba0: 4f5f 4252 4f41 4443 4153 543c 2f63 6f64 O_BROADCAST socket option\n+0012cbc0: 2e20 4265 6361 7573 6520 7765 2065 7870 . Because we exp\n+0012cbd0: 6563 7420 746f 2072 6563 6569 7665 206d ect to receive m\n+0012cbe0: 756c 7469 706c 6520 7265 7370 6f6e 7365 ultiple response\n+0012cbf0: 732c 2077 6520 616c 736f 206e 6565 6420 s, we also need \n+0012cc00: 746f 2075 7365 2073 6570 6172 6174 6520 to use separate \n+0012cc10: 7265 7175 6573 742d 7265 7370 6f6e 7365 request-response\n+0012cc20: 206d 6573 7361 6765 7320 746f 2073 656e messages to sen\n+0012cc30: 6420 6f6e 6520 7265 7175 6573 7420 616e d one request an\n+0012cc40: 6420 636f 6e73 756d 6520 6d75 6c74 6970 d consume multip\n+0012cc50: 6c65 2072 6573 706f 6e73 6573 2e20 496e le responses. In\n+0012cc60: 2074 6869 7320 6578 616d 706c 6520 7765 this example we\n+0012cc70: 2064 6566 696e 6564 2061 203c 636f 6465 defined a bcastString request and \n+0012cca0: 6120 3c63 6f64 653e 6263 6173 7453 7472 a bcastStr\n+0012ccb0: 696e 6752 6573 706f 6e73 653c 2f63 6f64 ingResponse response mess\n+0012ccd0: 6167 652c 2077 6869 6368 2061 7265 2065 age, which are e\n+0012cce0: 7373 656e 7469 616c 6c79 2064 6563 6c61 ssentially decla\n+0012ccf0: 7265 6420 6173 206f 6e65 2d77 6179 206d red as one-way m\n+0012cd00: 6573 7361 6765 7320 696e 2074 6865 2068 essages in the h\n+0012cd10: 6561 6465 7220 6669 6c65 3a3c 2f70 3e0a eader file:

    .\n+0012cd20: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    //\n+0012cd60: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service\n+0012cd70: 206d 6574 686f 642d 6865 6164 6572 2d70 method-header-p\n+0012cd80: 6172 743a 2020 2020 2020 2020 2020 6263 art: bc\n+0012cd90: 6173 7453 7472 696e 6720 7773 615f 5f4d astString wsa__M\n+0012cda0: 6573 7361 6765 4944 203c 2f73 7061 6e3e essageID \n+0012cdb0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    /\n+0012cde0: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n+0012cdf0: 6520 6d65 7468 6f64 2d68 6561 6465 722d e method-header-\n+0012ce00: 7061 7274 3a20 2020 2020 2020 2020 2062 part: b\n+0012ce10: 6361 7374 5374 7269 6e67 2077 7361 5f5f castString wsa__\n+0012ce20: 546f 203c 2f73 7061 6e3e 3c2f 6469 763e To
    \n+0012ce30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n+0012ce60: 206e 7320 7365 7276 6963 6520 6d65 7468 ns service meth\n+0012ce70: 6f64 2d68 6561 6465 722d 7061 7274 3a20 od-header-part: \n+0012ce80: 2020 2020 2020 2020 2062 6361 7374 5374 bcastSt\n+0012ce90: 7269 6e67 2077 7361 5f5f 4163 7469 6f6e ring wsa__Action\n+0012cea0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .<\n+0012ceb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012cec0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n+0012cee0: 7320 7365 7276 6963 6520 6d65 7468 6f64 s service method\n+0012cef0: 2d68 6561 6465 722d 7061 7274 3a20 2020 -header-part: \n+0012cf00: 2020 2020 2020 2062 6361 7374 5374 7269 bcastStri\n+0012cf10: 6e67 2077 7361 5f5f 5265 706c 7954 6f20 ng wsa__ReplyTo \n+0012cf20: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0012cf40: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns__bcastSt\n+0012cf70: 7269 6e67 283c 7370 616e 2063 6c61 7373 ring(c\n+0012cf90: 6861 723c 2f73 7061 6e3e 202a 7374 722c har *str,\n+0012cfa0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 void<\n+0012cfc0: 2f73 7061 6e3e 293b 203c 2f64 6976 3e0a /span>);
    .\n+0012cfd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap \n+0012d000: 6e73 2073 6572 7669 6365 206d 6574 686f ns service metho\n+0012d010: 642d 6865 6164 6572 2d70 6172 743a 2020 d-header-part: \n+0012d020: 2020 2020 2020 2020 6263 6173 7453 7472 bcastStr\n+0012d030: 696e 6752 6573 706f 6e73 6520 7773 615f ingResponse wsa_\n+0012d040: 5f4d 6573 7361 6765 4944 203c 2f73 7061 _MessageID
    .
    //gsoap ns serv\n+0012d090: 6963 6520 6d65 7468 6f64 2d68 6561 6465 ice method-heade\n+0012d0a0: 722d 7061 7274 3a20 2020 2020 2020 2020 r-part: \n+0012d0b0: 2062 6361 7374 5374 7269 6e67 5265 7370 bcastStringResp\n+0012d0c0: 6f6e 7365 2077 7361 5f5f 546f 203c 2f73 onse wsa__To
    .
    //gsoap ns se\n+0012d110: 7276 6963 6520 6d65 7468 6f64 2d68 6561 rvice method-hea\n+0012d120: 6465 722d 7061 7274 3a20 2020 2020 2020 der-part: \n+0012d130: 2020 2062 6361 7374 5374 7269 6e67 5265 bcastStringRe\n+0012d140: 7370 6f6e 7365 2077 7361 5f5f 4163 7469 sponse wsa__Acti\n+0012d150: 6f6e 203c 2f73 7061 6e3e 3c2f 6469 763e on
    \n+0012d160: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap\n+0012d190: 206e 7320 7365 7276 6963 6520 6d65 7468 ns service meth\n+0012d1a0: 6f64 2d68 6561 6465 722d 7061 7274 3a20 od-header-part: \n+0012d1b0: 2020 2020 2020 2020 2062 6361 7374 5374 bcastSt\n+0012d1c0: 7269 6e67 5265 7370 6f6e 7365 2077 7361 ringResponse wsa\n+0012d1d0: 5f5f 5265 6c61 7465 7354 6f20 3c2f 7370 __RelatesTo
    .
    int\n+0012d220: 206e 735f 5f62 6361 7374 5374 7269 6e67 ns__bcastString\n+0012d230: 5265 7370 6f6e 7365 283c 7370 616e 2063 Response(char *\n+0012d260: 7265 732c 203c 7370 616e 2063 6c61 7373 res, v\n+0012d280: 6f69 643c 2f73 7061 6e3e 293b 3c2f 6469 oid);.

    To \n+0012d2b0: 6f62 7461 696e 2072 6573 706f 6e73 6520 obtain response \n+0012d2c0: 6f6e 652d 7761 7920 6f70 6572 6174 696f one-way operatio\n+0012d2d0: 6e73 2c20 7573 6520 3c61 2068 7265 663d ns, use <\n+0012d2f0: 636f 6465 3e77 7364 6c32 6820 2d62 3c2f code>wsdl2h -b option\n+0012d310: 203c 623e 3c63 6f64 653e 2d62 3c2f 636f -b.

    \n+0012d330: 0a3c 703e 5468 6520 636c 6965 6e74 2063 .

    The client c\n+0012d340: 6f64 6520 696e 636c 7564 6573 2061 206c ode includes a l\n+0012d350: 6f6f 7020 746f 2072 6563 6569 7665 2072 oop to receive r\n+0012d360: 6573 706f 6e73 6520 6d65 7373 6167 6573 esponse messages\n+0012d370: 2075 6e74 696c 2061 2074 696d 656f 7574 until a timeout\n+0012d380: 206f 6363 7572 733a 3c2f 703e 0a3c 6469 occurs:

    .
    \n+0012d3d0: 2369 6e63 6c75 6465 2026 7175 6f74 3b70 #include "p\n+0012d3e0: 6c75 6769 6e2f 7773 6161 7069 2e68 2671 lugin/wsaapi.h&q\n+0012d3f0: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;.
    .struct soap soap;
    .
    struct \n+0012d4f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SO\n+0012d530: 4150 5f45 4e56 5f5f 4865 6164 6572 3c2f AP_ENV__Header header; .
    struct\n+0012d580: 203c 2f73 7061 6e3e 7773 615f 5f45 6e64 wsa__End\n+0012d590: 706f 696e 7452 6566 6572 656e 6365 5479 pointReferenceTy\n+0012d5a0: 7065 2072 6570 6c79 546f 3b20 3c2f 6469 pe replyTo; .
    c\n+0012d5e0: 6861 723c 2f73 7061 6e3e 202a 7265 733b har *res;\n+0012d5f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    s\n+0012d660: 6f61 705f 696e 6974 3c2f 613e 2826 616d oap_init(&am\n+0012d670: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
    .
    soap_register_p\n+0012d720: 6c75 6769 6e3c 2f61 3e28 2661 6d70 3b3c lugin(&<\n+0012d730: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012d740: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012d750: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+0012d760: 736f 6170 5f77 7361 293b 3c2f 6469 763e soap_wsa);
    \n+0012d770: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap.conn\n+0012d800: 6563 745f 666c 6167 733c 2f61 3e20 3d20 ect_flags = \n+0012d810: 534f 5f42 524f 4144 4341 5354 3b20 3c2f SO_BROADCAST; .
    so\n+0012d860: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.\n+0012d8b0: 7365 6e64 5f74 696d 656f 7574 3c2f 613e send_timeout\n+0012d8c0: 203d 2035 3b20 3c73 7061 6e20 636c 6173 = 5; // 5\n+0012d8e0: 2073 6563 6f6e 6473 206d 6178 2073 6f63 seconds max soc\n+0012d8f0: 6b65 7420 6465 6c61 7920 3c2f 7370 616e ket delay
    ..
    // set up WS-\n+0012da20: 4164 6472 6573 7369 6e67 2068 6561 6465 Addressing heade\n+0012da30: 723c 2f73 7061 6e3e 3c2f 6469 763e 0a3c r
    .<\n+0012da40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012da50: 3e73 6f61 705f 7773 615f 7265 7175 6573 >soap_wsa_reques\n+0012da60: 7428 2661 6d70 3b3c 6120 636c 6173 733d t(&
    so\n+0012da90: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, "messag\n+0012dac0: 6520 4944 2671 756f 743b 3c2f 7370 616e e ID", &\n+0012daf0: 7175 6f74 3b65 6e64 706f 696e 7426 7175 quot;endpoint&qu\n+0012db00: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "SO\n+0012db30: 4150 2061 6374 696f 6e26 7175 6f74 3b3c AP action"<\n+0012db40: 2f73 7061 6e3e 293b 3c2f 6469 763e 0a3c /span>);
    .<\n+0012db50: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012db60: 3e73 6f61 705f 7773 615f 6164 645f 5265 >soap_wsa_add_Re\n+0012db70: 706c 7954 6f28 2661 6d70 3b3c 6120 636c plyTo(&soap, NULL\n+0012dbb0: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // anon\n+0012dbd0: 796d 6f75 7320 5265 706c 7954 6f20 6164 ymous ReplyTo ad\n+0012dbe0: 6472 6573 733c 2f73 7061 6e3e 3c2f 6469 dress.
    i\n+0012dc20: 663c 2f73 7061 6e3e 2028 736f 6170 5f73 f (soap_s\n+0012dc30: 656e 645f 6e73 5f5f 6263 6173 7453 7472 end_ns__bcastStr\n+0012dc40: 696e 6728 2661 6d70 3b3c 6120 636c 6173 ing(&\n+0012dc70: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, "soap\n+0012dca0: 2e75 6470 3a2f 2f65 6e64 706f 696e 7426 .udp://endpoint&\n+0012dcb0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 quot;, "\n+0012dce0: 534f 4150 2061 6374 696f 6e26 7175 6f74 SOAP action"\n+0012dcf0: 3b3c 2f73 7061 6e3e 2c20 3c73 7061 6e20 ;, "hell\n+0012dd20: 6f20 776f 726c 6421 2671 756f 743b 3c2f o world!"))
    .<\n+0012dd40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012dd50: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    ..
    }.
    else .
    {
    .\n+0012dea0: 2020 3c73 7061 6e20 636c 6173 733d 226b whil\n+0012dec0: 653c 2f73 7061 6e3e 2028 3129 3c2f 6469 e (1).
    {
    .<\n+0012def0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0012df00: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n+0012df20: 663c 2f73 7061 6e3e 2028 736f 6170 5f72 f (soap_r\n+0012df30: 6563 765f 6e73 5f5f 6263 6173 7453 7472 ecv_ns__bcastStr\n+0012df40: 696e 6752 6573 706f 6e73 6528 2661 6d70 ingResponse(&\n+0012df50: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n+0012df80: 2c20 2661 6d70 3b72 6573 2929 203c 2f64 , &res)) .
    break;
    .
    \n+0012dff0: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // Go\n+0012e010: 7420 7265 7370 6f6e 7365 2026 2333 393b t response '\n+0012e020: 7265 7326 2333 393b 2066 726f 6d20 6120 res' from a \n+0012e030: 7365 7276 6572 203c 2f73 7061 6e3e 3c2f server .
    } .
    \n+0012e090: 6966 3c2f 7370 616e 3e20 283c 6120 636c if (soap.error ==\n+0012e120: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_EOF && soap.errnum\n+0012e210: 203d 3d20 3029 203c 2f64 6976 3e0a 3c64 == 0)
    .\n+0012e230: 2020 2020 2e2e 2e20 3c73 7061 6e20 636c ... //\n+0012e250: 2054 696d 656f 7574 3a20 6e6f 206d 6f72 Timeout: no mor\n+0012e260: 6520 6d65 7373 6167 6573 2072 6563 6569 e messages recei\n+0012e270: 7665 6420 3c2f 7370 616e 3e3c 2f64 6976 ved .
    \n+0012e2b0: 656c 7365 3c2f 7370 616e 3e20 3c2f 6469 else .
    soap\n+0012e330: 5f70 7269 6e74 5f66 6175 6c74 3c2f 613e _print_fault\n+0012e340: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+0012e370: 703c 2f61 3e2c 2073 7464 6572 7229 3b20 p, stderr); \n+0012e380: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    soap_de\n+0012e410: 7374 726f 793c 2f61 3e28 2661 6d70 3b3c stroy(&<\n+0012e420: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0012e430: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0012e440: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+0012e450: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    so\n+0012e4c0: 6170 5f65 6e64 3c2f 613e 2826 616d 703b ap_end(&\n+0012e4d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+0012e500: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    s\n+0012e570: 6f61 705f 646f 6e65 3c2f 613e 2826 616d oap_done(&am\n+0012e580: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
    .
    \n+0012e5c0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d <\n+00130860: 703e 5468 6520 7365 7276 6572 2062 696e p>The server bin\n+00130870: 6473 2074 6f20 6120 686f 7374 2061 6e64 ds to a host and\n+00130880: 2070 6f72 7420 616e 6420 6163 6365 7074 port and accept\n+00130890: 7320 6d65 7373 6167 6573 2069 6e20 6120 s messages in a \n+001308a0: 6c6f 6f70 2e20 4265 6361 7573 6520 5544 loop. Because UD\n+001308b0: 5020 646f 6573 206e 6f74 2068 6176 6520 P does not have \n+001308c0: 7468 6520 6571 7569 7661 6c65 6e74 206f the equivalent o\n+001308d0: 6620 616e 2061 6363 6570 742c 2074 6865 f an accept, the\n+001308e0: 206d 6573 7361 6765 7320 6361 6e6e 6f74 messages cannot\n+001308f0: 2062 6520 6469 7370 6174 6368 6564 2074 be dispatched t\n+00130900: 6f20 7468 7265 6164 732e 2049 6e73 7465 o threads. Inste\n+00130910: 6164 2074 6865 203c 636f 6465 3e3c 6120 ad the soap\n+00130990: 5f73 6572 7665 3c2f 613e 3c2f 636f 6465 _serve waits for a me\n+001309b0: 7373 6167 6520 616e 6420 696d 6d65 6469 ssage and immedi\n+001309c0: 6174 656c 7920 6163 6365 7074 7320 6974 ately accepts it\n+001309d0: 2e20 596f 7520 6361 6e20 7573 6520 6120 . You can use a \n+001309e0: 7265 6365 6976 6520 7469 6d65 6f75 7420 receive timeout \n+001309f0: 7661 6c75 6520 666f 7220 3c63 6f64 653e value for \n+00130a00: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap:\n+00130ab0: 3a72 6563 765f 7469 6d65 6f75 743c 2f61 :recv_timeout to make\n+00130ad0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_serve\n+00130b50: 3c2f 613e 3c2f 636f 6465 3e20 6e6f 6e2d non-\n+00130b60: 626c 6f63 6b69 6e67 2e3c 2f70 3e0a 3c70 blocking.

    .To obtain respo\n+00130b80: 6e73 6520 6f6e 652d 7761 7920 6f70 6572 nse one-way oper\n+00130b90: 6174 696f 6e73 2066 726f 6d20 6120 5753 ations from a WS\n+00130ba0: 444c 2c20 7573 6520 3c61 2068 7265 663d DL, use <\n+00130bc0: 636f 6465 3e77 7364 6c32 6820 2d62 3c2f code>wsdl2h -b option\n+00130be0: 203c 623e 3c63 6f64 653e 2d62 3c2f 636f -b. Thi\n+00130c00: 7320 7072 6f64 7563 6573 2061 6464 6974 s produces addit\n+00130c10: 696f 6e61 6c20 6f6e 652d 7761 7920 6f70 ional one-way op\n+00130c20: 6572 6174 696f 6e73 2074 6f20 7375 7070 erations to supp\n+00130c30: 6f72 7420 6173 796e 6368 726f 6e6f 7573 ort asynchronous\n+00130c40: 2068 616e 646c 696e 6720 6f66 2072 6573 handling of res\n+00130c50: 706f 6e73 6520 6d65 7373 6167 6573 2069 ponse messages i\n+00130c60: 6e20 7468 6520 7361 6d65 2077 6179 2072 n the same way r\n+00130c70: 6571 7565 7374 7320 6172 6520 6861 6e64 equests are hand\n+00130c80: 6c65 642e 3c2f 703e 0a3c 703e f09f 949d led.

    .

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

    .<\n+00130cc0: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3><\n+00130cf0: 2f61 3e0a 534f 4150 2d6f 7665 722d 5544 /a>.SOAP-over-UD\n+00130d00: 5020 6d75 6c74 6963 6173 7420 7265 6365 P multicast rece\n+00130d10: 6976 696e 6720 7365 7276 6572 3c2f 6833 iving server.

    For UDP mul\n+00130d30: 7469 6361 7374 2073 7570 706f 7274 2c20 ticast support, \n+00130d40: 666f 6c6c 6f77 2074 6865 2073 7567 6765 follow the sugge\n+00130d50: 7374 696f 6e73 2069 6e20 5365 6374 696f stions in Sectio\n+00130d60: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n SO\n+00130d90: 4150 2d6f 7665 722d 5544 5020 7365 7276 AP-over-UDP serv\n+00130da0: 6572 3c2f 613e 2061 6e64 2063 6861 6e67 er and chang\n+00130db0: 6520 7468 6520 696e 6974 6961 6c69 7a61 e the initializa\n+00130dc0: 7469 6f6e 2070 6172 7473 206f 6620 7468 tion parts of th\n+00130dd0: 6520 636f 6465 2074 6f20 656e 6162 6c65 e code to enable\n+00130de0: 2055 4450 206d 756c 7469 6361 7374 2070 UDP multicast p\n+00130df0: 6f72 7420 6269 6e64 696e 6720 6279 2074 ort binding by t\n+00130e00: 6f20 7465 6c6c 696e 6720 7468 6520 6b65 o telling the ke\n+00130e10: 726e 656c 2077 6869 6368 206d 756c 7469 rnel which multi\n+00130e20: 6361 7374 2067 726f 7570 7320 796f 7520 cast groups you \n+00130e30: 6172 6520 696e 7465 7265 7374 6564 2069 are interested i\n+00130e40: 6e3a 3c2f 703e 0a3c 6469 7620 636c 6173 n:

    .
    <\n+00130e70: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n+00130e80: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n+00130e90: 6465 2026 7175 6f74 3b70 6c75 6769 6e2f de "plugin/\n+00130ea0: 7773 6161 7069 2e68 2671 756f 743b 3c2f wsaapi.h"
    . <\n+00130ed0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int mai\n+00130f10: 6e28 2920 3c2f 6469 763e 0a3c 6469 7620 n()
    .
    {.
    s\n+00130f60: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap soap; .
    s\n+00131000: 7472 7563 7420 3c2f 7370 616e 3e69 705f truct ip_\n+00131010: 6d72 6571 206d 6361 7374 3b20 3c2f 6469 mreq mcast; .
    soap\n+00131090: 5f69 6e69 7431 3c2f 613e 2826 616d 703b _init1(&\n+001310a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001310d0: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_IO_UDP<\n+00131130: 2f61 3e29 3b20 3c2f 6469 763e 0a3c 6469 /a>);
    . \n+00131150: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_regist\n+001311b0: 6572 5f70 6c75 6769 6e3c 2f61 3e28 2661 er_plugin(&a\n+001311c0: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, soap_wsa);..
    {..
    e\n+00131450: 7869 7428 4558 4954 5f46 4149 4c55 5245 xit(EXIT_FAILURE\n+00131460: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    } \n+00131480: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    mcast\n+001314a0: 2e69 6d72 5f6d 756c 7469 6164 6472 2e73 .imr_multiaddr.s\n+001314b0: 5f61 6464 7220 3d20 696e 6574 5f61 6464 _addr = inet_add\n+001314c0: 7228 7075 7420 4950 206d 756c 7469 6361 r(put IP multica\n+001314d0: 7374 2061 6464 7265 7373 206f 6620 6772 st address of gr\n+001314e0: 6f75 7020 6865 7265 293b 203c 2f64 6976 oup here); .
    mcast.imr_\n+00131510: 696e 7465 7266 6163 652e 735f 6164 6472 interface.s_addr\n+00131520: 203d 2068 746f 6e6c 2849 4e41 4444 525f = htonl(INADDR_\n+00131530: 414e 5929 3b20 3c2f 6469 763e 0a3c 6469 ANY);
    . \n+00131550: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (setsockopt\n+00131580: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001315b0: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .master\n+00131600: 3c2f 613e 2c20 4950 5052 4f54 4f5f 4950 , IPPROTO_IP\n+00131610: 2c20 4950 5f41 4444 5f4d 454d 4245 5253 , IP_ADD_MEMBERS\n+00131620: 4849 502c 2026 616d 703b 6d63 6173 742c HIP, &mcast,\n+00131630: 203c 7370 616e 2063 6c61 7373 3d22 6b65 sizeof(mcast))<\n+00131660: 3029 203c 2f64 6976 3e0a 3c64 6976 2063 0)
    .
    \n+00131680: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // err\n+001316a0: 6f72 3c2f 7370 616e 3e3c 2f64 6976 3e0a or
    .\n+001316b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //\n+001316e0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+00131700: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_dest\n+00131760: 726f 793c 2f61 3e28 2661 6d70 3b3c 6120 roy(&soap);.
    so\n+00131810: 6170 5f65 6e64 3c2f 613e 2826 616d 703b ap_end(&\n+00131820: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+00131850: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    soap_done(&\n+001318d0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+00131900: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    .}<\n+00131920: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <\n+00131970: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+00131980: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n+001319c0: 6f61 703a 3a6d 6173 7465 723c 2f61 3e3c oap::master<\n+001319d0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    SOAP_SO\n+001319f0: 434b 4554 206d 6173 7465 723c 2f64 6976 CKET master
    The socket s\n+00131a20: 6574 2062 7920 736f 6170 5f62 696e 6420 et by soap_bind \n+00131a30: 286f 7220 7468 6520 432b 2b20 7365 7276 (or the C++ serv\n+00131a40: 6963 6520 636c 6173 7320 6269 6e64 206d ice class bind m\n+00131a50: 6574 686f 6429 2074 6f20 7365 7276 6520 ethod) to serve \n+00131a60: 6173 2074 6865 206d 6173 7465 7220 736f as the master so\n+00131a70: 636b 6574 2062 6f75 6e2e 2e2e 3c2f 6469 cket boun...
    Definiti\n+00131aa0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+00131ab0: 2e68 3a33 3032 333c 2f64 6976 3e3c 2f64 .h:3023
    .

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

    \n+00131b10: 0a3c 6831 3e3c 6120 636c 6173 733d 2261 .

    .C\n+00131b40: 6f6d 7069 6c65 2d74 696d 6520 666c 6167 ompile-time flag\n+00131b50: 733c 2f68 313e 0a3c 703e 5468 6520 666f s

    .

    The fo\n+00131b60: 6c6c 6f77 696e 6720 6d61 6372 6f73 2061 llowing macros a\n+00131b70: 7265 2064 6566 696e 6564 2069 6e20 7468 re defined in th\n+00131b80: 6520 4150 4920 646f 6375 6d65 6e74 6174 e API documentat\n+00131b90: 696f 6e20 4d6f 6475 6c65 203c 6120 636c ion Module WITH_MAC\n+00131bd0: 524f 2063 6f6d 7069 6c65 2d74 696d 6520 RO compile-time \n+00131be0: 666c 6167 733c 2f61 3e2e 2054 6865 7365 flags. These\n+00131bf0: 206d 6163 726f 7320 6172 6520 7573 6564 macros are used\n+00131c00: 2074 6f20 656e 6162 6c65 206f 7220 6469 to enable or di\n+00131c10: 7361 626c 6520 6665 6174 7572 6573 2061 sable features a\n+00131c20: 7320 7370 6563 6966 6965 6420 6265 6c6f s specified belo\n+00131c30: 772c 2062 7920 636f 6d70 696c 696e 6720 w, by compiling \n+00131c40: 736f 7572 6365 2063 6f64 6520 6669 6c65 source code file\n+00131c50: 7320 7769 7468 2063 6f6d 7069 6c65 7220 s with compiler \n+00131c60: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option \n+00131c70: 2d44 3c2f 636f 6465 3e3c 2f62 3e20 746f -D to\n+00131c80: 2073 6574 2074 6865 206d 6163 726f 3a3c set the macro:<\n+00131c90: 2f70 3e0a 3c74 6162 6c65 2063 6c61 7373 /p>.

  • engine <\n-0018e5b0: 2f74 683e 3c74 6820 636c 6173 733d 226d /th>result \n-0018e5e0: 3c2f 7468 3e3c 2f74 723e 0a3c 7472 2063
    openssl The \n-0018e670: 6465 6661 756c 7420 736f 6674 7761 7265 default software\n-0018e680: 2065 6e67 696e 6520 666f 7220 6372 7970 engine for cryp\n-0018e690: 746f 6772 6170 6869 6320 6f70 6572 6174 tographic operat\n-0018e6a0: 696f 6e73 2020 2020 3c2f 7464 3e3c 2f74 ions
    ope\n-0018e700: 6e62 7364 5f64 6576 5f63 7279 7074 6f3c nbsd_dev_crypto<\n-0018e710: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    cswift \n-0018e7d0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 CryptoS\n-0018e800: 7769 6674 2061 6363 656c 6572 6174 696f wift acceleratio\n-0018e810: 6e20 6861 7264 7761 7265 2020 2020 3c2f n hardware
    chil \n-0018e880: 203c 2f74 643e 3c74 6420 636c 6173 733d nCipher \n-0018e8b0: 4348 494c 2061 6363 656c 6572 6174 696f CHIL acceleratio\n-0018e8c0: 6e20 6861 7264 7761 7265 2020 2020 3c2f n hardware
    atalla \n-0018e930: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 Compaq \n-0018e960: 4174 616c 6c61 2061 6363 656c 6572 6174 Atalla accelerat\n-0018e970: 696f 6e20 6861 7264 7761 7265 2020 2020 ion hardware \n-0018e980: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    Nuron\n-0018ea10: 2061 6363 656c 6572 6174 696f 6e20 6861 acceleration ha\n-0018ea20: 7264 7761 7265 2020 2020 3c2f 7464 3e3c rdware
    ub\n-0018ea80: 7365 633c 2f63 6f64 653e 2020 203c 2f74 sec Broadcom uBS\n-0018eac0: 6563 2061 6363 656c 6572 6174 696f 6e20 ec acceleration \n-0018ead0: 6861 7264 7761 7265 2020 2020 3c2f 7464 hardware
    aep Aep acceler\n-0018eb70: 6174 696f 6e20 6861 7264 7761 7265 2020 ation hardware \n-0018eb80: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    .\n+00131cd0: 0a3c 7468 2063 6c61 7373 3d22 6d61 726b ...\n+00131e10: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....<\n+00132010: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>...\n+00132130: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+00132150: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .....e\n+001323d0: 6e61 626c 6573 2048 5454 5020 636f 6f6b nables HTTP cook\n+001323e0: 6965 732c 2073 6565 2053 6563 7469 6f6e ies, see Section\n+001323f0: 7320 3c61 2063 6c61 7373 3d22 656c 2220 s C\n+00132420: 6c69 656e 742d 7369 6465 2063 6f6f 6b69 lient-side cooki\n+00132430: 6520 7375 7070 6f72 743c 2f61 3e20 616e e support an\n+00132440: 6420 3c61 2063 6c61 7373 3d22 656c 2220 d S\n+00132470: 6572 7665 722d 7369 6465 2063 6f6f 6b69 erver-side cooki\n+00132480: 6520 7375 7070 6f72 743c 2f61 3e20 2020 e support \n+00132490: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..\n+001324e0: 3c63 6f64 653e 2357 4954 485f 494e 5345 #WITH_INSE\n+001324f0: 4355 5245 5f43 4f4f 4b49 4553 3c2f 636f CURE_COOKIES .\n+001325a0: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+001325c0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ..........<\n+00132ac0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00132ad0: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+00132ae0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .\n+00132bc0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....<\n+00132cd0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00132ce0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00132cf0: 3e66 6f72 6365 2074 6865 2075 7365 206c >force the use l\n+00132d00: 6f63 616c 6520 6675 6e63 7469 6f6e 7320 ocale functions \n+00132d10: 7768 656e 2061 7661 696c 6162 6c65 2074 when available t\n+00132d20: 6f20 656e 7375 7265 206c 6f63 616c 652d o ensure locale-\n+00132d30: 696e 6465 7065 6e64 656e 7420 6e75 6d62 independent numb\n+00132d40: 6572 2063 6f6e 7665 7273 696f 6e73 2020 er conversions \n+00132d50: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..\n+00132da0: 3c63 6f64 653e 2357 4954 485f 4e4f 5f43 #WITH_NO_C\n+00132db0: 5f4c 4f43 414c 453c 2f63 6f64 653e 2020 _LOCALE \n+00132dc0: 203c 2f74 643e 3c74 6420 636c 6173 733d .\n+00132e30: 3c74 7220 636c 6173 733d 226d 6172 6b64 .\n+00132ea0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n+00132fa0: 636f 6465 3e23 5749 5448 5f44 4f4d 3c2f code>#WITH_DOM e\n+00132fe0: 6e61 626c 6520 444f 4d20 7061 7273 696e nable DOM parsin\n+00132ff0: 6720 696e 2074 6865 2065 6e67 696e 652c g in the engine,\n+00133000: 2072 6571 7569 7265 6420 6279 2074 6865 required by the\n+00133010: 2057 532d 5365 6375 7269 7479 2070 6c75 WS-Security plu\n+00133020: 6769 6e20 2020 203c 2f74 643e 3c2f 7472 gin ...<\n+00133130: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00133140: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+00133150: 3c74 6420 636c 6173 733d 226d 6172 6b64 <\n+00133210: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>....<\n+001333b0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001333c0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+001333d0: 3e72 656d 6f76 6573 2069 6420 616e 6420 >removes id and \n+001333e0: 6872 6566 2f72 6566 206d 756c 7469 2d72 href/ref multi-r\n+001333f0: 6566 6572 656e 6365 2064 6174 612c 206d eference data, m\n+00133400: 6f72 6520 6167 6772 6573 7369 7665 2074 ore aggressive t\n+00133410: 6861 6e20 7573 696e 6720 7468 6520 3c63 han using the #SOAP_XML_TR\n+00133430: 4545 3c2f 636f 6465 3e20 7275 6e74 696d EE runtim\n+00133440: 6520 666c 6167 2020 2020 3c2f 7464 3e3c e flag <\n+00133450: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..<\n+00133510: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>...<\n+001335f0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00133600: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+00133610: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .<\n+00133660: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00133670: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00133680: 3e64 6973 6162 6c65 7320 786d 6c6e 733d >disables xmlns=\n+00133690: 2222 2064 6566 6175 6c74 2065 6d70 7479 \"\" default empty\n+001336a0: 206e 616d 6573 7061 6365 7320 6672 6f6d namespaces from\n+001336b0: 2058 4d4c 206d 6573 7361 6765 7320 2020 XML messages \n+001336c0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..<\n+00133710: 636f 6465 3e23 5749 5448 5f4e 4f45 4d50 code>#WITH_NOEMP\n+00133720: 5459 5354 5255 4354 3c2f 636f 6465 3e20 TYSTRUCT \n+00133730: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 ......\n+00133bc0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ......\n+00133e60: 3c63 6f64 653e 2357 4954 485f 4341 5345 #WITH_CASE\n+00133e70: 494e 5345 4e53 4954 4956 4554 4147 533c INSENSITIVETAGS<\n+00133e80: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n+00133eb0: 656e 6162 6c65 7320 6361 7365 2069 6e73 enables case ins\n+00133ec0: 656e 7369 7469 7665 2058 4d4c 2070 6172 ensitive XML par\n+00133ed0: 7369 6e67 2020 2020 3c2f 7464 3e3c 2f74 sing ....<\n+00134070: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00134080: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00134090: 3e65 6e61 626c 6573 2054 4350 2046 494e >enables TCP FIN\n+001340a0: 2061 6674 6572 2073 656e 6473 2077 6865 after sends whe\n+001340b0: 6e20 736f 636b 6574 2069 7320 7265 6164 n socket is read\n+001340c0: 7920 746f 2063 6c6f 7365 2020 2020 3c2f y to close ..<\n+00134270: 2f74 723e 0a3c 2f74 6162 6c65 3e0a 3c70 /tr>.
    define result
    #SOAPDEFS_H the\n+00131dc0: 2068 6561 6465 7220 6669 6c65 2074 6f20 header file to \n+00131dd0: 696e 636c 7564 652c 2069 6620 6469 6666 include, if diff\n+00131de0: 6572 656e 7420 6672 6f6d 203c 636f 6465 erent from soapdefs.h
    #WITH\n+00131e60: 5f53 4f41 5044 4546 535f 483c 2f63 6f64 _SOAPDEFS_H incl\n+00131ea0: 7564 6573 2074 6865 203c 636f 6465 3e73 udes the s\n+00131eb0: 6f61 7064 6566 732e 683c 2f63 6f64 653e oapdefs.h\n+00131ec0: 2066 696c 6520 666f 7220 6375 7374 6f6d file for custom\n+00131ed0: 2073 6574 7469 6e67 732c 2073 6565 2053 settings, see S\n+00131ee0: 6563 7469 6f6e 203c 6120 636c 6173 733d ection \n+00131f10: 5573 696e 6720 7468 6520 736f 6170 6465 Using the soapde\n+00131f20: 6673 2e68 2068 6561 6465 7220 6669 6c65 fs.h header file\n+00131f30: 3c2f 613e 2020 2020 3c2f 7464 3e3c 2f74
    #WIT\n+00131f90: 485f 434f 4d50 4154 3c2f 636f 6465 3e20 H_COMPAT \n+00131fa0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 removes\n+00131fd0: 2064 6570 656e 6465 6e63 7920 6f6e 2043 dependency on C\n+00131fe0: 2b2b 2073 7472 6561 6d20 6c69 6272 6172 ++ stream librar\n+00131ff0: 6965 7320 616e 6420 432b 2b20 6578 6365 ies and C++ exce\n+00132000: 7074 696f 6e73 2020 2020 3c2f 7464 3e3c ptions
    #\n+00132060: 5749 5448 5f4c 4541 4e3c 2f63 6f64 653e WITH_LEAN\n+00132070: 2020 203c 2f74 643e 3c74 6420 636c 6173 create\n+001320a0: 7320 6120 736d 616c 6c2d 666f 6f74 7072 s a small-footpr\n+001320b0: 696e 7420 6578 6563 7574 6162 6c65 2c20 int executable, \n+001320c0: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section How to minimize\n+00132100: 2061 7070 6c69 6361 7469 6f6e 206d 656d application mem\n+00132110: 6f72 7920 666f 6f74 7072 696e 743c 2f61 ory footprint
    #WITH_L\n+00132180: 4541 4e45 523c 2f63 6f64 653e 2020 203c EANER <\n+00132190: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>creates an\n+001321c0: 2065 7665 6e20 736d 616c 6c65 7220 666f even smaller fo\n+001321d0: 6f74 7072 696e 7420 6578 6563 7574 6162 otprint executab\n+001321e0: 6c65 2c20 7365 6520 5365 6374 696f 6e20 le, see Section \n+001321f0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 How to mini\n+00132220: 6d69 7a65 2061 7070 6c69 6361 7469 6f6e mize application\n+00132230: 206d 656d 6f72 7920 666f 6f74 7072 696e memory footprin\n+00132240: 743c 2f61 3e20 2020 203c 2f74 643e 3c2f t
    #W\n+001322a0: 4954 485f 4641 5354 3c2f 636f 6465 3e20 ITH_FAST \n+001322b0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 use fas\n+001322e0: 7465 7220 6d65 6d6f 7279 2061 6c6c 6f63 ter memory alloc\n+001322f0: 6174 696f 6e20 7768 656e 2075 7365 6420 ation when used \n+00132300: 7769 7468 203c 636f 6465 3e23 5749 5448 with #WITH\n+00132310: 5f4c 4541 4e3c 2f63 6f64 653e 206f 7220 _LEAN or \n+00132320: 3c63 6f64 653e 2357 4954 485f 4c45 414e #WITH_LEAN\n+00132330: 4552 3c2f 636f 6465 3e20 2020 203c 2f74 ER
    #WITH_COOKIES
    ena\n+00132530: 626c 6573 2048 5454 5020 636f 6f6b 6965 bles HTTP cookie\n+00132540: 7320 616e 6420 616c 6c6f 7773 2063 6f6f s and allows coo\n+00132550: 6b69 6573 2077 6974 6820 7468 6569 7220 kies with their \n+00132560: 5365 6375 7265 2066 6c61 6720 7365 7420 Secure flag set \n+00132570: 746f 2062 6520 7365 6e74 206f 7665 7220 to be sent over \n+00132580: 696e 7365 6375 7265 2063 6861 6e6e 656c insecure channel\n+00132590: 7320 2020 203c 2f74 643e 3c2f 7472 3e0a s
    #WITH_I\n+001325f0: 5056 363c 2f63 6f64 653e 2020 203c 2f74 PV6 enables IPv6\n+00132630: 2073 7570 706f 7274 2020 2020 3c2f 7464 support
    #WITH_IPV6_V6ON\n+001326a0: 4c59 3c2f 636f 6465 3e20 2020 3c2f 7464 LY enables IPv6 \n+001326e0: 7375 7070 6f72 7420 7769 7468 2049 5076 support with IPv\n+001326f0: 362d 6f6e 6c79 2073 6572 7665 7220 6f70 6-only server op\n+00132700: 7469 6f6e 2020 2020 3c2f 7464 3e3c 2f74 tion
    #WIT\n+00132760: 485f 4f50 454e 5353 4c3c 2f63 6f64 653e H_OPENSSL\n+00132770: 2020 203c 2f74 643e 3c74 6420 636c 6173 enable\n+001327a0: 7320 4f70 656e 5353 4c2c 2073 6565 2053 s OpenSSL, see S\n+001327b0: 6563 7469 6f6e 7320 3c61 2063 6c61 7373 ections Secure cli\n+001327f0: 656e 7473 2077 6974 6820 4854 5450 533c ents with HTTPS<\n+00132800: 2f61 3e20 616e 6420 3c61 2063 6c61 7373 /a> and Secure Web\n+00132840: 2073 6572 7669 6365 7320 7769 7468 2048 services with H\n+00132850: 5454 5053 3c2f 613e 2020 2020 3c2f 7464 TTPS
    #WITH_GNUTLS en\n+001328f0: 6162 6c65 7320 474e 5554 4c53 2c20 7365 ables GNUTLS, se\n+00132900: 6520 5365 6374 696f 6e73 203c 6120 636c e Sections Secure \n+00132940: 636c 6965 6e74 7320 7769 7468 2048 5454 clients with HTT\n+00132950: 5053 3c2f 613e 2061 6e64 203c 6120 636c PS and Secure \n+00132990: 5765 6220 7365 7276 6963 6573 2077 6974 Web services wit\n+001329a0: 6820 4854 5450 533c 2f61 3e20 2020 203c h HTTPS <\n+001329b0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #WITH_GZIP en\n+00132a40: 6162 6c65 7320 677a 6970 2061 6e64 2064 ables gzip and d\n+00132a50: 6566 6c61 7465 2063 6f6d 7072 6573 7369 eflate compressi\n+00132a60: 6f6e 2c20 7365 6520 5365 6374 696f 6e20 on, see Section \n+00132a70: 3c61 2063 6c61 7373 3d22 656c 2220 6872 Zlib\n+00132aa0: 2063 6f6d 7072 6573 7369 6f6e 3c2f 613e compression\n+00132ab0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #WITH_Z\n+00132b10: 4c49 423c 2f63 6f64 653e 2020 203c 2f74 LIB enables defl\n+00132b50: 6174 6520 636f 6d70 7265 7373 696f 6e20 ate compression \n+00132b60: 6f6e 6c79 2c20 7365 6520 5365 6374 696f only, see Sectio\n+00132b70: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n Zl\n+00132ba0: 6962 2063 6f6d 7072 6573 7369 6f6e 3c2f ib compression
    #WITH_\n+00132c10: 4e54 4c4d 3c2f 636f 6465 3e20 2020 3c2f NTLM enables NTL\n+00132c50: 4d20 7375 7070 6f72 7420 2020 203c 2f74 M support
    #WITH_C_LOCALE\n+00132cc0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    remove t\n+00132df0: 6865 2075 7365 206f 6620 6c6f 6361 6c65 he use of locale\n+00132e00: 2066 756e 6374 696f 6e73 2074 6f20 696d functions to im\n+00132e10: 7072 6f76 6520 706f 7274 6162 696c 6974 prove portabilit\n+00132e20: 7920 2020 203c 2f74 643e 3c2f 7472 3e0a y
    #WITH_\n+00132e80: 494e 434c 5544 455f 584c 4f43 414c 455f INCLUDE_XLOCALE_\n+00132e90: 483c 2f63 6f64 653e 2020 203c 2f74 643e H force the incl\n+00132ed0: 7573 696f 6e20 6f66 203c 636f 6465 3e26 usion of &\n+00132ee0: 6c74 3b78 6c6f 6361 6c65 2e68 2667 743b lt;xlocale.h>\n+00132ef0: 3c2f 636f 6465 3e20 746f 2064 6566 696e to defin\n+00132f00: 6520 3c63 6f64 653e 6c6f 6361 6c65 5f74 e locale_t\n+00132f10: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and _l func\n+00132f30: 7469 6f6e 732c 2074 6f20 696d 7072 6f76 tions, to improv\n+00132f40: 6520 706f 7274 6162 696c 6974 7920 2020 e portability \n+00132f50: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    #WIT\n+00133080: 485f 5245 504c 4143 455f 494c 4c45 4741 H_REPLACE_ILLEGA\n+00133090: 4c5f 5554 4638 3c2f 636f 6465 3e20 2020 L_UTF8 \n+001330a0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 enable st\n+001330d0: 7269 6374 2055 5446 2d38 2c20 7265 706c rict UTF-8, repl\n+001330e0: 6163 6573 2055 5446 2d38 2063 6f6e 7465 aces UTF-8 conte\n+001330f0: 6e74 2074 6861 7420 6973 206f 7574 7369 nt that is outsi\n+00133100: 6465 2074 6865 2061 6c6c 6f77 6564 2072 de the allowed r\n+00133110: 616e 6765 2077 6974 6820 552b 4646 4644 ange with U+FFFD\n+00133120: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #WITH_FA\n+00133180: 5354 4347 493c 2f63 6f64 653e 2020 203c STCGI <\n+00133190: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>enables Fa\n+001331c0: 7374 4347 492c 2073 6565 2053 6563 7469 stCGI, see Secti\n+001331d0: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on FastC\n+00133200: 4749 3c2f 613e 2020 2020 3c2f 7464 3e3c GI
    #\n+00133260: 5749 5448 5f4e 4f49 4f3c 2f63 6f64 653e WITH_NOIO\n+00133270: 2020 203c 2f74 643e 3c74 6420 636c 6173 remove\n+001332a0: 7320 494f 206f 7065 7261 7469 6f6e 732c s IO operations,\n+001332b0: 2074 6f20 656c 696d 696e 6174 6520 7468 to eliminate th\n+001332c0: 6520 7573 6520 6f66 2042 5344 2073 6f63 e use of BSD soc\n+001332d0: 6b65 7473 2c20 7365 6520 5365 6374 696f kets, see Sectio\n+001332e0: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n How to re\n+00133310: 6d6f 7665 2074 6865 2042 5344 2073 6f63 move the BSD soc\n+00133320: 6b65 7420 6c69 6272 6172 7920 7265 7175 ket library requ\n+00133330: 6972 656d 656e 743c 2f61 3e20 2020 203c irement <\n+00133340: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #WITH_NOIDREF\n+001333a0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    #\n+001334a0: 5749 5448 5f4e 4f48 5454 503c 2f63 6f64 WITH_NOHTTP remo\n+001334e0: 7665 7320 7468 6520 4854 5450 2073 7461 ves the HTTP sta\n+001334f0: 636b 2074 6f20 7265 6475 6365 2063 6f64 ck to reduce cod\n+00133500: 6520 7369 7a65 2020 2020 3c2f 7464 3e3c e size
    #W\n+00133560: 4954 485f 4e4f 5a4f 4e45 3c2f 636f 6465 ITH_NOZONE disab\n+001335a0: 6c65 7320 616e 6420 6967 6e6f 7265 7320 les and ignores \n+001335b0: 7468 6520 7469 6d65 7a6f 6e65 2069 6e20 the timezone in \n+001335c0: 3c63 6f64 653e 7873 643a 6461 7465 5469 xsd:dateTi\n+001335d0: 6d65 3c2f 636f 6465 3e20 7661 6c75 6573 me values\n+001335e0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #WITH_N\n+00133640: 4f45 4d50 5459 4e41 4d45 5350 4143 4553 OEMPTYNAMESPACES\n+00133650: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    inserts\n+00133760: 2061 2064 756d 6d79 206d 656d 6265 7220 a dummy member \n+00133770: 696e 2065 6d70 7479 2073 7472 7563 7473 in empty structs\n+00133780: 2074 6f20 616c 6c6f 7720 636f 6d70 696c to allow compil\n+00133790: 6174 696f 6e20 2020 203c 2f74 643e 3c2f ation
    #W\n+001337f0: 4954 485f 4e4f 474c 4f42 414c 3c2f 636f ITH_NOGLOBAL omi\n+00133830: 7420 534f 4150 2048 6561 6465 7220 616e t SOAP Header an\n+00133840: 6420 4661 756c 7420 7365 7269 616c 697a d Fault serializ\n+00133850: 6174 696f 6e20 636f 6465 2c20 7072 6576 ation code, prev\n+00133860: 656e 7473 2064 7570 6c69 6361 7465 2064 ents duplicate d\n+00133870: 6566 696e 6974 696f 6e73 2077 6974 6820 efinitions with \n+00133880: 6765 6e65 7261 7465 6420 736f 6170 5859 generated soapXY\n+00133890: 5a4c 6962 2063 6f64 6520 2020 203c 2f74 ZLib code
    #WITH_NONAMESPA\n+00133900: 4345 533c 2f63 6f64 653e 2020 203c 2f74 CES disables dep\n+00133940: 656e 6465 6e63 6520 6f6e 2067 6c6f 6261 endence on globa\n+00133950: 6c20 3c63 6f64 653e 6e61 6d65 7370 6163 l namespac\n+00133960: 6573 3c2f 636f 6465 3e20 7461 626c 652c es table,\n+00133970: 2061 2074 6162 6c65 206d 7573 7420 6265 a table must be\n+00133980: 2073 6574 2065 7870 6c69 6369 746c 7920 set explicitly \n+00133990: 7769 7468 203c 636f 6465 3e3c 6120 636c with soap_\n+00133a60: 7365 745f 6e61 6d65 7370 6163 6573 3c2f set_namespaces see al\n+00133a80: 736f 2053 6563 7469 6f6e 203c 6120 636c so Section XML namespace\n+00133ac0: 7320 616e 6420 7468 6520 6e61 6d65 7370 s and the namesp\n+00133ad0: 6163 6520 6d61 7070 696e 6720 7461 626c ace mapping tabl\n+00133ae0: 653c 2f61 3e20 2020 203c 2f74 643e 3c2f e
    #W\n+00133b40: 4954 485f 4344 4154 413c 2f63 6f64 653e ITH_CDATA\n+00133b50: 2020 203c 2f74 643e 3c74 6420 636c 6173 retain\n+00133b80: 7320 7468 6520 7061 7273 6564 2043 4441 s the parsed CDA\n+00133b90: 5441 2073 6563 7469 6f6e 7320 696e 206c TA sections in l\n+00133ba0: 6974 6572 616c 2058 4d4c 2073 7472 696e iteral XML strin\n+00133bb0: 6773 2020 2020 3c2f 7464 3e3c 2f74 723e gs
    #WITH_\n+00133c10: 5055 5245 5f56 4952 5455 414c 3c2f 636f PURE_VIRTUAL ena\n+00133c50: 626c 6573 2043 2b2b 2061 6273 7472 6163 bles C++ abstrac\n+00133c60: 7420 7365 7276 6963 6520 636c 6173 7365 t service classe\n+00133c70: 7320 7769 7468 2070 7572 6520 7669 7274 s with pure virt\n+00133c80: 7561 6c20 6d65 7468 6f64 732c 2072 6571 ual methods, req\n+00133c90: 7569 7265 7320 736f 6170 6370 7032 206f uires soapcpp2 o\n+00133ca0: 7074 696f 6e20 3c63 6f64 653e 2d69 3c2f ption -i or -\n+00133cc0: 6a3c 2f63 6f64 653e 2020 2020 3c2f 7464 j
    #WITH_DEFAULT_V\n+00133d30: 4952 5455 414c 3c2f 636f 6465 3e20 2020 IRTUAL \n+00133d40: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 enables C\n+00133d70: 2b2b 2062 6173 6520 7365 7276 6963 6520 ++ base service \n+00133d80: 636c 6173 7365 7320 7769 7468 2064 6566 classes with def\n+00133d90: 6175 6c74 2076 6972 7475 616c 206d 6574 ault virtual met\n+00133da0: 686f 6473 2072 6574 7572 6e69 6e67 2066 hods returning f\n+00133db0: 6175 6c74 203c 636f 6465 3e23 534f 4150 ault #SOAP\n+00133dc0: 5f4e 4f5f 4d45 5448 4f44 3c2f 636f 6465 _NO_METHOD, requires soap\n+00133de0: 6370 7032 206f 7074 696f 6e20 3c63 6f64 cpp2 option -i or <\n+00133e00: 636f 6465 3e2d 6a3c 2f63 6f64 653e 2020 code>-j \n+00133e10: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    #WI\n+00133f30: 5448 5f53 4f43 4b45 545f 434c 4f53 455f TH_SOCKET_CLOSE_\n+00133f40: 4f4e 5f45 5849 543c 2f63 6f64 653e 2020 ON_EXIT \n+00133f50: 203c 2f74 643e 3c74 6420 636c 6173 733d prevents\n+00133f80: 2061 2073 6572 7665 7220 706f 7274 2066 a server port f\n+00133f90: 726f 6d20 7374 6179 696e 6720 696e 206c rom staying in l\n+00133fa0: 6973 7465 6e69 6e67 206d 6f64 6520 6166 istening mode af\n+00133fb0: 7465 7220 6578 6974 2062 7920 696e 7465 ter exit by inte\n+00133fc0: 726e 616c 6c79 2073 6574 7469 6e67 203c rnally setting <\n+00133fd0: 636f 6465 3e66 636e 746c 2873 6f63 6b2c code>fcntl(sock,\n+00133fe0: 2046 5f53 4554 4644 2c20 4644 5f43 4c4f F_SETFD, FD_CLO\n+00133ff0: 4558 4543 293c 2f63 6f64 653e 2020 2020 EXEC) \n+00134000: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    #WITH_TCPFIN\n+00134060: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    #WITH_SELF_PI\n+00134130: 5045 3c2f 636f 6465 3e20 2020 3c2f 7464 PE enables a \"se\n+00134170: 6c66 2070 6970 6522 2074 6f20 656e 6162 lf pipe\" to enab\n+00134180: 6c65 2074 6865 203c 636f 6465 3e3c 6120 le the soap_close_c\n+00134230: 6f6e 6e65 6374 696f 6e3c 2f61 3e3c 2f63 onnection function (g\n+00134250: 534f 4150 2032 2e38 2e37 3120 6f72 2067 SOAP 2.8.71 or g\n+00134260: 7265 6174 6572 2920 2020 3c2f 7464 3e3c reater)
    .The following s\n+00134290: 7562 7365 7420 6f66 206d 6163 726f 7320 ubset of macros \n+001342a0: 6172 6520 6465 6669 6e65 6420 696e 2074 are defined in t\n+001342b0: 6865 2041 5049 2064 6f63 756d 656e 7461 he API documenta\n+001342c0: 7469 6f6e 204d 6f64 756c 6520 3c61 2063 tion Module SOAP_MA\n+00134300: 4352 4f20 636f 6d70 696c 652d 7469 6d65 CRO compile-time\n+00134310: 2076 616c 7565 733c 2f61 3e2e 2054 6865 values. The\n+00134320: 7365 206d 6163 726f 7320 6172 6520 7573 se macros are us\n+00134330: 6564 2074 6f20 656e 6162 6c65 206f 7220 ed to enable or \n+00134340: 6469 7361 626c 6520 6665 6174 7572 6573 disable features\n+00134350: 2061 7320 7370 6563 6966 6965 6420 6265 as specified be\n+00134360: 6c6f 772c 2062 7920 636f 6d70 696c 696e low, by compilin\n+00134370: 6720 736f 7572 6365 2063 6f64 6520 6669 g source code fi\n+00134380: 6c65 7320 7769 7468 2063 6f6d 7069 6c65 les with compile\n+00134390: 7220 6f70 7469 6f6e 203c 623e 3c63 6f64 r option -D \n+001343b0: 746f 2073 6574 2074 6865 206d 6163 726f to set the macro\n+001343c0: 3a3c 2f70 3e0a 3c74 6162 6c65 2063 6c61 :

    .....<\n+001344d0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001344e0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+001344f0: 3e65 7870 616e 6473 2074 6f20 3c63 6f64 >expands to (std::nothrow)\n+00134510: 3c2f 636f 6465 3e20 746f 2070 7265 7665 to preve\n+00134520: 6e74 206d 656d 6f72 7920 616c 6c6f 6361 nt memory alloca\n+00134530: 7469 6f6e 2065 7863 6570 7469 6f6e 7320 tion exceptions \n+00134540: 283c 636f 6465 3e23 534f 4150 5f45 4f4d (#SOAP_EOM\n+00134550: 3c2f 636f 6465 3e20 6973 2075 7365 6420 is used \n+00134560: 696e 7374 6561 6429 2c20 7468 6973 206d instead), this m\n+00134570: 6163 726f 2063 616e 2062 6520 6368 616e acro can be chan\n+00134580: 6765 6420 2020 203c 2f74 643e 3c2f 7472 ged ..<\n+00134670: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>....\n+00134770: 3c63 6f64 653e 2353 4f41 505f 5441 474c #SOAP_TAGL\n+00134780: 454e 3c2f 636f 6465 3e20 2020 3c2f 7464 EN ..t\n+00134870: 6865 206d 6178 696d 756d 206c 656e 6774 he maximum lengt\n+00134880: 6820 6f66 2074 656d 706f 7261 7279 2073 h of temporary s\n+00134890: 7472 696e 6720 7661 6c75 6573 2c20 7368 tring values, sh\n+001348a0: 6f72 7420 7374 7269 6e67 7320 616e 6420 ort strings and \n+001348b0: 6272 6965 6620 6572 726f 7220 6d65 7373 brief error mess\n+001348c0: 6167 6573 2020 2020 3c2f 7464 3e3c 2f74 ages ..\n+00134960: 7468 6520 6d61 7869 6d75 6d20 7369 7a65 the maximum size\n+00134970: 206f 6620 6120 626c 6f63 6b20 6f66 206d of a block of m\n+00134980: 656d 6f72 7920 7468 6174 203c 636f 6465 emory that malloc c\n+001349a0: 616e 2061 6c6c 6f63 6174 6520 2020 203c an allocate <\n+001349b0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>....<\n+00134ae0: 636f 6465 3e23 534f 4150 5f4d 4158 4449 code>#SOAP_MAXDI\n+00134af0: 4d45 5349 5a45 3c2f 636f 6465 3e20 2020 MESIZE \n+00134b00: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 ..<\n+00134bd0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00134be0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00134bf0: 3e6d 6178 696d 756d 206e 756d 6265 7220 >maximum number \n+00134c00: 6f66 2045 494e 5452 2069 6e74 6572 7275 of EINTR interru\n+00134c10: 7074 7320 746f 2069 676e 6f72 6520 7768 pts to ignore wh\n+00134c20: 696c 6520 706f 6c6c 696e 6720 6120 736f ile polling a so\n+00134c30: 636b 6574 2066 6f72 2070 656e 6469 6e67 cket for pending\n+00134c40: 2061 6374 6976 6974 7920 2020 203c 2f74 activity ..<\n+00134d20: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..<\n+00134d90: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00134da0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00134db0: 3e6d 6178 696d 756d 2069 7465 7261 7469 >maximum iterati\n+00134dc0: 6f6e 7320 696e 2074 6865 203c 636f 6465 ons in the \n+00134e40: 736f 6170 5f73 6572 7665 3c2f 613e 3c2f soap_serve loop on HT\n+00134e60: 5450 206b 6565 702d 616c 6976 6520 636f TP keep-alive co\n+00134e70: 6e6e 6563 7469 6f6e 7320 2020 203c 2f74 nnections ..\n+00134ef0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..m\n+00135010: 6178 696d 756d 2058 4d4c 206e 6573 7469 aximum XML nesti\n+00135020: 6e67 2064 6570 7468 206c 6576 656c 2070 ng depth level p\n+00135030: 6572 6d69 7474 6564 2062 7920 7468 6520 ermitted by the \n+00135040: 584d 4c20 7061 7273 6572 2020 2020 3c2f XML parser ......\n+001352a0: 3c63 6f64 653e 2353 4f41 505f 5055 5245 #SOAP_PURE\n+001352b0: 5f56 4952 5455 414c 3c2f 636f 6465 3e20 _VIRTUAL \n+001352c0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 .<\n+00135340: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00135350: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+00135360: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n+00135400: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..<\n+00135520: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>......<\n+001357d0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>....
    \n+001359c0: 3c64 743e 5761 726e 696e 673c 2f64 743e
    Warning
    \n+001359d0: 3c64 643e 4974 2069 7320 696d 706f 7274
    It is import\n+001359e0: 616e 7420 7468 6174 2061 6e79 206f 6620 ant that any of \n+001359f0: 7468 6573 6520 6d61 6372 6f73 2077 6865 these macros whe\n+00135a00: 6e20 6465 6669 6e65 6420 7368 6f75 6c64 n defined should\n+00135a10: 2062 6520 636f 6e73 6973 7465 6e74 6c79 be consistently\n+00135a20: 2064 6566 696e 6564 2077 6865 6e20 636f defined when co\n+00135a30: 6d70 696c 696e 6720 736f 7572 6365 2063 mpiling source c\n+00135a40: 6f64 6520 6669 6c65 732c 2073 7563 6820 ode files, such \n+00135a50: 6173 203c 656d 3e3c 636f 6465 3e67 736f as gso\n+00135a60: 6170 2f73 7464 736f 6170 322e 6370 703c ap/stdsoap2.cpp<\n+00135a70: 2f63 6f64 653e 3c2f 656d 3e2c 203c 656d /code>, soapC.cpp\n+00135a90: 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 3c65 , soapClie\n+00135ab0: 6e74 2e63 7070 3c2f 636f 6465 3e3c 2f65 nt.cpp, so\n+00135ad0: 6170 5365 7276 6572 2e63 7070 3c2f 636f apServer.cpp, and al\n+00135af0: 6c20 6170 706c 6963 6174 696f 6e20 736f l application so\n+00135b00: 7572 6365 2063 6f64 6520 6669 6c65 7320 urce code files \n+00135b10: 7468 6174 2069 6e63 6c75 6465 203c 656d that include gsoap/std\n+00135b30: 736f 6170 322e 683c 2f63 6f64 653e 3c2f soap2.h or soapH.h<\n+00135b60: 2f65 6d3e 2e20 4966 2074 6865 206d 6163 /em>. If the mac\n+00135b70: 726f 7320 6172 6520 6e6f 7420 636f 6e73 ros are not cons\n+00135b80: 6973 7465 6e74 6c79 2064 6566 696e 6564 istently defined\n+00135b90: 2061 7420 636f 6d70 696c 6520 7469 6d65 at compile time\n+00135ba0: 2074 6865 6e20 7468 6520 6170 706c 6963 then the applic\n+00135bb0: 6174 696f 6e20 7769 6c6c 206c 696b 656c ation will likel\n+00135bc0: 7920 6372 6173 6820 6475 6520 746f 2061 y crash due to a\n+00135bd0: 206d 6973 6d61 7463 6865 7320 696e 2074 mismatches in t\n+00135be0: 6865 2064 6563 6c61 7261 7469 6f6e 2061 he declaration a\n+00135bf0: 6e64 2075 7365 206f 6620 7468 6520 3c63 nd use of the \n+00135c50: 736f 6170 3c2f 613e 3c2f 636f 6465 3e20 soap \n+00135c60: 636f 6e74 6578 7420 7468 6174 2069 7320 context that is \n+00135c70: 6375 7374 6f6d 697a 6564 2062 7920 7468 customized by th\n+00135c80: 6573 6520 666c 6167 732e 3c2f 6464 3e3c ese flags.
    <\n+00135c90: 2f64 6c3e 0a3c 703e f09f 949d 203c 6120 /dl>.

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

    .

    <\n+00135cd0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+00135ce0: 2069 643d 2273 6f61 7064 6566 7322 3e3c id=\"soapdefs\"><\n+00135cf0: 2f61 3e0a 5573 696e 6720 7468 6520 736f /a>.Using the so\n+00135d00: 6170 6465 6673 2e68 2068 6561 6465 7220 apdefs.h header \n+00135d10: 6669 6c65 3c2f 6832 3e0a 3c70 3e54 6865 file

    .

    The\n+00135d20: 203c 656d 3e3c 636f 6465 3e73 6f61 7064 soapd\n+00135d30: 6566 732e 683c 2f63 6f64 653e 3c2f 656d efs.h header file is\n+00135d50: 2069 6e63 6c75 6465 6420 696e 203c 656d included in gsoap/std\n+00135d70: 736f 6170 322e 683c 2f63 6f64 653e 3c2f soap2.h when compili\n+00135d90: 6e67 2077 6974 6820 636f 6d70 696c 652d ng with compile-\n+00135da0: 7469 6d65 2066 6c61 6720 3c63 6f64 653e time flag \n+00135db0: 2357 4954 485f 534f 4150 4445 4653 5f48 #WITH_SOAPDEFS_H\n+00135dc0: 3c2f 636f 6465 3e3a 203c 2f70 3e3c 7072 :

    c++ -D WITH_\n+00135df0: 534f 4150 4445 4653 5f48 202d 6320 7374 SOAPDEFS_H -c st\n+00135e00: 6473 6f61 7032 2e63 7070 0a3c 2f70 7265 dsoap2.cpp.

    The soapdefs.h file a\n+00135e40: 6c6c 6f77 7320 7573 6572 7320 746f 2069 llows users to i\n+00135e50: 6e63 6c75 6465 2064 6566 696e 6974 696f nclude definitio\n+00135e60: 6e73 2061 6e64 2061 6464 2069 6e63 6c75 ns and add inclu\n+00135e70: 6465 7320 7769 7468 6f75 7420 7265 7175 des without requ\n+00135e80: 6972 696e 6720 6368 616e 6765 7320 746f iring changes to\n+00135e90: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n+00135ea0: 2f73 7464 736f 6170 322e 683c 2f63 6f64 /stdsoap2.h. You can\n+00135ec0: 2061 6c73 6f20 7370 6563 6966 7920 7468 also specify th\n+00135ed0: 6520 6865 6164 6572 2066 696c 6520 6e61 e header file na\n+00135ee0: 6d65 2074 6f20 696e 636c 7564 6520 6173 me to include as\n+00135ef0: 2061 206d 6163 726f 203c 636f 6465 3e53 a macro S\n+00135f00: 4f41 5044 4546 535f 483c 2f63 6f64 653e OAPDEFS_H\n+00135f10: 2074 6f20 6f76 6572 7269 6465 2074 6865 to override the\n+00135f20: 206e 616d 6520 3c65 6d3e 3c63 6f64 653e name \n+00135f30: 736f 6170 6465 6673 2e68 3c2f 636f 6465 soapdefs.h:

    c++ -D SOAPDE\n+00135f70: 4653 5f48 3d6d 7964 6566 732e 6820 2d63 FS_H=mydefs.h -c\n+00135f80: 2073 7464 736f 6170 322e 6370 700a 3c2f stdsoap2.cpp.

    For exam\n+00135fa0: 706c 652c 3c2f 703e 0a3c 6469 7620 636c ple,

    .
    <\n+00135fc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00135fd0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >// Conten\n+00135ff0: 7473 206f 6620 6669 6c65 2026 7175 6f74 ts of file "\n+00136000: 3b73 6f61 7064 6566 732e 6826 7175 6f74 ;soapdefs.h"\n+00136010: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .<\n+00136020: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00136030: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#inc\n+00136050: 6c75 6465 2026 6c74 3b6f 7374 7265 616d lude <ostream\n+00136060: 2667 743b 3c2f 7370 616e 3e20 3c2f 6469 > .

    The\n+00136090: 2066 6f6c 6c6f 7769 6e67 2068 6561 6465 following heade\n+001360a0: 7220 6669 6c65 2066 6f72 2073 6f61 7063 r file for soapc\n+001360b0: 7070 3220 7265 6665 7273 2074 6f20 3c63 pp2 refers to std::ostream\n+001360d0: 3c2f 636f 6465 3e20 7769 7468 6f75 7420 without \n+001360e0: 736f 6170 6370 7032 2074 6872 6f77 696e soapcpp2 throwin\n+001360f0: 6720 6572 726f 7273 2c20 6279 2075 7369 g errors, by usi\n+00136100: 6e67 203c 636f 6465 3e65 7874 6572 6e3c ng extern<\n+00136110: 2f63 6f64 653e 2074 6f20 6465 636c 6172 /code> to declar\n+00136120: 6520 3c63 6f64 653e 636c 6173 7320 7374 e class st\n+00136130: 643a 3a6f 7374 7265 616d 3c2f 636f 6465 d::ostream:

    .
    <\n+00136170: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00136180: 656e 7422 3e2f 2f20 7374 643a 3a6f 7374 ent\">// std::ost\n+00136190: 7265 616d 2063 616e 2623 3339 3b74 2062 ream can't b\n+001361a0: 6520 7365 7269 616c 697a 6564 2c20 6275 e serialized, bu\n+001361b0: 7420 6e65 6564 2074 6f20 6265 2064 6563 t need to be dec\n+001361c0: 6c61 7265 6420 746f 206d 616b 6520 6974 lared to make it\n+001361d0: 2076 6973 6962 6c65 2074 6f20 6753 4f41 visible to gSOA\n+001361e0: 5020 3c2f 7370 616e 3e3c 2f64 6976 3e0a P
    .\n+001361f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    extern clas\n+00136240: 7320 3c2f 7370 616e 3e73 7464 3a3a 6f73 s std::os\n+00136250: 7472 6561 6d3b 3c2f 6469 763e 0a3c 6469 tream;
    . \n+00136270: 3c2f 6469 763e 0a3c 6469 7620 636c 6173 .
    c\n+001362a0: 6c61 7373 203c 2f73 7061 6e3e 6e73 5f5f lass ns__\n+001362b0: 6d79 436c 6173 7320 3c2f 6469 763e 0a3c myClass
    .<\n+001362c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001362d0: 3e7b 203c 7370 616e 2063 6c61 7373 3d22 >{ public<\n+001362f0: 2f73 7061 6e3e 3a3c 2f64 6976 3e0a 3c64 /span>:.\n+00136310: 2020 2020 3c73 7061 6e20 636c 6173 733d virtua\n+00136330: 6c3c 2f73 7061 6e3e 203c 7370 616e 2063 l void p\n+00136360: 7269 6e74 2873 7464 3a3a 6f73 7472 6561 rint(std::ostrea\n+00136370: 6d20 2661 6d70 3b73 2920 3c73 7061 6e20 m &s) \n+00136390: 636f 6e73 743c 2f73 7061 6e3e 3b20 3c73 const; // we need s\n+001363c0: 7464 3a3a 6f73 7472 6561 6d20 6865 7265 td::ostream here\n+001363d0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c .<\n+001363e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001363f0: 3e20 2020 202e 2e2e 203c 7370 616e 2063 > ... /\n+00136410: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /.<\n+00136420: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00136430: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};.\n+00136440: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    To initia\n+00138bd0: 6c69 7a65 2061 2073 7461 636b 2d61 6c6c lize a stack-all\n+00138be0: 6f63 6174 6564 203c 636f 6465 3e3c 6120 ocated soap context\n+00138c50: 2077 6974 6820 696e 7075 7420 616e 6420 with input and \n+00138c60: 6f75 7470 7574 206d 6f64 6520 666c 6167 output mode flag\n+00138c70: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

    .
    <\n+00138ca0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00138cb0: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void soap_i\n+00138d20: 6e69 7431 3c2f 613e 283c 7370 616e 2063 nit1(s\n+00138d40: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n+00138db0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00138dc0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00138dd0: 705f 5f66 6c61 6773 2e68 746d 6c23 6761 p__flags.html#ga\n+00138de0: 3732 6230 3439 3163 3963 6266 3230 3731 72b0491c9cbf2071\n+00138df0: 6630 6339 3663 3764 3239 6237 3139 6262 f0c96c7d29b719bb\n+00138e00: 223e 736f 6170 5f6d 6f64 653c 2f61 3e20 \">soap_mode \n+00138e10: 696f 6d6f 6465 293b 3c2f 6469 763e 0a3c iomode);
    .<\n+00138e20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00138e30: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void<\n+00138e50: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> soap\n+00138eb0: 5f69 6e69 7432 3c2f 613e 283c 7370 616e _init2(struct <\n+00138ee0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00138ef0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00138f00: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+00138f10: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00138f40: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_mode imode\n+00138ff0: 3c2f 613e 2c20 3c61 2063 6c61 7373 3d22 , soap_mo\n+00139050: 6465 3c2f 613e 203c 6120 636c 6173 733d de \n+001390a0: 6f6d 6f64 653c 2f61 3e29 3b3c 2f64 6976 omode);..\n+00139250: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    To set\n+00139270: 2061 6e64 2063 6c65 6172 206d 6f64 6520 and clear mode \n+00139280: 666c 6167 7320 7573 653a 3c2f 703e 0a3c flags use:

    .<\n+00139290: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+001392a0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    .
    void soap_set_\n+00139510: 696d 6f64 653c 2f61 3e28 3c73 7061 6e20 imode(\n+00139530: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *<\n+00139570: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00139580: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00139590: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001395a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_mode\n+00139600: 203c 6120 636c 6173 733d 2263 6f64 6522 imode<\n+00139650: 2f61 3e29 3b20 3c73 7061 6e20 636c 6173 /a>); // s\n+00139670: 6574 2069 6e70 7574 206d 6f64 6520 666c et input mode fl\n+00139680: 6167 733c 2f73 7061 6e3e 3c2f 6469 763e ags
    \n+00139690: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    void\n+001398e0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_clr_m\n+00139940: 6f64 653c 2f61 3e28 3c73 7061 6e20 636c ode(st\n+00139960: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, soap_mode i\n+00139a30: 6f6d 6f64 6529 3b20 3c73 7061 6e20 636c omode); //\n+00139a50: 2063 6c65 6172 2069 6e70 7574 2061 6e64 clear input and\n+00139a60: 206f 7574 7075 7420 6d6f 6465 2066 6c61 output mode fla\n+00139a70: 6773 3c2f 7370 616e 3e3c 2f64 6976 3e0a gs
    .\n+00139a80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    void\n+00139cd0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_clr_o\n+00139d30: 6d6f 6465 3c2f 613e 283c 7370 616e 2063 mode(s\n+00139d50: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n+00139dc0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00139dd0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00139de0: 705f 5f66 6c61 6773 2e68 746d 6c23 6761 p__flags.html#ga\n+00139df0: 3732 6230 3439 3163 3963 6266 3230 3731 72b0491c9cbf2071\n+00139e00: 6630 6339 3663 3764 3239 6237 3139 6262 f0c96c7d29b719bb\n+00139e10: 223e 736f 6170 5f6d 6f64 653c 2f61 3e20 \">soap_mode \n+00139e20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 omode); // cl\n+00139e90: 6561 7220 6f75 7470 7574 206d 6f64 6520 ear output mode \n+00139ea0: 666c 6167 733c 2f73 7061 6e3e 3c2f 6469 flags.
    v\n+00139f90: 6f69 6420 736f 6170 5f63 6c72 5f6d 6f64 oid soap_clr_mod\n+00139fa0: 6528 7374 7275 6374 2073 6f61 7020 2a73 e(struct soap *s\n+00139fb0: 6f61 702c 2073 6f61 705f 6d6f 6465 2069 oap, soap_mode i\n+00139fc0: 6e70 7574 5f61 6e64 5f6f 7574 7075 745f nput_and_output_\n+00139fd0: 6d6f 6465 293c 2f64 6976 3e3c 6469 7620 mode)
    Cl\n+00139ff0: 6561 7220 696e 7075 7420 616e 6420 6f75 ear input and ou\n+0013a000: 7470 7574 2073 6f61 705f 6d6f 6465 2066 tput soap_mode f\n+0013a010: 6c61 6773 206f 6620 7468 6520 6769 7665 lags of the give\n+0013a020: 6e20 736f 6170 2063 6f6e 7465 7874 2e3c n soap context.<\n+0013a030: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    soa\n+0013a0f0: 705f 636c 725f 696d 6f64 653c 2f61 3e3c p_clr_imode<\n+0013a100: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    void so\n+0013a120: 6170 5f63 6c72 5f69 6d6f 6465 2873 7472 ap_clr_imode(str\n+0013a130: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+0013a140: 736f 6170 5f6d 6f64 6520 696e 7075 745f soap_mode input_\n+0013a150: 6d6f 6465 293c 2f64 6976 3e3c 6469 7620 mode)
    Cl\n+0013a170: 6561 7220 696e 7075 7420 736f 6170 5f6d ear input soap_m\n+0013a180: 6f64 6520 666c 6167 7320 6f66 2074 6865 ode flags of the\n+0013a190: 2067 6976 656e 2073 6f61 7020 636f 6e74 given soap cont\n+0013a1a0: 6578 742e 3c2f 6469 763e 3c2f 6469 763e ext.
    \n+0013a1b0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    vo\n+0013a290: 6964 2073 6f61 705f 636c 725f 6f6d 6f64 id soap_clr_omod\n+0013a2a0: 6528 7374 7275 6374 2073 6f61 7020 2a73 e(struct soap *s\n+0013a2b0: 6f61 702c 2073 6f61 705f 6d6f 6465 206f oap, soap_mode o\n+0013a2c0: 7574 7075 745f 6d6f 6465 293c 2f64 6976 utput_mode)
    Clear output\n+0013a2f0: 2073 6f61 705f 6d6f 6465 2066 6c61 6773 soap_mode flags\n+0013a300: 206f 6620 7468 6520 6769 7665 6e20 736f of the given so\n+0013a310: 6170 2063 6f6e 7465 7874 2e3c 2f64 6976 ap context.
    .
    soap_se\n+0013a3e0: 745f 696d 6f64 653c 2f61 3e3c 2f64 6976 t_imode
    void soap_s\n+0013a410: 6574 5f69 6d6f 6465 2873 7472 7563 7420 et_imode(struct \n+0013a420: 736f 6170 202a 736f 6170 2c20 736f 6170 soap *soap, soap\n+0013a430: 5f6d 6f64 6520 696e 7075 745f 6d6f 6465 _mode input_mode\n+0013a440: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Set in\n+0013a460: 7075 7420 736f 6170 5f6d 6f64 6520 666c put soap_mode fl\n+0013a470: 6167 7320 6f66 2074 6865 2067 6976 656e ags of the given\n+0013a480: 2073 6f61 7020 636f 6e74 6578 742e 3c2f soap context.
    .
    \n+0013a4f0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    soap\n+0013a550: 5f73 6574 5f6f 6d6f 6465 3c2f 613e 3c2f _set_omode
    void soa\n+0013a580: 705f 7365 745f 6f6d 6f64 6528 7374 7275 p_set_omode(stru\n+0013a590: 6374 2073 6f61 7020 2a73 6f61 702c 2073 ct soap *soap, s\n+0013a5a0: 6f61 705f 6d6f 6465 206f 7574 7075 745f oap_mode output_\n+0013a5b0: 6d6f 6465 293c 2f64 6976 3e3c 6469 7620 mode)
    Se\n+0013a5d0: 7420 6f75 7470 7574 2073 6f61 705f 6d6f t output soap_mo\n+0013a5e0: 6465 2066 6c61 6773 206f 6620 7468 6520 de flags of the \n+0013a5f0: 6769 7665 6e20 736f 6170 2063 6f6e 7465 given soap conte\n+0013a600: 7874 2e3c 2f64 6976 3e3c 2f64 6976 3e0a xt.
    .\n+0013a610: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d
    \n+0013a640: 3c64 743e 4e6f 7465 3c2f 6474 3e3c 6464
    Note
    The #SOAP\n+0013a660: 5f58 4d4c 5f54 5245 453c 2f63 6f64 653e _XML_TREE\n+0013a670: 206d 6f64 6520 666c 6167 2063 616e 2062 mode flag can b\n+0013a680: 6520 7573 6564 2074 6f20 696d 7072 6f76 e used to improv\n+0013a690: 6520 696e 7465 726f 7065 7261 6269 6c69 e interoperabili\n+0013a6a0: 7479 2077 6974 6820 534f 4150 2069 6d70 ty with SOAP imp\n+0013a6b0: 6c65 6d65 6e74 6174 696f 6e73 2074 6861 lementations tha\n+0013a6c0: 7420 6172 6520 6e6f 7420 6675 6c6c 7920 t are not fully \n+0013a6d0: 534f 4150 2031 2e31 2f31 2e32 2052 5043 SOAP 1.1/1.2 RPC\n+0013a6e0: 2065 6e63 6f64 696e 6720 636f 6d70 6c69 encoding compli\n+0013a6f0: 616e 7420 7769 7468 2072 6573 7065 6374 ant with respect\n+0013a700: 2074 6f20 7072 6f63 6573 7369 6e67 2069 to processing i\n+0013a710: 642d 6872 6566 2f72 6566 2061 7474 7269 d-href/ref attri\n+0013a720: 6275 7465 732e 2048 6f77 6576 6572 2c20 butes. However, \n+0013a730: 7472 6565 2073 6572 6961 6c69 7a61 7469 tree serializati\n+0013a740: 6f6e 2077 696c 6c20 6475 706c 6963 6174 on will duplicat\n+0013a750: 6520 6461 7461 2077 6865 6e20 7468 6973 e data when this\n+0013a760: 2064 6174 6120 6973 2063 6f2d 7265 6665 data is co-refe\n+0013a770: 7265 6e63 6564 2e20 4379 636c 6573 2061 renced. Cycles a\n+0013a780: 7265 2064 6574 6563 7465 6420 616e 6420 re detected and \n+0013a790: 6272 6f6b 656e 2074 6f20 6176 6f69 6420 broken to avoid \n+0013a7a0: 696e 6669 6e69 7465 2073 6572 6961 6c69 infinite seriali\n+0013a7b0: 7a61 7469 6f6e 2e3c 2f64 643e 3c2f 646c zation..

    In addition\n+0013a7d0: 2074 6f20 7468 6520 636f 6e74 6578 7420 to the context \n+0013a7e0: 6d6f 6465 2066 6c61 6773 2c20 7468 6520 mode flags, the \n+0013a7f0: 666f 6c6c 6f77 696e 6720 636f 6e74 6578 following contex\n+0013a800: 7420 666c 6167 7320 6361 6e20 6265 2075 t flags can be u\n+0013a810: 7365 6420 746f 2073 6574 203c 636f 6465 sed to set setsockopt level S\n+0013a840: 4f4c 5f53 4f43 4b45 543c 2f63 6f64 653e OL_SOCKET\n+0013a850: 206f 7074 696f 6e73 2077 6865 6e20 736f options when so\n+0013a860: 636b 6574 7320 6172 6520 6372 6561 7465 ckets are create\n+0013a870: 642c 2074 686f 7567 6820 736f 6d65 206f d, though some o\n+0013a880: 7074 696f 6e73 206d 6179 206e 6f74 2062 ptions may not b\n+0013a890: 6520 6170 706c 6963 6162 6c65 2074 6f20 e applicable to \n+0013a8a0: 796f 7572 206f 7065 7261 7469 6e67 2073 your operating s\n+0013a8b0: 7973 7465 6d3a 3c2f 703e 0a3c 7461 626c ystem:

    ..
    ...<\n+0013a9c0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n+0013aa80: 703a 3a63 6f6e 6e65 6374 5f66 6c61 6773 p::connect_flags\n+0013aa90: 3c2f 613e 3c2f 636f 6465 3e20 3d20 3c63 = SO_NOSIGPIPE\n+0013aab0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n+0013aac0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0013aad0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0013aae0: 3e64 6973 6162 6c65 7320 5349 4750 4950 >disables SIGPIP\n+0013aaf0: 4520 2020 203c 2f74 643e 3c2f 7472 3e0a E .\n+0013ab00: 3c74 7220 636c 6173 733d 226d 6172 6b64 .\n+0013ac40: 3c74 6420 636c 6173 733d 226d 6172 6b64 .<\n+0013acc0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+0013acd0: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+0013ace0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..\n+0013aea0: 3c74 6420 636c 6173 733d 226d 6172 6b64 <\n+0013afc0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0013afd0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0013afe0: 3e73 6574 7320 636c 6965 6e74 2d73 6964 >sets client-sid\n+0013aff0: 6520 6c69 6e67 6572 2074 696d 6520 746f e linger time to\n+0013b000: 2074 6865 2076 616c 7565 206f 6620 3c63 the value of soap\n+0013b0d0: 3a3a 6c69 6e67 6572 5f74 696d 653c 2f61 ::linger_time ....\n+0013b440: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..<\n+0013b580: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0013b590: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0013b5a0: 3e74 7572 6e73 206f 6e20 7265 636f 7264 >turns on record\n+0013b5b0: 696e 6720 6f66 2064 6562 7567 6769 6e67 ing of debugging\n+0013b5c0: 2069 6e66 6f72 6d61 7469 6f6e 2069 6e20 information in \n+0013b5d0: 7468 6520 756e 6465 726c 7969 6e67 2070 the underlying p\n+0013b5e0: 726f 746f 636f 6c20 6d6f 6475 6c65 7320 rotocol modules \n+0013b5f0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..\n+0013b620: 3c74 6420 636c 6173 733d 226d 6172 6b64 \n+0013b760: 7365 7473 2073 6572 7665 722d 7369 6465 sets server-side\n+0013b770: 206c 696e 6765 7220 7469 6d65 2074 6f20 linger time to \n+0013b780: 7468 6520 7661 6c75 6520 6f66 203c 636f the value of soap:\n+0013b850: 3a6c 696e 6765 725f 7469 6d65 3c2f 613e :linger_time\n+0013b860: 3c2f 636f 6465 3e20 2020 203c 2f74 643e \n+0013b870: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..<\n+0013ba10: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>...\n+0013bbc0: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+0013bbe0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .\n+0013bd00: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..

    For examp\n+0013bd70: 6c65 2c20 7768 656e 203c 636f 6465 3e3c le, when <\n+0013bd80: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0013bd90: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0013bda0: 6d6c 2361 6439 3866 3132 6636 3032 6566 ml#ad98f12f602ef\n+0013bdb0: 6464 6530 3439 6462 6433 3637 6134 3365 dde049dbd367a43e\n+0013bdc0: 3763 6230 2220 7469 746c 653d 2255 7365 7cb0\" title=\"Use\n+0013bdd0: 722d 6465 6669 6e61 626c 6520 7365 7473 r-definable sets\n+0013bde0: 6f63 6b6f 7074 206c 6576 656c 2053 4f4c ockopt level SOL\n+0013bdf0: 5f53 4f43 4b45 5420 666c 6167 7320 2830 _SOCKET flags (0\n+0013be00: 2062 7920 6465 6661 756c 7429 2c20 7768 by default), wh\n+0013be10: 656e 206e 6f6e 7a65 726f 2073 6574 7320 en nonzero sets \n+0013be20: 7468 6520 736f 6170 3a3a 736f 636b 6574 the soap::socket\n+0013be30: 2066 2e2e 2e22 3e73 6f61 703a 3a61 6363 f...\">soap::acc\n+0013be40: 6570 745f 666c 6167 733c 2f61 3e3c 2f63 ept_flags is set to <\n+0013be60: 636f 6465 3e28 534f 5f4e 4f53 4947 5049 code>(SO_NOSIGPI\n+0013be70: 5045 207c 2053 4f5f 4c49 4e47 4552 293c PE | SO_LINGER)<\n+0013be80: 2f63 6f64 653e 2074 6869 7320 6469 7361 /code> this disa\n+0013be90: 626c 6573 2053 4947 5049 5045 2073 6967 bles SIGPIPE sig\n+0013bea0: 6e61 6c73 2061 6e64 2073 6574 206c 696e nals and set lin\n+0013beb0: 6765 7220 7469 6d65 2076 616c 7565 2067 ger time value g\n+0013bec0: 6976 656e 2062 7920 3c63 6f64 653e 3c61 iven by soap::ling\n+0013bf90: 6572 5f74 696d 653c 2f61 3e3c 2f63 6f64 er_time, which is zer\n+0013bfb0: 6f20 6279 2064 6566 6175 6c74 2e3c 2f70 o by default..

    The <\n+0013bfd0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0013bfe0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0013bff0: 6d6c 2361 6165 3365 6565 3737 3164 3863 ml#aae3eee771d8c\n+0013c000: 3430 3331 6433 3064 3463 6137 3633 3365 4031d30d4ca7633e\n+0013c010: 6466 3966 2220 7469 746c 653d 2255 7365 df9f\" title=\"Use\n+0013c020: 722d 6465 6669 6e61 626c 6520 736f 636b r-definable sock\n+0013c030: 6574 2073 656e 6420 616e 6420 7265 6376 et send and recv\n+0013c040: 2066 6c61 6773 2c20 666f 7220 6578 616d flags, for exam\n+0013c050: 706c 6520 6173 7369 676e 204d 5347 5f4e ple assign MSG_N\n+0013c060: 4f53 4947 4e41 4c20 746f 2064 6973 6162 OSIGNAL to disab\n+0013c070: 6c65 2073 6967 7069 7065 2028 7468 6520 le sigpipe (the \n+0013c080: 7661 2e2e 2e22 3e73 6f61 703a 3a73 6f63 va...\">soap::soc\n+0013c090: 6b65 745f 666c 6167 733c 2f61 3e3c 2f63 ket_flags context fla\n+0013c0b0: 6720 6361 6e20 6265 2075 7365 6420 746f g can be used to\n+0013c0c0: 2070 6173 7320 6f70 7469 6f6e 7320 746f pass options to\n+0013c0d0: 2074 6865 203c 636f 6465 3e26 6c74 3b73 the <s\n+0013c0e0: 7973 2f73 6f63 6b65 742e 6826 6774 3b3c ys/socket.h><\n+0013c0f0: 2f63 6f64 653e 203c 636f 6465 3e73 656e /code> sen\n+0013c100: 643c 2f63 6f64 653e 2c20 3c63 6f64 653e d, \n+0013c110: 7365 6e64 746f 3c2f 636f 6465 3e2c 203c sendto, <\n+0013c120: 636f 6465 3e72 6563 763c 2f63 6f64 653e code>recv\n+0013c130: 2c20 616e 6420 3c63 6f64 653e 7265 6376 , and recv\n+0013c140: 6672 6f6d 3c2f 636f 6465 3e20 6361 6c6c from call\n+0013c150: 7320 6d61 6465 2062 7920 7468 6520 656e s made by the en\n+0013c160: 6769 6e65 2c20 7468 6f75 6768 2073 6f6d gine, though som\n+0013c170: 6520 6f70 7469 6f6e 7320 6d61 7920 6e6f e options may no\n+0013c180: 7420 6265 2061 7070 6c69 6361 626c 6520 t be applicable \n+0013c190: 746f 2079 6f75 7220 6f70 6572 6174 696e to your operatin\n+0013c1a0: 6720 7379 7374 656d 3a3c 2f70 3e0a 3c74 g system:

    ..
    ...\n+0013c2b0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n+0013c370: 6170 3a3a 736f 636b 6574 5f66 6c61 6773 ap::socket_flags\n+0013c380: 3c2f 613e 3c2f 636f 6465 3e20 3d20 3c63 = MSG_NOSIGNAL\n+0013c3a0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n+0013c3b0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0013c3c0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0013c3d0: 3e64 6973 6162 6c65 7320 5349 4750 4950 >disables SIGPIP\n+0013c3e0: 4520 2020 203c 2f74 643e 3c2f 7472 3e0a E .\n+0013c3f0: 3c74 7220 636c 6173 733d 226d 6172 6b64 ..\n+0013c590: 3c2f 7461 626c 653e 0a3c 703e 4675 7274
    define result <\n+00134460: 2f74 683e 3c2f 7472 3e0a 3c74 7220 636c /th>
    #SOAP_NOTHROW\n+001344c0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    #SOA\n+001345e0: 505f 4255 464c 454e 3c2f 636f 6465 3e20 P_BUFLEN \n+001345f0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 the len\n+00134620: 6774 6820 6f66 2074 6865 2069 6e74 6572 gth of the inter\n+00134630: 6e61 6c20 6d65 7373 6167 6520 6275 6666 nal message buff\n+00134640: 6572 2c20 696d 7061 6374 7320 636f 6d6d er, impacts comm\n+00134650: 756e 6963 6174 696f 6e73 2070 6572 666f unications perfo\n+00134660: 726d 616e 6365 2020 2020 3c2f 7464 3e3c rmance
    #S\n+001346c0: 4f41 505f 4844 524c 454e 3c2f 636f 6465 OAP_HDRLEN the m\n+00134700: 6178 696d 756d 206c 656e 6774 6820 6f66 aximum length of\n+00134710: 2048 5454 5020 6865 6164 6572 7320 2020 HTTP headers \n+00134720: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    the maximum l\n+001347c0: 656e 6774 6820 6f66 2058 4d4c 2074 6167 ength of XML tag\n+001347d0: 7320 616e 6420 5552 4c73 2020 2020 3c2f s and URLs
    #SOAP_TMPLEN
    #SO\n+00134920: 4150 5f4d 4158 414c 4c4f 4353 495a 453c AP_MAXALLOCSIZE<\n+00134930: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    #SOAP_MAXARRA\n+00134a10: 5953 495a 453c 2f63 6f64 653e 2020 203c YSIZE <\n+00134a20: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>the maximu\n+00134a50: 6d20 616c 6c6f 6361 7469 6f6e 2074 6872 m allocation thr\n+00134a60: 6573 686f 6c64 2074 6f20 7072 652d 616c eshold to pre-al\n+00134a70: 6c6f 6361 7465 2053 4f41 5020 6172 7261 locate SOAP arra\n+00134a80: 7973 2069 6e20 6d65 6d6f 7279 2020 2020 ys in memory \n+00134a90: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    the maxim\n+00134b30: 756d 2044 494d 4520 6174 7461 6368 6d65 um DIME attachme\n+00134b40: 6e74 2073 697a 6520 616c 6c6f 7765 6420 nt size allowed \n+00134b50: 746f 2072 6563 6569 7665 2020 2020 3c2f to receive
    #SOAP_MAXEINTR\n+00134bc0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    #SOAP_MAXINFLA\n+00134cb0: 5445 5349 5a45 3c2f 636f 6465 3e20 2020 TESIZE \n+00134cc0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 trusted i\n+00134cf0: 6e66 6c61 7465 6420 636f 6e74 656e 7420 nflated content \n+00134d00: 7369 7a65 2028 3120 4d42 2062 7920 6465 size (1 MB by de\n+00134d10: 6661 756c 7429 2020 2020 3c2f 7464 3e3c fault)
    #S\n+00134d70: 4f41 505f 4d41 584b 4545 5041 4c49 5645 OAP_MAXKEEPALIVE\n+00134d80: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    #SOAP_MAXLENGT\n+00134ee0: 483c 2f63 6f64 653e 2020 203c 2f74 643e H maximum string\n+00134f20: 2063 6f6e 7465 6e74 206c 656e 6774 6820 content length \n+00134f30: 666f 7220 7374 7269 6e67 7320 6e6f 7420 for strings not \n+00134f40: 616c 7265 6164 7920 636f 6e73 7472 6169 already constrai\n+00134f50: 6e65 6420 6279 2058 4d4c 2073 6368 656d ned by XML schem\n+00134f60: 6120 7661 6c69 6461 7469 6f6e 2063 6f6e a validation con\n+00134f70: 7374 7261 696e 7473 2020 2020 3c2f 7464 straints
    \n+00134fd0: 2353 4f41 505f 4d41 584c 4556 454c 3c2f #SOAP_MAXLEVEL
    #SOAP_MAXOCCU\n+001350b0: 5253 3c2f 636f 6465 3e20 2020 3c2f 7464 RS maximum numbe\n+001350f0: 7220 6f66 2061 7272 6179 206f 7220 636f r of array or co\n+00135100: 6e74 6169 6e65 7220 656c 656d 656e 7473 ntainer elements\n+00135110: 2066 6f72 2063 6f6e 7461 696e 6572 7320 for containers \n+00135120: 7468 6174 2061 7265 206e 6f74 2061 6c72 that are not alr\n+00135130: 6561 6479 2063 6f6e 7374 7261 696e 6564 eady constrained\n+00135140: 2062 7920 584d 4c20 7363 6865 6d61 2076 by XML schema v\n+00135150: 616c 6964 6174 696f 6e20 636f 6e73 7472 alidation constr\n+00135160: 6169 6e74 7320 2020 203c 2f74 643e 3c2f aints
    #SO\n+001351c0: 4150 5f4d 494e 4445 464c 4154 4552 4154 AP_MINDEFLATERAT\n+001351d0: 494f 3c2f 636f 6465 3e20 2020 3c2f 7464 IO trusted defla\n+00135210: 7469 6f6e 2072 6174 696f 2061 6674 6572 tion ratio after\n+00135220: 203c 636f 6465 3e23 534f 4150 5f4d 4158 #SOAP_MAX\n+00135230: 494e 464c 4154 4553 495a 453c 2f63 6f64 INFLATESIZE is reached \n+00135250: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    set to \n+001352f0: 3c63 6f64 653e 3d20 303c 2f63 6f64 653e = 0\n+00135300: 2077 6865 6e20 3c63 6f64 653e 2357 4954 when #WIT\n+00135310: 485f 5055 5245 5f56 4952 5455 414c 3c2f H_PURE_VIRTUAL is defined\n+00135330: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_SS\n+00135390: 4c5f 5253 415f 4249 5453 3c2f 636f 6465 L_RSA_BITS lengt\n+001353d0: 6820 6f66 2074 6865 2052 5341 206b 6579 h of the RSA key\n+001353e0: 2028 3230 3438 2062 7920 6465 6661 756c (2048 by defaul\n+001353f0: 7429 2020 2020 3c2f 7464 3e3c 2f74 723e t)
    #SOAP\n+00135450: 5f55 4e4b 4e4f 574e 5f43 4841 523c 2f63 _UNKNOWN_CHAR an\n+00135490: 2038 2062 6974 2069 6e74 6567 6572 2074 8 bit integer t\n+001354a0: 6861 7420 7265 7072 6573 656e 7473 2061 hat represents a\n+001354b0: 2063 6861 7261 6374 6572 2074 6861 7420 character that \n+001354c0: 636f 756c 6420 6e6f 7420 6265 2063 6f6e could not be con\n+001354d0: 7665 7274 6564 2074 6f20 616e 2041 5343 verted to an ASC\n+001354e0: 4949 2063 6861 722c 2069 2e65 2e20 7768 II char, i.e. wh\n+001354f0: 656e 2063 6f6e 7665 7274 696e 6720 616e en converting an\n+00135500: 2058 4d4c 2055 6e69 636f 6465 2063 6861 XML Unicode cha\n+00135510: 7261 6374 6572 2020 2020 3c2f 7464 3e3c racter
    #S\n+00135570: 4f41 505f 554e 4b4e 4f57 4e5f 554e 4943 OAP_UNKNOWN_UNIC\n+00135580: 4f44 455f 4348 4152 3c2f 636f 6465 3e20 ODE_CHAR \n+00135590: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 integer\n+001355c0: 2055 6e69 636f 6465 2076 616c 7565 2072 Unicode value r\n+001355d0: 6570 7265 7365 6e74 696e 6720 6120 6368 epresenting a ch\n+001355e0: 6172 6163 7465 7220 7468 6174 2072 6570 aracter that rep\n+001355f0: 6c61 6365 7320 616e 2069 6e76 616c 6964 laces an invalid\n+00135600: 2055 6e69 636f 6465 2063 6f64 6520 706f Unicode code po\n+00135610: 696e 7420 2020 203c 2f74 643e 3c2f 7472 int
    #SOA\n+00135670: 505f 4c4f 4e47 5f46 4f52 4d41 543c 2f63 P_LONG_FORMAT ma\n+001356b0: 6372 6f20 7468 6174 2072 6570 7265 7365 cro that represe\n+001356c0: 6e74 7320 7468 6520 3c63 6f64 653e 234c nts the #L\n+001356d0: 4f4e 4736 343c 2f63 6f64 653e 2070 7269 ONG64 pri\n+001356e0: 6e74 6620 252d 666f 726d 6174 2020 2020 ntf %-format \n+001356f0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    #SOAP_ULONG_\n+00135750: 464f 524d 4154 3c2f 636f 6465 3e20 2020 FORMAT \n+00135760: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 macro tha\n+00135790: 7420 7265 7072 6573 656e 7473 2074 6865 t represents the\n+001357a0: 203c 636f 6465 3e23 554c 4f4e 4736 343c #ULONG64<\n+001357b0: 2f63 6f64 653e 2070 7269 6e74 6620 252d /code> printf %-\n+001357c0: 666f 726d 6174 2020 2020 3c2f 7464 3e3c format
    #\n+00135820: 534f 4150 5f49 4e56 414c 4944 5f53 4f43 SOAP_INVALID_SOC\n+00135830: 4b45 543c 2f63 6f64 653e 2020 203c 2f74 KET portable inv\n+00135870: 616c 6964 2073 6f63 6b65 7420 7661 6c75 alid socket valu\n+00135880: 652c 2063 616e 2061 6c73 6f20 7573 6520 e, can also use \n+00135890: 3c63 6f64 653e 233c 6120 636c 6173 733d #soap_valid_s\n+00135950: 6f63 6b65 7428 736f 636b 293c 2f61 3e3c ocket(sock)<\n+00135960: 2f63 6f64 653e 2074 6f20 6368 6563 6b20 /code> to check \n+00135970: 6966 203c 636f 6465 3e73 6f63 6b3c 2f63 if sock is valid \n+00135990: 3c2f 7464 3e3c 2f74 723e 0a3c 2f74 6162
    contex\n+0013a920: 7420 666c 6167 2077 6974 6820 7365 7473 t flag with sets\n+0013a930: 6f63 6b6f 7074 206f 7074 696f 6e20 2020 ockopt option \n+0013a940: 3c2f 7468 3e3c 7468 2063 6c61 7373 3d22 result \n+0013a970: 203c 2f74 683e 3c2f 7472 3e0a 3c74 7220
    soap::connect_\n+0013ac10: 666c 6167 733c 2f61 3e3c 2f63 6f64 653e flags\n+0013ac20: 203d 203c 636f 6465 3e53 4f5f 4445 4255 = SO_DEBU\n+0013ac30: 473c 2f63 6f64 653e 2020 203c 2f74 643e G turns on recor\n+0013ac70: 6469 6e67 206f 6620 6465 6275 6767 696e ding of debuggin\n+0013ac80: 6720 696e 666f 726d 6174 696f 6e20 696e g information in\n+0013ac90: 2074 6865 2075 6e64 6572 6c79 696e 6720 the underlying \n+0013aca0: 7072 6f74 6f63 6f6c 206d 6f64 756c 6573 protocol modules\n+0013acb0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    \n+0013adc0: 736f 6170 3a3a 636f 6e6e 6563 745f 666c soap::connect_fl\n+0013add0: 6167 733c 2f61 3e3c 2f63 6f64 653e 203d ags =\n+0013ade0: 203c 636f 6465 3e53 4f5f 4252 4f41 4443 SO_BROADC\n+0013adf0: 4153 543c 2f63 6f64 653e 2020 203c 2f74 AST permits send\n+0013ae30: 696e 6720 6f66 2062 726f 6164 6361 7374 ing of broadcast\n+0013ae40: 206d 6573 7361 6765 732c 2066 6f72 2065 messages, for e\n+0013ae50: 7861 6d70 6c65 2077 6974 6820 5544 502c xample with UDP,\n+0013ae60: 2077 6865 6e20 7065 726d 6974 7465 6420 when permitted \n+0013ae70: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    \n+0013af80: 736f 6170 3a3a 636f 6e6e 6563 745f 666c soap::connect_fl\n+0013af90: 6167 733c 2f61 3e3c 2f63 6f64 653e 203d ags =\n+0013afa0: 203c 636f 6465 3e53 4f5f 4c49 4e47 4552 SO_LINGER\n+0013afb0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    \n+0013b140: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::co\n+0013b200: 6e6e 6563 745f 666c 6167 733c 2f61 3e3c nnect_flags<\n+0013b210: 2f63 6f64 653e 203d 203c 636f 6465 3e53 /code> = S\n+0013b220: 4f5f 444f 4e54 524f 5554 453c 2f63 6f64 O_DONTROUTE enab\n+0013b260: 6c65 7320 726f 7574 696e 6720 6279 7061 les routing bypa\n+0013b270: 7373 2066 6f72 206f 7574 676f 696e 6720 ss for outgoing \n+0013b280: 6d65 7373 6167 6573 2020 2020 3c2f 7464 messages
    soap::a\n+0013b3a0: 6363 6570 745f 666c 6167 733c 2f61 3e3c ccept_flags<\n+0013b3b0: 2f63 6f64 653e 203d 203c 636f 6465 3e53 /code> = S\n+0013b3c0: 4f5f 4e4f 5349 4750 4950 453c 2f63 6f64 O_NOSIGPIPE disa\n+0013b400: 626c 6573 2053 4947 5049 5045 2028 6368 bles SIGPIPE (ch\n+0013b410: 6563 6b20 796f 7572 204f 532c 2074 6869 eck your OS, thi\n+0013b420: 7320 6973 206e 6f74 2070 6f72 7461 626c s is not portabl\n+0013b430: 6529 2020 2020 3c2f 7464 3e3c 2f74 723e e)
    soap::accept_f\n+0013b550: 6c61 6773 3c2f 613e 3c2f 636f 6465 3e20 lags \n+0013b560: 3d20 3c63 6f64 653e 534f 5f44 4542 5547 = SO_DEBUG\n+0013b570: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    \n+0013b700: 736f 6170 3a3a 6163 6365 7074 5f66 6c61 soap::accept_fla\n+0013b710: 6773 3c2f 613e 3c2f 636f 6465 3e20 3d20 gs = \n+0013b720: 3c63 6f64 653e 534f 5f4c 494e 4745 523c SO_LINGER<\n+0013b730: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    <\n+0013b8c0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0013b8d0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0013b8e0: 6d6c 2361 6439 3866 3132 6636 3032 6566 ml#ad98f12f602ef\n+0013b8f0: 6464 6530 3439 6462 6433 3637 6134 3365 dde049dbd367a43e\n+0013b900: 3763 6230 2220 7469 746c 653d 2255 7365 7cb0\" title=\"Use\n+0013b910: 722d 6465 6669 6e61 626c 6520 7365 7473 r-definable sets\n+0013b920: 6f63 6b6f 7074 206c 6576 656c 2053 4f4c ockopt level SOL\n+0013b930: 5f53 4f43 4b45 5420 666c 6167 7320 2830 _SOCKET flags (0\n+0013b940: 2062 7920 6465 6661 756c 7429 2c20 7768 by default), wh\n+0013b950: 656e 206e 6f6e 7a65 726f 2073 6574 7320 en nonzero sets \n+0013b960: 7468 6520 736f 6170 3a3a 736f 636b 6574 the soap::socket\n+0013b970: 2066 2e2e 2e22 3e73 6f61 703a 3a61 6363 f...\">soap::acc\n+0013b980: 6570 745f 666c 6167 733c 2f61 3e3c 2f63 ept_flags = SO_\n+0013b9a0: 444f 4e54 524f 5554 453c 2f63 6f64 653e DONTROUTE\n+0013b9b0: 2020 203c 2f74 643e 3c74 6420 636c 6173 enable\n+0013b9e0: 7320 726f 7574 696e 6720 6279 7061 7373 s routing bypass\n+0013b9f0: 2066 6f72 206f 7574 676f 696e 6720 6d65 for outgoing me\n+0013ba00: 7373 6167 6573 2020 2020 3c2f 7464 3e3c ssages
    <\n+0013ba60: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0013ba70: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0013ba80: 6d6c 2361 3662 3138 6230 3137 6365 3263 ml#a6b18b017ce2c\n+0013ba90: 3737 6163 3262 3633 3331 3436 3930 3934 77ac2b6331469094\n+0013baa0: 6465 3539 2220 7469 746c 653d 2255 7365 de59\" title=\"Use\n+0013bab0: 722d 6465 6669 6e61 626c 6520 7365 7473 r-definable sets\n+0013bac0: 6f63 6b6f 7074 206c 6576 656c 2053 4f4c ockopt level SOL\n+0013bad0: 5f53 4f43 4b45 5420 666c 6167 7320 7768 _SOCKET flags wh\n+0013bae0: 656e 2062 696e 6469 6e67 2073 6f61 703a en binding soap:\n+0013baf0: 3a6d 6173 7465 7220 736f 636b 6574 2028 :master socket (\n+0013bb00: 7468 6520 7661 6c75 6520 6973 2030 2062 the value is 0 b\n+0013bb10: 7920 2e2e 2e22 3e73 6f61 703a 3a62 696e y ...\">soap::bin\n+0013bb20: 645f 666c 6167 733c 2f61 3e3c 2f63 6f64 d_flags = SO_RE\n+0013bb40: 5553 4541 4444 523c 2f63 6f64 653e 2020 USEADDR \n+0013bb50: 203c 2f74 643e 3c74 6420 636c 6173 733d enables \n+0013bb80: 6c6f 6361 6c20 6164 6472 6573 7320 7265 local address re\n+0013bb90: 7573 6520 696d 6d65 6469 6174 656c 792c use immediately,\n+0013bba0: 2075 7365 2077 6974 6820 6361 7574 696f use with cautio\n+0013bbb0: 6e20 2020 203c 2f74 643e 3c2f 7472 3e0a n
    soap::bind_flag\n+0013bcd0: 733c 2f61 3e3c 2f63 6f64 653e 203d 203c s = <\n+0013bce0: 636f 6465 3e53 4f5f 5245 5553 4550 4f52 code>SO_REUSEPOR\n+0013bcf0: 543c 2f63 6f64 653e 2020 203c 2f74 643e T enables duplic\n+0013bd30: 6174 6520 6164 6472 6573 7320 616e 6420 ate address and \n+0013bd40: 706f 7274 2062 696e 6469 6e67 7320 2020 port bindings \n+0013bd50: 3c2f 7464 3e3c 2f74 723e 0a3c 2f74 6162
    con\n+0013c210: 7465 7874 2066 6c61 6720 7769 7468 2073 text flag with s\n+0013c220: 656e 742f 7265 6376 2066 6c61 6773 2020 ent/recv flags \n+0013c230: 203c 2f74 683e 3c74 6820 636c 6173 733d result \n+0013c260: 2020 3c2f 7468 3e3c 2f74 723e 0a3c 7472
    soap::socket_f\n+0013c500: 6c61 6773 3c2f 613e 3c2f 636f 6465 3e20 lags \n+0013c510: 3d20 3c63 6f64 653e 4d53 475f 444f 4e54 = MSG_DONT\n+0013c520: 524f 5554 453c 2f63 6f64 653e 2020 203c ROUTE <\n+0013c530: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>enables ro\n+0013c560: 7574 696e 6720 6279 7061 7373 2066 6f72 uting bypass for\n+0013c570: 206f 7574 676f 696e 6720 6d65 7373 6167 outgoing messag\n+0013c580: 6573 2020 203c 2f74 643e 3c2f 7472 3e0a es
    .

    Furt\n+0013c5a0: 6865 726d 6f72 652c 2074 6865 203c 636f hermore, the setsockopt level SOL_SOCKET options SO_SNDBUF and SO_R\n+0013c610: 4356 4255 463c 2f63 6f64 653e 2061 7265 CVBUF are\n+0013c620: 2073 6574 2074 6865 2065 6e67 696e 6520 set the engine \n+0013c630: 7768 656e 203c 636f 6465 3e3c 6120 636c when soap::sndbuf and soap:\n+0013c7b0: 3a72 6376 6275 663c 2f61 3e3c 2f63 6f64 :rcvbuf are set to a \n+0013c7d0: 6e6f 6e7a 6572 6f20 7661 6c75 652e 2054 nonzero value. T\n+0013c7e0: 6865 2064 6566 6175 6c74 2076 616c 7565 he default value\n+0013c7f0: 2069 7320 3c63 6f64 653e 2353 4f41 505f is #SOAP_\n+0013c800: 4255 464c 454e 3c2f 636f 6465 3e2c 2077 BUFLEN, w\n+0013c810: 6869 6368 2069 7320 7468 6520 7361 6d65 hich is the same\n+0013c820: 2073 697a 6520 7573 6564 2062 7920 7468 size used by th\n+0013c830: 6520 696e 7465 726e 616c 2062 7566 6665 e internal buffe\n+0013c840: 7220 3c63 6f64 653e 3c61 2063 6c61 7373 r \n+0013c900: 736f 6170 3a3a 6275 663c 2f61 3e3c 2f63 soap::buf to send and\n+0013c920: 2072 6563 6569 7665 206d 6573 7361 6765 receive message\n+0013c930: 732e 2041 207a 6572 6f20 7661 6c75 6520 s. A zero value \n+0013c940: 6f6d 6974 7320 7468 6520 696e 7465 726e omits the intern\n+0013c950: 616c 203c 636f 6465 3e73 6574 736f 636b al setsock\n+0013c960: 6f70 743c 2f63 6f64 653e 2063 616c 6c20 opt call \n+0013c970: 746f 2073 6574 2074 6865 7365 206f 7074 to set these opt\n+0013c980: 696f 6e73 2e20 5365 7474 696e 6720 7468 ions. Setting th\n+0013c990: 6573 6520 7661 6c75 6573 2074 6f20 7a65 ese values to ze\n+0013c9a0: 726f 2061 6374 6976 6174 6573 2061 7574 ro activates aut\n+0013c9b0: 6f2d 7475 6e69 6e67 2077 6974 6820 4c69 o-tuning with Li\n+0013c9c0: 6e75 7820 322e 3420 616e 6420 6772 6561 nux 2.4 and grea\n+0013c9d0: 7465 722e 3c2f 703e 0a3c 703e 5468 6520 ter.

    .

    The \n+0013c9e0: 3c63 6f64 653e 7365 7473 6f63 6b6f 7074 setsockopt\n+0013c9f0: 3c2f 636f 6465 3e20 6c65 7665 6c20 3c63 level SOL_SOCKET option SO_KEEPALIVE<\n+0013ca30: 2f63 6f64 653e 2069 7320 7365 7420 7768 /code> is set wh\n+0013ca40: 656e 206b 6565 702d 616c 6976 6520 6973 en keep-alive is\n+0013ca50: 2065 6e61 626c 6564 2077 6974 6820 636f enabled with co\n+0013ca60: 6e74 6578 7420 666c 6167 203c 636f 6465 ntext flag #SOAP_IO_KEEPAL\n+0013ca80: 4956 453c 2f63 6f64 653e 206f 7220 7768 IVE or wh\n+0013ca90: 656e 203c 636f 6465 3e3c 6120 636c 6173 en soap::tcp_keep_\n+0013cb60: 616c 6976 653c 2f61 3e3c 2f63 6f64 653e alive\n+0013cb70: 2069 7320 6e6f 6e7a 6572 6f2e 2057 6974 is nonzero. Wit\n+0013cb80: 6820 3c63 6f64 653e 3c61 2063 6c61 7373 h \n+0013cc40: 736f 6170 3a3a 7463 705f 6b65 6570 5f61 soap::tcp_keep_a\n+0013cc50: 6c69 7665 3c2f 613e 3c2f 636f 6465 3e20 live \n+0013cc60: 6164 6469 7469 6f6e 616c 206f 7074 696f additional optio\n+0013cc70: 6e73 2063 616e 2062 6520 7370 6563 6966 ns can be specif\n+0013cc80: 6965 6420 7769 7468 203c 636f 6465 3e3c ied with <\n+0013cc90: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0013cca0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0013ccb0: 6d6c 2361 3863 3038 3232 6362 3033 3939 ml#a8c0822cb0399\n+0013ccc0: 6564 3535 6465 3663 3261 3438 3231 3731 ed55de6c2a482171\n+0013ccd0: 3836 3866 2220 7469 746c 653d 2255 7365 868f\" title=\"Use\n+0013cce0: 722d 6465 6669 6e61 626c 6520 7661 6c75 r-definable valu\n+0013ccf0: 6520 746f 2073 6574 2054 4350 5f4b 4545 e to set TCP_KEE\n+0013cd00: 5049 444c 4520 7365 7473 6f63 6b6f 7074 PIDLE setsockopt\n+0013cd10: 2028 7468 6520 7661 6c75 6520 6973 2030 (the value is 0\n+0013cd20: 2062 7920 6465 6661 756c 7429 223e 736f by default)\">so\n+0013cd30: 6170 3a3a 7463 705f 6b65 6570 5f69 646c ap::tcp_keep_idl\n+0013cd40: 653c 2f61 3e3c 2f63 6f64 653e 2c20 3c63 e, soap::tcp_ke\n+0013ce00: 6570 5f69 6e74 766c 3c2f 613e 3c2f 636f ep_intvl, and <\n+0013ce20: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0013ce30: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0013ce40: 6d6c 2361 3831 3130 3431 6661 6162 3163 ml#a811041faab1c\n+0013ce50: 6634 3831 6537 6536 3536 6638 3164 6338 f481e7e656f81dc8\n+0013ce60: 3839 3031 2220 7469 746c 653d 2255 7365 8901\" title=\"Use\n+0013ce70: 722d 6465 6669 6e61 626c 6520 7661 6c75 r-definable valu\n+0013ce80: 6520 746f 2073 6574 2054 4350 5f4b 4545 e to set TCP_KEE\n+0013ce90: 5043 4e54 2073 6574 736f 636b 6f70 7420 PCNT setsockopt \n+0013cea0: 2874 6865 2076 616c 7565 2069 7320 3020 (the value is 0 \n+0013ceb0: 6279 2064 6566 6175 6c74 2922 3e73 6f61 by default)\">soa\n+0013cec0: 703a 3a74 6370 5f6b 6565 705f 636e 743c p::tcp_keep_cnt<\n+0013ced0: 2f61 3e3c 2f63 6f64 653e 2e20 466f 7220 /a>. For \n+0013cee0: 6578 616d 706c 653a 3c2f 703e 0a3c 6469 example:

    .
    struc\n+0013cf30: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t \n+0013cf60: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap = soap_new();\n+0013d000: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    \n+0013d040: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->tcp_keep_a\n+0013d0a0: 6c69 7665 3c2f 613e 203d 2031 3b20 2020 live = 1; \n+0013d0b0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // setsock\n+0013d0d0: 6f70 7420 534f 5f4b 4545 5041 4c49 5645 opt SO_KEEPALIVE\n+0013d0e0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0013d100: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+0013d130: 2667 743b 3c61 2063 6c61 7373 3d22 636f >tcp\n+0013d180: 5f6b 6565 705f 6964 6c65 3c2f 613e 203d _keep_idle =\n+0013d190: 2033 303b 2020 203c 7370 616e 2063 6c61 30; // \n+0013d1b0: 7469 6d65 2069 6e20 7365 636f 6e64 7320 time in seconds \n+0013d1c0: 7468 6520 636f 6e6e 6563 7469 6f6e 206e the connection n\n+0013d1d0: 6565 6473 2074 6f20 7265 6d61 696e 2069 eeds to remain i\n+0013d1e0: 646c 6520 6265 666f 7265 2054 4350 2073 dle before TCP s\n+0013d1f0: 7461 7274 7320 7365 6e64 696e 6720 6b65 tarts sending ke\n+0013d200: 6570 616c 6976 6520 7072 6f62 6573 3c2f epalive probes
    .soap-&g\n+0013d260: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;tcp_k\n+0013d2b0: 6565 705f 696e 7476 6c3c 2f61 3e20 3d20 eep_intvl = \n+0013d2c0: 3132 303b 203c 7370 616e 2063 6c61 7373 120; // ti\n+0013d2e0: 6d65 2069 6e20 7365 636f 6e64 7320 6265 me in seconds be\n+0013d2f0: 7477 6565 6e20 696e 6469 7669 6475 616c tween individual\n+0013d300: 206b 6565 7061 6c69 7665 2070 726f 6265 keepalive probe\n+0013d310: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .<\n+0013d320: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0013d330: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n+0013d360: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->tc\n+0013d3b0: 705f 6b65 6570 5f63 6e74 3c2f 613e 203d p_keep_cnt =\n+0013d3c0: 2035 3b20 2020 2020 3c73 7061 6e20 636c 5; //\n+0013d3e0: 206d 6178 696d 756d 206e 756d 6265 7220 maximum number \n+0013d3f0: 6f66 206b 6565 7061 6c69 7665 2070 726f of keepalive pro\n+0013d400: 6265 7320 5443 5020 7368 6f75 6c64 2073 bes TCP should s\n+0013d410: 656e 6420 6265 666f 7265 2064 726f 7070 end before dropp\n+0013d420: 696e 6720 7468 6520 636f 6e6e 6563 7469 ing the connecti\n+0013d430: 6f6e 3c2f 7370 616e 3e3c 2f64 6976 3e0a on
    .\n+0013d440: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    soap::t\n+0013d4e0: 6370 5f6b 6565 705f 636e 743c 2f61 3e3c cp_keep_cnt<\n+0013d4f0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    unsigne\n+0013d510: 6420 696e 7420 7463 705f 6b65 6570 5f63 d int tcp_keep_c\n+0013d520: 6e74 3c2f 6469 763e 3c64 6976 2063 6c61 nt
    User-\n+0013d540: 6465 6669 6e61 626c 6520 7661 6c75 6520 definable value \n+0013d550: 746f 2073 6574 2054 4350 5f4b 4545 5043 to set TCP_KEEPC\n+0013d560: 4e54 2073 6574 736f 636b 6f70 7420 2874 NT setsockopt (t\n+0013d570: 6865 2076 616c 7565 2069 7320 3020 6279 he value is 0 by\n+0013d580: 2064 6566 6175 6c74 293c 2f64 6976 3e3c default)
    <\n+0013d590: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n+0013d5a0: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n+0013d5b0: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n+0013d5c0: 3335 3834 3c2f 6469 763e 3c2f 6469 763e 3584
    \n+0013d5d0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap::\n+0013d670: 7463 705f 6b65 6570 5f69 6e74 766c 3c2f tcp_keep_intvl
    unsi\n+0013d6a0: 676e 6564 2069 6e74 2074 6370 5f6b 6565 gned int tcp_kee\n+0013d6b0: 705f 696e 7476 6c3c 2f64 6976 3e3c 6469 p_intvl
    \n+0013d6d0: 5573 6572 2d64 6566 696e 6162 6c65 2076 User-definable v\n+0013d6e0: 616c 7565 2074 6f20 7365 7420 5443 505f alue to set TCP_\n+0013d6f0: 4b45 4550 494e 5456 4c20 7365 7473 6f63 KEEPINTVL setsoc\n+0013d700: 6b6f 7074 2028 7468 6520 7661 6c75 6520 kopt (the value \n+0013d710: 6973 2030 2062 7920 6465 6661 756c 7429 is 0 by default)\n+0013d720: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi\n+0013d740: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n+0013d750: 6f61 7032 2e68 3a33 3535 393c 2f64 6976 oap2.h:3559
    .
    unsigned int t\n+0013d840: 6370 5f6b 6565 705f 6964 6c65 3c2f 6469 cp_keep_idle
    User-defina\n+0013d870: 626c 6520 7661 6c75 6520 746f 2073 6574 ble value to set\n+0013d880: 2054 4350 5f4b 4545 5049 444c 4520 7365 TCP_KEEPIDLE se\n+0013d890: 7473 6f63 6b6f 7074 2028 7468 6520 7661 tsockopt (the va\n+0013d8a0: 6c75 6520 6973 2030 2062 7920 6465 6661 lue is 0 by defa\n+0013d8b0: 756c 7429 3c2f 6469 763e 3c64 6976 2063 ult)
    \n+0013d8d0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+0013d8e0: 7374 6473 6f61 7032 2e68 3a33 3533 343c stdsoap2.h:3534<\n+0013d8f0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    soap::tcp_k\n+0013d9a0: 6565 705f 616c 6976 653c 2f61 3e3c 2f64 eep_alive
    int tcp_k\n+0013d9d0: 6565 705f 616c 6976 653c 2f64 6976 3e3c eep_alive
    <\n+0013d9e0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+0013d9f0: 223e 5573 6572 2d64 6566 696e 6162 6c65 \">User-definable\n+0013da00: 2076 616c 7565 2074 6f20 7365 7420 534f value to set SO\n+0013da10: 5f4b 4545 5041 4c49 5645 2073 6574 736f _KEEPALIVE setso\n+0013da20: 636b 6f70 7420 2830 2062 7920 6465 6661 ckopt (0 by defa\n+0013da30: 756c 7420 756e 6c65 7373 2074 6865 2023 ult unless the #\n+0013da40: 534f 4150 5f49 4f5f 4b45 4550 414c 4956 SOAP_IO_KEEPALIV\n+0013da50: 4520 6d6f 6465 202e 2e2e 3c2f 6469 763e E mode ...
    \n+0013da60: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition\n+0013da80: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n+0013da90: 3a33 3530 393c 2f64 6976 3e3c 2f64 6976 :3509
    .

    For \n+0013dac0: 5544 5020 6d65 7373 6167 696e 672c 2075 UDP messaging, u\n+0013dad0: 7365 203c 636f 6465 3e23 534f 4150 5f49 se #SOAP_I\n+0013dae0: 4f5f 5544 503c 2f63 6f64 653e 2e20 5365 O_UDP. Se\n+0013daf0: 6520 616c 736f 2053 6563 7469 6f6e 203c e also Section <\n+0013db00: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0013db10: 663d 2269 6e64 6578 2e68 746d 6c23 5544 f=\"index.html#UD\n+0013db20: 5022 3e53 4f41 502f 584d 4c20 6f76 6572 P\">SOAP/XML over\n+0013db30: 2055 4450 3c2f 613e 2e20 5468 6520 636f UDP. The co\n+0013db40: 6e74 6578 7420 666c 6167 7320 7468 6174 ntext flags that\n+0013db50: 2063 616e 2062 6520 7365 7420 6174 2074 can be set at t\n+0013db60: 6865 2063 6c69 656e 7420 7369 6465 2066 he client side f\n+0013db70: 6f72 2055 4450 206d 6573 7361 6769 6e67 or UDP messaging\n+0013db80: 2061 7265 203c 636f 6465 3e3c 6120 636c are soap::ipv4_m\n+0013dc40: 756c 7469 6361 7374 5f69 663c 2f61 3e3c ulticast_if<\n+0013dc50: 2f63 6f64 653e 2c20 3c63 6f64 653e 3c61 /code>, soap::ipv\n+0013dd10: 345f 6d75 6c74 6963 6173 745f 7474 6c3c 4_multicast_ttl<\n+0013dd20: 2f61 3e3c 2f63 6f64 653e 2c20 616e 6420 /a>, and \n+0013dd30: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap:\n+0013ddd0: 3a69 7076 365f 6d75 6c74 6963 6173 745f :ipv6_multicast_\n+0013dde0: 6966 3c2f 613e 3c2f 636f 6465 3e3a 3c2f if:.\n+0013de10: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..\n+0013de30: 3c74 6820 636c 6173 733d 226d 6172 6b64 ..\n+0013dee0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 s\n+0013df90: 6f61 703a 3a69 7076 345f 6d75 6c74 6963 oap::ipv4_multic\n+0013dfa0: 6173 745f 6966 3c2f 613e 3c2f 636f 6465 ast_if ..\n+0013e150: 3c74 6420 636c 6173 733d 226d 6172 6b64 ...
    context flag \n+0013de60: 203c 2f74 683e 3c74 6820 636c 6173 733d result \n+0013de90: 2020 3c2f 7468 3e3c 2f74 723e 0a3c 7472
    set <\n+0013dfe0: 636f 6465 3e73 6574 736f 636b 6f70 743c code>setsockopt<\n+0013dff0: 2f63 6f64 653e 206c 6576 656c 203c 636f /code> level IPPROTO_IP to IP\n+0013e020: 5f4d 554c 5449 4341 5354 5f49 463c 2f63 _MULTICAST_IF with value \n+0013e040: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 s\n+0013e0f0: 6f61 703a 3a69 7076 345f 6d75 6c74 6963 oap::ipv4_multic\n+0013e100: 6173 745f 6966 3c2f 613e 3c2f 636f 6465 ast_if when non-NULL \n+0013e120: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    soap::ipv4_mult\n+0013e230: 6963 6173 745f 7474 6c3c 2f61 3e3c 2f63 icast_ttl se\n+0013e270: 7420 3c63 6f64 653e 7365 7473 6f63 6b6f t setsocko\n+0013e280: 7074 3c2f 636f 6465 3e20 6c65 7665 6c20 pt level \n+0013e290: 3c63 6f64 653e 4950 5052 4f54 4f5f 4950 IPPROTO_IP\n+0013e2a0: 3c2f 636f 6465 3e20 746f 203c 636f 6465 to IP_MULTICAST_TT\n+0013e2c0: 4c3c 2f63 6f64 653e 2077 6974 6820 7661 L with va\n+0013e2d0: 6c75 6520 3c63 6f64 653e 3c61 2063 6c61 lue soap::ipv4_mu\n+0013e390: 6c74 6963 6173 745f 7474 6c3c 2f61 3e3c lticast_ttl<\n+0013e3a0: 2f63 6f64 653e 2077 6865 6e20 6e6f 6e7a /code> when nonz\n+0013e3b0: 6572 6f20 2020 203c 2f74 643e 3c2f 7472 ero
    \n+0013e4a0: 736f 6170 3a3a 6970 7636 5f6d 756c 7469 soap::ipv6_multi\n+0013e4b0: 6361 7374 5f69 663c 2f61 3e3c 2f63 6f64 cast_if set \n+0013e4f0: 3c63 6f64 653e 736f 636b 6164 6472 5f69 sockaddr_i\n+0013e500: 6e36 3a3a 7369 6e36 5f73 636f 7065 5f69 n6::sin6_scope_i\n+0013e510: 643c 2f63 6f64 653e 2074 6f20 3c63 6f64 d to soap::ipv\n+0013e5c0: 365f 6d75 6c74 6963 6173 745f 6966 3c2f 6_multicast_if when n\n+0013e5e0: 6f6e 7a65 726f 2020 203c 2f74 643e 3c2f onzero
    .

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

    .Run-\n+0013e660: 7469 6d65 2065 7272 6f72 2063 6f64 6573 time error codes\n+0013e670: 3c2f 6831 3e0a 3c70 3e53 7461 7475 7320

    .

    Status \n+0013e680: 6572 726f 7220 636f 6465 7320 6172 6520 error codes are \n+0013e690: 696e 7465 6765 7220 7661 6c75 6573 2c20 integer values, \n+0013e6a0: 7768 6963 6820 6172 6520 7265 7475 726e which are return\n+0013e6b0: 6564 2062 7920 7468 6520 6753 4f41 5020 ed by the gSOAP \n+0013e6c0: 4150 4920 6675 6e63 7469 6f6e 732e 2054 API functions. T\n+0013e6d0: 6865 2066 756c 6c20 6c69 7374 206f 6620 he full list of \n+0013e6e0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat\n+0013e7a0: 7573 3c2f 613e 3c2f 636f 6465 3e20 6572 us er\n+0013e7b0: 726f 7220 636f 6465 7320 6973 206c 6973 ror codes is lis\n+0013e7c0: 7465 6420 6265 6c6f 773a 3c2f 703e 0a3c ted below:

    .<\n+0013e7d0: 7461 626c 6520 636c 6173 733d 226d 6172 table class=\"mar\n+0013e7e0: 6b64 6f77 6e54 6162 6c65 223e 0a3c 7472 kdownTable\">..Er\n+0013e830: 726f 7220 636f 6465 2020 203c 2f74 683e ror code \n+0013e840: 3c74 6820 636c 6173 733d 226d 6172 6b64 Description \n+0013e870: 203c 2f74 683e 3c2f 7472 3e0a 3c74 7220 ..<\n+0013e8c0: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK No\n+0013e900: 2065 7272 6f72 2028 7a65 726f 2920 2020 error (zero) \n+0013e910: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..\n+0013e960: 3c63 6f64 653e 2353 4f41 505f 434c 495f #SOAP_CLI_\n+0013e970: 4641 554c 543c 2f63 6f64 653e 2020 203c FAULT <\n+0013e980: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>The servic\n+0013e9b0: 6520 7265 7475 726e 6564 2061 2053 4f41 e returned a SOA\n+0013e9c0: 5020 312e 3120 636c 6965 6e74 2066 6175 P 1.1 client fau\n+0013e9d0: 6c74 202f 2053 4f41 5020 312e 3220 7365 lt / SOAP 1.2 se\n+0013e9e0: 6e64 6572 2066 6175 6c74 2074 6f20 7468 nder fault to th\n+0013e9f0: 6520 636c 6965 6e74 2020 2020 3c2f 7464 e client ..\n+0013ea50: 2353 4f41 505f 4441 5441 454e 434f 4449 #SOAP_DATAENCODI\n+0013ea60: 4e47 554e 4b4e 4f57 4e3c 2f63 6f64 653e NGUNKNOWN\n+0013ea70: 2020 203c 2f74 643e 3c74 6420 636c 6173 SOAP 1\n+0013eaa0: 2e32 2044 6174 6145 6e63 6f64 696e 6755 .2 DataEncodingU\n+0013eab0: 6e6b 6e6f 776e 2066 6175 6c74 2020 2020 nknown fault \n+0013eac0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..<\n+0013eb10: 636f 6465 3e23 534f 4150 5f44 454c 5f4d code>#SOAP_DEL_M\n+0013eb20: 4554 484f 443c 2f63 6f64 653e 2020 203c ETHOD
    <\n+0013eb30: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>An HTTP DE\n+0013eb60: 4c45 5445 2072 6571 7565 7374 2077 6173 LETE request was\n+0013eb70: 2072 6563 6569 7665 6420 6279 2074 6865 received by the\n+0013eb80: 2073 6572 7669 6365 2062 7574 2074 6865 service but the\n+0013eb90: 2044 454c 4554 4520 7265 7175 6573 7420 DELETE request \n+0013eba0: 6361 6c6c 6261 636b 203c 636f 6465 3e3c callback <\n+0013ebb0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0013ebc0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0013ebd0: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+0013ebe0: 6761 6632 6264 6130 3138 3734 3839 6338 gaf2bda0187489c8\n+0013ebf0: 6632 6239 3835 3766 3631 6239 3661 6430 f2b9857f61b96ad0\n+0013ec00: 6530 2220 7469 746c 653d 2243 616c 6c62 e0\" title=\"Callb\n+0013ec10: 6163 6b20 746f 2069 6d70 6c65 6d65 6e74 ack to implement\n+0013ec20: 206c 6f67 6963 2061 7420 7468 6520 7365 logic at the se\n+0013ec30: 7276 6572 2d73 6964 6520 746f 2073 6572 rver-side to ser\n+0013ec40: 7665 2072 6573 706f 6e73 6573 2074 6f20 ve responses to \n+0013ec50: 4854 5450 2044 454c 4554 4520 7265 7175 HTTP DELETE requ\n+0013ec60: 6573 7473 2066 726f 6d20 636c 6965 6e74 ests from client\n+0013ec70: 2e2e 2e22 3e73 6f61 703a 3a66 6465 6c3c ...\">soap::fdel<\n+0013ec80: 2f61 3e3c 2f63 6f64 653e 2069 7320 6e6f /a> is no\n+0013ec90: 7420 696d 706c 656d 656e 7465 642c 2073 t implemented, s\n+0013eca0: 6565 2053 6563 7469 6f6e 203c 6120 636c ee Section Function cal\n+0013ece0: 6c62 6163 6b73 2066 6f72 2063 7573 746f lbacks for custo\n+0013ecf0: 6d69 7a65 6420 492f 4f20 616e 6420 4854 mized I/O and HT\n+0013ed00: 5450 2068 616e 646c 696e 673c 2f61 3e20 TP handling \n+0013ed10: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n+0013ed40: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0013ed50: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0013ed60: 3e3c 636f 6465 3e23 534f 4150 5f44 494d >#SOAP_DIM\n+0013ed70: 455f 454e 443c 2f63 6f64 653e 2020 203c E_END <\n+0013ed80: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>End of DIM\n+0013edb0: 4520 6174 7461 6368 6d65 6e74 7320 7072 E attachments pr\n+0013edc0: 6f74 6f63 6f6c 2065 7272 6f72 2020 2020 otocol error \n+0013edd0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..<\n+0013ee20: 636f 6465 3e23 534f 4150 5f44 494d 455f code>#SOAP_DIME_\n+0013ee30: 4552 524f 523c 2f63 6f64 653e 2020 203c ERROR
    <\n+0013ee40: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>DIME forma\n+0013ee70: 7474 696e 6720 6572 726f 7220 6f72 2044 tting error or D\n+0013ee80: 494d 4520 6174 7461 6368 6d65 6e74 2073 IME attachment s\n+0013ee90: 697a 6520 6578 6365 6564 7320 3c63 6f64 ize exceeds #SOAP_MAXDIMES\n+0013eeb0: 495a 453c 2f63 6f64 653e 2020 2020 3c2f IZE ..#SOAP_DIME_HRE\n+0013ef20: 463c 2f63 6f64 653e 2020 203c 2f74 643e F \n+0013ef30: 3c74 6420 636c 6173 733d 226d 6172 6b64 DIME attachmen\n+0013ef60: 7420 6861 7320 6e6f 2068 7265 6620 6672 t has no href fr\n+0013ef70: 6f6d 2053 4f41 5020 626f 6479 2061 6e64 om SOAP body and\n+0013ef80: 206e 6f20 4449 4d45 2063 616c 6c62 6163 no DIME callbac\n+0013ef90: 6b73 2077 6572 6520 6465 6669 6e65 6420 ks were defined \n+0013efa0: 746f 2073 6176 6520 7468 6520 6174 7461 to save the atta\n+0013efb0: 6368 6d65 6e74 2020 2020 3c2f 7464 3e3c chment <\n+0013efc0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..#\n+0013f010: 534f 4150 5f44 494d 455f 4d49 534d 4154 SOAP_DIME_MISMAT\n+0013f020: 4348 3c2f 636f 6465 3e20 2020 3c2f 7464 CH DIME version \n+0013f060: 6572 726f 7220 2020 203c 2f74 643e 3c2f error ..#SO\n+0013f0c0: 4150 5f44 5550 4c49 4341 5445 5f49 443c AP_DUPLICATE_ID<\n+0013f0d0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n+0013f100: 584d 4c20 656c 656d 656e 7420 6861 7320 XML element has \n+0013f110: 6475 706c 6963 6174 6520 6964 2061 7474 duplicate id att\n+0013f120: 7269 6275 7465 2076 616c 7565 2028 6170 ribute value (ap\n+0013f130: 706c 6963 6162 6c65 2074 6f20 534f 4150 plicable to SOAP\n+0013f140: 206d 756c 7469 2d72 6566 2065 6e63 6f64 multi-ref encod\n+0013f150: 696e 6720 616e 6420 3c63 6f64 653e 2353 ing and #S\n+0013f160: 4f41 505f 584d 4c5f 4752 4150 483c 2f63 OAP_XML_GRAPH serializati\n+0013f180: 6f6e 2920 2020 203c 2f74 643e 3c2f 7472 on) ..#SOA\n+0013f1e0: 505f 454d 5054 593c 2f63 6f64 653e 2020 P_EMPTY \n+0013f1f0: 203c 2f74 643e 3c74 6420 636c 6173 733d XML elem\n+0013f220: 656e 7420 6f72 2061 7474 7269 6275 7465 ent or attribute\n+0013f230: 2069 7320 656d 7074 7920 7768 656e 2061 is empty when a\n+0013f240: 2076 616c 7565 2069 7320 7265 7175 6972 value is requir\n+0013f250: 6564 2020 2020 3c2f 7464 3e3c 2f74 723e ed \n+0013f260: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..#SOAP_\n+0013f2b0: 454f 463c 2f63 6f64 653e 2020 203c 2f74 EOF Unexpected e\n+0013f2f0: 6e64 206f 6620 6669 6c65 2c20 6e6f 2069 nd of file, no i\n+0013f300: 6e70 7574 2c20 7472 616e 736d 6973 7369 nput, transmissi\n+0013f310: 6f6e 2069 6e74 6572 7275 7074 6564 206f on interrupted o\n+0013f320: 7220 7469 6d65 6420 6f75 742c 2073 616d r timed out, sam\n+0013f330: 6520 6173 203c 636f 6465 3e45 4f46 3c2f e as EOF ..#S\n+0013f3a0: 4f41 505f 454f 4d3c 2f63 6f64 653e 2020 OAP_EOM \n+0013f3b0: 203c 2f74 643e 3c74 6420 636c 6173 733d Out of m\n+0013f3e0: 656d 6f72 7920 2020 203c 2f74 643e 3c2f emory ..#SO\n+0013f440: 4150 5f45 5252 3c2f 636f 6465 3e20 2020 AP_ERR \n+0013f450: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 Same as <\n+0013f480: 636f 6465 3e45 4f46 3c2f 636f 6465 3e2c code>EOF,\n+0013f490: 2062 7574 2069 6e64 6963 6174 6573 2061 but indicates a\n+0013f4a0: 6e20 756e 7370 6563 6966 6965 6420 6572 n unspecified er\n+0013f4b0: 726f 7220 2020 203c 2f74 643e 3c2f 7472 ror ..#SOA\n+0013f510: 505f 4641 554c 543c 2f63 6f64 653e 2020 P_FAULT \n+0013f520: 203c 2f74 643e 3c74 6420 636c 6173 733d The faul\n+0013f550: 7420 636f 6465 2074 6f20 6265 2072 6574 t code to be ret\n+0013f560: 7572 6e65 6420 6279 2061 2073 6572 7669 urned by a servi\n+0013f570: 6365 206f 7065 7261 7469 6f6e 2077 6865 ce operation whe\n+0013f580: 6e20 6361 6c6c 696e 6720 3c63 6f64 653e n calling \n+0013f590: 3c61 2063 6c61 7373 3d22 656c 2220 6872 so\n+0013f630: 6170 5f73 656e 6465 725f 6661 756c 743c ap_sender_fault<\n+0013f640: 2f61 3e3c 2f63 6f64 653e 2028 636c 6965 /a> (clie\n+0013f650: 6e74 2069 7320 6174 2066 6175 6c74 2920 nt is at fault) \n+0013f660: 6f72 203c 636f 6465 3e3c 6120 636c 6173 or soap_re\n+0013f710: 6365 6976 6572 5f66 6175 6c74 3c2f 613e ceiver_fault\n+0013f720: 3c2f 636f 6465 3e20 2873 6572 7665 7220 (server \n+0013f730: 6973 2061 7420 6661 756c 7429 2c20 636c is at fault), cl\n+0013f740: 6965 6e74 7320 7265 6365 6976 6520 7468 ients receive th\n+0013f750: 6520 6661 756c 7420 6173 203c 636f 6465 e fault as #SOAP_CLI_FAULT\n+0013f770: 3c2f 636f 6465 3e20 6f72 203c 636f 6465 or #SOAP_SVR_FAULT\n+0013f790: 3c2f 636f 6465 3e20 7265 7370 6563 7469 respecti\n+0013f7a0: 7665 6c79 2020 2020 3c2f 7464 3e3c 2f74 vely ..#SOA\n+0013f800: 505f 4644 5f45 5843 4545 4445 443c 2f63 P_FD_EXCEEDED To\n+0013f840: 6f20 6d61 6e79 206f 7065 6e20 736f 636b o many open sock\n+0013f850: 6574 7320 2020 203c 2f74 643e 3c2f 7472 ets ..#SOA\n+0013f8b0: 505f 4649 5845 443c 2f63 6f64 653e 2020 P_FIXED \n+0013f8c0: 203c 2f74 643e 3c74 6420 636c 6173 733d XML elem\n+0013f8f0: 656e 7420 6f72 2061 7474 7269 6275 7465 ent or attribute\n+0013f900: 2076 616c 7565 2069 7320 6669 7865 6420 value is fixed \n+0013f910: 616e 6420 7468 6520 7061 7273 6564 2076 and the parsed v\n+0013f920: 616c 7565 2064 6f65 7320 6e6f 7420 6d61 alue does not ma\n+0013f930: 7463 6820 7468 6520 6669 7865 6420 7661 tch the fixed va\n+0013f940: 6c75 6520 2020 203c 2f74 643e 3c2f 7472 lue ..#SOAP\n+0013f9a0: 5f47 4554 5f4d 4554 484f 443c 2f63 6f64 _GET_METHOD An H\n+0013f9e0: 5454 5020 4745 5420 7265 7175 6573 7420 TTP GET request \n+0013f9f0: 7761 7320 7265 6365 6976 6564 2062 7920 was received by \n+0013fa00: 7468 6520 7365 7276 6963 6520 6275 7420 the service but \n+0013fa10: 7468 6520 4745 5420 7265 7175 6573 7420 the GET request \n+0013fa20: 6361 6c6c 6261 636b 203c 636f 6465 3e3c callback <\n+0013fa30: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0013fa40: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0013fa50: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+0013fa60: 6761 6530 3232 3230 3466 6637 3030 3464 gae022204ff7004d\n+0013fa70: 6632 6435 6163 3965 3038 3363 6262 3562 f2d5ac9e083cbb5b\n+0013fa80: 3136 2220 7469 746c 653d 2243 616c 6c62 16\" title=\"Callb\n+0013fa90: 6163 6b20 746f 2069 6d70 6c65 6d65 6e74 ack to implement\n+0013faa0: 206c 6f67 6963 2061 7420 7468 6520 7365 logic at the se\n+0013fab0: 7276 6572 2d73 6964 6520 746f 2073 6572 rver-side to ser\n+0013fac0: 7665 2072 6573 706f 6e73 6573 2074 6f20 ve responses to \n+0013fad0: 4854 5450 2047 4554 2072 6571 7565 7374 HTTP GET request\n+0013fae0: 7320 6672 6f6d 2063 6c69 656e 7473 2e22 s from clients.\"\n+0013faf0: 3e73 6f61 703a 3a66 6765 743c 2f61 3e3c >soap::fget<\n+0013fb00: 2f63 6f64 653e 2069 7320 6e6f 7420 696d /code> is not im\n+0013fb10: 706c 656d 656e 7465 642c 2073 6565 2053 plemented, see S\n+0013fb20: 6563 7469 6f6e 7320 3c61 2063 6c61 7373 ections How \n+0013fb50: 746f 2069 6d70 6c65 6d65 6e74 2048 5454 to implement HTT\n+0013fb60: 5020 4745 542c 2050 5554 2c20 616e 6420 P GET, PUT, and \n+0013fb70: 5041 5443 4820 7365 7276 6963 6573 3c2f PATCH services and \n+0013fbb0: 4675 6e63 7469 6f6e 2063 616c 6c62 6163 Function callbac\n+0013fbc0: 6b73 2066 6f72 2063 7573 746f 6d69 7a65 ks for customize\n+0013fbd0: 6420 492f 4f20 616e 6420 4854 5450 2068 d I/O and HTTP h\n+0013fbe0: 616e 646c 696e 673c 2f61 3e20 2020 203c andling <\n+0013fbf0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..#SOAP_HREF R\n+0013fc80: 6566 6572 656e 6365 2074 6f20 6f62 6a65 eference to obje\n+0013fc90: 6374 2069 6e20 584d 4c20 6964 656e 7469 ct in XML identi\n+0013fca0: 6669 6564 2062 7920 6974 7320 6964 2061 fied by its id a\n+0013fcb0: 7474 7269 6275 7465 2069 7320 696e 636f ttribute is inco\n+0013fcc0: 6d70 6174 6962 6c65 2077 6974 6820 7468 mpatible with th\n+0013fcd0: 6520 6f62 6a65 6374 2072 6566 6572 7265 e object referre\n+0013fce0: 6420 746f 2062 7920 7468 6520 7265 6620 d to by the ref \n+0013fcf0: 6f72 2068 7265 6620 6174 7472 6962 7574 or href attribut\n+0013fd00: 6520 2861 7070 6c69 6361 626c 6520 746f e (applicable to\n+0013fd10: 2053 4f41 5020 6d75 6c74 692d 7265 6620 SOAP multi-ref \n+0013fd20: 656e 636f 6469 6e67 2061 6e64 203c 636f encoding and #SOAP_XML_GRA\n+0013fd40: 5048 3c2f 636f 6465 3e20 7365 7269 616c PH serial\n+0013fd50: 697a 6174 696f 6e29 2020 2020 3c2f 7464 ization) ..\n+0013fdb0: 2353 4f41 505f 4854 5450 5f45 5252 4f52 #SOAP_HTTP_ERROR\n+0013fdc0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n+0013fdd0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0013fde0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0013fdf0: 3e41 6e20 756e 7370 6563 6966 6965 6420 >An unspecified \n+0013fe00: 4854 5450 2065 7272 6f72 206f 6363 7572 HTTP error occur\n+0013fe10: 7265 6420 2020 203c 2f74 643e 3c2f 7472 red ..#SOA\n+0013fe70: 505f 4854 5450 5f4d 4554 484f 443c 2f63 P_HTTP_METHOD An\n+0013feb0: 2048 5454 5020 7265 7175 6573 7420 7761 HTTP request wa\n+0013fec0: 7320 7265 6365 6976 6564 2062 7920 7468 s received by th\n+0013fed0: 6520 7365 7276 6963 6520 7468 6174 2063 e service that c\n+0013fee0: 616e 6e6f 7420 6265 2068 616e 646c 6564 annot be handled\n+0013fef0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .<\n+0013ff00: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+0013ff10: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+0013ff20: 3c74 6420 636c 6173 733d 226d 6172 6b64 #SOAP_IO\n+0013ff50: 423c 2f63 6f64 653e 2020 203c 2f74 643e B \n+0013ff60: 3c74 6420 636c 6173 733d 226d 6172 6b64 SOAP array ind\n+0013ff90: 6578 206f 7574 206f 6620 626f 756e 6473 ex out of bounds\n+0013ffa0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .<\n+0013ffb0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+0013ffc0: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+0013ffd0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .#SOAP_L\n+00140000: 454e 4754 483c 2f63 6f64 653e 2020 203c ENGTH <\n+00140010: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>XML elemen\n+00140040: 7420 6f72 2061 7474 7269 6275 7465 206c t or attribute l\n+00140050: 656e 6774 6820 7661 6c69 6461 7469 6f6e ength validation\n+00140060: 2065 7272 6f72 206f 7220 3c63 6f64 653e error or \n+00140070: 2353 4f41 505f 4d41 584c 454e 4754 483c #SOAP_MAXLENGTH<\n+00140080: 2f63 6f64 653e 2065 7863 6565 6465 6420 /code> exceeded \n+00140090: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n+001400c0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001400d0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+001400e0: 3e3c 636f 6465 3e23 534f 4150 5f4c 4556 >#SOAP_LEV\n+001400f0: 454c 3c2f 636f 6465 3e20 2020 3c2f 7464 EL XML nesting d\n+00140130: 6570 7468 206c 6576 656c 2065 7863 6565 epth level excee\n+00140140: 6473 203c 636f 6465 3e23 534f 4150 5f4d ds #SOAP_M\n+00140150: 4158 4c45 5645 4c3c 2f63 6f64 653e 2020 AXLEVEL \n+00140160: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n+00140190: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001401a0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+001401b0: 3e3c 636f 6465 3e23 534f 4150 5f4d 494d >#SOAP_MIM\n+001401c0: 455f 454e 443c 2f63 6f64 653e 2020 203c E_END <\n+001401d0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>End of MIM\n+00140200: 4520 6174 7461 6368 6d65 6e74 7320 7072 E attachments pr\n+00140210: 6f74 6f63 6f6c 2065 7272 6f72 2020 2020 otocol error \n+00140220: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..#SOAP_MIME_E\n+00140280: 5252 4f52 3c2f 636f 6465 3e20 2020 3c2f RROR MIME attach\n+001402c0: 6d65 6e74 2070 6172 7369 6e67 2065 7272 ment parsing err\n+001402d0: 6f72 2020 2020 3c2f 7464 3e3c 2f74 723e or \n+001402e0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..#SOAP\n+00140330: 5f4d 494d 455f 4852 4546 3c2f 636f 6465 _MIME_HREF MIME \n+00140370: 6174 7461 6368 6d65 6e74 2068 6173 206e attachment has n\n+00140380: 6f20 6872 6566 2066 726f 6d20 534f 4150 o href from SOAP\n+00140390: 2062 6f64 7920 616e 6420 6e6f 204d 494d body and no MIM\n+001403a0: 4520 6361 6c6c 6261 636b 7320 7765 7265 E callbacks were\n+001403b0: 2064 6566 696e 6564 2074 6f20 7361 7665 defined to save\n+001403c0: 2074 6865 2061 7474 6163 686d 656e 7420 the attachment \n+001403d0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n+00140400: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00140410: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00140420: 3e3c 636f 6465 3e23 534f 4150 5f4d 4953 >#SOAP_MIS\n+00140430: 5349 4e47 5f49 443c 2f63 6f64 653e 2020 SING_ID \n+00140440: 203c 2f74 643e 3c74 6420 636c 6173 733d An XML e\n+00140470: 6c65 6d65 6e74 2077 6974 6820 6964 2061 lement with id a\n+00140480: 7474 7269 6275 7465 2069 7320 6d69 7373 ttribute is miss\n+00140490: 696e 6720 7468 6174 2073 686f 756c 6420 ing that should \n+001404a0: 6d61 7463 6820 7468 6520 656c 656d 656e match the elemen\n+001404b0: 7420 7769 7468 2068 7265 662f 7265 6620 t with href/ref \n+001404c0: 6174 7472 6962 7574 6520 2861 7070 6c69 attribute (appli\n+001404d0: 6361 626c 6520 746f 2053 4f41 5020 6d75 cable to SOAP mu\n+001404e0: 6c74 692d 7265 6620 656e 636f 6469 6e67 lti-ref encoding\n+001404f0: 2061 6e64 203c 636f 6465 3e23 534f 4150 and #SOAP\n+00140500: 5f58 4d4c 5f47 5241 5048 3c2f 636f 6465 _XML_GRAPH serialization)\n+00140520: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .<\n+00140530: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00140540: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+00140550: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .#SOAP_M\n+00140580: 4f45 3c2f 636f 6465 3e20 2020 3c2f 7464 OE Memory overfl\n+001405c0: 6f77 206f 7220 6d65 6d6f 7279 2063 6f72 ow or memory cor\n+001405d0: 7275 7074 696f 6e20 6572 726f 7220 2861 ruption error (a\n+001405e0: 7070 6c69 6361 626c 6520 696e 203c 636f pplicable in #DEBUG\n+00140600: 206d 6f64 6520 6f6e 6c79 2920 2020 203c mode only) <\n+00140610: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..#SOAP_MUSTUND\n+00140670: 4552 5354 414e 443c 2f63 6f64 653e 2020 ERSTAND \n+00140680: 203c 2f74 643e 3c74 6420 636c 6173 733d An XML e\n+001406b0: 6c65 6d65 6e74 2069 7320 7072 6573 656e lement is presen\n+001406c0: 7420 7769 7468 2061 206d 7573 7455 6e64 t with a mustUnd\n+001406d0: 6572 7374 616e 6420 6174 7472 6962 7574 erstand attribut\n+001406e0: 6520 7768 6963 6820 6d75 7374 2062 6520 e which must be \n+001406f0: 756e 6465 7273 746f 6f64 2062 7574 2069 understood but i\n+00140700: 7320 6e6f 7420 6465 7365 7269 616c 697a s not deserializ\n+00140710: 6564 2020 2020 3c2f 7464 3e3c 2f74 723e ed \n+00140720: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..#SOAP\n+00140770: 5f4e 414d 4553 5041 4345 3c2f 636f 6465 _NAMESPACE XML n\n+001407b0: 616d 6573 7061 6365 206e 616d 6520 6d69 amespace name mi\n+001407c0: 736d 6174 6368 2076 616c 6964 6174 696f smatch validatio\n+001407d0: 6e20 6572 726f 7220 2020 203c 2f74 643e n error \n+001407e0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..#\n+00140830: 534f 4150 5f4e 4f5f 4441 5441 3c2f 636f SOAP_NO_DATA No \n+00140870: 6461 7461 2069 6e20 7468 6520 4854 5450 data in the HTTP\n+00140880: 2062 6f64 7920 6f66 2074 6865 206d 6573 body of the mes\n+00140890: 7361 6765 2072 6563 6569 7665 6420 2020 sage received \n+001408a0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..\n+001408f0: 3c63 6f64 653e 2353 4f41 505f 4e4f 5f4d #SOAP_NO_M\n+00140900: 4554 484f 443c 2f63 6f64 653e 2020 203c ETHOD <\n+00140910: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>The servic\n+00140940: 6520 7265 7175 6573 7420 6469 7370 6174 e request dispat\n+00140950: 6368 6572 2064 6964 206e 6f74 2066 696e cher did not fin\n+00140960: 6420 6120 6d61 7463 6869 6e67 2073 6572 d a matching ser\n+00140970: 7669 6365 206f 7065 7261 7469 6f6e 2066 vice operation f\n+00140980: 6f72 2061 2073 6572 7669 6365 2072 6571 or a service req\n+00140990: 7565 7374 2020 2020 3c2f 7464 3e3c 2f74 uest ..#SOA\n+001409f0: 505f 4e4f 5f54 4147 3c2f 636f 6465 3e20 P_NO_TAG \n+00140a00: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 No XML \n+00140a30: 656c 656d 656e 7420 7461 6720 7761 7320 element tag was \n+00140a40: 666f 756e 6420 7768 656e 206f 6e65 2077 found when one w\n+00140a50: 6173 2065 7870 6563 7465 6420 2020 203c as expected <\n+00140a60: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..#SOAP_NTLM_E\n+00140ac0: 5252 4f52 3c2f 636f 6465 3e20 2020 3c2f RROR An NTLM aut\n+00140b00: 6865 6e74 6963 6174 696f 6e20 6861 6e64 hentication hand\n+00140b10: 7368 616b 6520 6572 726f 7220 6f63 6375 shake error occu\n+00140b20: 7272 6564 2020 2020 3c2f 7464 3e3c 2f74 rred ..#SOA\n+00140b80: 505f 4e55 4c4c 3c2f 636f 6465 3e20 2020 P_NULL \n+00140b90: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 XML eleme\n+00140bc0: 6e74 2068 6173 2061 6e20 3c63 6f64 653e nt has an \n+00140bd0: 7873 693a 6e69 6c3c 2f63 6f64 653e 2061 xsi:nil a\n+00140be0: 7474 7269 6275 7465 2077 6865 6e20 7468 ttribute when th\n+00140bf0: 6520 656c 656d 656e 7420 6973 206e 6f74 e element is not\n+00140c00: 206e 696c 6c61 626c 652c 2063 6175 7369 nillable, causi\n+00140c10: 6e67 2061 2076 616c 6964 6174 696f 6e20 ng a validation \n+00140c20: 6572 726f 7220 2020 203c 2f74 643e 3c2f error ..#S\n+00140c80: 4f41 505f 4f43 4355 5253 3c2f 636f 6465 OAP_OCCURS XML e\n+00140cc0: 6c65 6d65 6e74 206d 696e 4f63 6375 7273 lement minOccurs\n+00140cd0: 206f 7220 6d61 784f 6363 7572 7320 7661 or maxOccurs va\n+00140ce0: 6c69 6461 7469 6f6e 2065 7272 6f72 206f lidation error o\n+00140cf0: 7220 3c63 6f64 653e 2353 4f41 505f 4d41 r #SOAP_MA\n+00140d00: 584f 4343 5552 533c 2f63 6f64 653e 2065 XOCCURS e\n+00140d10: 7863 6565 6465 6420 2020 203c 2f74 643e xceeded \n+00140d20: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..#\n+00140d70: 534f 4150 5f50 4154 4348 5f4d 4554 484f SOAP_PATCH_METHO\n+00140d80: 443c 2f63 6f64 653e 2020 203c 2f74 643e D \n+00140d90: 3c74 6420 636c 6173 733d 226d 6172 6b64 An HTTP PATCH \n+00140dc0: 7265 7175 6573 7420 7761 7320 7265 6365 request was rece\n+00140dd0: 6976 6564 2062 7920 7468 6520 7365 7276 ived by the serv\n+00140de0: 6963 6520 6275 7420 7468 6520 5041 5443 ice but the PATC\n+00140df0: 4820 7265 7175 6573 7420 6361 6c6c 6261 H request callba\n+00140e00: 636b 203c 636f 6465 3e3c 6120 636c 6173 ck s\n+00140ed0: 6f61 703a 3a66 7061 7463 683c 2f61 3e3c oap::fpatch<\n+00140ee0: 2f63 6f64 653e 2069 7320 6e6f 7420 696d /code> is not im\n+00140ef0: 706c 656d 656e 7465 642c 2073 6565 2053 plemented, see S\n+00140f00: 6563 7469 6f6e 203c 6120 636c 6173 733d ection \n+00140f30: 4675 6e63 7469 6f6e 2063 616c 6c62 6163 Function callbac\n+00140f40: 6b73 2066 6f72 2063 7573 746f 6d69 7a65 ks for customize\n+00140f50: 6420 492f 4f20 616e 6420 4854 5450 2068 d I/O and HTTP h\n+00140f60: 616e 646c 696e 673c 2f61 3e20 2020 203c andling <\n+00140f70: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..#SOAP_PATTER\n+00140fd0: 4e3c 2f63 6f64 653e 2020 203c 2f74 643e N \n+00140fe0: 3c74 6420 636c 6173 733d 226d 6172 6b64 XML element or\n+00141010: 2061 7474 7269 6275 7465 2076 616c 7565 attribute value\n+00141020: 2070 6174 7465 726e 206d 6973 6d61 7463 pattern mismatc\n+00141030: 6820 2020 203c 2f74 643e 3c2f 7472 3e0a h .\n+00141040: 3c74 7220 636c 6173 733d 226d 6172 6b64 \n+00141060: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .#SOAP_P\n+00141090: 4c55 4749 4e5f 4552 524f 523c 2f63 6f64 LUGIN_ERROR Fail\n+001410d0: 6564 2074 6f20 7265 6769 7374 6572 2070 ed to register p\n+001410e0: 6c75 6769 6e20 2020 203c 2f74 643e 3c2f lugin ..#S\n+00141140: 4f41 505f 5052 4f48 4942 4954 4544 3c2f OAP_PROHIBITED X\n+00141180: 4d4c 2061 7474 7269 6275 7465 2069 7320 ML attribute is \n+00141190: 7072 6f68 6962 6974 6564 2062 7574 2070 prohibited but p\n+001411a0: 7265 7365 6e74 2020 2020 3c2f 7464 3e3c resent <\n+001411b0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..#S\n+00141200: 4f41 505f 5055 545f 4d45 5448 4f44 3c2f OAP_PUT_METHOD A\n+00141240: 6e20 4854 5450 2050 5554 2072 6571 7565 n HTTP PUT reque\n+00141250: 7374 2077 6173 2072 6563 6569 7665 6420 st was received \n+00141260: 6279 2074 6865 2073 6572 7669 6365 2062 by the service b\n+00141270: 7574 2074 6865 2050 5554 2072 6571 7565 ut the PUT reque\n+00141280: 7374 2063 616c 6c62 6163 6b20 3c63 6f64 st callback soap::fput is not\n+00141370: 2069 6d70 6c65 6d65 6e74 6564 2c20 7365 implemented, se\n+00141380: 6520 5365 6374 696f 6e20 3c61 2063 6c61 e Section Function call\n+001413c0: 6261 636b 7320 666f 7220 6375 7374 6f6d backs for custom\n+001413d0: 697a 6564 2049 2f4f 2061 6e64 2048 5454 ized I/O and HTT\n+001413e0: 5020 6861 6e64 6c69 6e67 3c2f 613e 2020 P handling \n+001413f0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n+00141420: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00141430: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00141440: 3e3c 636f 6465 3e23 534f 4150 5f52 4551 >#SOAP_REQ\n+00141450: 5549 5245 443c 2f63 6f64 653e 2020 203c UIRED <\n+00141460: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>XML attrib\n+00141490: 7574 6520 6973 2072 6571 7569 7265 6420 ute is required \n+001414a0: 6275 7420 6e6f 7420 7072 6573 656e 7420 but not present \n+001414b0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n+001414e0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001414f0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00141500: 3e3c 636f 6465 3e23 534f 4150 5f53 534c >#SOAP_SSL\n+00141510: 5f45 5252 4f52 3c2f 636f 6465 3e20 2020 _ERROR \n+00141520: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 An SSL er\n+00141550: 726f 7220 6f63 6375 7272 6564 2020 2020 ror occurred \n+00141560: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..<\n+001415b0: 636f 6465 3e23 534f 4150 5f53 5652 5f46 code>#SOAP_SVR_F\n+001415c0: 4155 4c54 3c2f 636f 6465 3e20 2020 3c2f AULT The service\n+00141600: 2072 6574 7572 6e65 6420 6120 534f 4150 returned a SOAP\n+00141610: 2031 2e31 2073 6572 7665 7220 6661 756c 1.1 server faul\n+00141620: 7420 6f72 2053 4f41 5020 312e 3220 7265 t or SOAP 1.2 re\n+00141630: 6365 6976 6572 2066 6175 6c74 2074 6f20 ceiver fault to \n+00141640: 7468 6520 636c 6965 6e74 2020 2020 3c2f the client ..#SOAP_SYNTAX_E\n+001416b0: 5252 4f52 3c2f 636f 6465 3e20 2020 3c2f RROR An XML synt\n+001416f0: 6178 2065 7272 6f72 206f 6363 7572 7265 ax error occurre\n+00141700: 6420 7768 696c 6520 7061 7273 696e 6720 d while parsing \n+00141710: 7468 6520 696e 7075 7420 2020 203c 2f74 the input ..#SOAP_TAG_MISM\n+00141780: 4154 4348 3c2f 636f 6465 3e20 2020 3c2f ATCH XML element\n+001417c0: 2074 6167 2070 6172 7365 6420 646f 6573 tag parsed does\n+001417d0: 206e 6f74 206d 6174 6368 2061 6e79 7468 not match anyth\n+001417e0: 696e 6720 7468 6174 2069 7320 6578 7065 ing that is expe\n+001417f0: 6374 6564 2020 2020 3c2f 7464 3e3c 2f74 cted ..#SOA\n+00141850: 505f 5443 505f 4552 524f 523c 2f63 6f64 P_TCP_ERROR A TC\n+00141890: 502f 4950 2063 6f6e 6e65 6374 696f 6e20 P/IP connection \n+001418a0: 6572 726f 7220 6f63 6375 7272 6564 2020 error occurred \n+001418b0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n+001418e0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001418f0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00141900: 3e3c 636f 6465 3e23 534f 4150 5f54 5950 >#SOAP_TYP\n+00141910: 453c 2f63 6f64 653e 2020 203c 2f74 643e E \n+00141920: 3c74 6420 636c 6173 733d 226d 6172 6b64 XML element or\n+00141950: 2061 7474 7269 6275 7465 2068 6173 2061 attribute has a\n+00141960: 206d 6973 6d61 7463 6869 6e67 2074 7970 mismatching typ\n+00141970: 6520 6f72 2076 616c 7565 2074 6861 7420 e or value that \n+00141980: 6973 2063 6175 7369 6e67 2061 2076 616c is causing a val\n+00141990: 6964 6174 696f 6e20 6572 726f 7220 2020 idation error \n+001419a0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..<\n+001419f0: 636f 6465 3e23 534f 4150 5f55 4450 5f45 code>#SOAP_UDP_E\n+00141a00: 5252 4f52 3c2f 636f 6465 3e20 2020 3c2f RROR A UDP/IP co\n+00141a40: 6e6e 6563 7469 6f6e 2065 7272 6f72 206f nnection error o\n+00141a50: 6363 7572 7265 6420 6f72 2074 6865 206d ccurred or the m\n+00141a60: 6573 7361 6765 2074 6f6f 206c 6172 6765 essage too large\n+00141a70: 2074 6f20 7374 6f72 6520 696e 2061 2055 to store in a U\n+00141a80: 4450 2070 6163 6b65 7420 2020 203c 2f74 DP packet ..#SOAP_USER_ERR\n+00141af0: 4f52 3c2f 636f 6465 3e20 2020 3c2f 7464 OR soap:\n+00141be0: 3a75 7365 723c 2f61 3e20 6e6f 7420 7365 :user not se\n+00141bf0: 7420 746f 206e 6f6e 2d4e 554c 4c20 2020 t to non-NULL \n+00141c00: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..<\n+00141c50: 636f 6465 3e23 534f 4150 5f55 5446 5f45 code>#SOAP_UTF_E\n+00141c60: 5252 4f52 3c2f 636f 6465 3e20 2020 3c2f RROR An UTF-8 de\n+00141ca0: 636f 6469 6e67 2065 7272 6f72 206f 6363 coding error occ\n+00141cb0: 7572 7265 6420 2020 203c 2f74 643e 3c2f urred ..#S\n+00141d10: 4f41 505f 5645 5253 494f 4e4d 4953 4d41 OAP_VERSIONMISMA\n+00141d20: 5443 483c 2f63 6f64 653e 2020 203c 2f74 TCH SOAP version\n+00141d60: 206d 6973 6d61 7463 6820 6f72 206e 6f20 mismatch or no \n+00141d70: 534f 4150 206d 6573 7361 6765 2069 7320 SOAP message is \n+00141d80: 7265 6365 6976 6564 2020 2020 3c2f 7464 received ..\n+00141de0: 2353 4f41 505f 5a4c 4942 5f45 5252 4f52 #SOAP_ZLIB_ERROR\n+00141df0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n+00141e00: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00141e10: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00141e20: 3e41 207a 6c69 6220 6572 726f 7220 6f63 >A zlib error oc\n+00141e30: 6375 7272 6564 2020 203c 2f74 643e 3c2f curred ..

    \n+00141e50: 4120 7374 6174 7573 2063 6f64 6520 6f66 A status code of\n+00141e60: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK<\n+00141e70: 2f63 6f64 653e 2028 7a65 726f 2920 6973 /code> (zero) is\n+00141e80: 2072 6574 7572 6e65 6420 6279 2061 2067 returned by a g\n+00141e90: 534f 4150 2041 5049 2066 756e 6374 696f SOAP API functio\n+00141ea0: 6e20 7768 656e 2074 6865 2066 756e 6374 n when the funct\n+00141eb0: 696f 6e20 6361 6c6c 2077 6173 2073 7563 ion call was suc\n+00141ec0: 6365 7373 6675 6c2c 206f 7468 6572 7769 cessful, otherwi\n+00141ed0: 7365 2061 206e 6f6e 2d7a 6572 6f20 6572 se a non-zero er\n+00141ee0: 726f 7220 636f 6465 2069 7320 7265 7475 ror code is retu\n+00141ef0: 726e 6564 2e20 5468 6520 7374 6174 7573 rned. The status\n+00141f00: 2065 7272 6f72 2063 6f64 6520 6973 2061 error code is a\n+00141f10: 6c73 6f20 7374 6f72 6564 2069 6e20 7468 lso stored in th\n+00141f20: 6520 6375 7272 656e 7420 3c63 6f64 653e e current \n+00141f30: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n+00141f80: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n+00141f90: 6578 7420 6173 203c 636f 6465 3e3c 6120 ext as soap::error. For I\n+00142060: 4f20 616e 6420 736f 636b 6574 2d72 656c O and socket-rel\n+00142070: 6174 6564 2065 7272 6f72 732c 2061 6c73 ated errors, als\n+00142080: 6f20 7468 6520 3c63 6f64 653e 3c61 2063 o the soap\n+00142110: 3a3a 6572 726e 756d 3c2f 613e 3c2f 636f ::errnum variable is \n+00142130: 7365 7420 746f 2074 6865 203c 636f 6465 set to the errno va\n+00142150: 6c75 6520 6f66 2074 6865 2073 7973 7465 lue of the syste\n+00142160: 6d20 6572 726f 7220 666f 7220 6578 616d m error for exam\n+00142170: 706c 6520 7768 656e 2061 203c 636f 6465 ple when a #SOAP_EOF error occurred\n+001421a0: 2e3c 2f70 3e0a 3c70 3e54 6f20 6469 7370 .

    .

    To disp\n+001421b0: 6c61 7920 7468 6520 6572 726f 722c 2075 lay the error, u\n+001421c0: 7365 203c 636f 6465 3e3c 6120 636c 6173 se s\n+00142250: 6f61 705f 7072 696e 745f 6661 756c 7428 oap_print_fault(\n+00142260: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+00142270: 702c 2046 494c 4520 2a66 6429 3c2f 613e p, FILE *fd)\n+00142280: 3c2f 636f 6465 3e20 7768 6572 6520 7468 where th\n+00142290: 6520 6375 7272 656e 7420 7661 6c75 6520 e current value \n+001422a0: 6f66 203c 636f 6465 3e3c 6120 636c 6173 of s\n+00142350: 6f61 703a 3a65 7272 6f72 3c2f 613e 3c2f oap::error is used by\n+00142370: 2074 6865 2066 756e 6374 696f 6e20 746f the function to\n+00142380: 2070 7269 6e74 2074 6865 2065 7272 6f72 print the error\n+00142390: 2074 6f20 7468 6520 7370 6563 6966 6965 to the specifie\n+001423a0: 6420 3c63 6f64 653e 6664 3c2f 636f 6465 d fd file. Alternat\n+001423c0: 6976 656c 792c 2069 6e20 432b 2b20 796f ively, in C++ yo\n+001423d0: 7520 6361 6e20 7573 6520 3c63 6f64 653e u can use \n+001423e0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soa\n+00142470: 705f 7374 7265 616d 5f66 6175 6c74 2873 p_stream_fault(s\n+00142480: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+00142490: 2c20 7374 643a 3a6f 7374 7265 616d 2661 , std::ostream&a\n+001424a0: 6d70 3b20 6f73 293c 2f61 3e3c 2f63 6f64 mp; os) to print the \n+001424c0: 6572 726f 7220 6f6e 2074 6865 2073 7065 error on the spe\n+001424d0: 6369 6669 6564 203c 636f 6465 3e6f 733c cified os<\n+001424e0: 2f63 6f64 653e 206f 7574 7075 7420 7374 /code> output st\n+001424f0: 7265 616d 2e3c 2f70 3e0a 3c70 3e54 6f20 ream.

    .

    To \n+00142500: 6469 7370 6c61 7920 7468 6520 6c6f 6361 display the loca\n+00142510: 7469 6f6e 206f 6620 616e 2058 4d4c 2070 tion of an XML p\n+00142520: 6172 7369 6e67 2061 6e64 2076 616c 6964 arsing and valid\n+00142530: 6174 696f 6e20 6572 726f 722c 2075 7365 ation error, use\n+00142540: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_print_\n+001425f0: 6661 756c 745f 6c6f 6361 7469 6f6e 2873 fault_location(s\n+00142600: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+00142610: 2c20 4649 4c45 202a 6664 293c 2f61 3e3c , FILE *fd)<\n+00142620: 2f63 6f64 653e 206f 7220 3c63 6f64 653e /code> or \n+00142630: 3c61 2063 6c61 7373 3d22 656c 2220 6872 so\n+001426d0: 6170 5f73 7472 6561 6d5f 6661 756c 745f ap_stream_fault_\n+001426e0: 6c6f 6361 7469 6f6e 2873 7472 7563 7420 location(struct \n+001426f0: 736f 6170 202a 736f 6170 2c20 7374 643a soap *soap, std:\n+00142700: 3a6f 7374 7265 616d 2661 6d70 3b20 6f73 :ostream& os\n+00142710: 293c 2f61 3e3c 2f63 6f64 653e 2074 6f20 ) to \n+00142720: 7072 696e 7420 7061 7274 206f 6620 7468 print part of th\n+00142730: 6520 584d 4c20 7769 7468 2074 6865 2065 e XML with the e\n+00142740: 7272 6f72 206c 6f63 6174 696f 6e20 6d61 rror location ma\n+00142750: 726b 6564 2069 6e20 7468 6520 584d 4c20 rked in the XML \n+00142760: 6f75 7470 7574 2e3c 2f70 3e0a 3c70 3e54 output.

    .

    T\n+00142770: 6f20 7361 7665 2074 6865 2065 7272 6f72 o save the error\n+00142780: 2069 6e20 6120 7374 7269 6e67 2062 7566 in a string buf\n+00142790: 6665 7220 3c63 6f64 653e 6275 665b 302e fer buf[0.\n+001427a0: 2e2e 6c65 6e2d 315d 3c2f 636f 6465 3e2c ..len-1],\n+001427b0: 2075 7365 203c 636f 6465 3e3c 6120 636c use soap_spr\n+00142850: 696e 745f 6661 756c 7428 7374 7275 6374 int_fault(struct\n+00142860: 2073 6f61 702a 2c20 6368 6172 202a 6275 soap*, char *bu\n+00142870: 662c 2073 697a 655f 7420 6c65 6e29 3c2f f, size_t len), where\n+00142890: 203c 636f 6465 3e62 7566 3c2f 636f 6465 buf is populated w\n+001428b0: 6974 6820 7468 6520 6661 756c 7420 6d65 ith the fault me\n+001428c0: 7373 6167 6520 7465 726d 696e 6174 696e ssage terminatin\n+001428d0: 6720 7769 7468 2061 203c 636f 6465 3e5c g with a \\\n+001428e0: 303c 2f63 6f64 653e 2e3c 2f70 3e0a 3c70 0.

    .To determine th\n+00142900: 6520 7479 7065 206f 6620 6572 726f 7220 e type of error \n+00142910: 7468 6174 206f 6363 7572 7265 642c 2075 that occurred, u\n+00142920: 7365 3a3c 2f70 3e3c 756c 3e0a 3c6c 693e se:

    .

    An HTTP\n+001435d0: 2073 7461 7475 7320 636f 6465 2069 7320 status code is \n+001435e0: 7265 7475 726e 6564 2077 6865 6e20 7468 returned when th\n+001435f0: 6520 636c 6965 6e74 2066 6169 6c73 2074 e client fails t\n+00143600: 6f20 636f 6e6e 6563 7420 746f 2061 6e20 o connect to an \n+00143610: 4854 5450 2073 6572 7665 7220 616e 6420 HTTP server and \n+00143620: 7468 6520 4854 5450 2073 6572 7665 7220 the HTTP server \n+00143630: 7265 7370 6f6e 7365 2077 6974 6820 616e response with an\n+00143640: 2065 7272 6f72 2e20 5468 6520 6c69 7374 error. The list\n+00143650: 206f 6620 4854 5450 2073 7461 7475 7320 of HTTP status \n+00143660: 636f 6465 7320 6973 2067 6976 656e 2062 codes is given b\n+00143670: 656c 6f77 3a3c 2f70 3e0a 3c74 6162 6c65 elow:

    ...Code \n+001436e0: 3c2f 7468 3e3c 7468 2063 6c61 7373 3d22 Descripti\n+00143710: 6f6e 2020 2020 3c2f 7468 3e3c 2f74 723e on \n+00143720: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..200 <\n+00143770: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00143780: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00143790: 3e4f 4b20 286e 6f20 6572 726f 7229 2020 >OK (no error) \n+001437a0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n+001437d0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001437e0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+001437f0: 3e32 3031 2020 203c 2f74 643e 3c74 6420 >201 Cr\n+00143820: 6561 7465 6420 2020 203c 2f74 643e 3c2f eated ..202 Accepted \n+001438b0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..2\n+00143900: 3033 2020 203c 2f74 643e 3c74 6420 636c 03 Non-\n+00143930: 4175 7468 6f72 6974 6174 6976 6520 496e Authoritative In\n+00143940: 666f 726d 6174 696f 6e20 2020 203c 2f74 formation ..204 \n+001439a0: 203c 2f74 643e 3c74 6420 636c 6173 733d No Conte\n+001439d0: 6e74 2020 2020 3c2f 7464 3e3c 2f74 723e nt \n+001439e0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..205 \n+00143a30: 3c74 6420 636c 6173 733d 226d 6172 6b64 Reset Content \n+00143a60: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n+00143a90: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00143aa0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00143ab0: 3e32 3036 2020 203c 2f74 643e 3c74 6420 >206 Pa\n+00143ae0: 7274 6961 6c20 436f 6e74 656e 7420 2020 rtial Content \n+00143af0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..\n+00143b40: 3330 3020 2020 3c2f 7464 3e3c 7464 2063 300 Mul\n+00143b70: 7469 706c 6520 4368 6f69 6365 7320 2020 tiple Choices \n+00143b80: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..3\n+00143bd0: 3031 2020 203c 2f74 643e 3c74 6420 636c 01 Move\n+00143c00: 6420 5065 726d 616e 656e 746c 7920 2020 d Permanently \n+00143c10: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..\n+00143c60: 3330 3220 2020 3c2f 7464 3e3c 7464 2063 302 Fou\n+00143c90: 6e64 2020 2020 3c2f 7464 3e3c 2f74 723e nd \n+00143ca0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..303 <\n+00143cf0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00143d00: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00143d10: 3e53 6565 204f 7468 6572 2020 2020 3c2f >See Other ..304\n+00143d70: 2020 203c 2f74 643e 3c74 6420 636c 6173 Not Mo\n+00143da0: 6469 6669 6564 2020 2020 3c2f 7464 3e3c dified <\n+00143db0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..305 Use Proxy \n+00143e30: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n+00143e60: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00143e70: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00143e80: 3e33 3037 2020 203c 2f74 643e 3c74 6420 >307 Te\n+00143eb0: 6d70 6f72 6172 7920 5265 6469 7265 6374 mporary Redirect\n+00143ec0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .<\n+00143ed0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00143ee0: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+00143ef0: 3c74 6420 636c 6173 733d 226d 6172 6b64 400 B\n+00143f40: 6164 2052 6571 7565 7374 2020 2020 3c2f ad Request ..401\n+00143fa0: 2020 203c 2f74 643e 3c74 6420 636c 6173 Unauth\n+00143fd0: 6f72 697a 6564 2020 2020 3c2f 7464 3e3c orized <\n+00143fe0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..402 Payment Req\n+00144060: 7569 7265 6420 2020 203c 2f74 643e 3c2f uired ..403 Forbidden \n+001440f0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..\n+00144140: 3430 3420 2020 3c2f 7464 3e3c 7464 2063 404 Not\n+00144170: 2046 6f75 6e64 2020 2020 3c2f 7464 3e3c Found <\n+00144180: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..405 <\n+001441d0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>Method Not\n+00144200: 2041 6c6c 6f77 6564 2020 2020 3c2f 7464 Allowed ..406 \n+00144260: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 Not Accep\n+00144290: 7461 626c 6520 2020 203c 2f74 643e 3c2f table ..407 Proxy Authe\n+00144320: 6e74 6963 6174 696f 6e20 5265 7175 6972 ntication Requir\n+00144330: 6564 2020 2020 3c2f 7464 3e3c 2f74 723e ed \n+00144340: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..408 <\n+00144390: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001443a0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+001443b0: 3e52 6571 7565 7374 2054 696d 652d 6f75 >Request Time-ou\n+001443c0: 7420 2020 203c 2f74 643e 3c2f 7472 3e0a t .\n+001443d0: 3c74 7220 636c 6173 733d 226d 6172 6b64 .409 <\n+00144420: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00144430: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00144440: 3e43 6f6e 666c 6963 7420 2020 203c 2f74 >Conflict ..410 \n+001444a0: 203c 2f74 643e 3c74 6420 636c 6173 733d Gone \n+001444d0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..4\n+00144520: 3131 2020 203c 2f74 643e 3c74 6420 636c 11 Leng\n+00144550: 7468 2052 6571 7569 7265 6420 2020 203c th Required <\n+00144560: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..412\n+001445b0: 2020 203c 2f74 643e 3c74 6420 636c 6173 Precon\n+001445e0: 6469 7469 6f6e 2046 6169 6c65 6420 2020 dition Failed \n+001445f0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..\n+00144640: 3431 3320 2020 3c2f 7464 3e3c 7464 2063 413 Req\n+00144670: 7565 7374 2045 6e74 6974 7920 546f 6f20 uest Entity Too \n+00144680: 4c61 7267 6520 2020 203c 2f74 643e 3c2f Large ..414 Request-URI \n+00144710: 546f 6f20 4c61 7267 6520 2020 203c 2f74 Too Large ..415 \n+00144770: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 Unsuppo\n+001447a0: 7274 6564 204d 6564 6961 2054 7970 6520 rted Media Type \n+001447b0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n+001447e0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001447f0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00144800: 3e34 3136 2020 203c 2f74 643e 3c74 6420 >416 Re\n+00144830: 7175 6573 7465 6420 7261 6e67 6520 6e6f quested range no\n+00144840: 7420 7361 7469 7366 6961 626c 6520 2020 t satisfiable \n+00144850: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..\n+001448a0: 3431 3720 2020 3c2f 7464 3e3c 7464 2063 417 Exp\n+001448d0: 6563 7461 7469 6f6e 2046 6169 6c65 6420 ectation Failed \n+001448e0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n+00144910: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00144920: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00144930: 3e35 3030 2020 203c 2f74 643e 3c74 6420 >500 In\n+00144960: 7465 726e 616c 2053 6572 7665 7220 4572 ternal Server Er\n+00144970: 726f 7220 2020 203c 2f74 643e 3c2f 7472 ror ..501 Not Implement\n+00144a00: 6564 2020 2020 3c2f 7464 3e3c 2f74 723e ed \n+00144a10: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..502 <\n+00144a60: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00144a70: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00144a80: 3e42 6164 2047 6174 6577 6179 2020 2020 >Bad Gateway \n+00144a90: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..5\n+00144ae0: 3033 2020 203c 2f74 643e 3c74 6420 636c 03 Serv\n+00144b10: 6963 6520 556e 6176 6169 6c61 626c 6520 ice Unavailable \n+00144b20: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n+00144b50: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00144b60: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00144b70: 3e35 3034 2020 203c 2f74 643e 3c74 6420 >504 Ga\n+00144ba0: 7465 7761 7920 5469 6d65 2d6f 7574 2020 teway Time-out \n+00144bb0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..<\n+00144be0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00144bf0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00144c00: 3e35 3035 2020 203c 2f74 643e 3c74 6420 >505 HT\n+00144c30: 5450 2056 6572 7369 6f6e 206e 6f74 2073 TP Version not s\n+00144c40: 7570 706f 7274 6564 2020 203c 2f74 643e upported \n+00144c50: 3c2f 7472 3e0a 3c2f 7461 626c 653e 0a3c ..<\n+00144c60: 703e 4854 5450 2073 7461 7475 7320 636f p>HTTP status co\n+00144c70: 6465 2032 3030 2069 7320 6e6f 7420 666c de 200 is not fl\n+00144c80: 6167 6765 6420 6173 2061 6e20 6572 726f agged as an erro\n+00144c90: 7220 6279 2074 6865 2065 6e67 696e 652e r by the engine.\n+00144ca0: 2053 7461 7475 7320 636f 6465 7320 3230 Status codes 20\n+00144cb0: 3120 616e 6420 3230 3220 6172 6520 696e 1 and 202 are in\n+00144cc0: 666f 726d 6174 6976 6520 616e 6420 7368 formative and sh\n+00144cd0: 6f75 6c64 206e 6f74 2062 6520 636f 6e73 ould not be cons\n+00144ce0: 6964 6572 6564 2065 7272 6f72 7320 6279 idered errors by\n+00144cf0: 2074 6865 2061 7070 6c69 6361 7469 6f6e the application\n+00144d00: 206c 6f67 6963 2e3c 2f70 3e0a 3c70 3e53 logic.

    .

    S\n+00144d10: 6572 7665 722d 7369 6465 2069 6d70 6c65 erver-side imple\n+00144d20: 6d65 6e74 6174 696f 6e73 206f 6620 7365 mentations of se\n+00144d30: 7276 6963 6520 6f70 6572 6174 696f 6e73 rvice operations\n+00144d40: 2073 686f 756c 6420 7265 7475 726e 203c should return <\n+00144d50: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK when the op\n+00144d70: 6572 6174 696f 6e20 7761 7320 7375 6363 eration was succ\n+00144d80: 6573 7366 756c 2c20 7768 6963 6820 7265 essful, which re\n+00144d90: 7475 726e 7320 6120 2232 3030 204f 4b22 turns a \"200 OK\"\n+00144da0: 2048 5454 5020 6865 6164 6572 2077 6974 HTTP header wit\n+00144db0: 6820 7468 6520 584d 4c20 7265 7370 6f6e h the XML respon\n+00144dc0: 7365 206d 6573 7361 6765 2e20 5365 7276 se message. Serv\n+00144dd0: 6572 2d73 6964 6520 696d 706c 656d 656e er-side implemen\n+00144de0: 7461 7469 6f6e 7320 6f66 2073 6572 7669 tations of servi\n+00144df0: 6365 206f 7065 7261 7469 6f6e 7320 696e ce operations in\n+00144e00: 2067 534f 4150 206d 6179 2064 6972 6563 gSOAP may direc\n+00144e10: 746c 7920 7265 7475 726e 2061 6e20 4854 tly return an HT\n+00144e20: 5450 2073 7461 7475 7320 636f 6465 2077 TP status code w\n+00144e30: 6865 6e20 616e 2048 5454 502d 7265 6c61 hen an HTTP-rela\n+00144e40: 7465 6420 6572 726f 7220 7368 6f75 6c64 ted error should\n+00144e50: 2062 6520 7265 7475 726e 6564 2e20 466f be returned. Fo\n+00144e60: 7220 6578 616d 706c 652c 203c 636f 6465 r example, return 404 returns \"404 \n+00144e90: 4e6f 7420 466f 756e 6422 2074 6f20 7468 Not Found\" to th\n+00144ea0: 6520 636c 6965 6e74 2061 6e64 2074 6865 e client and the\n+00144eb0: 203c 636f 6465 3e3c 6120 636c 6173 733d soa\n+00144f60: 703a 3a65 7272 6f72 3c2f 613e 3c2f 636f p::error variable is \n+00144f80: 7365 7420 746f 2034 3034 2061 7420 7468 set to 404 at th\n+00144f90: 6520 636c 6965 6e74 2073 6964 652e 3c2f e client side..

    To return \n+00144fb0: 6120 534f 4150 2046 6175 6c74 2066 726f a SOAP Fault fro\n+00144fc0: 6d20 6120 7365 7276 6572 2d73 6964 6520 m a server-side \n+00144fd0: 696d 706c 656d 656e 7461 7469 6f6e 206f implementation o\n+00144fe0: 6620 6120 7365 7276 6963 6520 6f70 6572 f a service oper\n+00144ff0: 6174 696f 6e2c 2075 7365 206f 6e65 206f ation, use one o\n+00145000: 6620 7468 6520 666f 6c6c 6f77 696e 6720 f the following \n+00145010: 6675 6e63 7469 6f6e 7320 746f 2070 6f70 functions to pop\n+00145020: 756c 6174 6520 7468 6520 534f 4150 2046 ulate the SOAP F\n+00145030: 6175 6c74 206d 6573 7361 6765 3a3c 2f70 ault message:

    .

    A recei\n+00145920: 7665 7220 6572 726f 7220 696e 6469 6361 ver error indica\n+00145930: 7465 7320 7468 6174 2074 6865 2073 6572 tes that the ser\n+00145940: 7669 6365 2063 6f75 6c64 206e 6f74 2068 vice could not h\n+00145950: 616e 646c 6520 7468 6520 636c 6965 6e74 andle the client\n+00145960: 2072 6571 7565 7374 2c20 6275 7420 6974 request, but it\n+00145970: 2063 616e 2070 6f73 7369 626c 7920 7265 can possibly re\n+00145980: 636f 7665 7220 6672 6f6d 2074 6865 2065 cover from the e\n+00145990: 7272 6f72 206c 6174 6572 2c20 666f 7220 rror later, for \n+001459a0: 6578 616d 706c 6520 7768 656e 2072 6573 example when res\n+001459b0: 6f75 7263 6573 2061 7265 2074 656d 706f ources are tempo\n+001459c0: 7261 7269 6c79 2075 6e61 7661 696c 6162 rarily unavailab\n+001459d0: 6c65 2e20 4120 7365 6e64 6572 2065 7272 le. A sender err\n+001459e0: 6f72 2069 6e64 6963 6174 6573 2074 6861 or indicates tha\n+001459f0: 7420 7468 6520 636c 6965 6e74 2072 6571 t the client req\n+00145a00: 7565 7374 2069 7320 6661 756c 7479 2061 uest is faulty a\n+00145a10: 6e64 2073 2072 656a 6563 7465 6420 6279 nd s rejected by\n+00145a20: 2074 6865 2073 6572 7669 6365 2e3c 2f70 the service..

    See Section\n+00145a40: 203c 6120 636c 6173 733d 2265 6c22 2068 SOAP Faul\n+00145a70: 7420 7072 6f63 6573 7369 6e67 3c2f 613e t processing\n+00145a80: 2066 6f72 206d 6f72 6520 6465 7461 696c for more detail\n+00145a90: 7320 6f6e 2068 6f77 2074 6f20 7573 6520 s on how to use \n+00145aa0: 7468 6573 6520 6675 6e63 7469 6f6e 732e these functions.\n+00145ab0: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to\n+00145ad0: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten\n+00145ae0: 7473 3c2f 613e 3c2f 703e 0a3c 6831 3e3c ts

    .

    <\n+00145af0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+00145b00: 2069 643d 226d 656d 6f72 7922 3e3c 2f61 id=\"memory\">.Memory managem\n+00145b20: 656e 743c 2f68 313e 0a3c 703e 4d65 6d6f ent

    .

    Memo\n+00145b30: 7279 206d 616e 6167 656d 656e 7420 7769 ry management wi\n+00145b40: 7468 2067 534f 4150 2069 7320 6175 746f th gSOAP is auto\n+00145b50: 6d61 7469 632e 2054 6865 2065 6e67 696e matic. The engin\n+00145b60: 6520 636f 6e74 6578 7420 6d61 6e61 6765 e context manage\n+00145b70: 7320 616c 6c20 6d65 6d6f 7279 2061 6c6c s all memory all\n+00145b80: 6f63 6174 6564 2074 6f20 7365 7269 616c ocated to serial\n+00145b90: 697a 6520 6461 7461 2061 6e64 2066 6f72 ize data and for\n+00145ba0: 2074 656d 706f 7261 7279 2073 746f 7261 temporary stora\n+00145bb0: 6765 2e20 4465 7365 7269 616c 697a 6564 ge. Deserialized\n+00145bc0: 2064 6174 6120 6973 2061 6c6c 6f63 6174 data is allocat\n+00145bd0: 6564 2069 6e20 6d61 6e61 6765 6420 6d65 ed in managed me\n+00145be0: 6d6f 7279 2061 6e64 2064 6174 6120 7374 mory and data st\n+00145bf0: 7275 6374 7572 6573 2063 616e 2062 6520 ructures can be \n+00145c00: 616c 6c6f 6361 7465 6420 696e 206d 616e allocated in man\n+00145c10: 6167 6564 206d 656d 6f72 7920 6279 2074 aged memory by t\n+00145c20: 6865 2075 7365 7220 7768 656e 2064 6573 he user when des\n+00145c30: 6972 6564 2075 7369 6e67 203c 636f 6465 ired using soap_new_T functions gen\n+00145c60: 6572 6174 6564 2062 7920 736f 6170 6370 erated by soapcp\n+00145c70: 7032 2066 6f72 2065 6163 6820 7365 7269 p2 for each seri\n+00145c80: 616c 697a 6162 6c65 2074 7970 6520 3c63 alizable type T. Al\n+00145ca0: 6c20 6d65 6d6f 7279 206d 616e 6167 6564 l memory managed\n+00145cb0: 2062 7920 6120 636f 6e74 6578 7420 6973 by a context is\n+00145cc0: 2064 6561 6c6c 6f63 6174 6564 2077 6974 deallocated wit\n+00145cd0: 6820 3c63 6f64 653e 3c61 2063 6c61 7373 h soap_dest\n+00145d90: 726f 793c 2f61 3e3c 2f63 6f64 653e 2074 roy t\n+00145da0: 6f20 6465 7374 726f 7920 6d61 6e61 6765 o destroy manage\n+00145db0: 6420 432b 2b20 6f62 6a65 6374 7320 616e d C++ objects an\n+00145dc0: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d soap\n+00145e90: 5f65 6e64 3c2f 613e 3c2f 636f 6465 3e20 _end \n+00145ea0: 746f 2064 656c 6574 6520 616c 6c20 6f74 to delete all ot\n+00145eb0: 6865 7220 6d61 6e61 6765 6420 6461 7461 her managed data\n+00145ec0: 2e20 5768 656e 2061 2063 6f6e 7465 7874 . When a context\n+00145ed0: 2069 7320 6669 6e61 6c69 7a65 6420 6f72 is finalized or\n+00145ee0: 2066 7265 6564 2077 6974 6820 3c63 6f64 freed with soap_done(\n+00145fc0: 7374 7275 6374 2073 6f61 702a 293c 2f61 struct soap*) and soap_free(str\n+00146090: 7563 7420 736f 6170 2a29 3c2f 613e 3c2f uct soap*) then manag\n+001460b0: 6564 206d 656d 6f72 7920 6973 206e 6f74 ed memory is not\n+001460c0: 2072 656c 6561 7365 642c 2073 6f20 6974 released, so it\n+001460d0: 2069 7320 696d 706f 7274 616e 7420 746f is important to\n+001460e0: 2063 616c 6c20 7468 6520 6465 616c 6c6f call the deallo\n+001460f0: 6361 7469 6f6e 2066 756e 6374 696f 6e73 cation functions\n+00146100: 2066 6972 7374 2e20 5468 6973 2077 6173 first. This was\n+00146110: 2064 6f6e 6520 746f 2061 6c6c 6f77 206d done to allow m\n+00146120: 616e 6167 6564 2064 6174 6120 746f 206f anaged data to o\n+00146130: 7574 6c69 7665 2074 6865 2063 6f6e 7465 utlive the conte\n+00146140: 7874 2c20 7375 6368 2061 7320 6465 7365 xt, such as dese\n+00146150: 7269 616c 697a 6564 206f 626a 6563 7473 rialized objects\n+00146160: 2c20 6275 7420 7468 6973 2069 7320 7261 , but this is ra\n+00146170: 7265 6c79 2069 6620 6576 6572 2075 7365 rely if ever use\n+00146180: 6420 6265 6361 7573 6520 6465 6c65 7469 d because deleti\n+00146190: 6e67 2074 6865 206f 7574 6c69 7665 6420 ng the outlived \n+001461a0: 6461 7461 2065 7870 6c69 6369 746c 7920 data explicitly \n+001461b0: 6973 2070 726f 6e65 2074 6f20 6d69 7374 is prone to mist\n+001461c0: 616b 6573 2e3c 2f70 3e0a 3c70 3e49 6620 akes.

    .

    If \n+001461d0: 796f 7520 7761 6e74 2074 6f20 6c65 7420 you want to let \n+001461e0: 6465 7365 7269 616c 697a 6564 2064 6174 deserialized dat\n+001461f0: 6120 6f75 746c 6976 6520 6120 3c63 6f64 a outlive a so\n+00146250: 6170 3c2f 613e 3c2f 636f 6465 3e20 636f ap co\n+00146260: 6e74 6578 7420 7468 6174 2079 6f75 2061 ntext that you a\n+00146270: 7265 2061 626f 7574 2074 6f20 6672 6565 re about to free\n+00146280: 2c20 7468 656e 2079 6f75 2063 616e 2064 , then you can d\n+00146290: 656c 6567 6174 6520 6d61 6e61 6765 6d65 elegate manageme\n+001462a0: 6e74 206f 6620 7468 6520 6461 7461 2074 nt of the data t\n+001462b0: 6f20 616e 6f74 6865 7220 3c63 6f64 653e o another \n+001462c0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n+00146310: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n+00146320: 6578 7420 7769 7468 203c 636f 6465 3e3c ext with <\n+00146330: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00146340: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00146350: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga\n+00146360: 6139 3539 6666 3631 3630 3966 3762 3332 a959ff61609f7b32\n+00146370: 3435 3237 6538 3836 3535 6332 3337 3766 4527e88655c2377f\n+00146380: 2220 7469 746c 653d 2244 656c 6567 6174 \" title=\"Delegat\n+00146390: 6520 7468 6520 6465 6c65 7469 6f6e 206f e the deletion o\n+001463a0: 6620 616c 6c20 6d61 6e61 6765 6420 6f62 f all managed ob\n+001463b0: 6a65 6374 7320 616e 6420 6461 7461 2066 jects and data f\n+001463c0: 726f 6d20 7468 6520 7370 6563 6966 6965 rom the specifie\n+001463d0: 6420 736f 6170 2063 6f6e 7465 7874 2074 d soap context t\n+001463e0: 6f20 616e 6f74 6865 7220 736f 6170 2e2e o another soap..\n+001463f0: 2e22 3e73 6f61 705f 6465 6c65 6761 7465 .\">soap_delegate\n+00146400: 5f64 656c 6574 696f 6e28 7374 7275 6374 _deletion(struct\n+00146410: 2073 6f61 7020 2a73 6f61 705f 6672 6f6d soap *soap_from\n+00146420: 2c20 7374 7275 6374 2073 6f61 7020 2a73 , struct soap *s\n+00146430: 6f61 705f 746f 293c 2f61 3e3c 2f63 6f64 oap_to). This moves a\n+00146450: 6c6c 2064 6573 6572 6961 6c69 7a65 6420 ll deserialized \n+00146460: 616e 6420 7465 6d70 6f72 6172 7920 6461 and temporary da\n+00146470: 7461 2074 6f20 7468 6520 6f74 6865 7220 ta to the other \n+00146480: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context \n+001464f0: 736f 6170 5f74 6f3c 2f63 6f64 653e 2c20 soap_to, \n+00146500: 7768 6963 6820 7769 6c6c 2064 656c 6574 which will delet\n+00146510: 6520 6974 7320 6461 7461 2061 6e64 2061 e its data and a\n+00146520: 6c6c 2074 6865 2064 656c 6567 6174 6564 ll the delegated\n+00146530: 2064 6174 6120 6974 2069 7320 7265 7370 data it is resp\n+00146540: 6f6e 7369 626c 6520 666f 7220 7768 656e onsible for when\n+00146550: 2079 6f75 2063 616c 6c20 3c63 6f64 653e you call \n+00146560: 3c61 2063 6c61 7373 3d22 656c 2220 6872 s\n+00146610: 6f61 705f 6465 7374 726f 793c 2f61 3e3c oap_destroy<\n+00146620: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and soap_end. This c\n+00146710: 616e 2062 6520 7061 7274 6963 756c 6172 an be particular\n+00146720: 6c79 2075 7365 6675 6c20 666f 7220 6d61 ly useful for ma\n+00146730: 6b69 6e67 2063 6c69 656e 7420 6361 6c6c king client call\n+00146740: 7320 696e 7369 6465 2061 2073 6572 7665 s inside a serve\n+00146750: 7220 6f70 6572 6174 696f 6e2c 2069 2e65 r operation, i.e\n+00146760: 2e20 6120 6d69 7865 6420 7365 7276 6572 . a mixed server\n+00146770: 2061 6e64 2063 6c69 656e 742e 2054 6865 and client. The\n+00146780: 2063 6c69 656e 7420 6361 6c6c 2069 6e73 client call ins\n+00146790: 6964 6520 7468 6520 7365 7276 6572 206f ide the server o\n+001467a0: 7065 7261 7469 6f6e 2072 6571 7569 7265 peration require\n+001467b0: 7320 6120 6e65 7720 3c63 6f64 653e 3c61 s a new soap contex\n+00146820: 742c 2065 2e67 2e20 636f 7069 6564 2066 t, e.g. copied f\n+00146830: 726f 6d20 7468 6520 7365 7276 6572 2773 rom the server's\n+00146840: 2077 6974 6820 3c63 6f64 653e 3c61 2063 with soap_copy\n+00146900: 3c2f 613e 3c2f 636f 6465 3e2e 2042 6566 . Bef\n+00146910: 6f72 6520 6465 7374 726f 7969 6e67 2074 ore destroying t\n+00146920: 6865 2063 6c69 656e 7420 636f 6e74 6578 he client contex\n+00146930: 7420 7769 7468 203c 636f 6465 3e3c 6120 t with soa\n+001469e0: 705f 6672 6565 3c2f 613e 3c2f 636f 6465 p_free, the data can \n+00146a00: 6265 2064 656c 6567 6174 6564 2074 6f20 be delegated to \n+00146a10: 7468 6520 7365 7276 6572 2773 2063 6f6e the server's con\n+00146a20: 7465 7874 2077 6974 6820 3c63 6f64 653e text with \n+00146a30: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_delegat\n+00146b00: 655f 6465 6c65 7469 6f6e 3c2f 613e 3c2f e_deletion. See for e\n+00146b20: 7861 6d70 6c65 203c 656d 3e3c 636f 6465 xample gsoap/samples/m\n+00146b40: 6173 6875 702f 6d61 7368 7570 7365 7276 ashup/mashupserv\n+00146b50: 6572 2e63 3c2f 636f 6465 3e3c 2f65 6d3e er.c\n+00146b60: 2069 6e20 7468 6520 6753 4f41 5020 736f in the gSOAP so\n+00146b70: 7572 6365 2063 6f64 6520 7061 636b 6167 urce code packag\n+00146b80: 652e 3c2f 703e 0a3c 703e 5468 6520 6675 e.

    .

    The fu\n+00146b90: 6e63 7469 6f6e 7320 7265 6c61 7465 6420 nctions related \n+00146ba0: 746f 206d 656d 6f72 7920 6d61 6e61 6765 to memory manage\n+00146bb0: 6d65 6e74 2062 7920 7468 6520 636f 6e74 ment by the cont\n+00146bc0: 6578 7420 6172 653a 3c2f 703e 0a3c 756c ext are:

    ..
  • void\n+00146be0: 202a 203c 6120 636c 6173 733d 2265 6c22 * soap_malloc\n+00146c90: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+00146ca0: 6170 2c20 7369 7a65 5f74 206e 293c 2f61 ap, size_t n) return \n+00146cc0: 706f 696e 7465 7220 746f 203c 636f 6465 pointer to n bytes \n+00146ce0: 6f66 206d 616e 6167 6564 206d 656d 6f72 of managed memor\n+00146cf0: 792e 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 y.
  • .
  • char * soap_strdup\n+00146d90: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+00146da0: 6170 2c20 636f 6e73 7420 6368 6172 202a ap, const char *\n+00146db0: 7329 3c2f 613e 3c2f 636f 6465 3e20 7265 s) re\n+00146dc0: 7475 726e 2070 6f69 6e74 6572 2074 6f20 turn pointer to \n+00146dd0: 6475 706c 6963 6174 6520 6f66 2073 7472 duplicate of str\n+00146de0: 696e 6720 3c63 6f64 653e 733c 2f63 6f64 ing s in managed me\n+00146e00: 6d6f 7279 2e3c 2f6c 693e 0a3c 6c69 3e3c mory.
  • .
  • <\n+00146e10: 636f 6465 3e63 6861 7220 2a20 3c61 2063 code>char * soa\n+00146ea0: 705f 7773 7472 6475 7028 7374 7275 6374 p_wstrdup(struct\n+00146eb0: 2073 6f61 7020 2a73 6f61 702c 2063 6f6e soap *soap, con\n+00146ec0: 7374 2077 6368 6172 5f74 202a 7329 3c2f st wchar_t *s) return\n+00146ee0: 2070 6f69 6e74 6572 2074 6f20 6475 706c pointer to dupl\n+00146ef0: 6963 6174 6520 6f66 2073 7472 696e 6720 icate of string \n+00146f00: 3c63 6f64 653e 733c 2f63 6f64 653e 2069 s i\n+00146f10: 6e20 6d61 6e61 6765 6420 6d65 6d6f 7279 n managed memory\n+00146f20: 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f 6465 .
  • .
  • T * soap_new_T(\n+00146f40: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+00146f50: 7029 3c2f 636f 6465 3e20 616c 6c6f 6361 p) alloca\n+00146f60: 7465 7320 616e 6420 6465 6661 756c 742d tes and default-\n+00146f70: 696e 6974 6961 6c69 7a65 7320 6461 7461 initializes data\n+00146f80: 206f 6620 7479 7065 203c 636f 6465 3e54 of type T\n+00146f90: 3c2f 636f 6465 3e2c 2043 2b2b 206f 6e6c , C++ onl\n+00146fa0: 792e 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 y.
  • .
  • T * soap_new_T\n+00146fc0: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+00146fd0: 6170 2c20 696e 7420 6e29 3c2f 636f 6465 ap, int n) allocates and \n+00146ff0: 6465 6661 756c 742d 696e 6974 6961 6c69 default-initiali\n+00147000: 7a65 7320 616e 6420 6172 7261 7920 6f66 zes and array of\n+00147010: 2074 7970 6520 3c63 6f64 653e 543c 2f63 type T, where n = -1 \n+00147040: 616c 6c6f 6361 7465 7320 6120 7369 6e67 allocates a sing\n+00147050: 6c65 206e 6f6e 2d61 7272 6179 2076 616c le non-array val\n+00147060: 7565 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f ue.
  • .
  • T * soap_new_\n+00147080: 7365 745f 5428 7374 7275 6374 2073 6f61 set_T(struct soa\n+00147090: 7020 2a73 6f61 702c 206d 312c 202e 2e2e p *soap, m1, ...\n+001470a0: 2c20 6d6e 293c 2f63 6f64 653e 2061 6c6c , mn) all\n+001470b0: 6f63 6174 6573 2061 2073 7472 7563 7420 ocates a struct \n+001470c0: 6f72 2063 6c61 7373 203c 636f 6465 3e54 or class T\n+001470d0: 3c2f 636f 6465 3e20 616e 6420 696e 6974 and init\n+001470e0: 6961 6c69 7a65 7320 6974 7320 6d65 6d62 ializes its memb\n+001470f0: 6572 7320 7769 7468 2074 6865 2076 616c ers with the val\n+00147100: 7565 7320 3c63 6f64 653e 6d31 3c2f 636f ues m1 to mn<\n+00147120: 2f63 6f64 653e 2e3c 2f6c 693e 0a3c 6c69 /code>.
  • .T * soap_\n+00147140: 6e65 775f 7265 715f 5428 7374 7275 6374 new_req_T(struct\n+00147150: 2073 6f61 7020 2a73 6f61 702c 206d 312c soap *soap, m1,\n+00147160: 202e 2e2e 2c20 6d6e 293c 2f63 6f64 653e ..., mn)\n+00147170: 2061 6c6c 6f63 6174 6573 2061 2073 7472 allocates a str\n+00147180: 7563 7420 6f72 2063 6c61 7373 203c 636f uct or class T and \n+001471a0: 696e 6974 6961 6c69 7a65 7320 6974 7320 initializes its \n+001471b0: 7265 7175 6972 6564 206d 656d 6265 7273 required members\n+001471c0: 2077 6974 6820 7468 6520 7661 6c75 6573 with the values\n+001471d0: 203c 636f 6465 3e6d 313c 2f63 6f64 653e m1\n+001471e0: 2074 6f20 3c63 6f64 653e 6d6e 3c2f 636f to mn, required me\n+00147200: 616e 7320 6e6f 6e2d 6f70 7469 6f6e 616c ans non-optional\n+00147210: 206d 656d 6265 7220 6173 2072 6571 7569 member as requi\n+00147220: 7265 6420 6279 2058 4d4c 2076 616c 6964 red by XML valid\n+00147230: 6174 696f 6e20 7768 656e 2074 6869 7320 ation when this \n+00147240: 6461 7461 2069 7320 7365 7269 616c 697a data is serializ\n+00147250: 6564 2069 6e20 584d 4c2e 3c2f 6c69 3e0a ed in XML..\n+00147260: 3c6c 693e 3c63 6f64 653e 766f 6964 203c
  • void <\n+00147270: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00147280: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00147290: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga\n+001472a0: 6637 6430 3137 3631 3631 6539 6465 6633 f7d0176161e9def3\n+001472b0: 3639 3831 6532 3466 6161 3139 3133 6439 6981e24faa1913d9\n+001472c0: 2220 7469 746c 653d 2244 656c 6574 6520 \" title=\"Delete \n+001472d0: 616c 6c20 6479 6e61 6d69 6361 6c6c 792d all dynamically-\n+001472e0: 616c 6c6f 6361 7465 6420 432b 2b20 6f62 allocated C++ ob\n+001472f0: 6a65 6374 7320 6d61 6e61 6765 6420 6279 jects managed by\n+00147300: 2074 6865 2073 7065 6369 6669 6564 2073 the specified s\n+00147310: 6f61 7020 636f 6e74 6578 742e 223e 736f oap context.\">so\n+00147320: 6170 5f64 6573 7472 6f79 2873 7472 7563 ap_destroy(struc\n+00147330: 7420 736f 6170 202a 736f 6170 293c 2f61 t soap *soap) deletes\n+00147350: 2061 6c6c 2063 6f6e 7465 7874 2d6d 616e all context-man\n+00147360: 6167 6564 2043 2b2b 206f 626a 6563 7473 aged C++ objects\n+00147370: 2061 6e64 206d 7573 7420 6265 2063 616c and must be cal\n+00147380: 6c65 6420 6265 666f 7265 203c 636f 6465 led before soap_end.
  • .<\n+00147470: 6c69 3e3c 636f 6465 3e76 6f69 6420 3c61 li>void soap_end(struc\n+00147550: 7420 736f 6170 202a 736f 6170 293c 2f61 t soap *soap) deletes\n+00147570: 2074 656d 706f 7261 7279 2064 6174 6120 temporary data \n+00147580: 616e 6420 616c 6c20 6465 7365 7269 616c and all deserial\n+00147590: 697a 6564 2064 6174 6120 6578 6365 7074 ized data except\n+001475a0: 2043 2b2b 206f 626a 6563 7473 2c20 7365 C++ objects, se\n+001475b0: 6520 6162 6f76 652e 3c2f 6c69 3e0a 3c6c e above..void s\n+00147640: 6f61 705f 6672 6565 5f74 656d 7028 7374 oap_free_temp(st\n+00147650: 7275 6374 2073 6f61 7020 2a73 6f61 7029 ruct soap *soap)\n+00147660: 3c2f 613e 3c2f 636f 6465 3e20 6465 6c65 dele\n+00147670: 7465 7320 7465 6d70 6f72 6172 7920 6461 tes temporary da\n+00147680: 7461 2062 7574 206c 6561 7665 7320 6465 ta but leaves de\n+00147690: 7365 7269 616c 697a 6564 2063 6f6e 7465 serialized conte\n+001476a0: 7874 2d6d 616e 6167 6564 2064 6174 6120 xt-managed data \n+001476b0: 696e 7461 6374 2e3c 2f6c 693e 0a3c 6c69 intact..void \n+00147790: 736f 6170 5f64 6561 6c6c 6f63 2873 7472 soap_dealloc(str\n+001477a0: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+001477b0: 766f 6964 202a 7029 3c2f 613e 3c2f 636f void *p) deallocates \n+001477d0: 636f 6e74 6578 742d 6d61 6e61 6765 6420 context-managed \n+001477e0: 6f62 6a65 6374 7320 6f72 2064 6174 6120 objects or data \n+001477f0: 6174 206c 6f63 6174 696f 6e20 3c63 6f64 at location p in me\n+00147810: 6d6f 7279 2e3c 2f6c 693e 0a3c 6c69 3e3c mory..
  • <\n+00147820: 636f 6465 3e69 6e74 203c 6120 636c 6173 code>int soa\n+001478f0: 705f 756e 6c69 6e6b 2873 7472 7563 7420 p_unlink(struct \n+00147900: 736f 6170 202a 736f 6170 2c20 636f 6e73 soap *soap, cons\n+00147910: 7420 766f 6964 202a 7029 3c2f 613e 3c2f t void *p) unlink obj\n+00147930: 6563 7420 6f72 2064 6174 6120 6174 206c ect or data at l\n+00147940: 6f63 6174 696f 6e20 3c63 6f64 653e 703c ocation p<\n+00147950: 2f63 6f64 653e 2066 726f 6d20 6d61 6e61 /code> from mana\n+00147960: 6765 6d65 6e74 2062 7920 7468 6520 636f gement by the co\n+00147970: 6e74 6578 742c 2074 6869 7320 6f62 6a65 ntext, this obje\n+00147980: 6374 206f 7220 6461 7461 206d 7573 7420 ct or data must \n+00147990: 6265 2064 6561 6c6c 6f63 6174 6564 2062 be deallocated b\n+001479a0: 7920 7468 6520 7573 6572 2e3c 2f6c 693e y the user.
  • \n+001479b0: 0a3c 6c69 3e3c 636f 6465 3e76 6f69 6420 .
  • void \n+001479c0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_done(st\n+00147a90: 7275 6374 2073 6f61 7020 2a73 6f61 7029 ruct soap *soap)\n+00147aa0: 3c2f 613e 3c2f 636f 6465 3e20 6669 6e61 fina\n+00147ab0: 6c69 7a65 7320 7468 6520 636f 6e74 6578 lizes the contex\n+00147ac0: 7420 6275 7420 646f 6573 206e 6f74 2064 t but does not d\n+00147ad0: 656c 6574 6520 616e 7920 6d61 6e61 6765 elete any manage\n+00147ae0: 6420 6f62 6a65 6374 7320 6f72 2064 6174 d objects or dat\n+00147af0: 612e 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 a.
  • .
  • void soap_free\n+00147bb0: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+00147bc0: 6170 293c 2f61 3e3c 2f63 6f64 653e 2066 ap) f\n+00147bd0: 696e 616c 697a 6573 2061 6e64 2066 7265 inalizes and fre\n+00147be0: 6573 2074 6865 2063 6f6e 7465 7874 2028 es the context (\n+00147bf0: 636f 6e74 6578 7473 2061 6c6c 6f63 6174 contexts allocat\n+00147c00: 6564 2077 6974 6820 3c63 6f64 653e 3c61 ed with soap_new or soa\n+00147d60: 705f 636f 7079 3c2f 613e 3c2f 636f 6465 p_copy) but does not \n+00147d80: 6465 6c65 7465 2061 6e79 206d 616e 6167 delete any manag\n+00147d90: 6564 206f 626a 6563 7473 206f 7220 6461 ed objects or da\n+00147da0: 7461 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f ta.
  • .
  • void soap\n+00147e80: 5f64 656c 6567 6174 655f 6465 6c65 7469 _delegate_deleti\n+00147e90: 6f6e 2873 7472 7563 7420 736f 6170 202a on(struct soap *\n+00147ea0: 736f 6170 5f66 726f 6d2c 2073 7472 7563 soap_from, struc\n+00147eb0: 7420 736f 6170 202a 736f 6170 5f74 6f29 t soap *soap_to)\n+00147ec0: 3c2f 613e 3c2f 636f 6465 3e20 6d6f 7665 move\n+00147ed0: 7320 616c 6c20 432b 2b20 6f62 6a65 6374 s all C++ object\n+00147ee0: 732c 2064 6174 612c 2061 6e64 2074 656d s, data, and tem\n+00147ef0: 706f 7261 7279 2064 6174 6120 6d61 6e61 porary data mana\n+00147f00: 6765 6420 6279 2074 6865 203c 636f 6465 ged by the soap_from context to ano\n+00147f30: 7468 6572 2063 6f6e 7465 7874 203c 636f ther context soap_to, which manages\n+00147f60: 2074 6865 2064 6174 6120 756e 7469 6c20 the data until \n+00147f70: 6465 6c65 7465 6420 7769 7468 203c 636f deleted with soap_destroy and soap_end\n+00148120: 3c2f 613e 3c2f 636f 6465 3e2e 3c2f 6c69 ...

    To he\n+00148140: 6c70 2075 6e64 6572 7374 616e 6420 7468 lp understand th\n+00148150: 6520 6469 6666 6572 656e 6365 7320 6265 e differences be\n+00148160: 7477 6565 6e20 6d61 6e61 6765 6420 6f62 tween managed ob\n+00148170: 6a65 6374 732c 206d 616e 6167 6564 2064 jects, managed d\n+00148180: 6174 612c 2061 6e64 206d 616e 6167 6564 ata, and managed\n+00148190: 2074 656d 706f 7261 7279 2064 6174 613a temporary data:\n+001481a0: 2074 656d 706f 7261 7279 2064 6174 6120 temporary data \n+001481b0: 6973 2063 7265 6174 6564 2062 7920 7468 is created by th\n+001481c0: 6520 656e 6769 6e65 2074 6f20 6b65 6570 e engine to keep\n+001481d0: 2074 7261 636b 206f 6620 7468 696e 6773 track of things\n+001481e0: 2c20 7375 6368 2061 7320 6861 7368 2074 , such as hash t\n+001481f0: 6162 6c65 7320 746f 206b 6565 7020 706f ables to keep po\n+00148200: 696e 7465 7220 7265 6665 7265 6e63 6520 inter reference \n+00148210: 696e 666f 726d 6174 696f 6e20 666f 7220 information for \n+00148220: 7365 7269 616c 697a 6174 696f 6e20 616e serialization an\n+00148230: 6420 6861 7368 2074 6162 6c65 7320 746f d hash tables to\n+00148240: 206b 6565 7020 584d 4c20 6964 2f68 7265 keep XML id/hre\n+00148250: 6620 696e 666f 726d 6174 696f 6e20 666f f information fo\n+00148260: 7220 6d75 6c74 692d 7265 6665 7265 6e63 r multi-referenc\n+00148270: 6520 6f62 6a65 6374 2064 6573 6572 6961 e object deseria\n+00148280: 6c69 7a61 7469 6f6e 2e20 4465 7365 7269 lization. Deseri\n+00148290: 616c 697a 6564 2064 6174 6120 6973 2061 alized data is a\n+001482a0: 6c6c 6f63 6174 6564 2062 7920 7468 6520 llocated by the \n+001482b0: 636f 6e74 6578 7420 696e 206d 616e 6167 context in manag\n+001482c0: 6564 206d 656d 6f72 7920 7768 656e 2063 ed memory when c\n+001482d0: 6f6e 7374 7275 6374 696e 6720 6461 7461 onstructing data\n+001482e0: 2073 7472 7563 7475 7265 7320 6279 2064 structures by d\n+001482f0: 6573 6572 6961 6c69 7a69 6e67 2058 4d4c eserializing XML\n+00148300: 2061 6e64 204a 534f 4e20 6d65 7373 6167 and JSON messag\n+00148310: 6573 2e20 4461 7461 2069 7320 7374 6f72 es. Data is stor\n+00148320: 6564 2069 6e20 6d65 6d6f 7279 206d 616e ed in memory man\n+00148330: 6167 6564 2062 7920 7468 6520 636f 6e74 aged by the cont\n+00148340: 6578 7420 7573 696e 6720 6361 6c6c 7320 ext using calls \n+00148350: 746f 203c 636f 6465 3e3c 6120 636c 6173 to soap_\n+00148400: 6d61 6c6c 6f63 3c2f 613e 3c2f 636f 6465 malloc to allocate he\n+00148420: 6170 2073 7061 6365 2077 6974 6820 3c63 ap space with malloc. A tiny bit mo\n+00148450: 7265 2073 7061 6365 2069 7320 616c 6c6f re space is allo\n+00148460: 6361 7465 6420 746f 206b 6565 7020 7472 cated to keep tr\n+00148470: 6163 6b20 6f66 2074 6865 2061 6c6c 6f63 ack of the alloc\n+00148480: 6174 696f 6e73 2061 6e64 2074 6f20 6164 ations and to ad\n+00148490: 6420 6120 2263 616e 6172 7922 2077 6f72 d a \"canary\" wor\n+001484a0: 6420 746f 2064 6574 6563 7420 6865 6170 d to detect heap\n+001484b0: 206d 656d 6f72 7920 6f76 6572 666c 6f77 memory overflow\n+001484c0: 732e 2048 6561 7020 6d65 6d6f 7279 206f s. Heap memory o\n+001484d0: 7665 7266 6c6f 7773 2061 7265 2064 6574 verflows are det\n+001484e0: 6563 7465 6420 7768 656e 2063 6f6e 7465 ected when conte\n+001484f0: 7874 2d6d 616e 6167 6564 2064 6174 6120 xt-managed data \n+00148500: 6973 2064 6561 6c6c 6f63 6174 6564 2077 is deallocated w\n+00148510: 6974 6820 3c63 6f64 653e 3c61 2063 6c61 ith so\n+001485e0: 6170 5f65 6e64 3c2f 613e 3c2f 636f 6465 ap_end. C++ objects a\n+00148600: 7265 2061 6c6c 6f63 6174 6564 2077 6974 re allocated wit\n+00148610: 6820 3c63 6f64 653e 6e65 773c 2f63 6f64 h new instead of malloc and are tracke\n+00148650: 6420 6173 2077 656c 6c2e 2054 6865 7365 d as well. These\n+00148660: 206f 626a 6563 7473 2061 7265 2064 6561 objects are dea\n+00148670: 6c6c 6f63 6174 6564 2077 6974 6820 3c63 llocated with soap_destroy<\n+00148740: 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 3e0a /a>.

    .\n+00148750: 3c70 3e57 6865 6e20 7468 6520 6753 4f41

    When the gSOA\n+00148760: 5020 6170 706c 6963 6174 696f 6e20 6973 P application is\n+00148770: 2063 6f6d 7069 6c65 6420 7769 7468 203c compiled with <\n+00148780: 623e 3c63 6f64 653e 2d44 4445 4255 473c b>-DDEBUG<\n+00148790: 2f63 6f64 653e 3c2f 623e 2075 7369 6e67 /code> using\n+001487a0: 2074 6865 2063 6f6d 7069 6c65 2d74 696d the compile-tim\n+001487b0: 6520 666c 6167 203c 636f 6465 3e23 4445 e flag #DE\n+001487c0: 4255 473c 2f63 6f64 653e 2c20 7468 6520 BUG, the \n+001487d0: 656e 6769 6e65 2072 6570 6f72 7473 206d engine reports m\n+001487e0: 656d 6f72 7920 6c65 616b 7320 7768 6963 emory leaks whic\n+001487f0: 6820 6172 6520 6465 7465 6374 6564 2062 h are detected b\n+00148800: 7920 3c63 6f64 653e 3c61 2063 6c61 7373 y soap\n+001488d0: 5f64 6f6e 653c 2f61 3e3c 2f63 6f64 653e _done\n+001488e0: 2061 6e64 203c 636f 6465 3e3c 6120 636c and soap_\n+00148990: 6672 6565 3c2f 613e 3c2f 636f 6465 3e2e free.\n+001489a0: 2054 6f20 696d 7072 6f76 6520 7468 6520 To improve the \n+001489b0: 6163 6375 7261 6379 206f 6620 6465 7465 accuracy of dete\n+001489c0: 6374 696f 6e2c 206e 6f20 6d65 6d6f 7279 ction, no memory\n+001489d0: 2069 7320 6163 7475 616c 6c79 2066 7265 is actually fre\n+001489e0: 6564 2075 6e74 696c 203c 636f 6465 3e3c ed until <\n+001489f0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00148a00: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00148a10: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga\n+00148a20: 3238 6565 3866 6463 6635 3030 3434 3365 28ee8fdcf500443e\n+00148a30: 3065 3531 3735 3033 3234 6161 3661 3161 0e51750324aa6a1a\n+00148a40: 2220 7469 746c 653d 2246 696e 616c 697a \" title=\"Finaliz\n+00148a50: 6520 7468 6520 6769 7665 6e20 736f 6170 e the given soap\n+00148a60: 2063 6f6e 7465 7874 2c20 692e 652e 2077 context, i.e. w\n+00148a70: 6865 6e20 7468 6520 736f 6170 2063 6f6e hen the soap con\n+00148a80: 7465 7874 2069 7320 7374 6163 6b20 616c text is stack al\n+00148a90: 6c6f 6361 7465 642c 2061 7574 6f6d 6174 located, automat\n+00148aa0: 6963 616c 6c79 2069 6e76 6f6b 6564 2e2e ically invoked..\n+00148ab0: 2e22 3e73 6f61 705f 646f 6e65 3c2f 613e .\">soap_done\n+00148ac0: 3c2f 636f 6465 3e20 6f72 203c 636f 6465 or soap_free are called\n+00148b90: 2074 6f20 6465 7465 6374 206d 656d 6f72 to detect memor\n+00148ba0: 7920 6973 7375 6573 2c20 736f 2061 6e79 y issues, so any\n+00148bb0: 2063 616c 6c73 2074 6f20 3c63 6f64 653e calls to \n+00148bc0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 s\n+00148c70: 6f61 705f 6465 7374 726f 793c 2f61 3e3c oap_destroy<\n+00148c80: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and soap_end are act\n+00148d70: 7561 6c6c 7920 6465 6665 7272 6564 2074 ually deferred t\n+00148d80: 6f20 6265 2065 7865 6375 7465 6420 7768 o be executed wh\n+00148d90: 656e 2074 6865 2063 6f6e 7465 7874 2066 en the context f\n+00148da0: 696e 616c 697a 6573 2e3c 2f70 3e0a 3c70 inalizes.

    .While memory ma\n+00148dc0: 6e61 6765 6d65 6e74 2069 6e20 6753 4f41 nagement in gSOA\n+00148dd0: 5020 6973 2061 7574 6f6d 6174 6963 2c20 P is automatic, \n+00148de0: 6974 2064 6f65 7320 6e6f 7420 656e 666f it does not enfo\n+00148df0: 7263 6520 6974 7320 6f77 6e20 6d65 6d6f rce its own memo\n+00148e00: 7279 206d 616e 6167 656d 656e 7420 706f ry management po\n+00148e10: 6c69 6379 206f 6e20 7468 6520 7573 6572 licy on the user\n+00148e20: 2e20 546f 206d 6f76 6520 6d61 6e61 6765 . To move manage\n+00148e30: 6420 6f62 6a65 6374 7320 616e 6420 6461 d objects and da\n+00148e40: 7461 2069 6e74 6f20 756e 6d61 6e61 6765 ta into unmanage\n+00148e50: 6420 6865 6170 2073 7061 6365 2c20 7468 d heap space, th\n+00148e60: 6520 3c63 6f64 653e 736f 6170 5f64 7570 e soap_dup\n+00148e70: 5f54 3c2f 636f 6465 3e20 6465 6570 2063 _T deep c\n+00148e80: 6f70 7920 6675 6e63 7469 6f6e 7320 6765 opy functions ge\n+00148e90: 6e65 7261 7465 6420 6279 203c 623e 3c63 nerated by soapcpp2 -Ec\n+00148eb0: 3c2f 636f 6465 3e3c 2f62 3e20 6f70 7469 opti\n+00148ec0: 6f6e 203c 623e 3c63 6f64 653e 2d45 633c on -Ec<\n+00148ed0: 2f63 6f64 653e 3c2f 623e 2063 616e 2062 /code> can b\n+00148ee0: 6520 7573 6564 2e20 546f 2064 656c 6574 e used. To delet\n+00148ef0: 6520 6465 6570 2063 6f70 6965 732c 2074 e deep copies, t\n+00148f00: 6865 203c 636f 6465 3e73 6f61 705f 6465 he soap_de\n+00148f10: 6c5f 543c 2f63 6f64 653e 2064 6565 7020 l_T deep \n+00148f20: 6465 6c65 7469 6f6e 2066 756e 6374 696f deletion functio\n+00148f30: 6e73 2067 656e 6572 6174 6564 2062 7920 ns generated by \n+00148f40: 3c62 3e3c 636f 6465 3e73 6f61 7063 7070 soapcpp\n+00148f50: 3220 2d45 643c 2f63 6f64 653e 3c2f 623e 2 -Ed\n+00148f60: 206f 7074 696f 6e20 3c62 3e3c 636f 6465 option -Ed \n+00148f80: 6361 6e20 6265 2075 7365 642e 2041 6674 can be used. Aft\n+00148f90: 6572 2063 6f70 7969 6e67 2074 6865 2075 er copying the u\n+00148fa0: 7375 616c 203c 636f 6465 3e3c 6120 636c sual soap_d\n+00149060: 6573 7472 6f79 3c2f 613e 3c2f 636f 6465 estroy and \n+00149140: 736f 6170 5f65 6e64 3c2f 613e 3c2f 636f soap_end functions re\n+00149160: 6d6f 7665 2074 6865 206d 616e 6167 6564 move the managed\n+00149170: 206f 7269 6769 6e61 6c73 2e20 5365 6520 originals. See \n+00149180: 616c 736f 2053 6563 7469 6f6e 203c 6120 also Section Generating dee\n+001491c0: 7020 636f 7079 2061 6e64 2064 656c 6574 p copy and delet\n+001491d0: 696f 6e20 6675 6e63 7469 6f6e 733c 2f61 ion functions.

    .

    Furthe\n+001491f0: 726d 6f72 652c 2074 6865 206d 656d 6f72 rmore, the memor\n+00149200: 7920 616c 6c6f 6361 7469 6f6e 2066 756e y allocation fun\n+00149210: 6374 696f 6e73 203c 636f 6465 3e6d 616c ctions mal\n+00149220: 6c6f 633c 2f63 6f64 653e 2061 6e64 203c loc and <\n+00149230: 636f 6465 3e6e 6577 3c2f 636f 6465 3e20 code>new \n+00149240: 7573 6564 2062 7920 7468 6520 656e 6769 used by the engi\n+00149250: 6e65 2069 6e74 6572 6e61 6c6c 7920 6361 ne internally ca\n+00149260: 6e20 6265 2072 6570 6c61 6365 6420 7769 n be replaced wi\n+00149270: 7468 206f 7468 6572 2061 6c6c 6f63 6174 th other allocat\n+00149280: 6f72 7320 6279 2064 6566 696e 696e 6720 ors by defining \n+00149290: 3c63 6f64 653e 534f 4150 5f4d 414c 4c4f SOAP_MALLO\n+001492a0: 433c 2f63 6f64 653e 2061 6e64 203c 636f C and SOAP_FREE to replace <\n+001492d0: 636f 6465 3e6d 616c 6c6f 633c 2f63 6f64 code>malloc and fre\n+001492f0: 653c 2f63 6f64 653e 2c20 616e 6420 6465 e, and de\n+00149300: 6669 6e65 203c 636f 6465 3e53 4f41 505f fine SOAP_\n+00149310: 4e45 573c 2f63 6f64 653e 2c20 3c63 6f64 NEW, SOAP_NEW_ARRAY\n+00149330: 3c2f 636f 6465 3e2c 203c 636f 6465 3e53 , S\n+00149340: 4f41 505f 504c 4143 454d 454e 545f 4e45 OAP_PLACEMENT_NE\n+00149350: 573c 2f63 6f64 653e 2c20 616e 6420 3c63 W, and SOAP_DELETE<\n+00149370: 2f63 6f64 653e 2c20 3c63 6f64 653e 534f /code>, SO\n+00149380: 4150 5f44 454c 4554 455f 4152 5241 593c AP_DELETE_ARRAY<\n+00149390: 2f63 6f64 653e 2074 6f20 7265 706c 6163 /code> to replac\n+001493a0: 6520 3c63 6f64 653e 6e65 773c 2f63 6f64 e new and del\n+001493c0: 6574 653c 2f63 6f64 653e 2075 7365 6420 ete used \n+001493d0: 6279 2074 6865 2065 6e67 696e 6520 746f by the engine to\n+001493e0: 2061 6c6c 6f63 6174 6520 6d61 6e61 6765 allocate manage\n+001493f0: 6420 6d65 6d6f 7279 2e20 4f6e 6520 6361 d memory. One ca\n+00149400: 6e20 666f 7220 6578 616d 706c 6520 7573 n for example us\n+00149410: 6520 6120 6761 7262 6167 6520 636f 6c6c e a garbage coll\n+00149420: 6563 746f 7220 7769 7468 2067 534f 4150 ector with gSOAP\n+00149430: 2062 7920 6465 6669 6e69 6e67 2073 7569 by defining sui\n+00149440: 7461 626c 6520 7265 706c 6163 656d 656e table replacemen\n+00149450: 7473 2e3c 2f70 3e0a 3c70 3e4d 6f72 6520 ts.

    .

    More \n+00149460: 696e 666f 726d 6174 696f 6e20 6f6e 206d information on m\n+00149470: 656d 6f72 7920 6d61 6e61 6765 6d65 6e74 emory management\n+00149480: 2063 616e 2062 6520 666f 756e 6420 696e can be found in\n+00149490: 2074 6865 203c 6120 6872 6566 3d22 2e2e the C and C++ XML D\n+001494d0: 6174 6120 4269 6e64 696e 6773 3c2f 613e ata Bindings\n+001494e0: 2064 6f63 756d 656e 7461 7469 6f6e 2074 documentation t\n+001494f0: 6861 7420 6861 7320 7365 7061 7261 7465 hat has separate\n+00149500: 2073 6563 7469 6f6e 7320 6f6e 206d 656d sections on mem\n+00149510: 6f72 7920 6d61 6e61 6765 6d65 6e74 2069 ory management i\n+00149520: 6e20 4320 616e 6420 696e 2043 2b2b 2e3c n C and in C++.<\n+00149530: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

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

    .

    .Intra-clas\n+001495a0: 7320 6d65 6d6f 7279 206d 616e 6167 656d s memory managem\n+001495b0: 656e 743c 2f68 313e 0a3c 703e 5768 656e ent

    .

    When\n+001495c0: 2061 2063 6c61 7373 203c 636f 6465 3e54 a class T\n+001495d0: 3c2f 636f 6465 3e20 6861 7320 6120 3c63 has a struct soap \n+001495f0: 2a20 543a 3a73 6f61 703c 2f63 6f64 653e * T::soap\n+00149600: 206d 656d 6265 7220 6465 636c 6172 6564 member declared\n+00149610: 2069 6e20 616e 2069 6e74 6572 6661 6365 in an interface\n+00149620: 2068 6561 6465 7220 6669 6c65 2066 6f72 header file for\n+00149630: 2073 6f61 7063 7070 322c 2074 6865 6e20 soapcpp2, then \n+00149640: 7468 6973 206d 656d 6265 7220 7769 6c6c this member will\n+00149650: 2062 6520 7365 7420 746f 2070 6f69 6e74 be set to point\n+00149660: 2074 6f20 7468 6520 6375 7272 656e 7420 to the current \n+00149670: 636f 6e74 6578 7420 6279 2074 6865 2064 context by the d\n+00149680: 6573 6572 6961 6c69 7a65 7273 2061 6e64 eserializers and\n+00149690: 2062 7920 7468 6520 3c63 6f64 653e 736f by the so\n+001496a0: 6170 5f64 6566 6175 6c74 3c2f 636f 6465 ap_default method of the \n+001496c0: 636c 6173 7320 616e 6420 6279 2074 6865 class and by the\n+001496d0: 203c 636f 6465 3e73 6f61 705f 6465 6661 soap_defa\n+001496e0: 756c 745f 543c 2f63 6f64 653e 2061 6e64 ult_T and\n+001496f0: 203c 636f 6465 3e73 6f61 705f 6e65 775f soap_new_\n+00149700: 543c 2f63 6f64 653e 2066 756e 6374 696f T functio\n+00149710: 6e73 2066 6f72 2074 6869 7320 636c 6173 ns for this clas\n+00149720: 7320 6e61 6d65 6420 3c63 6f64 653e 543c s named T<\n+00149730: 2f63 6f64 653e 2e20 5468 6973 2073 696d /code>. This sim\n+00149740: 706c 6966 6965 7320 6d65 6d6f 7279 206d plifies memory m\n+00149750: 616e 6167 656d 656e 7420 6279 2063 6c61 anagement by cla\n+00149760: 7373 206d 6574 686f 6473 2074 6861 7420 ss methods that \n+00149770: 616c 6c6f 6361 7465 2064 6174 6120 6173 allocate data as\n+00149780: 736f 6369 6174 6564 2077 6974 6820 7468 sociated with th\n+00149790: 6520 636c 6173 7320 696e 7374 616e 6365 e class instance\n+001497a0: 2074 6861 7420 6d75 7374 2062 6520 6d61 that must be ma\n+001497b0: 6e61 6765 6420 6279 2074 6865 2063 6f6e naged by the con\n+001497c0: 7465 7874 2e3c 2f70 3e0a 3c70 3e43 6f6e text.

    .

    Con\n+001497d0: 7369 6465 7220 666f 7220 6578 616d 706c sider for exampl\n+001497e0: 6520 7468 6520 666f 6c6c 6f77 696e 6720 e the following \n+001497f0: 636c 6173 7320 6465 636c 6172 6174 696f class declaratio\n+00149800: 6e3a 3c2f 703e 0a3c 6469 7620 636c 6173 n:

    .
    <\n+00149830: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00149840: 6f72 6422 3e63 6c61 7373 203c 2f73 7061 ord\">class Class
    .<\n+00149860: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00149870: 3e7b 203c 7370 616e 2063 6c61 7373 3d22 >{ public<\n+00149890: 2f73 7061 6e3e 3a3c 2f64 6976 3e0a 3c64 /span>:
  • .\n+001498b0: 2020 2020 436c 6173 7328 293b 3c2f 6469 Class();.
    ~Class(\n+001498e0: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    <\n+00149900: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00149910: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap *soa\n+001499a0: 703c 2f61 3e3b 3c2f 6469 763e 0a3c 6469 p;
    . \n+001499c0: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha\n+001499e0: 723c 2f73 7061 6e3e 202a 6e61 6d65 3b20 r *name; \n+001499f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    void setName(const char *s);
    .\n+00149a90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    \n+00149ac0: 6368 6172 3c2f 7370 616e 3e20 2a67 6574 char *get\n+00149ad0: 4e61 6d65 2829 3b3c 2f64 6976 3e0a 3c64 Name();
    .\n+00149af0: 7d3b 3c2f 6469 763e 0a3c 2f64 6976 3e3c };
    .
    <\n+00149b00: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+00149b10: 3c70 3e53 696e 6365 2074 6865 203c 636f

    Since the name m\n+00149b30: 656d 6265 7220 6973 2061 2063 6861 7261 ember is a chara\n+00149b40: 6374 6572 2070 6f69 6e74 6572 2074 6f20 cter pointer to \n+00149b50: 6120 7374 7269 6e67 2c20 7768 6572 6520 a string, where \n+00149b60: 7368 6f75 6c64 2077 6520 616c 6c6f 6361 should we alloca\n+00149b70: 7465 2074 6869 7320 7374 7269 6e67 3f20 te this string? \n+00149b80: 496e 206d 6f73 7420 6361 7365 7320 7765 In most cases we\n+00149b90: 2077 696c 6c20 6164 6420 6120 636f 6e73 will add a cons\n+00149ba0: 7472 7563 746f 7220 7468 6174 2069 6e69 tructor that ini\n+00149bb0: 7469 616c 6c79 2073 6574 7320 3c63 6f64 tially sets name to\n+00149bd0: 204e 554c 4c20 616e 6420 6120 6465 7374 NULL and a dest\n+00149be0: 7275 6374 6f72 2074 6861 7420 6465 6c65 ructor that dele\n+00149bf0: 7465 7320 3c63 6f64 653e 6e61 6d65 3c2f tes name when non-N\n+00149c10: 554c 4c2c 206c 696b 6520 736f 3a3c 2f70 ULL, like so:.

    Class:\n+00149c50: 3a43 6c61 7373 2829 203c 2f64 6976 3e0a :Class()
    .\n+00149c60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    soap = \n+00149cc0: 4e55 4c4c 3b3c 2f64 6976 3e0a 3c64 6976 NULL;
    . \n+00149ce0: 6e61 6d65 203d 204e 554c 4c3b 3c2f 6469 name = NULL;.
    }
    .\n+00149d20: 436c 6173 733a 3a7e 436c 6173 7328 2920 Class::~Class() \n+00149d30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    \n+00149d50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i\n+00149d80: 663c 2f73 7061 6e3e 2028 6e61 6d65 293c f (name)<\n+00149d90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    free\n+00149db0: 286e 616d 6529 3b3c 2f64 6976 3e0a 3c64 (name);
    .\n+00149dd0: 7d3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 }
    .
    <\n+00149df0: 703e 486f 7765 7665 722c 2077 6865 6e20 p>However, when \n+00149e00: 696e 7374 616e 6365 7320 6f66 203c 636f instances of Class \n+00149e20: 6172 6520 6465 7365 7269 616c 697a 6564 are deserialized\n+00149e30: 2077 6520 6861 7665 2061 2070 726f 626c we have a probl\n+00149e40: 656d 2077 6974 6820 7468 6973 2061 7070 em with this app\n+00149e50: 726f 6163 6820 6265 6361 7573 6520 3c63 roach because free(name) deletes a \n+00149e80: 6d61 6e61 6765 6420 7374 7269 6e67 2c20 managed string, \n+00149e90: 7768 6963 6820 6973 206d 616e 6167 6564 which is managed\n+00149ea0: 2062 7920 7468 6520 636f 6e74 6578 742e by the context.\n+00149eb0: 2042 6563 6175 7365 2074 6865 2064 6573 Because the des\n+00149ec0: 6572 6961 6c69 7a65 7220 616c 736f 2073 erializer also s\n+00149ed0: 6574 7320 7468 6520 3c63 6f64 653e 736f ets the so\n+00149ee0: 6170 3c2f 636f 6465 3e20 6d65 6d62 6572 ap member\n+00149ef0: 206f 6620 7468 6973 2063 6c61 7373 2c20 of this class, \n+00149f00: 7468 6572 6520 6973 2061 6e20 6561 7379 there is an easy\n+00149f10: 2073 6f6c 7574 696f 6e20 746f 2074 6869 solution to thi\n+00149f20: 7320 7072 6f62 6c65 6d3a 3c2f 703e 0a3c s problem:

    .<\n+00149f30: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+00149f40: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
    Class::~C\n+00149f60: 6c61 7373 2829 203c 2f64 6976 3e0a 3c64 lass()
    .\n+00149f80: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    if \n+00149fc0: 2821 3c61 2063 6c61 7373 3d22 636f 6465 (!soap && nam\n+0014a000: 6529 3c2f 6469 763e 0a3c 6469 7620 636c e)
    .
    f\n+0014a020: 7265 6528 6e61 6d65 293b 3c2f 6469 763e ree(name);
    \n+0014a030: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .

    A\n+0014a6b0: 6e6f 7468 6572 2061 7070 726f 6163 6820 nother approach \n+0014a6c0: 6973 2074 6f20 7573 6520 3c63 6f64 653e is to use \n+0014a6d0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_unlink<\n+0014a7a0: 2f61 3e3c 2f63 6f64 653e 2074 6f20 756e /a> to un\n+0014a7b0: 6c69 6e6b 2064 6174 6120 6d61 6e61 6765 link data manage\n+0014a7c0: 6420 6279 2074 6865 2063 6f6e 7465 7874 d by the context\n+0014a7d0: 2061 6e64 206d 616b 6520 616c 6c20 616c and make all al\n+0014a7e0: 6c6f 6361 7469 6f6e 7320 6578 706c 6963 locations explic\n+0014a7f0: 6974 6c79 3a3c 2f70 3e0a 3c64 6976 2063 itly:

    .
    \n+0014a810: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    Class::~Class(\n+0014a830: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    if (name\n+0014a890: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    {.
    s\n+0014a920: 6f61 705f 756e 6c69 6e6b 3c2f 613e 283c oap_unlink(<\n+0014a930: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0014a940: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0014a950: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+0014a960: 6e61 6d65 293b 203c 7370 616e 2063 6c61 name); // \n+0014a980: 756e 6c69 6e6b 7320 7468 6520 6e61 6d65 unlinks the name\n+0014a990: 2069 6620 736f 6170 2069 7320 6e6f 6e2d if soap is non-\n+0014a9a0: 4e55 4c4c 3c2f 7370 616e 3e3c 2f64 6976 NULL.
    free(nam\n+0014a9d0: 6529 3b3c 2f64 6976 3e0a 3c64 6976 2063 e);
    .
    }<\n+0014a9f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    .\n+0014aa10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    void\n+0014aa40: 3c2f 7370 616e 3e20 436c 6173 733a 3a73 Class::s\n+0014aa50: 6574 4e61 6d65 283c 7370 616e 2063 6c61 etName(con\n+0014aa70: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+0014aaa0: 2a73 293c 2f64 6976 3e0a 3c64 6976 2063 *s)
    .
    {.
    name = s\n+0014aae0: 7472 6475 7028 7329 3b3c 2f64 6976 3e0a trdup(s);
    .\n+0014aaf0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    const <\n+0014ab40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0014ab50: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *getName()<\n+0014ab70: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .\n+0014ab90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re\n+0014abc0: 7475 726e 3c2f 7370 616e 3e20 6e61 6d65 turn name\n+0014abd0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    }.
    .

    The soap_unlink\n+0014ae80: 3c2f 613e 3c2f 636f 6465 3e20 6361 6c6c call\n+0014ae90: 2075 6e6c 696e 6b73 2064 6174 6120 616e unlinks data an\n+0014aea0: 6420 6f62 6a65 6374 7320 6672 6f6d 206d d objects from m\n+0014aeb0: 616e 6167 6564 206d 656d 6f72 792e 2049 anaged memory. I\n+0014aec0: 6e20 7468 6973 2077 6179 203c 636f 6465 n this way \n+0014af80: 736f 6170 5f64 6573 7472 6f79 3c2f 613e soap_destroy\n+0014af90: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and soap_end can be\n+0014b080: 2063 616c 6c65 6420 6c61 7465 7220 6576 called later ev\n+0014b090: 656e 2077 6865 6e20 7468 6973 2063 6c61 en when this cla\n+0014b0a0: 7373 2077 6173 2064 6573 6572 6961 6c69 ss was deseriali\n+0014b0b0: 7a65 642e 3c2f 703e 0a3c 703e f09f 949d zed.

    .

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

    .<\n+0014b0f0: 6831 3e3c 6120 636c 6173 733d 2261 6e63 h1>.Debuggi\n+0014b120: 6e67 3c2f 6831 3e0a 3c70 3e54 6f20 6163 ng.

    To ac\n+0014b130: 7469 7661 7465 2064 6562 7567 6769 6e67 tivate debugging\n+0014b140: 2061 6e64 206d 6573 7361 6765 206c 6f67 and message log\n+0014b150: 6769 6e67 2063 6f6d 7069 6c65 2074 6865 ging compile the\n+0014b160: 2073 6f75 7263 6520 636f 6465 2077 6974 source code wit\n+0014b170: 6820 636f 6d70 696c 652d 7469 6d65 2066 h compile-time f\n+0014b180: 6c61 6720 3c63 6f64 653e 2344 4542 5547 lag #DEBUG\n+0014b190: 3c2f 636f 6465 3e2e 204f 7220 7768 656e . Or when\n+0014b1a0: 2075 7369 6e67 203c 623e 3c63 6f64 653e using \n+0014b1b0: 2d6c 6773 6f61 703c 2f63 6f64 653e 3c2f -lgsoap or -\n+0014b1d0: 6c67 736f 6170 2b2b 3c2f 636f 6465 3e3c lgsoap++<\n+0014b1e0: 2f62 3e20 7468 656e 2072 6569 6e73 7461 /b> then reinsta\n+0014b1f0: 6c6c 2067 534f 4150 2077 6974 6820 3c62 ll gSOAP with ./configu\n+0014b210: 7265 202d 2d65 6e61 626c 652d 6465 6275 re --enable-debu\n+0014b220: 673c 2f63 6f64 653e 3c2f 623e 2061 6e64 g and\n+0014b230: 203c 623e 3c63 6f64 653e 6d61 6b65 3c2f make.

    .<\n+0014b250: 703e 5768 656e 2079 6f75 7220 6753 4f41 p>When your gSOA\n+0014b260: 5020 636c 6965 6e74 206f 7220 7365 7276 P client or serv\n+0014b270: 6572 2061 7070 6c69 6361 7469 6f6e 7320 er applications \n+0014b280: 7275 6e2c 2074 6865 7920 7769 6c6c 206c run, they will l\n+0014b290: 6f67 2074 6865 6972 2061 6374 6976 6974 og their activit\n+0014b2a0: 7920 696e 2074 6872 6565 2073 6570 6172 y in three separ\n+0014b2b0: 6174 6520 6669 6c65 733a 3c2f 703e 0a3c ate files:

    .<\n+0014b2c0: 756c 3e0a 3c6c 693e 3c65 6d3e 3c63 6f64 ul>.
  • SENT.log a concate\n+0014b2f0: 6e61 7469 6f6e 206f 6620 616c 6c20 6d65 nation of all me\n+0014b300: 7373 6167 6573 2073 656e 743c 2f6c 693e ssages sent
  • \n+0014b310: 0a3c 6c69 3e3c 656d 3e3c 636f 6465 3e52 .
  • R\n+0014b320: 4543 562e 6c6f 673c 2f63 6f64 653e 3c2f ECV.log a concatenat\n+0014b340: 696f 6e20 6f66 2061 6c6c 206d 6573 7361 ion of all messa\n+0014b350: 6765 7320 7265 6365 6976 6564 3c2f 6c69 ges received.
  • \n+0014b370: 5445 5354 2e6c 6f67 3c2f 636f 6465 3e3c TEST.log<\n+0014b380: 2f65 6d3e 2061 206c 6f67 206f 6620 7468 /em> a log of th\n+0014b390: 6520 656e 6769 6e65 2773 206f 7065 7261 e engine's opera\n+0014b3a0: 7469 6f6e 733c 2f6c 693e 0a3c 2f75 6c3e tions
  • .\n+0014b3b0: 0a3c 646c 2063 6c61 7373 3d22 7365 6374 .
    WarningThe gSOAP clien\n+0014b3f0: 7420 616e 6420 7365 7276 6572 2061 7070 t and server app\n+0014b400: 6c69 6361 7469 6f6e 7320 7769 6c6c 2072 lications will r\n+0014b410: 756e 2073 6c6f 7720 6475 6520 746f 2064 un slow due to d\n+0014b420: 6562 7567 6769 6e67 2061 6e64 206d 6573 ebugging and mes\n+0014b430: 7361 6765 206c 6f67 6769 6e67 2e3c 2f64 sage logging.
    .

    You c\n+0014b450: 616e 2073 6574 206d 6163 726f 203c 636f an set macro #DEBUG_STAMP<\n+0014b470: 2f63 6f64 653e 2069 6e73 7465 6164 206f /code> instead o\n+0014b480: 6620 3c63 6f64 653e 2344 4542 5547 3c2f f #DEBUG to add tim\n+0014b4a0: 6520 7374 616d 7073 2074 6f20 3c63 6f64 e stamps to TEST.log. This works on\n+0014b4d0: 2061 6c6c 206f 7065 7261 7469 6e67 2073 all operating s\n+0014b4e0: 7973 7465 6d73 2073 7570 706f 7274 696e ystems supportin\n+0014b4f0: 6720 7468 6520 3c63 6f64 653e 6765 7474 g the gett\n+0014b500: 696d 656f 6664 6179 3c2f 636f 6465 3e20 imeofday \n+0014b510: 6675 6e63 7469 6f6e 2e3c 2f70 3e0a 3c70 function.

    .When installing\n+0014b530: 2061 2043 4749 2073 6572 7669 6365 2061 a CGI service a\n+0014b540: 7070 6c69 6361 7469 6f6e 2063 6f6d 7069 pplication compi\n+0014b550: 6c65 6420 7769 7468 2064 6562 7567 6769 led with debuggi\n+0014b560: 6e67 2065 6e61 626c 6564 2c20 7468 6520 ng enabled, the \n+0014b570: 6c6f 6720 6669 6c65 7320 6d61 7920 736f log files may so\n+0014b580: 6d65 7469 6d65 7320 6e6f 7420 6265 2063 metimes not be c\n+0014b590: 7265 6174 6564 2064 7565 2074 6f20 6669 reated due to fi\n+0014b5a0: 6c65 2061 6363 6573 7320 7065 726d 6973 le access permis\n+0014b5b0: 7369 6f6e 2072 6573 7472 6963 7469 6f6e sion restriction\n+0014b5c0: 7320 696d 706f 7365 6420 6f6e 2043 4749 s imposed on CGI\n+0014b5d0: 2061 7070 6c69 6361 7469 6f6e 732e 2054 applications. T\n+0014b5e0: 6f20 6765 7420 6172 6f75 6e64 2074 6869 o get around thi\n+0014b5f0: 732c 2063 7265 6174 6520 656d 7074 7920 s, create empty \n+0014b600: 6c6f 6720 6669 6c65 7320 7769 7468 2075 log files with u\n+0014b610: 6e69 7665 7273 616c 2077 7269 7465 2070 niversal write p\n+0014b620: 6572 6d69 7373 696f 6e73 2e20 4265 2063 ermissions. Be c\n+0014b630: 6172 6566 756c 2061 626f 7574 2074 6865 areful about the\n+0014b640: 2073 6563 7572 6974 7920 696d 706c 6963 security implic\n+0014b650: 6174 696f 6e20 6f66 2074 6869 732e 3c2f ation of this..

    You can ac\n+0014b670: 7475 616c 6c79 2074 6573 7420 6120 4347 tually test a CG\n+0014b680: 4920 7365 7276 6963 6520 6170 706c 6963 I service applic\n+0014b690: 6174 696f 6e20 7769 7468 6f75 7420 6465 ation without de\n+0014b6a0: 706c 6f79 696e 6720 6974 206f 6e20 7468 ploying it on th\n+0014b6b0: 6520 5765 622e 2054 6f20 646f 2074 6869 e Web. To do thi\n+0014b6c0: 732c 2063 7265 6174 6520 7468 6520 4347 s, create the CG\n+0014b6d0: 4920 7365 7276 6963 6520 6170 706c 6963 I service applic\n+0014b6e0: 6174 696f 6e20 616e 6420 7365 6e64 2069 ation and send i\n+0014b6f0: 7420 6120 7265 7175 6573 7420 6d65 7373 t a request mess\n+0014b700: 6167 6520 7573 696e 6720 7265 6469 7265 age using redire\n+0014b710: 6374 696f 6e20 6173 2066 6f6c 6c6f 7773 ction as follows\n+0014b720: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

    ./se\n+0014b740: 7276 6963 652e 6367 6920 266c 743b 206e  rvice.cgi < n\n+0014b750: 732e 6164 642e 7265 712e 786d 6c0a 3c2f  s.add.req.xml.

    this sho\n+0014b770: 756c 6420 6469 7370 6c61 7920 7468 6520 uld display the \n+0014b780: 7365 7276 6963 6520 7265 7370 6f6e 7365 service response\n+0014b790: 206f 6e20 7468 6520 7465 726d 696e 616c on the terminal\n+0014b7a0: 2c20 7768 6572 6520 3c65 6d3e 3c63 6f64 , where ns.add.req.xml\n+0014b7c0: 3c2f 636f 6465 3e3c 2f65 6d3e 2077 6173 was\n+0014b7d0: 2067 656e 6572 6174 6564 2062 7920 736f generated by so\n+0014b7e0: 6170 6370 7032 206f 7220 6120 6d6f 6469 apcpp2 or a modi\n+0014b7f0: 6669 6564 2076 6572 7369 6f6e 206f 6620 fied version of \n+0014b800: 7468 6973 2066 696c 652e 2059 6f75 2063 this file. You c\n+0014b810: 616e 2061 6c73 6f20 7573 6520 6120 3c65 an also use a SENT.log\n+0014b830: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 696c fil\n+0014b840: 6520 7072 6f64 7563 6564 2062 7920 6120 e produced by a \n+0014b850: 636c 6965 6e74 2061 7070 6c69 6361 7469 client applicati\n+0014b860: 6f6e 2074 6f20 7265 6469 7265 6374 2074 on to redirect t\n+0014b870: 6f20 7468 6520 4347 4920 7365 7276 6963 o the CGI servic\n+0014b880: 6520 6170 706c 6963 6174 696f 6e2e 2059 e application. Y\n+0014b890: 6f75 2063 616e 2061 6c73 6f20 7573 6520 ou can also use \n+0014b8a0: 7468 6520 6753 4f41 5020 3c61 2068 7265 the gSOAP Test Messenge\n+0014b8e0: 723c 2f61 3e20 6170 706c 6963 6174 696f r applicatio\n+0014b8f0: 6e20 746f 2067 656e 6572 6174 6520 7261 n to generate ra\n+0014b900: 6e64 6f6d 697a 6564 206d 6573 7361 6765 ndomized message\n+0014b910: 7320 746f 2074 6573 7420 796f 7572 2073 s to test your s\n+0014b920: 6572 7665 7273 2e3c 2f70 3e0a 3c70 3e54 ervers.

    .

    T\n+0014b930: 6865 2066 696c 6520 6e61 6d65 7320 6f66 he file names of\n+0014b940: 2074 6865 206c 6f67 2066 696c 6573 2061 the log files a\n+0014b950: 6e64 2074 6865 206c 6f67 6769 6e67 2061 nd the logging a\n+0014b960: 6374 6976 6974 7920 6361 6e20 6265 2063 ctivity can be c\n+0014b970: 6f6e 7472 6f6c 6c65 6420 6174 2074 6865 ontrolled at the\n+0014b980: 2061 7070 6c69 6361 7469 6f6e 206c 6576 application lev\n+0014b990: 656c 2e20 5468 6973 2061 6c6c 6f77 7320 el. This allows \n+0014b9a0: 7468 6520 6372 6561 7469 6f6e 206f 6620 the creation of \n+0014b9b0: 7365 7061 7261 7465 206c 6f67 2066 696c separate log fil\n+0014b9c0: 6573 2062 7920 7365 7061 7261 7465 2073 es by separate s\n+0014b9d0: 6572 7669 6365 732c 2063 6c69 656e 7473 ervices, clients\n+0014b9e0: 2c20 616e 6420 7468 7265 6164 732e 2046 , and threads. F\n+0014b9f0: 6f72 2065 7861 6d70 6c65 2c20 7468 6520 or example, the \n+0014ba00: 666f 6c6c 6f77 696e 6720 7365 7276 6963 following servic\n+0014ba10: 6520 6c6f 6773 2061 6c6c 206d 6573 7361 e logs all messa\n+0014ba20: 6765 7320 2862 7574 206e 6f20 6465 6275 ges (but no debu\n+0014ba30: 6720 6d65 7373 6167 6573 2920 696e 2073 g messages) in s\n+0014ba40: 6570 6172 6174 6520 6469 7265 6374 6f72 eparate director\n+0014ba50: 6965 733a 3c2f 703e 0a3c 6469 7620 636c ies:

    .
    <\n+0014ba70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0014ba80: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct soap\n+0014bad0: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+0014bb00: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa\n+0014bb60: 705f 6e65 773c 2f61 3e28 293b 203c 2f64 p_new(); ..<\n+0014bce0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0014bcf0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0014bd00: 705f 5f64 6562 7567 2e68 746d 6c23 6761 p__debug.html#ga\n+0014bd10: 3935 3732 3963 3238 6637 3132 6366 3462 95729c28f712cf4b\n+0014bd20: 6361 3331 3235 3935 6235 6365 3236 3837 ca312595b5ce2687\n+0014bd30: 223e 736f 6170 5f73 6574 5f73 656e 745f \">soap_set_sent_\n+0014bd40: 6c6f 6766 696c 653c 2f61 3e28 3c61 2063 logfile(soap, "l\n+0014bda0: 6f67 732f 7365 6e74 2f73 6572 7669 6365 ogs/sent/service\n+0014bdb0: 3132 2e6c 6f67 2671 756f 743b 3c2f 7370 12.log"); // a\n+0014bde0: 7070 656e 6420 616c 6c20 6d65 7373 6167 ppend all messag\n+0014bdf0: 6573 2073 656e 7420 696e 202f 6c6f 6773 es sent in /logs\n+0014be00: 2f73 656e 742f 7365 7276 6963 6531 322e /sent/service12.\n+0014be10: 6c6f 6720 3c2f 7370 616e 3e3c 2f64 6976 log .
    soap_set_\n+0014be90: 7465 7374 5f6c 6f67 6669 6c65 3c2f 613e test_logfile\n+0014bea0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+0014bed0: 2c20 4e55 4c4c 293b 2020 2020 2020 2020 , NULL); \n+0014bee0: 2020 2020 2020 2020 2020 2020 2020 3c73 // no file n\n+0014bf10: 616d 653a 2064 6f20 6e6f 7420 7361 7665 ame: do not save\n+0014bf20: 2064 6562 7567 206d 6573 7361 6765 7320 debug messages \n+0014bf30: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .\n+0014bf50: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... //
    .
    soap\n+0014bfe0: 5f73 6572 7665 3c2f 613e 283c 6120 636c _serve(soap); .
    ... \n+0014c050: 2f2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a //
    .\n+0014c060: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .\n+0014c160: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    voi\n+0014c1f0: 6420 736f 6170 5f73 6574 5f72 6563 765f d soap_set_recv_\n+0014c200: 6c6f 6766 696c 6528 7374 7275 6374 2073 logfile(struct s\n+0014c210: 6f61 7020 2a73 6f61 702c 2063 6f6e 7374 oap *soap, const\n+0014c220: 2063 6861 7220 2a6c 6f67 6669 6c65 293c char *logfile)<\n+0014c230: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Specify \n+0014c250: 6120 6669 6c65 206e 616d 6520 746f 2073 a file name to s\n+0014c260: 6176 6520 6d65 7373 6167 6573 2072 6563 ave messages rec\n+0014c270: 6569 7665 642e 3c2f 6469 763e 3c2f 6469 eived.
    .
    <\n+0014c350: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+0014c360: 6922 3e76 6f69 6420 736f 6170 5f73 6574 i\">void soap_set\n+0014c370: 5f74 6573 745f 6c6f 6766 696c 6528 7374 _test_logfile(st\n+0014c380: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n+0014c390: 2063 6f6e 7374 2063 6861 7220 2a6c 6f67 const char *log\n+0014c3a0: 6669 6c65 293c 2f64 6976 3e3c 6469 7620 file)
    Sp\n+0014c3c0: 6563 6966 7920 6120 6669 6c65 206e 616d ecify a file nam\n+0014c3d0: 6520 746f 2073 6176 6520 6465 6275 6767 e to save debugg\n+0014c3e0: 696e 6720 696e 666f 2e3c 2f64 6976 3e3c ing info.
    <\n+0014c3f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_set_sent\n+0014c4b0: 5f6c 6f67 6669 6c65 3c2f 613e 3c2f 6469 _logfile
    void soap_\n+0014c4e0: 7365 745f 7365 6e74 5f6c 6f67 6669 6c65 set_sent_logfile\n+0014c4f0: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+0014c500: 6170 2c20 636f 6e73 7420 6368 6172 202a ap, const char *\n+0014c510: 6c6f 6766 696c 6529 3c2f 6469 763e 3c64 logfile)
    Specify a file \n+0014c540: 6e61 6d65 2074 6f20 7361 7665 206d 6573 name to save mes\n+0014c550: 7361 6765 7320 7365 6e74 2e3c 2f64 6976 sages sent.
    .
    <\n+0014c580: 703e 4c69 6b65 7769 7365 2c20 6d65 7373 p>Likewise, mess\n+0014c590: 6167 6573 2063 616e 2062 6520 6c6f 6767 ages can be logg\n+0014c5a0: 6564 2066 6f72 2069 6e64 6976 6964 7561 ed for individua\n+0014c5b0: 6c20 636c 6965 6e74 2d73 6964 6520 7365 l client-side se\n+0014c5c0: 7276 6963 6520 6f70 6572 6174 696f 6e20 rvice operation \n+0014c5d0: 6361 6c6c 7320 696e 2061 2063 6c69 656e calls in a clien\n+0014c5e0: 7420 6170 706c 6963 6174 696f 6e2e 3c2f t application..

    To log mes\n+0014c600: 7361 6765 7320 6d6f 7265 2065 6666 6963 sages more effic\n+0014c610: 6965 6e74 6c79 2c20 7573 6520 7468 6520 iently, use the \n+0014c620: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 logging\n+0014c6b0: 3c2f 613e 3c2f 636f 6465 3e20 706c 7567 plug\n+0014c6c0: 696e 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 in.

    .

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

    ..Limita\n+0014c730: 7469 6f6e 733c 2f68 313e 0a3c 703e 4672 tions.

    Fr\n+0014c740: 6f6d 2074 6865 2070 6572 7370 6563 7469 om the perspecti\n+0014c750: 7665 206f 6620 7468 6520 432f 432b 2b20 ve of the C/C++ \n+0014c760: 6c61 6e67 7561 6765 2c20 6120 6665 7720 language, a few \n+0014c770: 432f 432b 2b20 6c61 6e67 7561 6765 2066 C/C++ language f\n+0014c780: 6561 7475 7265 7320 6172 6520 6e6f 7420 eatures are not \n+0014c790: 7375 7070 6f72 7465 6420 6279 2067 534f supported by gSO\n+0014c7a0: 4150 2061 6e64 2074 6865 7365 2066 6561 AP and these fea\n+0014c7b0: 7475 7265 7320 6361 6e6e 6f74 2062 6520 tures cannot be \n+0014c7c0: 7573 6564 2069 6e20 616e 2069 6e74 6572 used in an inter\n+0014c7d0: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file\n+0014c7e0: 2066 6f72 2073 6f61 7063 7070 322e 3c2f for soapcpp2..

      .
    • STL:\n+0014c800: 2074 6865 2073 6f61 7063 7070 3220 746f the soapcpp2 to\n+0014c810: 6f6c 2073 7570 706f 7274 7320 7468 6520 ol supports the \n+0014c820: 7365 7269 616c 697a 6174 696f 6e20 6f66 serialization of\n+0014c830: 2043 2b2b 2073 7472 696e 6773 203c 636f C++ strings std::string and \n+0014c860: 7374 643a 3a77 7374 7269 6e67 3c2f 636f std::wstring and the cont\n+0014c880: 6169 6e65 7273 203c 636f 6465 3e73 7464 ainers std\n+0014c890: 3a3a 6465 7175 653c 2f63 6f64 653e 2c20 ::deque, \n+0014c8a0: 3c63 6f64 653e 7374 643a 3a6c 6973 743c std::list<\n+0014c8b0: 2f63 6f64 653e 2c20 3c63 6f64 653e 7374 /code>, st\n+0014c8c0: 643a 3a76 6563 746f 723c 2f63 6f64 653e d::vector\n+0014c8d0: 2c20 616e 6420 3c63 6f64 653e 7374 643a , and std:\n+0014c8e0: 3a73 6574 3c2f 636f 6465 3e2c 2028 7365 :set, (se\n+0014c8f0: 6520 5365 6374 696f 6e20 3c61 2063 6c61 e Section STL containe\n+0014c930: 7273 3c2f 613e 2029 2e20 416c 736f 203c rs ). Also <\n+0014c940: 636f 6465 3e73 7464 3a3a 7368 6172 6564 code>std::shared\n+0014c950: 5f70 7472 3c2f 636f 6465 3e2c 203c 636f _ptr, std::unique_p\n+0014c970: 7472 3c2f 636f 6465 3e2c 2061 6e64 203c tr, and <\n+0014c980: 636f 6465 3e73 7464 3a3a 6175 746f 5f70 code>std::auto_p\n+0014c990: 7472 3c2f 636f 6465 3e20 6172 6520 7375 tr are su\n+0014c9a0: 7070 6f72 7465 642e 204f 7468 6572 2053 pported. Other S\n+0014c9b0: 544c 2074 7970 6573 2061 7265 206e 6f74 TL types are not\n+0014c9c0: 2073 6572 6961 6c69 7a61 626c 652e 3c2f serializable..
    • Template\n+0014c9e0: 733a 2074 6865 2073 6f61 7063 7070 3220 s: the soapcpp2 \n+0014c9f0: 746f 6f6c 2061 7373 756d 6573 2074 6861 tool assumes tha\n+0014ca00: 7420 7465 6d70 6c61 7465 7320 636c 6173 t templates clas\n+0014ca10: 7365 7320 6861 7665 206f 6e6c 7920 6f6e ses have only on\n+0014ca20: 6520 7465 6d70 6c61 7465 2070 6172 616d e template param\n+0014ca30: 6574 6572 2074 7970 6520 616e 6420 7468 eter type and th\n+0014ca40: 6573 6520 7465 6d70 6c61 7465 7320 6172 ese templates ar\n+0014ca50: 6520 636f 6e74 6169 6e65 7273 206f 6620 e containers of \n+0014ca60: 7661 6c75 6573 206f 6620 7468 6973 2074 values of this t\n+0014ca70: 656d 706c 6174 6520 7061 7261 6d65 7465 emplate paramete\n+0014ca80: 7220 7479 7065 2e20 5468 6973 2074 656d r type. This tem\n+0014ca90: 706c 6174 6520 636c 6173 7320 7368 6f75 plate class shou\n+0014caa0: 6c64 2064 6566 696e 6520 3c63 6f64 653e ld define \n+0014cab0: 6265 6769 6e28 293c 2f63 6f64 653e 2c20 begin(), \n+0014cac0: 3c63 6f64 653e 656e 6428 293c 2f63 6f64 end(), size()\n+0014cae0: 3c2f 636f 6465 3e2c 203c 636f 6465 3e63 , c\n+0014caf0: 6c65 6172 2829 3c2f 636f 6465 3e2c 2061 lear(), a\n+0014cb00: 6e64 203c 636f 6465 3e69 6e73 6572 7428 nd insert(\n+0014cb10: 293c 2f63 6f64 653e 206d 6574 686f 6473 ) methods\n+0014cb20: 2e3c 2f6c 693e 0a3c 6c69 3e49 6e68 6572 .
    • .
    • Inher\n+0014cb30: 6974 616e 6365 3a20 7369 6e67 6c65 2063 itance: single c\n+0014cb40: 6c61 7373 2069 6e68 6572 6974 616e 6365 lass inheritance\n+0014cb50: 2069 7320 7375 7070 6f72 7465 642e 3c2f is supported..
    • Abstract\n+0014cb70: 206d 6574 686f 6473 3a20 6120 636c 6173 methods: a clas\n+0014cb80: 7320 6d75 7374 2062 6520 696e 7374 616e s must be instan\n+0014cb90: 7469 6162 6c65 2074 6f20 7375 7070 6f72 tiable to suppor\n+0014cba0: 7420 7365 7269 616c 697a 6174 696f 6e20 t serialization \n+0014cbb0: 6f66 2074 6861 7420 636c 6173 732e 2041 of that class. A\n+0014cbc0: 6e20 6162 7374 7261 6374 2063 6c61 7373 n abstract class\n+0014cbd0: 2077 6865 6e20 7573 6564 2073 686f 756c when used shoul\n+0014cbe0: 6420 6265 2064 6563 6c61 7265 6420 7472 d be declared tr\n+0014cbf0: 616e 7369 656e 742c 2073 6565 2053 6563 ansient, see Sec\n+0014cc00: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion T\n+0014cc30: 7261 6e73 6965 6e74 2064 6174 6120 7479 ransient data ty\n+0014cc40: 7065 733c 2f61 3e2e 3c2f 6c69 3e0a 3c6c pes.
    • .Directives: di\n+0014cc60: 7265 6374 6976 6573 2061 6e64 2070 7261 rectives and pra\n+0014cc70: 676d 6173 2073 7563 6820 6173 203c 636f gmas such as #include and #de\n+0014cca0: 6669 6e65 3c2f 636f 6465 3e20 6172 6520 fine are \n+0014ccb0: 6d6f 7665 6420 746f 2074 6865 2067 656e moved to the gen\n+0014ccc0: 6572 6174 6564 203c 656d 3e3c 636f 6465 erated soapStub.h source c\n+0014ccf0: 6f64 6520 6279 2073 6f61 7063 7070 322e ode by soapcpp2.\n+0014cd00: 2054 6865 7365 2064 6972 6563 7469 7665 These directive\n+0014cd10: 7320 6172 6520 616c 6c20 706c 6163 6564 s are all placed\n+0014cd20: 2061 7420 7468 6520 746f 7020 6f66 2074 at the top of t\n+0014cd30: 6861 7420 6669 6c65 2c20 7365 6520 3c61 hat file, see The #inclu\n+0014cd70: 6465 2061 6e64 2023 6465 6669 6e65 2064 de and #define d\n+0014cd80: 6972 6563 7469 7665 733c 2f61 3e2e 2055 irectives. U\n+0014cd90: 7365 2074 6865 203c 636f 6465 3e23 696d se the #im\n+0014cda0: 706f 7274 3c2f 636f 6465 3e20 6469 7265 port dire\n+0014cdb0: 6374 6976 6520 746f 2069 6d70 6f72 7420 ctive to import \n+0014cdc0: 696e 7465 7266 6163 6520 6865 6164 6572 interface header\n+0014cdd0: 2066 696c 6573 2069 6e74 6f20 6f74 6865 files into othe\n+0014cde0: 7220 696e 7465 7266 6163 6520 6865 6164 r interface head\n+0014cdf0: 6572 2066 696c 6573 2c20 7365 6520 5365 er files, see Se\n+0014ce00: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction The\n+0014ce30: 2023 696d 706f 7274 2064 6972 6563 7469 #import directi\n+0014ce40: 7665 3c2f 613e 202e 3c2f 6c69 3e0a 3c6c ve ..C and C++ code\n+0014ce60: 2073 7461 7465 6d65 6e74 733a 206e 6f20 statements: no \n+0014ce70: 636f 6465 2073 7461 7465 6d65 6e74 7320 code statements \n+0014ce80: 6172 6520 616c 6c6f 7773 2069 6e20 696e are allows in in\n+0014ce90: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f\n+0014cea0: 696c 6573 2e20 436c 6173 7320 6d65 7468 iles. Class meth\n+0014ceb0: 6f64 7320 7368 6f75 6c64 2062 6520 6465 ods should be de\n+0014cec0: 636c 6172 6564 2077 6974 686f 7574 2063 clared without c\n+0014ced0: 6f64 6520 696e 203c 636f 6465 3e7b 3c2f ode in { and \n+0014cef0: 7d3c 2f63 6f64 653e 2e20 416c 736f 2063 }. Also c\n+0014cf00: 6f6e 7374 7275 6374 6f72 2069 6e69 7469 onstructor initi\n+0014cf10: 616c 697a 6572 7320 6172 6520 6e6f 7420 alizers are not \n+0014cf20: 616c 6c6f 7765 642e 2043 6c61 7373 206d allowed. Class m\n+0014cf30: 6574 686f 6420 696d 706c 656d 656e 7461 ethod implementa\n+0014cf40: 7469 6f6e 7320 7368 6f75 6c64 2062 6520 tions should be \n+0014cf50: 6465 6669 6e65 6420 696e 2061 2073 6570 defined in a sep\n+0014cf60: 6172 6174 6520 432b 2b20 736f 7572 6365 arate C++ source\n+0014cf70: 2066 696c 652e 3c2f 6c69 3e0a 3c6c 693e file..
    • \n+0014cf80: 432b 2b20 7265 6665 7265 6e63 6573 3a20 C++ references: \n+0014cf90: 7468 6573 6520 6361 6e6e 6f74 2062 6520 these cannot be \n+0014cfa0: 7365 7269 616c 697a 6564 2c20 7573 6520 serialized, use \n+0014cfb0: 706f 696e 7465 7273 2069 6e73 7465 6164 pointers instead\n+0014cfc0: 2e3c 2f6c 693e 0a3c 2f75 6c3e 0a3c 703e .
    • .
    .

    \n+0014cfd0: 5468 6520 666f 6c6c 6f77 696e 6720 432f The following C/\n+0014cfe0: 432b 2b20 6461 7461 2074 7970 6573 2072 C++ data types r\n+0014cff0: 6571 7569 7265 2073 6f6d 6520 6174 7465 equire some atte\n+0014d000: 6e74 696f 6e20 746f 2065 6e73 7572 6520 ntion to ensure \n+0014d010: 7468 6579 2063 616e 2062 6520 7365 7269 they can be seri\n+0014d020: 616c 697a 6564 3a3c 2f70 3e0a 3c75 6c3e alized:

    .
    .

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

    .

    \n+0014d6f0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 \n+0014d710: 3c2f 613e 0a41 6476 616e 6365 6420 6665 .Advanced fe\n+0014d720: 6174 7572 6573 3c2f 6831 3e0a 3c70 3ef0 atures

    .

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

    .Internati\n+0014d7a0: 6f6e 616c 697a 6174 696f 6e3c 2f68 323e onalization

    \n+0014d7b0: 0a3c 703e 5265 6775 6c61 7220 382d 6269 .

    Regular 8-bi\n+0014d7c0: 7420 7374 7269 6e67 7320 6361 6e6e 6f74 t strings cannot\n+0014d7d0: 2068 6f6c 6420 7769 6465 2063 6861 7261 hold wide chara\n+0014d7e0: 6374 6572 7320 6f75 7473 6964 6520 6f66 cters outside of\n+0014d7f0: 2074 6865 2063 6861 7261 6374 6572 2072 the character r\n+0014d800: 616e 6765 205b 312c 3235 355d 2e20 4f66 ange [1,255]. Of\n+0014d810: 2063 6f75 7273 6520 796f 7520 6361 6e20 course you can \n+0014d820: 7573 6520 7769 6465 2073 7472 696e 6773 use wide strings\n+0014d830: 2069 6e73 7465 6164 206f 6620 382d 6269 instead of 8-bi\n+0014d840: 7420 7374 7269 6e67 7320 696e 2074 6865 t strings in the\n+0014d850: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n+0014d860: 7220 6669 6c65 2066 6f72 2073 6f61 7063 r file for soapc\n+0014d870: 7070 322e 2041 6c74 6572 6e61 7469 7665 pp2. Alternative\n+0014d880: 6c79 2c20 7365 7420 7468 6520 3c63 6f64 ly, set the #SOAP_C_UTFSTR\n+0014d8a0: 494e 473c 2f63 6f64 653e 206d 6f64 6520 ING mode \n+0014d8b0: 666c 6167 2074 6f20 656e 636f 6465 2077 flag to encode w\n+0014d8c0: 6964 6520 6368 6172 6163 7465 7273 2069 ide characters i\n+0014d8d0: 6e20 382d 6269 7420 7374 7269 6e67 7320 n 8-bit strings \n+0014d8e0: 696e 2055 5446 2d38 2066 6f72 6d61 742e in UTF-8 format.\n+0014d8f0: 3c2f 703e 0a3c 703e 466f 7220 6578 616d

    .

    For exam\n+0014d900: 706c 652c 2074 6865 203c 656d 3e3c 636f ple, the xsd:string string\n+0014d930: 2073 6368 656d 6120 7479 7065 2063 616e schema type can\n+0014d940: 2062 6520 6465 636c 6172 6564 2061 7320 be declared as \n+0014d950: 6120 7769 6465 2d63 6861 7261 6374 6572 a wide-character\n+0014d960: 2073 7472 696e 6720 616e 6420 7573 6564 string and used\n+0014d970: 2073 7562 7365 7175 656e 746c 793a 3c2f subsequently:.

    typedef \n+0014d9d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 wchar_\n+0014d9f0: 743c 2f73 7061 6e3e 202a 7873 645f 5f73 t *xsd__s\n+0014da00: 7472 696e 673b 203c 2f64 6976 3e0a 3c64 tring;
    .\n+0014da20: 3c73 7061 6e20 636c 6173 733d 226b 6579 int ns__myMetho\n+0014da50: 6428 7873 645f 5f73 7472 696e 6720 696e d(xsd__string in\n+0014da60: 7075 742c 2078 7364 5f5f 7374 7269 6e67 put, xsd__string\n+0014da70: 202a 6f75 7470 7574 293b 3c2f 6469 763e *output);
    \n+0014da80: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    To do\n+0014daa0: 2073 6f20 6175 746f 6d61 7469 6361 6c6c so automaticall\n+0014dab0: 7920 7769 7468 2077 7364 6c32 682c 2065 y with wsdl2h, e\n+0014dac0: 6469 7420 3c65 6d3e 3c63 6f64 653e 7479 dit ty\n+0014dad0: 7065 6d61 702e 6461 743c 2f63 6f64 653e pemap.dat\n+0014dae0: 3c2f 656d 3e20 616e 6420 6164 6420 7468 and add th\n+0014daf0: 6520 6c69 6e65 3a20 3c2f 703e 3c70 7265 e line:

    xsd__string = \n+0014db20: 7c20 7763 6861 725f 742a 207c 2077 6368 | wchar_t* | wch\n+0014db30: 6172 5f74 2a0a 3c2f 7072 653e 3c70 3e20 ar_t*.

    \n+0014db40: 6f72 2066 6f72 2043 2b2b 3a20 3c2f 703e or for C++:

    \n+0014db50: 3c70 7265 2063 6c61 7373 3d22 6672 6167
    xsd__strin\n+0014db70: 6720 3d20 7c20 7374 643a 3a77 7374 7269  g = | std::wstri\n+0014db80: 6e67 207c 2073 7464 3a3a 7773 7472 696e  ng | std::wstrin\n+0014db90: 672a 0a3c 2f70 7265 3e3c 703e 2041 6c74  g*.

    Alt\n+0014dba0: 6572 6e61 7469 7665 6c79 2c20 382d 6269 ernatively, 8-bi\n+0014dbb0: 7420 7374 7269 6e67 7320 6361 6e20 686f t strings can ho\n+0014dbc0: 6c64 2055 5446 2d38 2066 6f72 6d61 7474 ld UTF-8 formatt\n+0014dbd0: 6564 2077 6964 6520 6368 6172 6163 7465 ed wide characte\n+0014dbe0: 7273 2077 6865 6e20 7468 6520 3c63 6f64 rs when the #SOAP_C_UTFSTR\n+0014dc00: 494e 473c 2f63 6f64 653e 2066 6c61 6720 ING flag \n+0014dc10: 6973 2065 6e61 626c 6564 2c20 7365 6520 is enabled, see \n+0014dc20: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section Ru\n+0014dc50: 6e2d 7469 6d65 2066 6c61 6773 3c2f 613e n-time flags\n+0014dc60: 202e 2054 6865 2061 7070 6c69 6361 7469 . The applicati\n+0014dc70: 6f6e 2069 7320 7265 7370 6f6e 7369 626c on is responsibl\n+0014dc80: 6520 666f 7220 6669 6c6c 696e 6720 7265 e for filling re\n+0014dc90: 6775 6c61 7220 7374 7269 6e67 7320 7769 gular strings wi\n+0014dca0: 7468 2055 5446 2d38 2063 6f6e 7465 6e74 th UTF-8 content\n+0014dcb0: 2e3c 2f70 3e0a 3c70 3e41 6c73 6f20 7468 .

    .

    Also th\n+0014dcc0: 6520 3c63 6f64 653e 2353 4f41 505f 435f e #SOAP_C_\n+0014dcd0: 4d42 5354 5249 4e47 3c2f 636f 6465 3e20 MBSTRING \n+0014dce0: 666c 6167 2063 616e 2062 6520 7573 6564 flag can be used\n+0014dcf0: 2074 6f20 6163 7469 7661 7465 206d 756c to activate mul\n+0014dd00: 7469 6279 7465 2063 6861 7261 6374 6572 tibyte character\n+0014dd10: 2073 7570 706f 7274 2075 7369 6e67 2074 support using t\n+0014dd20: 6865 2063 7572 7265 6e74 206c 6f63 616c he current local\n+0014dd30: 652e 204d 756c 7469 6279 7465 2073 7570 e. Multibyte sup\n+0014dd40: 706f 7274 2064 6570 656e 6473 206f 6e20 port depends on \n+0014dd50: 7468 6520 6c6f 6361 6c65 2073 6574 7469 the locale setti\n+0014dd60: 6e67 7320 666f 7220 6465 616c 696e 6720 ngs for dealing \n+0014dd70: 7769 7468 2065 7874 656e 6465 6420 6e61 with extended na\n+0014dd80: 7475 7261 6c20 6c61 6e67 7561 6765 2065 tural language e\n+0014dd90: 6e63 6f64 696e 6773 2e3c 2f70 3e0a 3c70 ncodings.

    .Both 8-bit stri\n+0014ddb0: 6e67 7320 616e 6420 7769 6465 2d63 6861 ngs and wide-cha\n+0014ddc0: 7261 6374 6572 2073 7472 696e 6773 2063 racter strings c\n+0014ddd0: 616e 2062 6520 7573 6564 2074 6f67 6574 an be used toget\n+0014dde0: 6865 7220 7769 7468 696e 2061 6e20 6170 her within an ap\n+0014ddf0: 706c 6963 6174 696f 6e2e 2046 6f72 2065 plication. For e\n+0014de00: 7861 6d70 6c65 2c20 7468 6520 666f 6c6c xample, the foll\n+0014de10: 6f77 696e 6720 6865 6164 6572 2066 696c owing header fil\n+0014de20: 6520 6465 636c 6172 6174 696f 6e20 696e e declaration in\n+0014de30: 7472 6f64 7563 6573 2074 776f 2073 7472 troduces two str\n+0014de40: 696e 6720 7363 6865 6d61 2074 7970 6573 ing schema types\n+0014de50: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    typedef wch\n+0014dec0: 6172 5f74 3c2f 7370 616e 3e20 2a78 7364 ar_t *xsd\n+0014ded0: 5f5f 7374 7269 6e67 3b20 3c2f 6469 763e __string;
    \n+0014dee0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    typedef\n+0014df10: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *x\n+0014df40: 7364 5f5f 7374 7269 6e67 5f3b 203c 7370 sd__string_; // trailing &\n+0014df70: 2333 393b 5f26 2333 393b 2061 766f 6964 #39;_' avoid\n+0014df80: 7320 6e61 6d65 2063 6c61 7368 203c 2f73 s name clash
    .
    int ns__myMethod(x\n+0014dfe0: 7364 5f5f 7374 7269 6e67 2069 6e70 7574 sd__string input\n+0014dff0: 2c20 7873 645f 5f73 7472 696e 675f 202a , xsd__string_ *\n+0014e000: 6f75 7470 7574 293b 3c2f 6469 763e 0a3c output);
    .<\n+0014e010: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    Please \n+0014e030: 636f 6e73 756c 7420 7468 6520 5554 462d consult the UTF-\n+0014e040: 3820 7370 6563 6966 6963 6174 696f 6e20 8 specification \n+0014e050: 666f 7220 6465 7461 696c 7320 6f6e 2074 for details on t\n+0014e060: 6865 2055 5446 2d38 2066 6f72 6d61 7420 he UTF-8 format \n+0014e070: 7768 656e 2070 726f 6365 7373 696e 6720 when processing \n+0014e080: 382d 6269 7420 7374 7269 6e67 7320 7769 8-bit strings wi\n+0014e090: 7468 2055 5446 2d38 2063 6f6e 7465 6e74 th UTF-8 content\n+0014e0a0: 2e20 4e6f 7465 2074 6861 7420 7468 6520 . Note that the \n+0014e0b0: 4153 4349 4920 6368 6172 6163 7465 7220 ASCII character \n+0014e0c0: 7365 7420 5b31 2d31 3237 5d20 6973 2061 set [1-127] is a\n+0014e0d0: 2073 7562 7365 7420 6f66 2055 5446 2d38 subset of UTF-8\n+0014e0e0: 2e20 5468 6572 6566 6f72 652c 2077 6974 . Therefore, wit\n+0014e0f0: 6820 7468 6520 3c63 6f64 653e 2353 4f41 h the #SOA\n+0014e100: 505f 435f 5554 4653 5452 494e 473c 2f63 P_C_UTFSTRING flag set, s\n+0014e120: 7472 696e 6773 206d 6179 2068 6f6c 6420 trings may hold \n+0014e130: 4153 4349 4920 6368 6172 6163 7465 7220 ASCII character \n+0014e140: 6461 7461 2061 6e64 2055 5446 2d38 2065 data and UTF-8 e\n+0014e150: 7874 656e 7369 6f6e 732e 3c2f 703e 0a3c xtensions.

    .<\n+0014e160: 703e 5365 6520 616c 736f 203c 6120 6872 p>See also C and C++\n+0014e1a0: 2058 4d4c 2064 6174 6120 6269 6e64 696e XML data bindin\n+0014e1b0: 6773 3c2f 613e 2064 6f63 756d 656e 7461 gs documenta\n+0014e1c0: 7469 6f6e 2066 6f72 206d 6f72 6520 6465 tion for more de\n+0014e1d0: 7461 696c 7320 6f6e 2075 7369 6e67 203c tails on using <\n+0014e1e0: 656d 3e3c 636f 6465 3e74 7970 656d 6170 em>typemap\n+0014e1f0: 2e64 6174 3c2f 636f 6465 3e3c 2f65 6d3e .dat
    \n+0014e200: 2066 6f72 2077 7364 6c32 682e 3c2f 703e for wsdl2h.

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

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

    .

    .Directives.

    An interfac\n+0014e290: 6520 6865 6164 6572 2066 696c 6520 666f e header file fo\n+0014e2a0: 7220 736f 6170 6370 7032 206d 6179 2069 r soapcpp2 may i\n+0014e2b0: 6e63 6c75 6465 203c 636f 6465 3e2f 2f67 nclude //g\n+0014e2c0: 736f 6170 3c2f 636f 6465 3e20 6469 7265 soap dire\n+0014e2d0: 6374 6976 6573 2074 6f20 636f 6e66 6967 ctives to config\n+0014e2e0: 7572 6520 6d65 7373 6167 696e 6720 7072 ure messaging pr\n+0014e2f0: 6f74 6f63 6f6c 7320 7375 6368 2061 7320 otocols such as \n+0014e300: 534f 4150 206f 7220 5245 5354 2c20 746f SOAP or REST, to\n+0014e310: 2061 7373 6f63 6961 7465 2053 4f41 5020 associate SOAP \n+0014e320: 4865 6164 6572 7320 616e 6420 4661 756c Headers and Faul\n+0014e330: 7473 2077 6974 6820 6d65 7373 6167 6573 ts with messages\n+0014e340: 2c20 616e 6420 746f 2073 6574 2070 726f , and to set pro\n+0014e350: 7065 7274 6965 7320 6f66 2074 6865 2057 perties of the W\n+0014e360: 6562 2073 6572 7669 6365 2064 6566 696e eb service defin\n+0014e370: 6564 2069 6e20 7468 6520 736f 6170 6370 ed in the soapcp\n+0014e380: 7032 2d67 656e 6572 6174 6564 2057 5344 p2-generated WSD\n+0014e390: 4c20 616e 6420 5853 4420 6669 6c65 732e L and XSD files.\n+0014e3a0: 2044 6972 6563 7469 7665 7320 666f 7220 Directives for \n+0014e3b0: 736f 6170 6370 7032 2061 7265 2073 7065 soapcpp2 are spe\n+0014e3c0: 6369 6669 6564 2061 7320 3c63 6f64 653e cified as \n+0014e3d0: 2f2f 6773 6f61 703c 2f63 6f64 653e 2d63 //gsoap-c\n+0014e3e0: 6f6d 6d65 6e74 7320 7468 6174 2061 7265 omments that are\n+0014e3f0: 2070 726f 6365 7373 6564 2062 7920 736f processed by so\n+0014e400: 6170 6370 7032 2e3c 2f70 3e0a 3c68 333e apcpp2.

    .

    \n+0014e410: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .Service\n+0014e440: 2064 6972 6563 7469 7665 733c 2f68 333e directives

    \n+0014e450: 0a3c 703e 4120 7365 7276 6963 6520 6469 .

    A service di\n+0014e460: 7265 6374 6976 6520 6d75 7374 2073 7461 rective must sta\n+0014e470: 7274 2061 7420 6120 6e65 7720 6c69 6e65 rt at a new line\n+0014e480: 2061 6e64 2069 7320 6f66 2074 6865 2066 and is of the f\n+0014e490: 6f72 6d3a 3c2f 703e 0a3c 6469 7620 636c orm:

    .
    <\n+0014e4b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0014e4c0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap &\n+0014e4e0: 6c74 3b70 7265 6669 7826 6774 3b20 7365 lt;prefix> se\n+0014e4f0: 7276 6963 6520 266c 743b 7072 6f70 6572 rvice <proper\n+0014e500: 7479 2667 743b 3a20 266c 743b 7661 6c75 ty>: <valu\n+0014e510: 6526 6774 3b3c 2f73 7061 6e3e 3c2f 6469 e>.

    whe\n+0014e540: 7265 203c 636f 6465 3e26 6c74 3b70 7265 re <pre\n+0014e550: 6669 7826 6774 3b3c 2f63 6f64 653e 2069 fix> i\n+0014e560: 7320 7468 6520 584d 4c20 6e61 6d65 7370 s the XML namesp\n+0014e570: 6163 6520 7072 6566 6978 206f 6620 6120 ace prefix of a \n+0014e580: 7365 7276 6963 6520 6269 6e64 696e 672e service binding.\n+0014e590: 2054 6865 203c 636f 6465 3e26 6c74 3b70 The <p\n+0014e5a0: 726f 7065 7274 7926 6774 3b3c 2f63 6f64 roperty> and <\n+0014e5c0: 3b76 616c 7565 2667 743b 3c2f 636f 6465 ;value> fields are one\n+0014e5e0: 206f 6620 7468 6520 666f 6c6c 6f77 696e of the followin\n+0014e5f0: 673a 3c2f 703e 0a3c 7461 626c 6520 636c g:

    .....<\n+0014e6e0: 636f 6465 3e6e 616d 653c 2f63 6f64 653e code>name\n+0014e6f0: 2020 203c 2f74 643e 3c74 6420 636c 6173 .\n+0014e770: 3c74 7220 636c 6173 733d 226d 6172 6b64 ...\n+0014e910: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..a\n+0014e990: 6e20 616c 6961 7320 666f 7220 7468 6520 n alias for the \n+0014e9a0: 3c63 6f64 653e 646f 6375 6d65 6e74 6174 documentat\n+0014e9b0: 696f 6e3c 2f63 6f64 653e 2070 726f 7065 ion prope\n+0014e9c0: 7274 7920 2020 203c 2f74 643e 3c2f 7472 rty ..<\n+0014ea30: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0014ea40: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0014ea50: 3e3c 636f 6465 3e64 6f63 756d 656e 743c >document<\n+0014ea60: 2f63 6f64 653e 2028 6465 6661 756c 7429 /code> (default)\n+0014ea70: 2053 4f41 5020 6d65 7373 6167 696e 6720 SOAP messaging \n+0014ea80: 7374 796c 6520 6f72 203c 636f 6465 3e72 style or r\n+0014ea90: 7063 3c2f 636f 6465 3e20 666f 7220 534f pc for SO\n+0014eaa0: 4150 2052 5043 2020 2020 3c2f 7464 3e3c AP RPC <\n+0014eab0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>....<\n+0014ebc0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0014ebd0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0014ebe0: 3e3c 636f 6465 3e70 726f 746f 636f 6c3c >protocol<\n+0014ebf0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n+0014ec20: 7370 6563 6966 6965 7320 534f 4150 206f specifies SOAP o\n+0014ec30: 7220 5245 5354 2c20 7365 6520 6265 6c6f r REST, see belo\n+0014ec40: 7720 2020 203c 2f74 643e 3c2f 7472 3e0a w .\n+0014ec50: 3c74 7220 636c 6173 733d 226d 6172 6b64 .U\n+0014ecd0: 524c 206f 6620 7468 6520 7365 7276 6963 RL of the servic\n+0014ece0: 6520 656e 6470 6f69 6e74 2c20 7573 7561 e endpoint, usua\n+0014ecf0: 6c6c 7920 616e 2068 7474 7020 6f72 2068 lly an http or h\n+0014ed00: 7474 7073 2061 6464 7265 7373 2c20 746f ttps address, to\n+0014ed10: 2075 7365 2069 6e20 7468 6520 5753 444c use in the WSDL\n+0014ed20: 2064 6566 696e 6974 696f 6e73 2f73 6572 definitions/ser\n+0014ed30: 7669 6365 2f70 6f72 742f 6164 6472 6573 vice/port/addres\n+0014ed40: 732f 406c 6f63 6174 696f 6e20 2020 203c s/@location <\n+0014ed50: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..\n+0014ee10: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..........\n+0014f1c0: 3c63 6f64 653e 706f 7274 5479 7065 3c2f portType a\n+0014f200: 6e20 616c 6961 7320 666f 7220 7468 6520 n alias for the \n+0014f210: 3c63 6f64 653e 7479 7065 3c2f 636f 6465 type property (portType follows SOAP 1\n+0014f250: 2e31 206e 616d 696e 6720 636f 6e76 656e .1 naming conven\n+0014f260: 7469 6f6e 7329 2020 2020 3c2f 7464 3e3c tions) <\n+0014f270: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>...<\n+0014f370: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+0014f380: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+0014f390: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .<\n+0014f3d0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0014f3e0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0014f3f0: 3e6e 616d 6520 6f66 2074 6865 2057 5344 >name of the WSD\n+0014f400: 4c20 6465 6669 6e69 7469 6f6e 732f 6269 L definitions/bi\n+0014f410: 6e64 696e 672f 406e 616d 6520 2020 203c nding/@name <\n+0014f420: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>....n\n+0014f570: 616d 6520 6f66 2074 6865 2022 6578 6563 ame of the \"exec\n+0014f580: 7574 6162 6c65 2220 746f 2075 7365 2069 utable\" to use i\n+0014f590: 6e20 7468 6520 5753 444c 2064 6566 696e n the WSDL defin\n+0014f5a0: 6974 696f 6e73 2f73 6572 7669 6365 2f70 itions/service/p\n+0014f5b0: 6f72 742f 6164 6472 6573 732f 406c 6f63 ort/address/@loc\n+0014f5c0: 6174 696f 6e20 2020 3c2f 7464 3e3c 2f74 ation .
    property \n+0014e660: 203c 2f74 683e 3c74 6820 636c 6173 733d value \n+0014e690: 203c 2f74 683e 3c2f 7472 3e0a 3c74 7220
    name o\n+0014e720: 6620 7468 6520 7365 7276 6963 652c 206f f the service, o\n+0014e730: 7074 696f 6e61 6c6c 7920 666f 6c6c 6f77 ptionally follow\n+0014e740: 6564 2062 7920 7465 7874 2064 6573 6372 ed by text descr\n+0014e750: 6962 696e 6720 7468 6520 7365 7276 6963 ibing the servic\n+0014e760: 6520 2020 203c 2f74 643e 3c2f 7472 3e0a e
    namesp\n+0014e7c0: 6163 653c 2f63 6f64 653e 2020 203c 2f74 ace URI of the W\n+0014e800: 5344 4c20 7461 7267 6574 4e61 6d65 7370 SDL targetNamesp\n+0014e810: 6163 6520 2020 203c 2f74 643e 3c2f 7472 ace
    docum\n+0014e870: 656e 7461 7469 6f6e 3c2f 636f 6465 3e20 entation \n+0014e880: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 text de\n+0014e8b0: 7363 7269 6269 6e67 2074 6865 2073 6572 scribing the ser\n+0014e8c0: 7669 6365 2028 7365 6520 616c 736f 2074 vice (see also t\n+0014e8d0: 6865 203c 636f 6465 3e6e 616d 653c 2f63 he name property), \n+0014e8f0: 6d75 6c74 6970 6c65 2070 6572 6d69 7474 multiple permitt\n+0014e900: 6564 2020 2020 3c2f 7464 3e3c 2f74 723e ed
    doc
    style\n+0014ea20: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    e\n+0014eb00: 6e63 6f64 696e 673c 2f63 6f64 653e 2020 ncoding \n+0014eb10: 203c 2f74 643e 3c74 6420 636c 6173 733d li\n+0014eb40: 7465 7261 6c3c 2f63 6f64 653e 2028 6465 teral (de\n+0014eb50: 6661 756c 7429 2c20 3c63 6f64 653e 656e fault), en\n+0014eb60: 636f 6465 643c 2f63 6f64 653e 2066 6f72 coded for\n+0014eb70: 2053 4f41 5020 656e 636f 6469 6e67 2c20 SOAP encoding, \n+0014eb80: 6f72 2061 2063 7573 746f 6d20 5552 4920 or a custom URI \n+0014eb90: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    port
    location an a\n+0014ede0: 6c69 6173 2066 6f72 2074 6865 203c 636f lias for the port p\n+0014ee00: 726f 7065 7274 7920 2020 203c 2f74 643e roperty
    \n+0014ee60: 656e 6470 6f69 6e74 3c2f 636f 6465 3e20 endpoint \n+0014ee70: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 an alia\n+0014eea0: 7320 666f 7220 7468 6520 3c63 6f64 653e s for the \n+0014eeb0: 706f 7274 3c2f 636f 6465 3e20 7072 6f70 port prop\n+0014eec0: 6572 7479 2020 2020 3c2f 7464 3e3c 2f74 erty
    tran\n+0014ef20: 7370 6f72 743c 2f63 6f64 653e 2020 203c sport <\n+0014ef30: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>URI declar\n+0014ef60: 6174 696f 6e20 6f66 2074 6865 2074 7261 ation of the tra\n+0014ef70: 6e73 706f 7274 2c20 7573 7561 6c6c 7920 nsport, usually \n+0014ef80: 3c63 6f64 653e 3c61 2068 7265 663d 2268 http://sche\n+0014efc0: 6d61 732e 786d 6c73 6f61 702e 6f72 672f mas.xmlsoap.org/\n+0014efd0: 736f 6170 2f68 7474 703c 2f61 3e3c 2f63 soap/http
    def\n+0014f040: 696e 6974 696f 6e73 3c2f 636f 6465 3e20 initions \n+0014f050: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 name of\n+0014f080: 2074 6865 2057 5344 4c20 6465 6669 6e69 the WSDL defini\n+0014f090: 7469 6f6e 732f 406e 616d 6520 2020 203c tions/@name <\n+0014f0a0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    type \n+0014f100: 203c 2f74 643e 3c74 6420 636c 6173 733d name of \n+0014f130: 7468 6520 5753 444c 2064 6566 696e 6974 the WSDL definit\n+0014f140: 696f 6e73 2f70 6f72 7454 7970 652f 406e ions/portType/@n\n+0014f150: 616d 6520 2857 5344 4c32 2e30 2069 6e74 ame (WSDL2.0 int\n+0014f160: 6572 6661 6365 2f40 6e61 6d65 2920 2020 erface/@name) \n+0014f170: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    in\n+0014f2c0: 7465 7266 6163 653c 2f63 6f64 653e 2020 terface \n+0014f2d0: 203c 2f74 643e 3c74 6420 636c 6173 733d an alias\n+0014f300: 2066 6f72 2074 6865 203c 636f 6465 3e74 for the t\n+0014f310: 7970 653c 2f63 6f64 653e 2070 726f 7065 ype prope\n+0014f320: 7274 7920 283c 636f 6465 3e69 6e74 6572 rty (inter\n+0014f330: 6661 6365 3c2f 636f 6465 3e20 666f 6c6c face foll\n+0014f340: 6f77 7320 534f 4150 2031 2e32 206e 616d ows SOAP 1.2 nam\n+0014f350: 696e 6720 636f 6e76 656e 7469 6f6e 7329 ing conventions)\n+0014f360: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    binding\n+0014f3c0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    portName name\n+0014f4b0: 206f 6620 7468 6520 5753 444c 2064 6566 of the WSDL def\n+0014f4c0: 696e 6974 696f 6e73 2f73 6572 7669 6365 initions/service\n+0014f4d0: 2f70 6f72 742f 406e 616d 6520 2020 203c /port/@name <\n+0014f4e0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    executable
    .

    T\n+0014f5e0: 6865 2073 6572 7669 6365 203c 636f 6465 he service name and\n+0014f600: 203c 636f 6465 3e6e 616d 6573 7061 6365 namespace\n+0014f610: 3c2f 636f 6465 3e20 7072 6f70 6572 7469 properti\n+0014f620: 6573 2061 7265 2072 6571 7569 7265 6420 es are required \n+0014f630: 696e 206f 7264 6572 2074 6f20 6765 6e65 in order to gene\n+0014f640: 7261 7465 2061 2076 616c 6964 2057 5344 rate a valid WSD\n+0014f650: 4c20 7769 7468 2073 6f61 7063 7070 322e L with soapcpp2.\n+0014f660: 2054 6865 206f 7468 6572 2070 726f 7065 The other prope\n+0014f670: 7274 6965 7320 6172 6520 6f70 7469 6f6e rties are option\n+0014f680: 616c 2e3c 2f70 3e0a 3c70 3e54 6865 203c al.

    .

    The <\n+0014f690: 636f 6465 3e73 7479 6c65 3c2f 636f 6465 code>style and enco\n+0014f6b0: 6469 6e67 3c2f 636f 6465 3e20 7072 6f70 ding prop\n+0014f6c0: 6572 7479 2064 6566 6175 6c74 7320 6172 erty defaults ar\n+0014f6d0: 6520 6368 616e 6765 6420 7769 7468 203c e changed with <\n+0014f6e0: 623e 3c63 6f64 653e 736f 6170 6370 7032 b>soapcpp2\n+0014f6f0: 202d 653c 2f63 6f64 653e 3c2f 623e 206f -e o\n+0014f700: 7074 696f 6e20 3c62 3e3c 636f 6465 3e2d ption -\n+0014f710: 653c 2f63 6f64 653e 3c2f 623e 2074 6f20 e to \n+0014f720: 3c63 6f64 653e 7270 633c 2f63 6f64 653e rpc\n+0014f730: 2061 6e64 203c 636f 6465 3e65 6e63 6f64 and encod\n+0014f740: 6564 3c2f 636f 6465 3e2e 3c2f 703e 0a3c ed.

    .<\n+0014f750: 703e 596f 7520 6361 6e20 6f76 6572 7269 p>You can overri\n+0014f760: 6465 2074 6865 203c 636f 6465 3e70 6f72 de the por\n+0014f770: 743c 2f63 6f64 653e 2065 6e64 706f 696e t endpoin\n+0014f780: 7420 5552 4c20 6174 2072 756e 7469 6d65 t URL at runtime\n+0014f790: 2069 6e20 7468 6520 6175 746f 2d67 656e in the auto-gen\n+0014f7a0: 6572 6174 6564 203c 636f 6465 3e73 6f61 erated soa\n+0014f7b0: 705f 6361 6c6c 5f70 7265 6669 785f 5f66 p_call_prefix__f\n+0014f7c0: 756e 633c 2f63 6f64 653e 2073 6572 7669 unc servi\n+0014f7d0: 6365 2063 616c 6c20 2843 2f43 2b2b 2063 ce call (C/C++ c\n+0014f7e0: 6c69 656e 7420 7369 6465 2920 616e 6420 lient side) and \n+0014f7f0: 696e 2074 6865 2043 2b2b 2070 726f 7879 in the C++ proxy\n+0014f800: 2063 6c61 7373 2073 6572 7669 6365 2063 class service c\n+0014f810: 616c 6c2e 3c2f 703e 0a3c 703e 5072 6f74 all.

    .

    Prot\n+0014f820: 6f63 6f6c 2070 726f 7065 7274 7920 7661 ocol property va\n+0014f830: 6c75 6573 2061 7265 3a3c 2f70 3e0a 3c74 lues are:

    ...pro\n+0014f8a0: 746f 636f 6c20 7661 6c75 6520 2020 3c2f tocol value description\n+0014f8e0: 2020 2020 3c2f 7468 3e3c 2f74 723e 0a3c .<\n+0014f8f0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+0014f900: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd\">.\n+0014f910: 3c74 6420 636c 6173 733d 226d 6172 6b64 SOAP SOA\n+0014f970: 5020 7472 616e 7370 6f72 742c 2073 7570 P transport, sup\n+0014f980: 706f 7274 696e 6720 626f 7468 2053 4f41 porting both SOA\n+0014f990: 5020 312e 3120 616e 6420 312e 3220 2020 P 1.1 and 1.2 \n+0014f9a0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..\n+0014f9f0: 3c63 6f64 653e 534f 4150 312e 313c 2f63 SOAP1.1 SO\n+0014fa30: 4150 2031 2e31 2074 7261 6e73 706f 7274 AP 1.1 transport\n+0014fa40: 2028 7361 6d65 2061 7320 3c63 6f64 653e (same as \n+0014fa50: 736f 6170 6370 7032 202d 313c 2f63 6f64 soapcpp2 -1) ..SOAP1\n+0014fac0: 2e32 3c2f 636f 6465 3e20 2020 3c2f 7464 .2 SOAP 1.2 tran\n+0014fb00: 7370 6f72 7420 2873 616d 6520 6173 203c sport (same as <\n+0014fb10: 636f 6465 3e73 6f61 7063 7070 3220 2d32 code>soapcpp2 -2\n+0014fb20: 3c2f 636f 6465 3e29 2020 2020 3c2f 7464 ) ..SOAP-GET\n+0014fb90: 2020 203c 2f74 643e 3c74 6420 636c 6173 one-wa\n+0014fbc0: 7920 534f 4150 2031 2e31 206f 7220 312e y SOAP 1.1 or 1.\n+0014fbd0: 3220 7769 7468 2048 5454 5020 4745 5420 2 with HTTP GET \n+0014fbe0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n+0014fc10: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0014fc20: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0014fc30: 3e3c 636f 6465 3e53 4f41 5031 2e31 2d47 >SOAP1.1-G\n+0014fc40: 4554 3c2f 636f 6465 3e20 2020 3c2f 7464 ET one-way SOAP \n+0014fc80: 312e 3120 7769 7468 2048 5454 5020 4745 1.1 with HTTP GE\n+0014fc90: 5420 2020 203c 2f74 643e 3c2f 7472 3e0a T .\n+0014fca0: 3c74 7220 636c 6173 733d 226d 6172 6b64 .SOAP1.\n+0014fcf0: 322d 4745 543c 2f63 6f64 653e 2020 203c 2-GET <\n+0014fd00: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>one-way SO\n+0014fd30: 4150 2031 2e32 2077 6974 6820 4854 5450 AP 1.2 with HTTP\n+0014fd40: 2047 4554 2020 2020 3c2f 7464 3e3c 2f74 GET ..HTTP\n+0014fda0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n+0014fdb0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0014fdc0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0014fdd0: 3e61 6e20 616c 6961 7320 666f 7220 3c63 >an alias for POST \n+0014fdf0: 2873 616d 6520 6173 203c 636f 6465 3e73 (same as s\n+0014fe00: 6f61 7063 7070 3220 2d30 3c2f 636f 6465 oapcpp2 -0) \n+0014fe20: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..POST<\n+0014fe70: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n+0014fea0: 6e6f 6e2d 534f 4150 2052 4553 5420 7072 non-SOAP REST pr\n+0014feb0: 6f74 6f63 6f6c 2077 6974 6820 4854 5450 otocol with HTTP\n+0014fec0: 2050 4f53 5420 2020 203c 2f74 643e 3c2f POST ..GET\n+0014ff20: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n+0014ff30: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0014ff40: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0014ff50: 3e6e 6f6e 2d53 4f41 5020 5245 5354 2070 >non-SOAP REST p\n+0014ff60: 726f 746f 636f 6c20 7769 7468 2048 5454 rotocol with HTT\n+0014ff70: 5020 4745 5420 2020 203c 2f74 643e 3c2f P GET ..PU\n+0014ffd0: 543c 2f63 6f64 653e 2020 203c 2f74 643e T \n+0014ffe0: 3c74 6420 636c 6173 733d 226d 6172 6b64 non-SOAP REST \n+00150010: 7072 6f74 6f63 6f6c 2077 6974 6820 4854 protocol with HT\n+00150020: 5450 2050 5554 2020 2020 3c2f 7464 3e3c TP PUT <\n+00150030: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..DE\n+00150080: 4c45 5445 3c2f 636f 6465 3e20 2020 3c2f LETE non-SOAP RE\n+001500c0: 5354 2070 726f 746f 636f 6c20 7769 7468 ST protocol with\n+001500d0: 2048 5454 5020 4445 4c45 5445 2020 203c HTTP DELETE <\n+001500e0: 2f74 643e 3c2f 7472 3e0a 3c2f 7461 626c /td>..

    The \n+00150100: 7072 6f74 6f63 6f6c 3c2f 636f 6465 3e20 protocol \n+00150110: 7072 6f70 6572 7479 2069 7320 3c63 6f64 property is SOAP by\n+00150130: 2064 6566 6175 6c74 2e20 5468 6520 6465 default. The de\n+00150140: 6661 756c 7420 6973 2063 6861 6e67 6564 fault is changed\n+00150150: 2077 6974 6820 3c62 3e3c 636f 6465 3e73 with s\n+00150160: 6f61 7063 7070 3220 2d31 3c2f 636f 6465 oapcpp2 -1 option \n+00150180: 3c63 6f64 653e 2d31 3c2f 636f 6465 3e3c -1<\n+00150190: 2f62 3e20 746f 2053 4f41 5020 312e 312c /b> to SOAP 1.1,\n+001501a0: 203c 623e 3c63 6f64 653e 736f 6170 6370 soapcp\n+001501b0: 7032 202d 323c 2f63 6f64 653e 3c2f 623e p2 -2\n+001501c0: 206f 7074 696f 6e20 3c62 3e3c 636f 6465 option -2 t\n+001501e0: 6f20 534f 4150 2031 2e32 2c20 616e 6420 o SOAP 1.2, and \n+001501f0: 6e6f 6e2d 534f 4150 2052 4553 5420 7769 non-SOAP REST wi\n+00150200: 7468 203c 623e 3c63 6f64 653e 736f 6170 th soap\n+00150210: 6370 7032 202d 303c 2f63 6f64 653e 3c2f cpp2 -0 option -0\n+00150240: 3c2f 703e 0a3c 703e 5468 6520 3c63 6f64

    .

    The GET pro\n+00150260: 746f 636f 6c73 2066 6f72 2053 4f41 5020 tocols for SOAP \n+00150270: 616e 6420 5245 5354 2072 6571 7569 7265 and REST require\n+00150280: 2074 6861 7420 7468 6520 7365 7276 6963 that the servic\n+00150290: 6520 6f70 6572 6174 696f 6e73 206f 6e6c e operations onl\n+001502a0: 7920 7573 6520 7072 696d 6974 6976 6520 y use primitive \n+001502b0: 7479 7065 7320 7769 7468 2074 6865 6972 types with their\n+001502c0: 2069 6e70 7574 2070 6172 616d 6574 6572 input parameter\n+001502d0: 732c 2062 6563 6175 7365 2074 6865 7365 s, because these\n+001502e0: 2070 6172 616d 6574 6572 7320 6172 6520 parameters are \n+001502f0: 656e 636f 6465 6420 7769 7468 2074 6865 encoded with the\n+00150300: 2055 524c 2061 7320 5552 4c20 7175 6572 URL as URL quer\n+00150310: 7920 7661 6c75 6573 2e3c 2f70 3e0a 3c70 y values.

    .To let directiv\n+00150330: 6573 2074 616b 6520 6566 6665 6374 2077 es take effect w\n+00150340: 6974 6820 7365 7276 6963 6520 6f70 6572 ith service oper\n+00150350: 6174 696f 6e73 2c20 796f 7520 7368 6f75 ations, you shou\n+00150360: 6c64 2062 696e 6420 7468 6520 7365 7276 ld bind the serv\n+00150370: 6963 6520 6f70 6572 6174 696f 6e73 2074 ice operations t\n+00150380: 6f20 7468 6520 5753 444c 206e 616d 6573 o the WSDL names\n+00150390: 7061 6365 206f 6620 6120 7365 7276 6963 pace of a servic\n+001503a0: 6520 6279 2075 7369 6e67 2074 6865 206e e by using the n\n+001503b0: 616d 6573 7061 6365 2070 7265 6669 7820 amespace prefix \n+001503c0: 6173 2070 6172 7420 6f66 2074 6865 2069 as part of the i\n+001503d0: 6465 6e74 6966 6965 7220 6e61 6d65 206f dentifier name o\n+001503e0: 6620 7468 6520 6675 6e63 7469 6f6e 2074 f the function t\n+001503f0: 6861 7420 6465 6669 6e65 7320 7468 6520 hat defines the \n+00150400: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio\n+00150410: 6e3a 3c2f 703e 0a3c 6469 7620 636c 6173 n:

    .
    <\n+00150440: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00150450: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int prefix__func\n+00150470: 2861 7267 312c 2061 7267 322c 202e 2e2e (arg1, arg2, ...\n+00150480: 2c20 6172 676e 2c20 7265 7375 6c74 293b , argn, result);\n+00150490: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    where pre\n+001504c0: 6669 783c 2f63 6f64 653e 2063 616e 206e fix can n\n+001504d0: 6f77 2062 6520 7573 6564 2074 6f20 6c65 ow be used to le\n+001504e0: 7420 6469 7265 6374 6976 6573 2074 616b t directives tak\n+001504f0: 6520 6566 6665 6374 206f 6e20 7468 6973 e effect on this\n+00150500: 2073 6572 7669 6365 206f 7065 7261 7469 service operati\n+00150510: 6f6e 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 on.

    .

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

    ..Servi\n+00150580: 6365 206d 6574 686f 6420 6469 7265 6374 ce method direct\n+00150590: 6976 6573 3c2f 6833 3e0a 3c70 3e53 6572 ives.

    Ser\n+001505a0: 7669 6365 2070 726f 7065 7274 6965 7320 vice properties \n+001505b0: 6172 6520 6170 706c 6963 6162 6c65 2074 are applicable t\n+001505c0: 6f20 6120 7365 7276 6963 6520 616e 6420 o a service and \n+001505d0: 746f 2061 6c6c 206f 6620 6974 7320 6f70 to all of its op\n+001505e0: 6572 6174 696f 6e73 2e20 5365 7276 6963 erations. Servic\n+001505f0: 6520 6d65 7468 6f64 2064 6972 6563 7469 e method directi\n+00150600: 7665 7320 6172 6520 7370 6563 6966 6963 ves are specific\n+00150610: 616c 6c79 2061 7070 6c69 6361 626c 6520 ally applicable \n+00150620: 746f 2061 2073 6572 7669 6365 206f 7065 to a service ope\n+00150630: 7261 7469 6f6e 2e3c 2f70 3e0a 3c70 3e41 ration.

    .

    A\n+00150640: 2073 6572 7669 6365 206d 6574 686f 6420 service method \n+00150650: 6469 7265 6374 6976 6520 6973 206f 6620 directive is of \n+00150660: 7468 6520 666f 726d 3a3c 2f70 3e0a 3c64 the form:

    .
    //gs\n+001506b0: 6f61 7020 266c 743b 7072 6566 6978 2667 oap <prefix&g\n+001506c0: 743b 2073 6572 7669 6365 206d 6574 686f t; service metho\n+001506d0: 642d 266c 743b 7072 6f70 6572 7479 2667 d-<property&g\n+001506e0: 743b 3a20 266c 743b 6d65 7468 6f64 2667 t;: <method&g\n+001506f0: 743b 2026 6c74 3b76 616c 7565 2667 743b t; <value>\n+00150700: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c2f
    .

    where <prefix&g\n+00150740: 743b 3c2f 636f 6465 3e20 6973 2074 6865 t; is the\n+00150750: 2058 4d4c 206e 616d 6573 7061 6365 2070 XML namespace p\n+00150760: 7265 6669 7820 6f66 2061 2073 6572 7669 refix of a servi\n+00150770: 6365 2062 696e 6469 6e67 2061 6e64 203c ce binding and <\n+00150780: 636f 6465 3e26 6c74 3b6d 6574 686f 6426 code><method&\n+00150790: 6774 3b3c 2f63 6f64 653e 2069 7320 7468 gt; is th\n+001507a0: 6520 756e 7175 616c 6966 6965 6420 6e61 e unqualified na\n+001507b0: 6d65 206f 6620 6120 7365 7276 6963 6520 me of a service \n+001507c0: 6f70 6572 6174 696f 6e2e 2054 6865 203c operation. The <\n+001507d0: 636f 6465 3e26 6c74 3b70 726f 7065 7274 code><propert\n+001507e0: 7926 6774 3b3c 2f63 6f64 653e 2061 6e64 y> and\n+001507f0: 203c 636f 6465 3e26 6c74 3b76 616c 7565 <value\n+00150800: 2667 743b 3c2f 636f 6465 3e20 6669 656c > fiel\n+00150810: 6473 2061 7265 206f 6e65 206f 6620 7468 ds are one of th\n+00150820: 6520 666f 6c6c 6f77 696e 673a 3c2f 703e e following:

    \n+00150830: 0a3c 7461 626c 6520 636c 6173 733d 226d ..<\n+00150850: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+00150860: 776e 5461 626c 6548 6561 6422 3e0a 3c74 wnTableHead\">.\n+00150890: 6d65 7468 6f64 2070 726f 7065 7274 7920 method property \n+001508a0: 2020 3c2f 7468 3e3c 7468 2063 6c61 7373 ..\n+00150920: 3c63 6f64 653e 6d65 7468 6f64 2d64 6f63 method-doc\n+00150930: 756d 656e 7461 7469 6f6e 3c2f 636f 6465 umentation .<\n+001509a0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class=\"markdo\n+001509b0: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven\">\n+001509c0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .\n+00150a20: 7361 6d65 2061 7320 6162 6f76 652c 2073 same as above, s\n+00150a30: 686f 7274 6861 6e64 2066 6f72 6d20 2020 horthand form \n+00150a40: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..<\n+00150a90: 636f 6465 3e6d 6574 686f 642d 6163 7469 code>method-acti\n+00150aa0: 6f6e 3c2f 636f 6465 3e20 2020 3c2f 7464 on....\n+00150c60: 3c63 6f64 653e 6d65 7468 6f64 2d6f 7574 method-out\n+00150c70: 7075 742d 6163 7469 6f6e 3c2f 636f 6465 put-action ..\n+00150d70: 3c74 6420 636c 6173 733d 226d 6172 6b64 ....<\n+00150f50: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00150f60: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00150f70: 3e3c 636f 6465 3e6d 6574 686f 642d 696e >method-in\n+00150f80: 7075 742d 6865 6164 6572 2d70 6172 743c put-header-part<\n+00150f90: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> \n+00150fc0: 6d65 6d62 6572 206e 616d 6520 6f66 2074 member name of t\n+00150fd0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he SOAP_ENV__He\n+00151040: 6164 6572 3c2f 613e 3c2f 636f 6465 3e20 ader \n+00151050: 7374 7275 6374 2075 7365 6420 696e 2053 struct used in S\n+00151060: 4f41 5020 4865 6164 6572 7320 6f66 2072 OAP Headers of r\n+00151070: 6571 7565 7374 7320 2020 203c 2f74 643e equests \n+00151080: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ...\n+001511e0: 3c74 7220 636c 6173 733d 226d 6172 6b64 .....<\n+001513e0: 636f 6465 3e6d 6574 686f 642d 696e 7075 code>method-inpu\n+001513f0: 742d 6d69 6d65 2d74 7970 653c 2f63 6f64 t-mime-type ..........<\n+00151890: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+001518a0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+001518b0: 3e53 4f41 5020 6f72 2052 4553 542c 2073 >SOAP or REST, s\n+001518c0: 6565 203c 6120 636c 6173 733d 2265 6c22 ee \n+001518f0: 5365 7276 6963 6520 6469 7265 6374 6976 Service directiv\n+00151900: 6573 3c2f 613e 2020 203c 2f74 643e 3c2f es .
    value \n+001508d0: 2020 3c2f 7468 3e3c 2f74 723e 0a3c 7472
    text \n+00150970: 6465 7363 7269 6269 6e67 2074 6865 2073 describing the s\n+00150980: 6572 7669 6365 206f 7065 7261 7469 6f6e ervice operation\n+00150990: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    method<\n+001509f0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    \"\" or URI SOAPAc\n+00150af0: 7469 6f6e 2048 5454 5020 6865 6164 6572 tion HTTP header\n+00150b00: 2c20 6f72 2055 524c 2071 7565 7279 2073 , or URL query s\n+00150b10: 7472 696e 6720 666f 7220 5245 5354 2070 tring for REST p\n+00150b20: 726f 746f 636f 6c73 2020 2020 3c2f 7464 rotocols
    method-input-ac\n+00150b90: 7469 6f6e 3c2f 636f 6465 3e20 2020 3c2f tion \"\" or URI SOAP\n+00150be0: 4163 7469 6f6e 2048 5454 5020 6865 6164 Action HTTP head\n+00150bf0: 6572 206f 6620 7365 7276 6963 6520 7265 er of service re\n+00150c00: 7175 6573 7420 6d65 7373 6167 6573 2020 quest messages \n+00150c10: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    \"\" or UR\n+00150cc0: 4920 534f 4150 4163 7469 6f6e 2048 5454 I SOAPAction HTT\n+00150cd0: 5020 6865 6164 6572 206f 6620 7365 7276 P header of serv\n+00150ce0: 6963 6520 7265 7370 6f6e 7365 206d 6573 ice response mes\n+00150cf0: 7361 6765 7320 2020 203c 2f74 643e 3c2f sages
    me\n+00150d50: 7468 6f64 2d66 6175 6c74 2d61 6374 696f thod-fault-actio\n+00150d60: 6e3c 2f63 6f64 653e 2020 203c 2f74 643e n \"\" or URI SOAPAct\n+00150db0: 696f 6e20 4854 5450 2068 6561 6465 7220 ion HTTP header \n+00150dc0: 6f66 2073 6572 7669 6365 2066 6175 6c74 of service fault\n+00150dd0: 206d 6573 7361 6765 7320 2020 203c 2f74 messages
    method-header-p\n+00150e40: 6172 743c 2f63 6f64 653e 2020 203c 2f74 art member name \n+00150e80: 6f66 2074 6865 203c 636f 6465 3e3c 6120 of the SOAP_ENV\n+00150ef0: 5f5f 4865 6164 6572 3c2f 613e 3c2f 636f __Header struct used \n+00150f10: 696e 2053 4f41 5020 4865 6164 6572 2020 in SOAP Header \n+00150f20: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    m\n+001510d0: 6574 686f 642d 6f75 7470 7574 2d68 6561 ethod-output-hea\n+001510e0: 6465 722d 7061 7274 3c2f 636f 6465 3e20 der-part \n+001510f0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 member \n+00151120: 6e61 6d65 206f 6620 7468 6520 3c63 6f64 name of the SOA\n+00151190: 505f 454e 565f 5f48 6561 6465 723c 2f61 P_ENV__Header struct \n+001511b0: 7573 6564 2069 6e20 534f 4150 2048 6561 used in SOAP Hea\n+001511c0: 6465 7273 206f 6620 7265 7370 6f6e 7365 ders of response\n+001511d0: 7320 2020 203c 2f74 643e 3c2f 7472 3e0a s
    method\n+00151230: 2d66 6175 6c74 3c2f 636f 6465 3e20 2020 -fault \n+00151240: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 type name\n+00151270: 206f 6620 6120 7374 7275 6374 206f 7220 of a struct or \n+00151280: 636c 6173 7320 6d65 6d62 6572 2075 7365 class member use\n+00151290: 6420 696e 203c 636f 6465 3e53 4f41 505f d in SOAP_\n+001512a0: 454e 565f 5f44 6574 6169 6c73 3c2f 636f ENV__Details struct
    method-mime-ty\n+00151320: 7065 3c2f 636f 6465 3e20 2020 3c2f 7464 pe REST content \n+00151360: 7479 7065 206f 7220 534f 4150 204d 494d type or SOAP MIM\n+00151370: 4520 6174 7461 6368 6d65 6e74 2063 6f6e E attachment con\n+00151380: 7465 6e74 2074 7970 6528 7329 2020 2020 tent type(s) \n+00151390: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    REST\n+00151430: 2063 6f6e 7465 6e74 2074 7970 6520 6f72 content type or\n+00151440: 2053 4f41 5020 4d49 4d45 2061 7474 6163 SOAP MIME attac\n+00151450: 686d 656e 7420 636f 6e74 656e 7420 7479 hment content ty\n+00151460: 7065 2873 2920 6f66 2072 6571 7565 7374 pe(s) of request\n+00151470: 206d 6573 7361 6765 2020 2020 3c2f 7464 message
    \n+001514d0: 6d65 7468 6f64 2d6f 7574 7075 742d 6d69 method-output-mi\n+001514e0: 6d65 2d74 7970 653c 2f63 6f64 653e 2020 me-type \n+001514f0: 203c 2f74 643e 3c74 6420 636c 6173 733d REST con\n+00151520: 7465 6e74 2074 7970 6520 6f72 2053 4f41 tent type or SOA\n+00151530: 5020 4d49 4d45 2061 7474 6163 686d 656e P MIME attachmen\n+00151540: 7420 636f 6e74 656e 7420 7479 7065 2873 t content type(s\n+00151550: 2920 6f66 2072 6573 706f 6e73 6520 6d65 ) of response me\n+00151560: 7373 6167 6520 2020 203c 2f74 643e 3c2f ssage
    me\n+001515c0: 7468 6f64 2d73 7479 6c65 3c2f 636f 6465 thod-style document\n+00151610: 206f 7220 3c63 6f64 653e 7270 633c 2f63 or rpc
    meth\n+00151680: 6f64 2d65 6e63 6f64 696e 673c 2f63 6f64 od-encoding literal\n+001516d0: 2c20 3c63 6f64 653e 656e 636f 6465 643c , encoded<\n+001516e0: 2f63 6f64 653e 2c20 6f72 2061 2063 7573 /code>, or a cus\n+001516f0: 746f 6d20 5552 4920 666f 7220 656e 636f tom URI for enco\n+00151700: 6469 6e67 5374 796c 6520 6f66 206d 6573 dingStyle of mes\n+00151710: 7361 6765 7320 2020 203c 2f74 643e 3c2f sages
    me\n+00151770: 7468 6f64 2d72 6573 706f 6e73 652d 656e thod-response-en\n+00151780: 636f 6469 6e67 3c2f 636f 6465 3e20 2020 coding \n+00151790: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 lit\n+001517c0: 6572 616c 3c2f 636f 6465 3e2c 203c 636f eral, encoded, or a custom U\n+001517f0: 5249 2066 6f72 2065 6e63 6f64 696e 6753 RI for encodingS\n+00151800: 7479 6c65 206f 6620 7265 7370 6f6e 7365 tyle of response\n+00151810: 206d 6573 7361 6765 7320 2020 203c 2f74 messages
    method-protocol\n+00151880: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    .

    \n+00151920: 5468 6520 3c63 6f64 653e 6d65 7468 6f64 The method\n+00151930: 2d68 6561 6465 722d 7061 7274 3c2f 636f -header-part properties c\n+00151950: 616e 2062 6520 7265 7065 6174 6564 2066 an be repeated f\n+00151960: 6f72 2061 2073 6572 7669 6365 206f 7065 or a service ope\n+00151970: 7261 7469 6f6e 2074 6f20 6465 636c 6172 ration to declar\n+00151980: 6520 6d75 6c74 6970 6c65 2053 4f41 5020 e multiple SOAP \n+00151990: 4865 6164 6572 2070 6172 7473 2074 6861 Header parts tha\n+001519a0: 7420 7468 6520 7365 7276 6963 6520 6f70 t the service op\n+001519b0: 6572 6174 696f 6e20 7265 7175 6972 6573 eration requires\n+001519c0: 2e20 596f 7520 6361 6e20 7573 6520 3c63 . You can use method-input\n+001519e0: 2d68 6561 6465 722d 7061 7274 3c2f 636f -header-part and me\n+00151a00: 7468 6f64 2d6f 7574 7075 742d 6865 6164 thod-output-head\n+00151a10: 6572 2d70 6172 743c 2f63 6f64 653e 2074 er-part t\n+00151a20: 6f20 6469 6666 6572 656e 7469 6174 6520 o differentiate \n+00151a30: 6265 7477 6565 6e20 7265 7175 6573 7420 between request \n+00151a40: 616e 6420 7265 7370 6f6e 7365 206d 6573 and response mes\n+00151a50: 7361 6765 732e 3c2f 703e 0a3c 703e 5468 sages.

    .

    Th\n+00151a60: 6520 3c63 6f64 653e 6d65 7468 6f64 2d66 e method-f\n+00151a70: 6175 6c74 3c2f 636f 6465 3e20 7072 6f70 ault prop\n+00151a80: 6572 7479 2063 616e 2062 6520 7265 7065 erty can be repe\n+00151a90: 6174 6564 2066 6f72 2061 2073 6572 7669 ated for a servi\n+00151aa0: 6365 206f 7065 7261 7469 6f6e 2074 6f20 ce operation to \n+00151ab0: 6465 636c 6172 6520 6d75 6c74 6970 6c65 declare multiple\n+00151ac0: 2066 6175 6c74 7320 7468 6174 2074 6865 faults that the\n+00151ad0: 2073 6572 7669 6365 206f 7065 7261 7469 service operati\n+00151ae0: 6f6e 206d 6179 2072 6574 7572 6e2e 3c2f on may return..

    The \n+00151b00: 6d65 7468 6f64 2d61 6374 696f 6e3c 2f63 method-action property se\n+00151b20: 7276 6573 2074 776f 2070 7572 706f 7365 rves two purpose\n+00151b30: 733a 3c2f 703e 0a3c 6f6c 2074 7970 653d s:

    .
      .
    1. To set \n+00151b50: 7468 6520 534f 4150 4163 7469 6f6e 2068 the SOAPAction h\n+00151b60: 6561 6465 7220 666f 7220 534f 4150 2070 eader for SOAP p\n+00151b70: 726f 746f 636f 6c73 2c20 692e 652e 2073 rotocols, i.e. s\n+00151b80: 6574 7320 7468 6520 6465 6669 6e69 7469 ets the definiti\n+00151b90: 6f6e 732f 6269 6e64 696e 672f 6f70 6572 ons/binding/oper\n+00151ba0: 6174 696f 6e2f 534f 4150 3a6f 7065 7261 ation/SOAP:opera\n+00151bb0: 7469 6f6e 2f40 736f 6170 4163 7469 6f6e tion/@soapAction\n+00151bc0: 2e3c 2f6c 693e 0a3c 6c69 3e54 6f20 7365 .
    2. .
    3. To se\n+00151bd0: 7420 7468 6520 5552 4c20 7175 6572 7920 t the URL query \n+00151be0: 7374 7269 6e67 2066 6f72 2065 6e64 706f string for endpo\n+00151bf0: 696e 7473 2077 6974 6820 5245 5354 2070 ints with REST p\n+00151c00: 726f 746f 636f 6c73 2c20 692e 652e 2073 rotocols, i.e. s\n+00151c10: 6574 7320 7468 6520 6465 6669 6e69 7469 ets the definiti\n+00151c20: 6f6e 732f 6269 6e64 696e 672f 6f70 6572 ons/binding/oper\n+00151c30: 6174 696f 6e2f 4854 5450 3a6f 7065 7261 ation/HTTP:opera\n+00151c40: 7469 6f6e 2f40 6c6f 6361 7469 6f6e 2c20 tion/@location, \n+00151c50: 7768 6963 6820 7370 6563 6966 6965 7320 which specifies \n+00151c60: 6120 5552 4c20 7175 6572 7920 7374 7269 a URL query stri\n+00151c70: 6e67 2028 7374 6172 7473 2077 6974 6820 ng (starts with \n+00151c80: 6120 3c63 6f64 653e 3f3c 2f63 6f64 653e a ?\n+00151c90: 2920 746f 2063 6f6d 706c 6574 6520 7468 ) to complete th\n+00151ca0: 6520 7365 7276 6963 6520 656e 6470 6f69 e service endpoi\n+00151cb0: 6e74 2055 524c 206f 7220 6578 7465 6e64 nt URL or extend\n+00151cc0: 7320 7468 6520 656e 6470 6f69 6e74 2055 s the endpoint U\n+00151cd0: 524c 2077 6974 6820 6120 6c6f 6361 6c20 RL with a local \n+00151ce0: 7061 7468 2028 7374 6172 7473 2077 6974 path (starts wit\n+00151cf0: 6820 6120 3c63 6f64 653e 2f3c 2f63 6f64 h a /).
    4. .
    .\n+00151d10: 3c70 3e55 7365 203c 636f 6465 3e6d 6574

    Use met\n+00151d20: 686f 642d 696e 7075 742d 6163 7469 6f6e hod-input-action\n+00151d30: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and method-output-\n+00151d50: 6163 7469 6f6e 3c2f 636f 6465 3e20 746f action to\n+00151d60: 2064 6966 6665 7265 6e74 6961 7465 2074 differentiate t\n+00151d70: 6865 2053 4f41 5041 6374 696f 6e20 6265 he SOAPAction be\n+00151d80: 7477 6565 6e20 534f 4150 2072 6571 7565 tween SOAP reque\n+00151d90: 7374 2061 6e64 2072 6573 706f 6e73 6520 st and response \n+00151da0: 6d65 7373 6167 6573 2e3c 2f70 3e0a 3c70 messages.

    .You can always \n+00151dc0: 6f76 6572 7269 6465 2074 6865 2070 6f72 override the por\n+00151dd0: 7420 656e 6470 6f69 6e74 2055 524c 2061 t endpoint URL a\n+00151de0: 6e64 2061 6374 696f 6e20 7661 6c75 6573 nd action values\n+00151df0: 2061 7420 7275 6e74 696d 6520 696e 2074 at runtime in t\n+00151e00: 6865 2061 7574 6f2d 6765 6e65 7261 7465 he auto-generate\n+00151e10: 6420 3c63 6f64 653e 736f 6170 5f63 616c d soap_cal\n+00151e20: 6c5f 7072 6566 6978 5f5f 6675 6e63 3c2f l_prefix__func service ca\n+00151e40: 6c6c 2028 432f 432b 2b20 636c 6965 6e74 ll (C/C++ client\n+00151e50: 2073 6964 6529 2061 6e64 2069 6e20 7468 side) and in th\n+00151e60: 6520 6175 746f 2d67 656e 6572 6174 6564 e auto-generated\n+00151e70: 2043 2b2b 2070 726f 7879 2063 6c61 7373 C++ proxy class\n+00151e80: 2073 6572 7669 6365 2063 616c 6c73 2e20 service calls. \n+00151e90: 4120 7275 6e74 696d 6520 4e55 4c4c 2065 A runtime NULL e\n+00151ea0: 6e64 706f 696e 7420 5552 4c20 616e 642f ndpoint URL and/\n+00151eb0: 6f72 2061 6374 696f 6e20 7573 6573 2074 or action uses t\n+00151ec0: 6865 2064 6566 6175 6c74 7320 7365 7420 he defaults set \n+00151ed0: 6279 2074 6865 7365 2064 6972 6563 7469 by these directi\n+00151ee0: 7665 732e 3c2f 703e 0a3c 703e 5468 6520 ves.

    .

    The \n+00151ef0: 3c63 6f64 653e 6d65 7468 6f64 2d6d 696d method-mim\n+00151f00: 652d 7479 7065 3c2f 636f 6465 3e20 7072 e-type pr\n+00151f10: 6f70 6572 7479 2073 6572 7665 7320 7477 operty serves tw\n+00151f20: 6f20 7075 7270 6f73 6573 3a3c 2f70 3e0a o purposes:

    .\n+00151f30: 3c6f 6c20 7479 7065 3d22 3122 3e0a 3c6c
      .To set the typ\n+00151f50: 6520 6f66 204d 494d 452f 4d54 4f4d 2061 e of MIME/MTOM a\n+00151f60: 7474 6163 686d 656e 7473 2075 7365 6420 ttachments used \n+00151f70: 7769 7468 2053 4f41 5020 7072 6f74 6f63 with SOAP protoc\n+00151f80: 6f6c 732e 204d 756c 7469 706c 6520 6174 ols. Multiple at\n+00151f90: 7461 6368 6d65 6e74 2074 7970 6573 2063 tachment types c\n+00151fa0: 616e 2062 6520 6465 636c 6172 6564 2066 an be declared f\n+00151fb0: 6f72 2061 2053 4f41 5020 7365 7276 6963 or a SOAP servic\n+00151fc0: 6520 6f70 6572 6174 696f 6e2c 2069 2e65 e operation, i.e\n+00151fd0: 2e20 6164 6473 2064 6566 696e 6974 696f . adds definitio\n+00151fe0: 6e73 2f62 696e 6469 6e67 2f6f 7065 7261 ns/binding/opera\n+00151ff0: 7469 6f6e 2f69 6e70 7574 2f4d 494d 453a tion/input/MIME:\n+00152000: 6d75 6c74 6970 6172 7452 656c 6174 6564 multipartRelated\n+00152010: 2f4d 494d 453a 7061 7274 2f4d 494d 453a /MIME:part/MIME:\n+00152020: 636f 6e74 656e 742f 4074 7970 6520 666f content/@type fo\n+00152030: 7220 6561 6368 2074 7970 6520 7370 6563 r each type spec\n+00152040: 6966 6965 642e 3c2f 6c69 3e0a 3c6c 693e ified..
    1. \n+00152050: 546f 2073 6574 2074 6865 204d 494d 4520 To set the MIME \n+00152060: 7479 7065 206f 6620 6120 5245 5354 206f type of a REST o\n+00152070: 7065 7261 7469 6f6e 2e20 5468 6973 2072 peration. This r\n+00152080: 6570 6c61 6365 7320 584d 4c20 6465 636c eplaces XML decl\n+00152090: 6172 6564 2069 6e20 5753 444c 2062 7920 ared in WSDL by \n+001520a0: 6465 6669 6e69 7469 6f6e 732f 6269 6e64 definitions/bind\n+001520b0: 696e 672f 6f70 6572 6174 696f 6e2f 2869 ing/operation/(i\n+001520c0: 6e70 7574 7c6f 7574 7075 7429 2f4d 494d nput|output)/MIM\n+001520d0: 453a 6d69 6d65 586d 6c20 7769 7468 204d E:mimeXml with M\n+001520e0: 494d 453a 636f 6e74 656e 742f 4074 7970 IME:content/@typ\n+001520f0: 652e 2055 7365 203c 636f 6465 3e61 7070 e. Use app\n+00152100: 6c69 6361 7469 6f6e 2f78 2d77 7777 2d66 lication/x-www-f\n+00152110: 6f72 6d2d 7572 6c65 6e63 6f64 6564 3c2f orm-urlencoded with REST \n+00152130: 504f 5354 2061 6e64 2050 5554 2070 726f POST and PUT pro\n+00152140: 746f 636f 6c73 2074 6f20 7365 6e64 2065 tocols to send e\n+00152150: 6e63 6f64 6564 2066 6f72 6d20 6461 7461 ncoded form data\n+00152160: 2061 7574 6f6d 6174 6963 616c 6c79 2069 automatically i\n+00152170: 6e73 7465 6164 206f 6620 584d 4c2e 204f nstead of XML. O\n+00152180: 6e6c 7920 7072 696d 6974 6976 6520 7479 nly primitive ty\n+00152190: 7065 2076 616c 7565 7320 6361 6e20 6265 pe values can be\n+001521a0: 2074 7261 6e73 6d69 7474 6564 2077 6974 transmitted wit\n+001521b0: 6820 666f 726d 2064 6174 612c 2073 7563 h form data, suc\n+001521c0: 6820 6173 206e 756d 6265 7273 2061 6e64 h as numbers and\n+001521d0: 2073 7472 696e 6773 2c20 692e 652e 206f strings, i.e. o\n+001521e0: 6e6c 7920 7479 7065 7320 7468 6174 2061 nly types that a\n+001521f0: 7265 206c 6567 616c 2074 6f20 7573 6520 re legal to use \n+00152200: 6173 2061 7474 7269 6275 7465 7320 6d65 as attributes me\n+00152210: 6d62 6572 732e 3c2f 6c69 3e0a 3c2f 6f6c mbers.
    2. ..

      Use m\n+00152230: 6574 686f 642d 696e 7075 742d 6d69 6d65 ethod-input-mime\n+00152240: 2d74 7970 653c 2f63 6f64 653e 2061 6e64 -type and\n+00152250: 203c 636f 6465 3e6d 6574 686f 642d 6f75 method-ou\n+00152260: 7470 7574 2d6d 696d 652d 7479 7065 3c2f tput-mime-type to differe\n+00152280: 6e74 6961 7465 2074 6865 2061 7474 6163 ntiate the attac\n+00152290: 686d 656e 7420 7479 7065 7320 6265 7477 hment types betw\n+001522a0: 6565 6e20 7265 7175 6573 7420 616e 6420 een request and \n+001522b0: 7265 7370 6f6e 7365 206d 6573 7361 6765 response message\n+001522c0: 732e 3c2f 703e 0a3c 703e f09f 949d 203c s.

      .

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

      ..Schema\n+00152330: 2064 6972 6563 7469 7665 733c 2f68 333e directives\n+00152340: 0a3c 703e 4120 7363 6865 6d61 2064 6972 .

      A schema dir\n+00152350: 6563 7469 7665 2069 7320 6f66 2074 6865 ective is of the\n+00152360: 2066 6f72 6d3a 3c2f 703e 0a3c 6469 7620 form:

      .
      //gsoap\n+001523b0: 2026 6c74 3b70 7265 6669 7826 6774 3b20 <prefix> \n+001523c0: 7363 6865 6d61 2026 6c74 3b70 726f 7065 schema <prope\n+001523d0: 7274 7926 6774 3b3a 2026 6c74 3b76 616c rty>: <val\n+001523e0: 7565 2667 743b 3c2f 7370 616e 3e3c 2f64 ue>.

      wh\n+00152410: 6572 6520 3c63 6f64 653e 266c 743b 7072 ere <pr\n+00152420: 6566 6978 2667 743b 3c2f 636f 6465 3e20 efix> \n+00152430: 6973 2074 6865 2058 4d4c 206e 616d 6573 is the XML names\n+00152440: 7061 6365 2070 7265 6669 7820 6f66 2061 pace prefix of a\n+00152450: 2073 6368 656d 612e 2054 6865 203c 636f schema. The <property&\n+00152470: 6774 3b3c 2f63 6f64 653e 2061 6e64 203c gt; and <\n+00152480: 636f 6465 3e26 6c74 3b76 616c 7565 2667 code><value&g\n+00152490: 743b 3c2f 636f 6465 3e20 6669 656c 6473 t; fields\n+001524a0: 2061 7265 206f 6e65 206f 6620 7468 6520 are one of the \n+001524b0: 666f 6c6c 6f77 696e 673a 3c2f 703e 0a3c following:

      .<\n+001524c0: 7461 626c 6520 636c 6173 733d 226d 6172 table class=\"mar\n+001524d0: 6b64 6f77 6e54 6162 6c65 223e 0a3c 7472 kdownTable\">..pr\n+00152520: 6f70 6572 7479 2020 203c 2f74 683e 3c74 operty \n+00152550: 7661 6c75 6520 2020 203c 2f74 683e 3c2f value ..nam\n+001525b0: 6573 7061 6365 3c2f 636f 6465 3e20 2020 espace \n+001525c0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 URI of th\n+001525f0: 6520 5853 4420 7461 7267 6574 4e61 6d65 e XSD targetName\n+00152600: 7370 6163 6520 2020 203c 2f74 643e 3c2f space ..na\n+00152660: 6d65 7370 6163 6532 3c2f 636f 6465 3e20 mespace2 \n+00152670: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 alterna\n+001526a0: 7465 2055 5249 2070 6174 7465 726e 2066 te URI pattern f\n+001526b0: 6f72 2074 6865 2058 5344 206e 616d 6573 or the XSD names\n+001526c0: 7061 6365 2028 692e 652e 2055 5249 2069 pace (i.e. URI i\n+001526d0: 7320 616c 736f 2061 6363 6570 7465 6420 s also accepted \n+001526e0: 6279 2074 6865 2058 4d4c 2070 6172 7365 by the XML parse\n+001526f0: 7229 2020 2020 3c2f 7464 3e3c 2f74 723e r) \n+00152700: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..import\n+00152750: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n+00152760: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00152770: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00152780: 3e55 5249 206f 6620 616e 2069 6d70 6f72 >URI of an impor\n+00152790: 7465 6420 6e61 6d65 7370 6163 652c 2061 ted namespace, a\n+001527a0: 7320 616e 2061 6c74 6572 6e61 7469 7665 s an alternative\n+001527b0: 206f 7220 696e 2061 6464 6974 696f 6e20 or in addition \n+001527c0: 746f 203c 636f 6465 3e6e 616d 6573 7061 to namespa\n+001527d0: 6365 3c2f 636f 6465 3e2c 2061 6464 7320 ce, adds \n+001527e0: 3c63 6f64 653e 7873 643a 696d 706f 7274 xsd:import\n+001527f0: 3c2f 636f 6465 3e20 746f 2074 6865 2067 to the g\n+00152800: 656e 6572 6174 6564 2057 5344 4c20 616e enerated WSDL an\n+00152810: 6420 5853 4420 6669 6c65 7320 2020 203c d XSD files <\n+00152820: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..form \n+00152880: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 u\n+001528b0: 6e71 7561 6c69 6669 6564 3c2f 636f 6465 nqualified (default) or <\n+001528d0: 636f 6465 3e71 7561 6c69 6669 6564 3c2f code>qualified local elem\n+001528f0: 656e 7420 616e 6420 6174 7472 6962 7574 ent and attribut\n+00152900: 6520 666f 726d 2064 6566 6175 6c74 7320 e form defaults \n+00152910: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..<\n+00152940: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00152950: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00152960: 3e3c 636f 6465 3e65 6c65 6d65 6e74 466f >elementFo\n+00152970: 726d 3c2f 636f 6465 3e20 2020 3c2f 7464 rm unquali\n+001529b0: 6669 6564 3c2f 636f 6465 3e20 2864 6566 fied (def\n+001529c0: 6175 6c74 2920 6f72 203c 636f 6465 3e71 ault) or q\n+001529d0: 7561 6c69 6669 6564 3c2f 636f 6465 3e20 ualified \n+001529e0: 6c6f 6361 6c20 656c 656d 656e 7420 666f local element fo\n+001529f0: 726d 2064 6566 6175 6c74 2020 2020 3c2f rm default ..attributeForm\n+00152a60: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c <\n+00152a70: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+00152a80: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+00152a90: 3e3c 636f 6465 3e75 6e71 7561 6c69 6669 >unqualifi\n+00152aa0: 6564 3c2f 636f 6465 3e20 2864 6566 6175 ed (defau\n+00152ab0: 6c74 2920 6f72 203c 636f 6465 3e71 7561 lt) or qua\n+00152ac0: 6c69 6669 6564 3c2f 636f 6465 3e20 6c6f lified lo\n+00152ad0: 6361 6c20 6174 7472 6962 7574 6520 666f cal attribute fo\n+00152ae0: 726d 2064 6566 6175 6c74 2020 2020 3c2f rm default ..typed \n+00152b50: 203c 2f74 643e 3c74 6420 636c 6173 733d no\n+00152b80: 3c2f 636f 6465 3e20 2864 6566 6175 6c74 (default\n+00152b90: 2920 6f72 203c 636f 6465 3e79 6573 3c2f ) or yes for serial\n+00152bb0: 697a 6572 7320 746f 2061 6464 203c 636f izers to add xsi:type attributes to\n+00152be0: 2058 4d4c 2020 203c 2f74 643e 3c2f 7472 XML ..

      Th\n+00152c00: 6520 3c63 6f64 653e 6e61 6d65 7370 6163 e namespac\n+00152c10: 6532 3c2f 636f 6465 3e20 5552 4920 6973 e2 URI is\n+00152c20: 2061 2070 6174 7465 726e 2077 6974 6820 a pattern with \n+00152c30: 3c63 6f64 653e 2a3c 2f63 6f64 653e 206d * m\n+00152c40: 6174 6368 696e 6720 616e 7920 7365 7175 atching any sequ\n+00152c50: 656e 6365 206f 6620 6368 6172 6163 7465 ence of characte\n+00152c60: 7273 2061 6e64 203c 636f 6465 3e2d 3c2f rs and - matching a\n+00152c80: 6e79 2063 6861 7261 6374 6572 2e20 5468 ny character. Th\n+00152c90: 6973 2070 6174 7465 726e 2069 6e73 7472 is pattern instr\n+00152ca0: 7563 7473 2074 6865 2058 4d4c 2070 6172 ucts the XML par\n+00152cb0: 7365 7220 616e 6420 7661 6c69 6461 746f ser and validato\n+00152cc0: 7220 746f 2061 6c73 6f20 6163 6365 7074 r to also accept\n+00152cd0: 2074 6865 2055 5249 2070 6174 7465 726e the URI pattern\n+00152ce0: 2061 7320 6120 7661 6c69 6420 6e61 6d65 as a valid name\n+00152cf0: 7370 6163 6520 666f 7220 7468 6520 7370 space for the sp\n+00152d00: 6563 6966 6965 6420 3c63 6f64 653e 266c ecified &l\n+00152d10: 743b 7072 6566 6978 2667 743b 3c2f 636f t;prefix>.

      .

      The \n+00152d30: 3c63 6f64 653e 7479 7065 643c 2f63 6f64 typed property is <\n+00152d50: 636f 6465 3e6e 6f3c 2f63 6f64 653e 2062 code>no b\n+00152d60: 7920 6465 6661 756c 7420 616e 6420 6361 y default and ca\n+00152d70: 6e20 6265 2063 6861 6e67 6564 2074 6f20 n be changed to \n+00152d80: 3c63 6f64 653e 7965 733c 2f63 6f64 653e yes\n+00152d90: 2077 6974 6820 3c62 3e3c 636f 6465 3e73 with s\n+00152da0: 6f61 7063 7070 3220 2d74 3c2f 636f 6465 oapcpp2 -t option \n+00152dc0: 3c63 6f64 653e 2d74 3c2f 636f 6465 3e3c -t<\n+00152dd0: 2f62 3e2e 3c2f 703e 0a3c 703e f09f 949d /b>.

      .

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

      .<\n+00152e10: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.Sche\n+00152e40: 6d61 2074 7970 6520 6469 7265 6374 6976 ma type directiv\n+00152e50: 6573 3c2f 6833 3e0a 3c70 3e41 2073 6368 es.

      A sch\n+00152e60: 656d 6120 7479 7065 2064 6972 6563 7469 ema type directi\n+00152e70: 7665 2069 7320 6f66 2074 6865 2066 6f72 ve is of the for\n+00152e80: 6d3a 3c2f 703e 0a3c 6469 7620 636c 6173 m:

      .
      <\n+00152eb0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00152ec0: 656e 7422 3e2f 2f67 736f 6170 2026 6c74 ent\">//gsoap <\n+00152ed0: 3b70 7265 6669 7826 6774 3b20 7363 6865 ;prefix> sche\n+00152ee0: 6d61 2074 7970 652d 266c 743b 7072 6f70 ma type-<prop\n+00152ef0: 6572 7479 2667 743b 3a20 266c 743b 6e61 erty>: <na\n+00152f00: 6d65 2667 743b 2026 6c74 3b76 616c 7565 me> <value\n+00152f10: 2667 743b 3c2f 7370 616e 3e3c 2f64 6976 >.
      //gsoa\n+00152f50: 7020 266c 743b 7072 6566 6978 2667 743b p <prefix>\n+00152f60: 2073 6368 656d 6120 7479 7065 2d26 6c74 schema type-<\n+00152f70: 3b70 726f 7065 7274 7926 6774 3b3a 2026 ;property>: &\n+00152f80: 6c74 3b6e 616d 6526 6774 3b3a 3a26 6c74 lt;name>::<\n+00152f90: 3b6d 656d 6265 7226 6774 3b20 266c 743b ;member> <\n+00152fa0: 7661 6c75 6526 6774 3b3c 2f73 7061 6e3e value>\n+00152fb0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
      .
      where <\n+00152fe0: 3b70 7265 6669 7826 6774 3b3c 2f63 6f64 ;prefix> is the XML na\n+00153000: 6d65 7370 6163 6520 7072 6566 6978 206f mespace prefix o\n+00153010: 6620 6120 7363 6865 6d61 2061 6e64 203c f a schema and <\n+00153020: 636f 6465 3e26 6c74 3b6e 616d 6526 6774 code><name>\n+00153030: 3b3c 2f63 6f64 653e 2069 7320 616e 2075 ; is an u\n+00153040: 6e71 7561 6c69 6669 6564 206e 616d 6520 nqualified name \n+00153050: 6f66 2061 2043 2f43 2b2b 2074 7970 652c of a C/C++ type,\n+00153060: 2061 6e64 2074 6865 206f 7074 696f 6e61 and the optiona\n+00153070: 6c20 3c63 6f64 653e 266c 743b 6d65 6d62 l <memb\n+00153080: 6572 2667 743b 3c2f 636f 6465 3e20 6973 er> is\n+00153090: 2061 2063 6c61 7373 2f73 7472 7563 7420 a class/struct \n+001530a0: 6d65 6d62 6572 7320 6f72 2065 6e75 6d20 members or enum \n+001530b0: 636f 6e73 7461 6e74 2e3c 2f70 3e0a 3c70 constant.

      .You can describ\n+001530d0: 6520 6120 7479 7065 2077 6974 6820 6f6e e a type with on\n+001530e0: 6520 6f66 2074 6865 2066 6f6c 6c6f 7769 e of the followi\n+001530f0: 6e67 3a3c 2f70 3e0a 3c74 6162 6c65 2063 ng:

      .......\n+001532a0: 3c63 6f64 653e 7479 7065 3c2f 636f 6465 type .
      type prop\n+00153160: 6572 7479 2020 203c 2f74 683e 3c74 6820 erty va\n+00153190: 6c75 6520 2020 203c 2f74 683e 3c2f 7472 lue
      type-\n+001531f0: 646f 6375 6d65 6e74 6174 696f 6e3c 2f63 documentation te\n+00153230: 7874 2064 6573 6372 6962 696e 6720 7468 xt describing th\n+00153240: 6520 7363 6865 6d61 2074 7970 6520 2020 e schema type \n+00153250: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
      an al\n+001532e0: 6961 7320 666f 7220 7468 6520 3c63 6f64 ias for the type-documenta\n+00153300: 7469 6f6e 3c2f 636f 6465 3e20 7072 6f70 tion prop\n+00153310: 6572 7479 2020 203c 2f74 643e 3c2f 7472 erty
      .

      Fo\n+00153330: 7220 6578 616d 706c 652c 2079 6f75 2063 r example, you c\n+00153340: 616e 2061 6464 2061 2064 6573 6372 6970 an add a descrip\n+00153350: 7469 6f6e 2074 6f20 616e 2065 6e75 6d65 tion to an enume\n+00153360: 7261 7469 6f6e 3a3c 2f70 3e0a 3c64 6976 ration:

      .
      //gsoa\n+001533b0: 7020 6e73 2073 6368 656d 6120 7479 7065 p ns schema type\n+001533c0: 3a20 566f 7765 6c73 2054 6865 206c 6574 : Vowels The let\n+001533d0: 7465 7273 2041 2c20 452c 2049 2c20 4f2c ters A, E, I, O,\n+001533e0: 2055 2c20 616e 6420 736f 6d65 7469 6d65 U, and sometime\n+001533f0: 7320 593c 2f73 7061 6e3e 3c2f 6469 763e s Y
      \n+00153400: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      //gsoap\n+00153430: 206e 7320 7363 6865 6d61 2074 7970 653a ns schema type:\n+00153440: 2056 6f77 656c 733a 3a59 2041 2076 6f77 Vowels::Y A vow\n+00153450: 656c 2c20 736f 6d65 7469 6d65 733c 2f73 el, sometimes
      .
      enum class ns__Vowels \n+001534b0: 3a20 6368 6172 207b 2041 203d 203c 7370 : char { A = 'A\n+001534e0: 393b 3c2f 7370 616e 3e2c 2045 203d 203c 9;, E = <\n+001534f0: 7370 616e 2063 6c61 7373 3d22 6368 6172 span class=\"char\n+00153500: 6c69 7465 7261 6c22 3e26 2333 393b 4526 literal\">'E&\n+00153510: 2333 393b 3c2f 7370 616e 3e2c 2049 203d #39;, I =\n+00153520: 203c 7370 616e 2063 6c61 7373 3d22 6368 '\n+00153540: 4926 2333 393b 3c2f 7370 616e 3e2c 204f I', O\n+00153550: 203d 203c 7370 616e 2063 6c61 7373 3d22 = \n+00153570: 393b 4f26 2333 393b 3c2f 7370 616e 3e2c 9;O',\n+00153580: 2055 203d 203c 7370 616e 2063 6c61 7373 U = &\n+001535a0: 2333 393b 5526 2333 393b 3c2f 7370 616e #39;U', Y = 'Y' };
      .

      This docu\n+00153610: 6d65 6e74 6564 2065 6e75 6d65 7261 7469 mented enumerati\n+00153620: 6f6e 206d 6170 7320 746f 2061 2073 696d on maps to a sim\n+00153630: 706c 6554 7970 6520 7265 7374 7269 6374 pleType restrict\n+00153640: 696f 6e20 6f66 203c 656d 3e3c 636f 6465 ion of xsd:string in the s\n+00153670: 6f61 7063 7070 322d 6765 6e65 7261 7465 oapcpp2-generate\n+00153680: 6420 7363 6865 6d61 3a3c 2f70 3e0a 3c64 d schema:

      . \n+001536a0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
      <simpleType\n+001536f0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c na\n+00153710: 6d65 3c2f 7370 616e 3e3d 3c73 7061 6e20 me="Vowe\n+00153740: 6c73 2671 756f 743b 3c2f 7370 616e 3e26 ls"&\n+00153750: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
      .
      &l\n+00153770: 743b 3c73 7061 6e20 636c 6173 733d 226b t;anno\n+00153790: 7461 7469 6f6e 3c2f 7370 616e 3e26 6774 tation>\n+001537a0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
      .
      &l\n+001537c0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;docu\n+001537e0: 6d65 6e74 6174 696f 6e3c 2f73 7061 6e3e mentation\n+001537f0: 2667 743b 3c73 7061 6e20 636c 6173 733d >The lette\n+00153830: 7273 3c2f 7370 616e 3e20 3c73 7061 6e20 rs \n+00153850: 413c 2f73 7061 6e3e 2c20 3c73 7061 6e20 A, \n+00153870: 453c 2f73 7061 6e3e 2c20 3c73 7061 6e20 E, \n+00153890: 493c 2f73 7061 6e3e 2c20 3c73 7061 6e20 I, \n+001538b0: 4f3c 2f73 7061 6e3e 2c20 3c73 7061 6e20 O, \n+001538d0: 553c 2f73 7061 6e3e 2c20 3c73 7061 6e20 U, \n+001538f0: 616e 643c 2f73 7061 6e3e 203c 7370 616e and sometimes Y\n+00153940: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </d\n+00153960: 6f63 756d 656e 7461 7469 6f6e 3c2f 7370 ocumentation>
      .\n+00153990: 2020 266c 743b 2f3c 7370 616e 2063 6c61 </annotation>
      . \n+001539e0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <r\n+00153a00: 6573 7472 6963 7469 6f6e 3c2f 7370 616e estriction base=\n+00153a50: 2671 756f 743b 7873 643a 7374 7269 6e67 "xsd:string\n+00153a60: 2671 756f 743b 3c2f 7370 616e 3e26 6774 ">\n+00153a70: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
      .
      &l\n+00153a90: 743b 3c73 7061 6e20 636c 6173 733d 226b t;enum\n+00153ab0: 6572 6174 696f 6e3c 2f73 7061 6e3e 203c eration <\n+00153ac0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00153ad0: 6f72 6422 3e76 616c 7565 3c2f 7370 616e ord\">value=&q\n+00153b00: 756f 743b 4126 7175 6f74 3b3c 2f73 7061 uot;A"/>
      .\n+00153b30: 2020 2020 266c 743b 3c73 7061 6e20 636c <enumeration value\n+00153b80: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="E"\n+00153bb0: 3b3c 2f73 7061 6e3e 2f26 6774 3b3c 2f64 ;/>.
      <enumerat\n+00153c00: 696f 6e3c 2f73 7061 6e3e 203c 7370 616e ion value="\n+00153c50: 4926 7175 6f74 3b3c 2f73 7061 6e3e 2f26 I"/&\n+00153c60: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
      .
      \n+00153c80: 266c 743b 3c73 7061 6e20 636c 6173 733d <en\n+00153ca0: 756d 6572 6174 696f 6e3c 2f73 7061 6e3e umeration\n+00153cb0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 value=\n+00153cf0: 2671 756f 743b 4f26 7175 6f74 3b3c 2f73 "O"/>
      .\n+00153d10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      <enumeration<\n+00153d50: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> val\n+00153d70: 7565 3c2f 7370 616e 3e3d 3c73 7061 6e20 ue="U&qu\n+00153da0: 6f74 3b3c 2f73 7061 6e3e 2f26 6774 3b3c ot;/><\n+00153db0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      <\n+00153dd0: 3c73 7061 6e20 636c 6173 733d 226b 6579 enumer\n+00153df0: 6174 696f 6e3c 2f73 7061 6e3e 203c 7370 ation value=\n+00153e20: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+00153e40: 743b 5926 7175 6f74 3b3c 2f73 7061 6e3e t;Y"\n+00153e50: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
      .
      \n+00153e70: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <annotation>
      . \n+00153ec0: 2020 2020 2020 2026 6c74 3b3c 7370 616e <documentati\n+00153ef0: 6f6e 3c2f 7370 616e 3e26 6774 3b3c 7370 on
      >A vowel, \n+00153f40: 3c73 7061 6e20 636c 6173 733d 226b 6579 sometimes<\n+00153f60: 2f73 7061 6e3e 266c 743b 2f3c 7370 616e /span></documentati\n+00153f90: 6f6e 3c2f 7370 616e 3e26 6774 3b3c 2f64 on>.
      <\n+00153fc0: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /annot\n+00153fe0: 6174 696f 6e3c 2f73 7061 6e3e 2667 743b ation>\n+00153ff0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      <\n+00154010: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;enume\n+00154030: 7261 7469 6f6e 3c2f 7370 616e 3e2f 2667 ration/&g\n+00154040: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
      .
      <\n+00154060: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/rest\n+00154080: 7269 6374 696f 6e3c 2f73 7061 6e3e 2667 riction&g\n+00154090: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
      .
      </\n+001540b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 simple\n+001540d0: 5479 7065 3c2f 7370 616e 3e26 6774 3b3c Type><\n+001540e0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

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

      .

      <\n+00154160: 2f61 3e0a 4578 616d 706c 653c 2f68 333e /a>.Example

      \n+00154170: 0a3c 703e 5468 6520 7573 6520 6f66 2064 .

      The use of d\n+00154180: 6972 6563 7469 7665 7320 6973 2062 6573 irectives is bes\n+00154190: 7420 696c 6c75 7374 7261 7465 6420 7769 t illustrated wi\n+001541a0: 7468 2061 6e20 6578 616d 706c 652e 2054 th an example. T\n+001541b0: 6865 2065 7861 6d70 6c65 2075 7365 7320 he example uses \n+001541c0: 6120 6879 706f 7468 6574 6963 616c 2073 a hypothetical s\n+001541d0: 746f 636b 2071 756f 7465 2073 6572 7669 tock quote servi\n+001541e0: 6365 2061 6e64 2065 7863 6861 6e67 6520 ce and exchange \n+001541f0: 7261 7465 2073 6572 7669 6365 2c20 6163 rate service, ac\n+00154200: 7475 616c 2073 6572 7669 6365 7320 7375 tual services su\n+00154210: 6368 2061 7320 7468 6573 6520 6172 6520 ch as these are \n+00154220: 6176 6169 6c61 626c 6520 666f 7220 6672 available for fr\n+00154230: 6565 206f 6e20 7468 6520 7765 622e 3c2f ee on the web..

      //gsoap ns1 ser\n+00154290: 7669 6365 206e 616d 6573 7061 6365 3a20 vice namespace: \n+001542a0: 2075 726e 3a47 6574 5175 6f74 6520 3c2f urn:GetQuote
      .int ns1__getQuote\n+00154300: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (char<\n+00154320: 2f73 7061 6e3e 202a 7379 6d62 6f6c 2c20 /span> *symbol, \n+00154330: 3c73 7061 6e20 636c 6173 733d 226b 6579 float<\n+00154350: 2f73 7061 6e3e 2026 616d 703b 7265 7375 /span> &resu\n+00154360: 6c74 293b 203c 2f64 6976 3e0a 3c64 6976 lt);
      . <\n+00154380: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      //\n+001543b0: 6773 6f61 7020 6e73 3220 7365 7276 6963 gsoap ns2 servic\n+001543c0: 6520 6e61 6d65 7370 6163 653a 2020 7572 e namespace: ur\n+001543d0: 6e3a 4375 7272 656e 6379 4578 6368 616e n:CurrencyExchan\n+001543e0: 6765 203c 2f73 7061 6e3e 3c2f 6469 763e ge
      \n+001543f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      int\n+00154420: 3c2f 7370 616e 3e20 6e73 325f 5f67 6574 ns2__get\n+00154430: 5261 7465 283c 7370 616e 2063 6c61 7373 Rate(c\n+00154450: 6861 723c 2f73 7061 6e3e 202a 636f 756e har *coun\n+00154460: 7472 7931 2c20 3c73 7061 6e20 636c 6173 try1, \n+00154480: 6368 6172 3c2f 7370 616e 3e20 2a63 6f75 char *cou\n+00154490: 6e74 7279 322c 203c 7370 616e 2063 6c61 ntry2, float &a\n+001544c0: 6d70 3b72 6573 756c 7429 3b20 3c2f 6469 mp;result); .
      .<\n+00154500: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00154510: 656e 7422 3e2f 2f67 736f 6170 206e 7333 ent\">//gsoap ns3\n+00154520: 2073 6572 7669 6365 206e 616d 653a 2020 service name: \n+00154530: 2020 2020 2071 756f 7465 7820 3c2f 7370 quotex
      .
      //gsoap ns3 se\n+00154580: 7276 6963 6520 7374 796c 653a 2020 2020 rvice style: \n+00154590: 2020 7270 6320 3c2f 7370 616e 3e3c 2f64 rpc .
      //gs\n+001545d0: 6f61 7020 6e73 3320 7365 7276 6963 6520 oap ns3 service \n+001545e0: 656e 636f 6469 6e67 3a20 2020 656e 636f encoding: enco\n+001545f0: 6465 6420 3c2f 7370 616e 3e3c 2f64 6976 ded .
      //gsoa\n+00154630: 7020 6e73 3320 7365 7276 6963 6520 706f p ns3 service po\n+00154640: 7274 3a20 2020 2020 2020 6874 7470 3a2f rt: http:/\n+00154650: 2f77 7777 2e6d 7964 6f6d 6169 6e2e 636f /www.mydomain.co\n+00154660: 6d2f 7175 6f74 6578 2e63 6769 203c 2f73 m/quotex.cgi
      .
      //gsoap ns3 s\n+001546b0: 6572 7669 6365 206e 616d 6573 7061 6365 ervice namespace\n+001546c0: 3a20 2075 726e 3a71 756f 7465 7820 3c2f : urn:quotex
      .int ns3__getQuote\n+00154720: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (char<\n+00154740: 2f73 7061 6e3e 202a 7379 6d62 6f6c 2c20 /span> *symbol, \n+00154750: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *country, \n+00154780: 3c73 7061 6e20 636c 6173 733d 226b 6579 float<\n+001547a0: 2f73 7061 6e3e 2026 616d 703b 7265 7375 /span> &resu\n+001547b0: 6c74 293b 3c2f 6469 763e 0a3c 2f64 6976 lt);
      .<\n+001553a0: 703e 4f6e 6c79 2074 6865 203c 636f 6465 p>Only the name
      mem\n+001553c0: 6265 7220 6973 2073 6572 6961 6c69 7a65 ber is serialize\n+001553d0: 6420 6f66 203c 636f 6465 3e6e 735f 5f72 d of ns__r\n+001553e0: 6563 6f72 643c 2f63 6f64 653e 2e3c 2f70 ecord..

      Another exa\n+00155400: 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 2063 mple:

      .
      \n+00155420: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      extern clas\n+00155470: 7320 3c2f 7370 616e 3e73 7464 3a3a 6f73 s std::os\n+00155480: 7472 6561 6d3b 203c 7370 616e 2063 6c61 tream; // \n+001554a0: 7374 643a 3a6f 7374 7265 616d 2063 616e std::ostream can\n+001554b0: 2623 3339 3b74 2062 6520 7365 7269 616c 't be serial\n+001554c0: 697a 6564 2c20 6275 7420 6e65 6564 2074 ized, but need t\n+001554d0: 6f20 6265 2064 6563 6c61 7265 643c 2f73 o be declared
      .
      class \n+00155520: 6e73 5f5f 6d79 436c 6173 7320 3c2f 6469 ns__myClass .
      { pub\n+00155560: 6c69 633c 2f73 7061 6e3e 3a3c 2f64 6976 lic:.
      vi\n+001555a0: 7274 7561 6c3c 2f73 7061 6e3e 203c 7370 rtual void print(std::os\n+001555e0: 7472 6561 6d20 2661 6d70 3b73 2920 3c73 tream &s) const\n+00155610: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // need \n+00155630: 6f73 7472 6561 6d20 6865 7265 203c 2f73 ostream here
      .
      \n+00155660: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... //
      .
      };<\n+001556a0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

      \n+001556c0: 496e 206f 7468 6572 2063 6173 6573 2077 In other cases w\n+001556d0: 6520 646f 2077 616e 7420 746f 2064 6563 e do want to dec\n+001556e0: 6c61 7265 2061 2074 7970 6520 7468 6174 lare a type that\n+001556f0: 2073 6f61 7063 7070 3220 7368 6f75 6c64 soapcpp2 should\n+00155700: 2063 6f70 7920 696e 746f 203c 656d 3e3c copy into <\n+00155710: 636f 6465 3e73 6f61 7053 7475 622e 683c code>soapStub.h<\n+00155720: 2f63 6f64 653e 3c2f 656d 3e20 666f 7220 /code> for \n+00155730: 7468 6520 6170 706c 6963 6174 696f 6e20 the application \n+00155740: 736f 7572 6365 2063 6f64 652c 2062 7574 source code, but\n+00155750: 2077 6869 6368 2073 686f 756c 6420 6e6f which should no\n+00155760: 7420 6265 2073 6572 6961 6c69 7a61 626c t be serializabl\n+00155770: 652e 2057 6520 6361 6e20 7573 6520 3c63 e. We can use extern for this or pu\n+001557a0: 7420 7468 6520 6465 636c 6172 6174 696f t the declaratio\n+001557b0: 6e20 696e 203c 636f 6465 3e5b 3c2f 636f n in [ and ]<\n+001557d0: 2f63 6f64 653e 2062 7261 636b 6574 733a /code> brackets:\n+001557e0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

      .
      [ <\n+00155810: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      \n+00155840: 636c 6173 7320 3c2f 7370 616e 3e6e 735f class ns_\n+00155850: 5f6d 7942 6173 6520 3c73 7061 6e20 636c _myBase //\n+00155870: 2062 6173 6520 636c 6173 7320 6e65 6564 base class need\n+00155880: 206e 6f74 2062 6520 7365 7269 616c 697a not be serializ\n+00155890: 6162 6c65 3c2f 7370 616e 3e3c 2f64 6976 able.
      {
      .\n+001558d0: 2020 2020 2e2e 2e20 3c73 7061 6e20 636c ... //\n+001558f0: 206d 656d 6265 7273 3c2f 7370 616e 3e3c members<\n+00155900: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      }; .
      ]
      .<\n+00155940: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00155950: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >class ns__myDerive\n+00155980: 6420 3a20 6e73 5f5f 6d79 4261 7365 203c d : ns__myBase <\n+00155990: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      {
      .\n+001559b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      ... //\n+001559e0: 206d 656d 6265 7273 3c2f 7370 616e 3e3c members<\n+001559f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      }; .

      We c\n+00155a30: 616e 2075 7365 203c 636f 6465 3e5b 3c2f an use [ and \n+00155a50: 5d3c 2f63 6f64 653e 2062 7261 636b 6574 ] bracket\n+00155a60: 7320 666f 7220 7061 7274 7320 6f66 2074 s for parts of t\n+00155a70: 6865 2063 6f64 652c 2066 6f72 2065 7861 he code, for exa\n+00155a80: 6d70 6c65 2074 6f20 6d61 6b65 2073 6576 mple to make sev\n+00155a90: 6572 616c 2063 6c61 7373 206d 656d 6265 eral class membe\n+00155aa0: 7273 2074 7261 6e73 6965 6e74 3a3c 2f70 rs transient:.

      [ typedef\n+00155b00: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int transientI\n+00155b30: 6e74 3b20 5d20 3c2f 6469 763e 0a3c 6469 nt; ]
      .<\n+00155b50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00155b60: 6f72 6422 3e63 6c61 7373 203c 2f73 7061 ord\">class ns__myClass .
      {
      .<\n+00155ba0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00155bb0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > int\n+00155bd0: 3c2f 7370 616e 3e20 613b 203c 7370 616e a; // will be seri\n+00155c00: 616c 697a 6564 203c 2f73 7061 6e3e 3c2f alized .
      [ .
      \n+00155c60: 696e 743c 2f73 7061 6e3e 2062 3b20 3c73 int b; // transient\n+00155c90: 206d 656d 6265 7220 3c2f 7370 616e 3e3c member <\n+00155ca0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      char \n+00155ce0: 735b 3235 365d 3b20 3c73 7061 6e20 636c s[256]; //\n+00155d00: 2074 7261 6e73 6965 6e74 206d 656d 6265 transient membe\n+00155d10: 7220 3c2f 7370 616e 3e3c 2f64 6976 3e0a r
      .\n+00155d20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      ]
      .\n+00155d50: 2020 3c73 7061 6e20 636c 6173 733d 226b extern \n+00155d90: 666c 6f61 743c 2f73 7061 6e3e 2064 3b20 float d; \n+00155da0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // transie\n+00155dc0: 6e74 2074 7970 6520 666c 6f61 7420 616e nt type float an\n+00155dd0: 6420 6d65 6d62 6572 3c2f 7370 616e 3e3c d member<\n+00155de0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      char \n+00155e20: 2a74 3b20 3c73 7061 6e20 636c 6173 733d *t; // wil\n+00155e40: 6c20 6265 2073 6572 6961 6c69 7a65 6420 l be serialized \n+00155e50: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+00155e70: 2020 7472 616e 7369 656e 7449 6e74 202a transientInt *\n+00155e80: 6e3b 203c 7370 616e 2063 6c61 7373 3d22 n; // tran\n+00155ea0: 7369 656e 7420 7479 7065 2069 6e74 2061 sient type int a\n+00155eb0: 6e64 206d 656d 6265 7220 3c2f 7370 616e nd member
      .
      [ .
      v\n+00155f10: 6972 7475 616c 3c2f 7370 616e 3e20 3c73 irtual void method(char\n+00155f70: 2062 7566 5b31 3032 345d 293b 203c 7370 buf[1024]); // does not c\n+00155fa0: 7265 6174 6520 6120 6368 6172 5b31 3032 reate a char[102\n+00155fb0: 345d 2073 6572 6961 6c69 7a65 7220 3c2f 4] serializer
      . \n+00155fe0: 5d20 203c 2f64 6976 3e0a 3c64 6976 2063 ]
      .
      };.

      I\n+00156020: 6e20 7468 6973 2065 7861 6d70 6c65 2c20 n this example, \n+00156030: 3c63 6f64 653e 6e73 5f5f 6d79 436c 6173 ns__myClas\n+00156040: 733c 2f63 6f64 653e 2068 6173 2074 6872 s has thr\n+00156050: 6565 2074 7261 6e73 6965 6e74 206d 656d ee transient mem\n+00156060: 6265 7273 3a20 3c63 6f64 653e 623c 2f63 bers: b, s, and \n+00156090: 6e3c 2f63 6f64 653e 2077 6869 6368 2077 n which w\n+001560a0: 696c 6c20 6e6f 7420 6265 2073 6572 6961 ill not be seria\n+001560b0: 6c69 7a65 642e 204d 656d 6265 7220 3c63 lized. Member n is \n+001560d0: 7472 616e 7369 656e 7420 6265 6361 7573 transient becaus\n+001560e0: 6520 7468 6520 7479 7065 2069 7320 6465 e the type is de\n+001560f0: 636c 6172 6564 2077 6974 6869 6e20 6120 clared within a \n+00156100: 7472 616e 7369 656e 7420 626c 6f63 6b2e transient block.\n+00156110: 2050 6f69 6e74 6572 732c 2072 6566 6572 Pointers, refer\n+00156120: 656e 6365 732c 2061 6e64 2061 7272 6179 ences, and array\n+00156130: 7320 6f66 2074 7261 6e73 6965 6e74 2074 s of transient t\n+00156140: 7970 6573 2061 7265 2074 7261 6e73 6965 ypes are transie\n+00156150: 6e74 2e20 5468 6520 7369 6e67 6c65 2063 nt. The single c\n+00156160: 6c61 7373 206d 6574 686f 6420 6973 2065 lass method is e\n+00156170: 6e63 6170 7375 6c61 7465 6420 7769 7468 ncapsulated with\n+00156180: 696e 203c 636f 6465 3e5b 3c2f 636f 6465 in [ and ] to prevent \n+001561b0: 736f 6170 6370 7032 2066 726f 6d20 6372 soapcpp2 from cr\n+001561c0: 6561 7469 6e67 2073 6572 6961 6c69 7a65 eating serialize\n+001561d0: 7273 2066 6f72 2074 6865 203c 636f 6465 rs for the char[1024] type.

      .

      \n+00156200: 5765 2061 6c73 6f20 7573 6520 3c63 6f64 We also use [ and <\n+00156220: 636f 6465 3e5d 3c2f 636f 6465 3e20 6272 code>] br\n+00156230: 6163 6b65 7473 2074 6f20 696e 7472 6f64 ackets to introd\n+00156240: 7563 6520 6120 7472 616e 7369 656e 7420 uce a transient \n+00156250: 696e 7465 6765 7220 7479 7065 203c 636f integer type transientInt<\n+00156270: 2f63 6f64 653e 2075 7369 6e67 2061 2074 /code> using a t\n+00156280: 7970 6564 6566 2e20 5765 2063 616e 6e6f ypedef. We canno\n+00156290: 7420 7573 6520 3c63 6f64 653e 6578 7465 t use exte\n+001562a0: 726e 3c2f 636f 6465 3e20 7769 7468 203c rn with <\n+001562b0: 636f 6465 3e74 7970 6564 6566 3c2f 636f code>typedef because this\n+001562d0: 2063 6f6e 7374 7275 6374 2069 7320 7265 construct is re\n+001562e0: 7365 7276 6564 2066 6f72 2063 7573 746f served for custo\n+001562f0: 6d20 7365 7269 616c 697a 6572 732e 3c2f m serializers..

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

      .

      .Serialization \n+00156370: 2261 7320 6973 2220 6f66 2076 6f6c 6174 \"as is\" of volat\n+00156380: 696c 6520 6461 7461 2074 7970 6573 3c2f ile data types.

      Types dec\n+001563a0: 6c61 7265 6420 3c63 6f64 653e 766f 6c61 lared vola\n+001563b0: 7469 6c65 3c2f 636f 6465 3e20 696e 2061 tile in a\n+001563c0: 6e20 696e 7465 7266 6163 6520 6865 6164 n interface head\n+001563d0: 6572 2066 696c 6520 6172 6520 7365 7269 er file are seri\n+001563e0: 616c 697a 6162 6c65 2062 7574 206e 6f74 alizable but not\n+001563f0: 2063 6f70 6965 6420 6279 2073 6f61 7063 copied by soapc\n+00156400: 7070 3220 746f 203c 656d 3e3c 636f 6465 pp2 to soapStub.h. These t\n+00156430: 7970 6573 2061 7265 2074 7970 6963 616c ypes are typical\n+00156440: 6c79 206c 6962 7261 7279 2074 7970 6573 ly library types\n+00156450: 2074 6861 7420 6172 6520 696e 636c 7564 that are includ\n+00156460: 6564 2069 6e20 7468 6520 736f 7572 6365 ed in the source\n+00156470: 2063 6f64 6520 616e 6420 7368 6f75 6c64 code and should\n+00156480: 206e 6f74 2062 6520 7265 6465 6669 6e65 not be redefine\n+00156490: 6420 696e 2074 6865 2061 7070 6c69 6361 d in the applica\n+001564a0: 7469 6f6e 2073 6f75 7263 6520 636f 6465 tion source code\n+001564b0: 2e20 5765 2077 616e 7420 746f 2073 6572 . We want to ser\n+001564c0: 6961 6c69 7a65 2074 6865 7365 206c 6962 ialize these lib\n+001564d0: 7261 7279 2074 7970 6573 2022 6173 2069 rary types \"as i\n+001564e0: 7322 2077 6974 686f 7574 2072 6564 6566 s\" without redef\n+001564f0: 696e 696e 6720 7468 656d 2e3c 2f70 3e0a ining them.

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

      Consider for \n+00156510: 6578 616d 706c 6520 3c63 6f64 653e 7374 example st\n+00156520: 7275 6374 2074 6d3c 2f63 6f64 653e 2c20 ruct tm, \n+00156530: 6465 636c 6172 6564 2069 6e20 3c65 6d3e declared in \n+00156540: 3c63 6f64 653e 7469 6d65 2e68 3c2f 636f time.h. The st\n+00156560: 7275 6374 7572 6520 6d61 7920 6163 7475 ructure may actu\n+00156570: 616c 6c79 2076 6172 7920 6265 7477 6565 ally vary betwee\n+00156580: 6e20 706c 6174 666f 726d 732c 2062 7574 n platforms, but\n+00156590: 2074 6865 203c 636f 6465 3e74 6d3c 2f63 the tm structure i\n+001565b0: 6e63 6c75 6465 7320 6174 206c 6561 7374 ncludes at least\n+001565c0: 2074 6865 2066 6f6c 6c6f 7769 6e67 206d the following m\n+001565d0: 656d 6265 7273 2061 7320 6465 636c 6172 embers as declar\n+001565e0: 6564 2069 6e20 7468 6520 666f 6c6c 6f77 ed in the follow\n+001565f0: 696e 6720 696e 7465 7266 6163 6520 6865 ing interface he\n+00156600: 6164 6572 2066 696c 6520 666f 7220 736f ader file for so\n+00156610: 6170 6370 7032 3a3c 2f70 3e0a 3c64 6976 apcpp2:

      .
      #\n+00156660: 696e 636c 7564 6520 266c 743b 7469 6d65 include <time\n+00156670: 2e68 2667 743b 3c2f 7370 616e 3e3c 2f64 .h>.
      vola\n+001566b0: 7469 6c65 3c2f 7370 616e 3e20 3c73 7061 tile struct \n+001566e0: 746d 203c 2f64 6976 3e0a 3c64 6976 2063 tm
      .
      {.
      int t\n+00156740: 6d5f 7365 633b 2020 2020 2020 2020 203c m_sec; <\n+00156750: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00156760: 656e 7422 3e2f 2a20 7365 636f 6e64 7320 ent\">/* seconds \n+00156770: 2830 202d 2036 3029 202a 2f3c 2f73 7061 (0 - 60) */
      .
      \n+001567a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int tm_min; \n+001567d0: 2020 2020 203c 7370 616e 2063 6c61 7373 /* mi\n+001567f0: 6e75 7465 7320 2830 202d 2035 3929 202a nutes (0 - 59) *\n+00156800: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
      .\n+00156810: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      \n+00156840: 696e 743c 2f73 7061 6e3e 2074 6d5f 686f int tm_ho\n+00156850: 7572 3b20 2020 2020 2020 203c 7370 616e ur; /* hours (0 - 2\n+00156880: 3329 202a 2f3c 2f73 7061 6e3e 203c 2f64 3) */ .
      int t\n+001568d0: 6d5f 6d64 6179 3b20 2020 2020 2020 203c m_mday; <\n+001568e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001568f0: 656e 7422 3e2f 2a20 6461 7920 6f66 206d ent\">/* day of m\n+00156900: 6f6e 7468 2028 3120 2d20 3331 2920 2a2f onth (1 - 31) */\n+00156910: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
      .<\n+00156920: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00156930: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n+00156950: 6e74 3c2f 7370 616e 3e20 746d 5f6d 6f6e nt tm_mon\n+00156960: 3b20 2020 2020 2020 2020 3c73 7061 6e20 ; \n+00156980: 2f2a 206d 6f6e 7468 206f 6620 7965 6172 /* month of year\n+00156990: 2028 3020 2d20 3131 2920 2a2f 3c2f 7370 (0 - 11) */
      .
      \n+001569c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int tm_year; \n+001569f0: 2020 2020 2020 3c73 7061 6e20 636c 6173 /* y\n+00156a10: 6561 7220 2d20 3139 3030 202a 2f3c 2f73 ear - 1900 */
      . \n+00156a40: 2020 3c73 7061 6e20 636c 6173 733d 226b int<\n+00156a60: 2f73 7061 6e3e 2074 6d5f 7764 6179 3b20 /span> tm_wday; \n+00156a70: 2020 2020 2020 203c 7370 616e 2063 6c61 /* \n+00156a90: 6461 7920 6f66 2077 6565 6b20 2853 756e day of week (Sun\n+00156aa0: 6461 7920 3d20 3029 202a 2f3c 2f73 7061 day = 0) */
      .
      \n+00156ad0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int tm_yday; \n+00156b00: 2020 2020 203c 7370 616e 2063 6c61 7373 /* da\n+00156b20: 7920 6f66 2079 6561 7220 2830 202d 2033 y of year (0 - 3\n+00156b30: 3635 2920 2a2f 3c2f 7370 616e 3e20 3c2f 65) */ .
      int \n+00156b80: 746d 5f69 7364 7374 3b20 2020 2020 2020 tm_isdst; \n+00156b90: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* is summ\n+00156bb0: 6572 2074 696d 6520 696e 2065 6666 6563 er time in effec\n+00156bc0: 743f 202a 2f3c 2f73 7061 6e3e 203c 2f64 t? */ .
      char \n+00156c10: 2a74 6d5f 7a6f 6e65 3b20 2020 2020 2020 *tm_zone; \n+00156c20: 203c 7370 616e 2063 6c61 7373 3d22 636f /* abbrev\n+00156c40: 6961 7469 6f6e 206f 6620 7469 6d65 7a6f iation of timezo\n+00156c50: 6e65 206e 616d 6520 2a2f 3c2f 7370 616e ne name */
      .
      <\n+00156c80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00156c90: 6f72 6474 7970 6522 3e6c 6f6e 673c 2f73 ordtype\">long tm_gmtoff; \n+00156cb0: 2020 2020 203c 7370 616e 2063 6c61 7373 /* of\n+00156cd0: 6673 6574 2066 726f 6d20 5554 4320 696e fset from UTC in\n+00156ce0: 2073 6563 6f6e 6473 202a 2f3c 2f73 7061 seconds */
      .
      };.

      B\n+00156d30: 7920 6465 636c 6172 696e 6720 7374 7275 y declaring stru\n+00156d40: 6374 203c 636f 6465 3e74 6d3c 2f63 6f64 ct tm volatile, soa\n+00156d60: 7063 7070 3220 646f 6573 206e 6f74 2072 pcpp2 does not r\n+00156d70: 6564 6566 696e 6520 6974 2069 6e20 7468 edefine it in th\n+00156d80: 6520 6f75 7470 7574 2073 6f75 7263 6520 e output source \n+00156d90: 636f 6465 2e20 5468 6520 3c63 6f64 653e code. The \n+00156da0: 2369 6e63 6c75 6465 2026 6c74 3b74 696d #include <tim\n+00156db0: 652e 6826 6774 3b3c 2f63 6f64 653e 2069 e.h> i\n+00156dc0: 7320 636f 7069 6564 2074 6f20 7468 6520 s copied to the \n+00156dd0: 736f 7572 6365 2063 6f64 6520 6f75 7470 source code outp\n+00156de0: 7574 2e20 5765 2063 616e 206e 6f77 2073 ut. We can now s\n+00156df0: 6572 6961 6c69 7a65 2074 6865 203c 636f erialize the tm str\n+00156e10: 7563 7475 7265 2e20 5468 6520 666f 6c6c ucture. The foll\n+00156e20: 6f77 696e 6720 6578 616d 706c 6520 7365 owing example se\n+00156e30: 7269 616c 697a 6573 2074 6865 206c 6f63 rializes the loc\n+00156e40: 616c 2074 696d 6520 7374 6f72 6564 2069 al time stored i\n+00156e50: 6e20 6120 3c63 6f64 653e 746d 3c2f 636f n a tm structure to\n+00156e70: 2073 7464 6f75 743a 3c2f 703e 0a3c 6469 stdout:

      .
      .
      time_t\n+00156fb0: 2054 203d 2074 696d 6528 4e55 4c4c 293b T = time(NULL);\n+00156fc0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      \n+00156ff0: 7374 7275 6374 203c 2f73 7061 6e3e 746d struct tm\n+00157000: 202a 7420 3d20 6c6f 6361 6c74 696d 6528 *t = localtime(\n+00157010: 2661 6d70 3b54 293b 203c 2f64 6976 3e0a &T);
      .\n+00157020: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      soap_write_tm(\n+00157040: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00157070: 2074 293b 203c 2f64 6976 3e0a 3c64 6976 t);
      .soap_destroy<\n+001570f0: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+00157120: 2f61 3e29 3b20 3c2f 6469 763e 0a3c 6469 /a>);
      .<\n+00157140: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00157150: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00157160: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+00157170: 6761 3831 6130 3039 6165 3165 6138 3235 ga81a009ae1ea825\n+00157180: 6130 3565 3532 3431 6532 6237 6138 6563 a05e5241e2b7a8ec\n+00157190: 6539 223e 736f 6170 5f65 6e64 3c2f 613e e9\">soap_end\n+001571a0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001571d0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
      .
      soap_free(<\n+00157250: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00157260: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00157270: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+00157280: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
      .
      It is also poss\n+001572b0: 6962 6c65 2074 6f20 7365 7269 616c 697a ible to serializ\n+001572c0: 6520 7468 6520 3c63 6f64 653e 746d 3c2f e the tm members as\n+001572e0: 2058 4d4c 2061 7474 7269 6275 7465 7320 XML attributes \n+001572f0: 6279 2064 6563 6c61 7269 6e67 2074 6865 by declaring the\n+00157300: 206d 656d 6265 7273 2061 7320 6174 7472 members as attr\n+00157310: 6962 7574 6573 2077 6974 6820 7468 6520 ibutes with the \n+00157320: 3c63 6f64 653e 403c 2f63 6f64 653e 2071 @ q\n+00157330: 7561 6c69 6669 6572 2c20 7365 6520 5365 ualifier, see Se\n+00157340: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction How to declare \n+00157380: 584d 4c20 6174 7472 6962 7574 6573 3c2f XML attributes .

      .

      If y\n+001573a0: 6f75 2077 616e 7420 746f 2070 726f 6475 ou want to produ\n+001573b0: 6365 2061 2073 6368 656d 6120 6669 6c65 ce a schema file\n+001573c0: 2c20 7361 7920 3c65 6d3e 3c63 6f64 653e , say \n+001573d0: 7469 6d65 2e78 7364 3c2f 636f 6465 3e3c time.xsd<\n+001573e0: 2f65 6d3e 2c20 7468 6174 2064 6566 696e /em>, that defin\n+001573f0: 6573 2061 6e20 584d 4c20 7363 6865 6d61 es an XML schema\n+00157400: 2061 6e64 206e 616d 6573 7061 6365 2066 and namespace f\n+00157410: 6f72 2074 6865 203c 636f 6465 3e74 6d3c or the tm<\n+00157420: 2f63 6f64 653e 2073 7472 7563 742c 2079 /code> struct, y\n+00157430: 6f75 2063 616e 2061 6464 2061 203c 636f ou can add a typedef declaration to\n+00157460: 2074 6865 2068 6561 6465 7220 6669 6c65 the header file\n+00157470: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

      .
      #includ\n+001574c0: 6520 266c 743b 7469 6d65 2e68 2667 743b e <time.h>\n+001574d0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+001574f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 volatile stru\n+00157530: 6374 203c 2f73 7061 6e3e 746d 3c2f 6469 ct tm.
      {
      . \n+00157570: 2020 202e 2e2e 203c 7370 616e 2063 6c61 ... // \n+00157590: 7365 6520 6162 6f76 653c 2f73 7061 6e3e see above\n+001575a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173

      .
      };.
      typede\n+001575f0: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f s\n+00157610: 7472 7563 7420 3c2f 7370 616e 3e74 6d20 truct tm \n+00157620: 7469 6d65 5f5f 7374 7275 6374 5f74 6d3b time__struct_tm;\n+00157630: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
      .
      or simply use c\n+00157660: 6f6c 6f6e 206e 6f74 6174 696f 6e20 7369 olon notation si\n+00157670: 6e63 6520 7765 206b 6565 7020 7468 6520 nce we keep the \n+00157680: 3c63 6f64 653e 746d 3c2f 636f 6465 3e20 tm \n+00157690: 6e61 6d65 3a3c 2f70 3e0a 3c64 6976 2063 name:

      .
      \n+001576b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      #in\n+001576e0: 636c 7564 6520 266c 743b 7469 6d65 2e68 clude <time.h\n+001576f0: 2667 743b 3c2f 7370 616e 3e3c 2f64 6976 >.
      volati\n+00157730: 6c65 3c2f 7370 616e 3e20 3c73 7061 6e20 le \n+00157750: 7374 7275 6374 203c 2f73 7061 6e3e 7469 struct ti\n+00157760: 6d65 3a74 6d20 3c2f 6469 763e 0a3c 6469 me:tm
      .{\n+00157780: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      int tm_sec; \n+001577d0: 2020 3c73 7061 6e20 636c 6173 733d 2263 /* secon\n+001577f0: 6473 2028 3020 2d20 3630 2920 2a2f 3c2f ds (0 - 60) */
      . \n+00157820: 2020 203c 7370 616e 2063 6c61 7373 3d22 int\n+00157840: 3c2f 7370 616e 3e20 746d 5f6d 696e 3b20 tm_min; \n+00157850: 2020 2020 2020 2020 3c73 7061 6e20 636c /*\n+00157870: 206d 696e 7574 6573 2028 3020 2d20 3539 minutes (0 - 59\n+00157880: 2920 2a2f 3c2f 7370 616e 3e20 3c2f 6469 ) */ .
      int tm\n+001578d0: 5f68 6f75 723b 2020 2020 2020 2020 3c73 _hour; /* hours (0 \n+00157900: 2d20 3233 2920 2a2f 3c2f 7370 616e 3e20 - 23) */ \n+00157910: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      int tm_mday; \n+00157960: 2020 3c73 7061 6e20 636c 6173 733d 2263 /* day o\n+00157980: 6620 6d6f 6e74 6820 2831 202d 2033 3129 f month (1 - 31)\n+00157990: 202a 2f3c 2f73 7061 6e3e 203c 2f64 6976 */ .
      int tm_\n+001579e0: 6d6f 6e3b 2020 2020 2020 2020 203c 7370 mon; /* month of y\n+00157a10: 6561 7220 2830 202d 2031 3129 202a 2f3c ear (0 - 11) */<\n+00157a20: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
      .\n+00157a40: 2020 2020 3c73 7061 6e20 636c 6173 733d in\n+00157a60: 743c 2f73 7061 6e3e 2074 6d5f 7965 6172 t tm_year\n+00157a70: 3b20 2020 2020 2020 203c 7370 616e 2063 ; /\n+00157a90: 2a20 7965 6172 202d 2031 3930 3020 2a2f * year - 1900 */\n+00157aa0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
      .<\n+00157ab0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00157ac0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i\n+00157ae0: 6e74 3c2f 7370 616e 3e20 746d 5f77 6461 nt tm_wda\n+00157af0: 793b 2020 2020 2020 2020 3c73 7061 6e20 y; \n+00157b10: 2f2a 2064 6179 206f 6620 7765 656b 2028 /* day of week (\n+00157b20: 5375 6e64 6179 203d 2030 2920 2a2f 3c2f Sunday = 0) */
      . \n+00157b50: 2020 203c 7370 616e 2063 6c61 7373 3d22 int\n+00157b70: 3c2f 7370 616e 3e20 746d 5f79 6461 793b tm_yday;\n+00157b80: 2020 2020 2020 2020 3c73 7061 6e20 636c /*\n+00157ba0: 2064 6179 206f 6620 7965 6172 2028 3020 day of year (0 \n+00157bb0: 2d20 3336 3529 202a 2f3c 2f73 7061 6e3e - 365) */\n+00157bc0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      int tm_isdst; \n+00157c10: 2020 203c 7370 616e 2063 6c61 7373 3d22 /* is s\n+00157c30: 756d 6d65 7220 7469 6d65 2069 6e20 6566 ummer time in ef\n+00157c40: 6665 6374 3f20 2a2f 3c2f 7370 616e 3e20 fect? */ \n+00157c50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      char *tm_zone; \n+00157ca0: 2020 3c73 7061 6e20 636c 6173 733d 2263 /* abbre\n+00157cc0: 7669 6174 696f 6e20 6f66 2074 696d 657a viation of timez\n+00157cd0: 6f6e 6520 6e61 6d65 202a 2f3c 2f73 7061 one name */
      .
      \n+00157d00: 3c73 7061 6e20 636c 6173 733d 226b 6579 long tm_gmtoff;\n+00157d30: 2020 2020 203c 7370 616e 2063 6c61 7373 /* of\n+00157d50: 6673 6574 2066 726f 6d20 5554 4320 696e fset from UTC in\n+00157d60: 2073 6563 6f6e 6473 202a 2f3c 2f73 7061 seconds */
      .
      };.

      W\n+00157db0: 6520 7573 6564 2074 6865 2074 7970 6564 e used the typed\n+00157dc0: 6566 206e 616d 6520 3c63 6f64 653e 7469 ef name ti\n+00157dd0: 6d65 5f5f 7374 7275 6374 5f74 6d3c 2f63 me__struct_tm rather than\n+00157df0: 203c 636f 6465 3e74 696d 655f 5f74 6d3c time__tm<\n+00157e00: 2f63 6f64 653e 2c20 6265 6361 7573 6520 /code>, because \n+00157e10: 6120 7363 6865 6d61 206e 616d 6520 636c a schema name cl\n+00157e20: 6173 6820 7769 6c6c 206f 6363 7572 2066 ash will occur f\n+00157e30: 6f72 2074 6865 2066 6972 7374 2065 7861 or the first exa\n+00157e40: 6d70 6c65 2061 626f 7665 2074 6861 7420 mple above that \n+00157e50: 6861 7320 3c63 6f64 653e 746d 3c2f 636f has tm already decl\n+00157e70: 6172 6564 2061 7320 7365 7269 616c 697a ared as serializ\n+00157e80: 6162 6c65 2074 7970 6520 696e 2074 6865 able type in the\n+00157e90: 2073 6368 656d 6120 6f66 2074 6865 2067 schema of the g\n+00157ea0: 656e 6572 6174 6564 2057 5344 4c2e 2054 enerated WSDL. T\n+00157eb0: 6865 2073 6563 6f6e 6420 6578 616d 706c he second exampl\n+00157ec0: 6520 7769 7468 2074 6865 2063 6f6c 6f6e e with the colon\n+00157ed0: 206e 6f74 6174 696f 6e20 6176 6f69 6473 notation avoids\n+00157ee0: 2074 6869 7320 616c 746f 6765 7468 6572 this altogether\n+00157ef0: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

      .

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

      .

      \n+00157f30: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .How to declar\n+00157f60: 6520 6375 7374 6f6d 2073 6572 6961 6c69 e custom seriali\n+00157f70: 7a65 7273 2061 6e64 2064 6573 6572 6961 zers and deseria\n+00157f80: 6c69 7a65 7273 3c2f 6832 3e0a 3c70 3e59 lizers

      .

      Y\n+00157f90: 6f75 2063 616e 2069 6d70 6c65 6d65 6e74 ou can implement\n+00157fa0: 2079 6f75 7220 6f77 6e20 6375 7374 6f6d your own custom\n+00157fb0: 2073 6572 6961 6c69 7a65 7273 2066 6f72 serializers for\n+00157fc0: 2064 6174 6120 7479 7065 732e 2041 2063 data types. A c\n+00157fd0: 7573 746f 6d20 7365 7269 616c 697a 6572 ustom serializer\n+00157fe0: 2069 7320 6465 636c 6172 6564 2069 6e20 is declared in \n+00157ff0: 616e 2069 6e74 6572 6661 6365 2068 6561 an interface hea\n+00158000: 6465 7220 6669 6c65 2066 6f72 2073 6f61 der file for soa\n+00158010: 7063 7070 3220 7573 696e 6720 7468 6520 pcpp2 using the \n+00158020: 7061 6972 206f 6620 6b65 7977 6f72 6473 pair of keywords\n+00158030: 203c 636f 6465 3e65 7874 6572 6e20 7479 extern ty\n+00158040: 7065 6465 663c 2f63 6f64 653e 2e20 466f pedef. Fo\n+00158050: 7220 6578 616d 706c 653a 3c2f 703e 0a3c r example:

      .<\n+00158060: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+00158070: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
      ext\n+001580a0: 6572 6e3c 2f73 7061 6e3e 203c 7370 616e ern typedef \n+001580d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *MyData; <\n+00158100: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      st\n+00158130: 7275 6374 203c 2f73 7061 6e3e 5361 6d70 ruct Samp\n+00158140: 6c65 203c 2f64 6976 3e0a 3c64 6976 2063 le
      .
      {.
      MyData\n+00158180: 2073 3b20 3c73 7061 6e20 636c 6173 733d s; // use\n+001581a0: 2063 7573 746f 6d20 7365 7269 616c 697a custom serializ\n+001581b0: 6572 2066 6f72 2074 6869 7320 6d65 6d62 er for this memb\n+001581c0: 6572 203c 2f73 7061 6e3e 3c2f 6469 763e er
      \n+001581d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      char *t;\n+00158210: 2020 3c73 7061 6e20 636c 6173 733d 2263 // use a\n+00158230: 7574 6f2d 6765 6e65 7261 7465 6420 7365 uto-generated se\n+00158240: 7269 616c 697a 6572 3c2f 7370 616e 3e3c rializer<\n+00158250: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      };
      \n+00158270: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

      Then \n+00158290: 7072 6f76 6964 6520 7468 6520 666f 6c6c provide the foll\n+001582a0: 6f77 696e 6720 6675 6e63 7469 6f6e 7320 owing functions \n+001582b0: 666f 7220 6561 6368 203c 636f 6465 3e65 for each e\n+001582c0: 7874 6572 6e20 7479 7065 6465 663c 2f63 xtern typedef declares ty\n+001582e0: 7065 203c 636f 6465 3e54 3c2f 636f 6465 pe T:

      .
      .
      void soap_default_\n+00158450: 5428 3c73 7061 6e20 636c 6173 733d 226b T(struct soa\n+001584a0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+001584d0: 6170 3c2f 613e 2c20 5420 2a61 293b 3c2f ap, T *a);.
      int soap\n+00158520: 5f6f 7574 5f54 283c 7370 616e 2063 6c61 _out_T(str\n+00158540: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, const \n+001585d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *tag, int\n+00158620: 203c 7370 616e 2063 6c61 7373 3d22 6b65 id, cons\n+00158660: 743c 2f73 7061 6e3e 2054 202a 612c 203c t T *a, <\n+00158670: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00158680: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n+001586b0: 3c2f 7370 616e 3e20 2a74 7970 6529 3b3c *type);<\n+001586c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      T *soap_\n+001586e0: 696e 5f54 283c 7370 616e 2063 6c61 7373 in_T(struc\n+00158700: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n+00158730: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, const char *tag, T *a, \n+001587c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n+00158800: 723c 2f73 7061 6e3e 202a 7479 7065 293b r *type);\n+00158810: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
      .
      The function pr\n+00158840: 6f74 6f74 7970 6573 206f 6620 7468 6573 ototypes of thes\n+00158850: 6520 6675 6e63 7469 6f6e 7320 6361 6e20 e functions can \n+00158860: 6265 2066 6f75 6e64 2069 6e20 7468 6520 be found in the \n+00158870: 736f 6170 6370 7032 2d67 656e 6572 6174 soapcpp2-generat\n+00158880: 6564 203c 656d 3e3c 636f 6465 3e73 6f61 ed soa\n+00158890: 7048 2e68 3c2f 636f 6465 3e3c 2f65 6d3e pH.h\n+001588a0: 2066 696c 652e 3c2f 703e 0a3c 703e 466f file.

      .

      Fo\n+001588b0: 7220 6578 616d 706c 652c 2074 6865 2073 r example, the s\n+001588c0: 6572 6961 6c69 7a61 7469 6f6e 206f 6620 erialization of \n+001588d0: 3c63 6f64 653e 4d79 4461 7461 3c2f 636f MyData can be done \n+001588f0: 7769 7468 2074 6865 2066 6f6c 6c6f 7769 with the followi\n+00158900: 6e67 2063 6f64 653a 3c2f 703e 0a3c 6469 ng code:

      .
      i\n+00158950: 6e74 3c2f 7370 616e 3e20 736f 6170 5f73 nt soap_s\n+00158960: 6572 6961 6c69 7a65 5f4d 7944 6174 6128 erialize_MyData(\n+00158970: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+001589c0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+001589f0: 3c2f 613e 2c20 4d79 4461 7461 203c 7370 , MyData const*\n+00158a20: 6129 203c 2f64 6976 3e0a 3c64 6976 2063 a)
      .
      {.
      //\n+00158a70: 206e 6f20 6e65 6564 2074 6f20 6d61 726b no need to mark\n+00158a80: 2074 6869 7320 6e6f 6465 2028 666f 7220 this node (for \n+00158a90: 6d75 6c74 692d 7265 6620 616e 6420 6379 multi-ref and cy\n+00158aa0: 636c 6520 6465 7465 6374 696f 6e29 203c cle detection) <\n+00158ab0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      . \n+00158ad0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n+00158af0: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA\n+00158b50: 505f 4f4b 3c2f 613e 3b3c 2f64 6976 3e0a P_OK;
      .\n+00158b60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      }
      .
      void soap_default_M\n+00158bc0: 7944 6174 6128 3c73 7061 6e20 636c 6173 yData(stru\n+00158be0: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, MyDa\n+00158c50: 7461 202a 6129 203c 2f64 6976 3e0a 3c64 ta *a)
      .\n+00158c70: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
      .
      *a =\n+00158c90: 204e 554c 4c3b 3c2f 6469 763e 0a3c 6469 NULL;
      .}\n+00158cb0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      int s\n+00158cf0: 6f61 705f 6f75 745f 4d79 4461 7461 283c oap_out_MyData(<\n+00158d00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00158d10: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n+00158d80: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, const\n+00158da0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *t\n+00158dd0: 6167 2c20 3c73 7061 6e20 636c 6173 733d ag, in\n+00158df0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t id, My\n+00158e20: 4461 7461 203c 7370 616e 2063 6c61 7373 Data const\n+00158e40: 3c2f 7370 616e 3e2a 612c 203c 7370 616e *a, const char *type) .
      {
      . \n+00158ed0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_elemen\n+00158f00: 745f 6265 6769 6e5f 6f75 7428 3c61 2063 t_begin_out(
      soap, tag\n+00158f40: 2c20 3c73 7061 6e20 636c 6173 733d 226b , id, type) // print XML \n+00158f90: 6265 6769 6e6e 696e 6720 7461 6720 3c2f beginning tag
      . \n+00158fc0: 207c 7c20 3c61 2063 6c61 7373 3d22 636f || soap_send(soap, *a) // \n+00159070: 6a75 7374 2070 7269 6e74 2074 6865 2073 just print the s\n+00159080: 7472 696e 6720 286e 6f20 584d 4c20 636f tring (no XML co\n+00159090: 6e76 6572 7369 6f6e 2920 3c2f 7370 616e nversion)
      ..
      return soa\n+001591b0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->error; .
      return\n+00159250: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_OK\n+001592b0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
      .
      } .. \n+001594f0: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n+00159510: 726e 3c2f 7370 616e 3e20 4e55 4c4c 3b20 rn NULL; \n+00159520: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      if (\n+00159560: 2161 2920 3c2f 6469 763e 0a3c 6469 7620 !a)
      ...\n+00159720: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      *a = NULL;\n+00159740: 203c 7370 616e 2063 6c61 7373 3d22 636f // xsi:ni\n+00159760: 6c20 656c 656d 656e 7420 3c2f 7370 616e l element
      .
      if \n+001597b0: 282a 3c61 2063 6c61 7373 3d22 636f 6465 (*soap->type &\n+001597f0: 2661 6d70 3b20 3c61 2063 6c61 7373 3d22 & soap_mat\n+00159850: 6368 5f74 6167 3c2f 613e 283c 6120 636c ch_tag(soap, soap->\n+001598c0: 7479 7065 2c20 7479 7065 2929 203c 2f64 type, type)) .
      {
      .\n+001598f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      soa\n+00159930: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->error = <\n+00159990: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001599a0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001599b0: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g\n+001599c0: 6166 6561 3636 6332 3536 6264 6161 3833 afea66c256bdaa83\n+001599d0: 3736 6531 3231 3036 6533 3633 3037 6330 76e12106e36307c0\n+001599e0: 3222 3e53 4f41 505f 5459 5045 3c2f 613e 2\">SOAP_TYPE\n+001599f0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
      .
      <\n+00159a10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00159a20: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+00159a30: 2f73 7061 6e3e 204e 554c 4c3b 203c 7370 /span> NULL; // type misma\n+00159a60: 7463 6820 3c2f 7370 616e 3e3c 2f64 6976 tch .
      }
      .<\n+00159a90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00159aa0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n+00159ac0: 2f73 7061 6e3e 2028 2a3c 6120 636c 6173 /span> (*\n+00159af0: 736f 6170 3c2f 613e 2d26 6774 3b68 7265 soap->hre\n+00159b00: 6629 203c 2f64 6976 3e0a 3c64 6976 2063 f)
      .
      \n+00159b20: 6120 3d20 284d 7944 6174 612a 2a29 736f a = (MyData**)so\n+00159b30: 6170 5f69 645f 666f 7277 6172 6428 3c61 ap_id_forward(soap, <\n+00159b70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00159b80: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00159b90: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+00159ba0: 6774 3b68 7265 662c 2061 2c20 302c 2053 gt;href, a, 0, S\n+00159bb0: 4f41 505f 5459 5045 5f4d 7944 6174 612c OAP_TYPE_MyData,\n+00159bc0: 2030 2c20 3c73 7061 6e20 636c 6173 733d 0, sizeof\n+00159be0: 3c2f 7370 616e 3e28 4d79 4461 7461 292c (MyData),\n+00159bf0: 2030 2c20 4e55 4c4c 2c20 4e55 4c4c 2920 0, NULL, NULL) \n+00159c00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      else\n+00159c40: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soa\n+00159c90: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->body) .
      {
      .\n+00159d10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      \n+00159d40: 6368 6172 3c2f 7370 616e 3e20 2a73 203d char *s =\n+00159d50: 2073 6f61 705f 7661 6c75 6528 3c61 2063 soap_value(soap); // fill buff\n+00159db0: 6572 203c 2f73 7061 6e3e 3c2f 6469 763e er
      \n+00159dc0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      *a = (char*)soap_ma\n+00159e60: 6c6c 6f63 3c2f 613e 283c 6120 636c 6173 lloc(\n+00159e90: 736f 6170 3c2f 613e 2c20 7374 726c 656e soap, strlen\n+00159ea0: 2873 292b 3129 3b20 3c2f 6469 763e 0a3c (s)+1);
      .<\n+00159eb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00159ec0: 3e20 2020 2073 7472 6370 7928 2a61 2c20 > strcpy(*a, \n+00159ed0: 7329 3b20 3c2f 6469 763e 0a3c 6469 7620 s);
      .
      }\n+00159ef0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      if \n+00159f30: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+00159f60: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->bo\n+00159fb0: 6479 3c2f 613e 2026 616d 703b 2661 6d70 dy &&\n+00159fc0: 3b20 736f 6170 5f65 6c65 6d65 6e74 5f65 ; soap_element_e\n+00159fd0: 6e64 5f69 6e28 3c61 2063 6c61 7373 3d22 nd_in(soa\n+0015a000: 703c 2f61 3e2c 2074 6167 2929 203c 2f64 p, tag)) .
      return NULL;
      .<\n+0015a060: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0015a070: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret\n+0015a090: 7572 6e3c 2f73 7061 6e3e 2061 3b20 3c2f urn a; .
      }
      .<\n+0015a0c0: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+0015a0d0: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n+0015a0e0: 705f 5f65 7272 6f72 735f 6874 6d6c 5f67 p__errors_html_g\n+0015a0f0: 6166 6561 3636 6332 3536 6264 6161 3833 afea66c256bdaa83\n+0015a100: 3736 6531 3231 3036 6533 3633 3037 6330 76e12106e36307c0\n+0015a110: 3222 3e3c 6469 7620 636c 6173 733d 2274 2\">
      SO\n+0015a170: 4150 5f54 5950 453c 2f61 3e3c 2f64 6976 AP_TYPE
      #define SOA\n+0015a1a0: 505f 5459 5045 3c2f 6469 763e 3c64 6976 P_TYPE
      A\n+0015a1c0: 2073 6f61 705f 7374 6174 7573 2065 7272 soap_status err\n+0015a1d0: 6f72 2063 6f64 653a 2058 4d4c 2065 6c65 or code: XML ele\n+0015a1e0: 6d65 6e74 206f 7220 6174 7472 6962 7574 ment or attribut\n+0015a1f0: 6520 6861 7320 6120 6d69 736d 6174 6368 e has a mismatch\n+0015a200: 696e 6720 7479 7065 206f 7220 7661 6c75 ing type or valu\n+0015a210: 6520 7468 6174 2069 7320 6361 7573 696e e that is causin\n+0015a220: 6720 6120 2e2e 2e3c 2f64 6976 3e3c 6469 g a ...
      \n+0015a240: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:26\n+0015a260: 3037 3c2f 6469 763e 3c2f 6469 763e 0a3c 07
      .<\n+0015a270: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+0015a280: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id=\"agroup__grou\n+0015a290: 705f 5f69 6f5f 6874 6d6c 5f67 6137 3731 p__io_html_ga771\n+0015a2a0: 3266 3562 6333 3631 3237 3035 3061 3131 2f5bc36127050a11\n+0015a2b0: 6164 3939 3564 3035 3933 6264 6322 3e3c ad995d0593bdc\"><\n+0015a2c0: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+0015a2d0: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">soap_send<\n+0015a320: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
      .\n+0015a3a0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
      .\n+0015a690: 3c64 6976 2063 6c61 7373 3d22 7474 6322
      short null
      The soap::nu\n+0015a780: 6c6c 2066 6c61 6720 6973 2073 6574 2077 ll flag is set w\n+0015a790: 6865 6e20 616e 2065 6c65 6d65 6e74 2063 hen an element c\n+0015a7a0: 6172 7269 6573 2061 2078 7369 3a6e 696c arries a xsi:nil\n+0015a7b0: 2061 7474 7269 6275 7465 2074 6861 7420 attribute that \n+0015a7c0: 6973 2074 7275 652e 3c2f 6469 763e 3c64 is true.
      Definition:<\n+0015a7f0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a32 /b> stdsoap2.h:2\n+0015a800: 3936 333c 2f64 6976 3e3c 2f64 6976 3e0a 963
      .\n+0015a810: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

      More i\n+0015a830: 6e66 6f72 6d61 7469 6f6e 206f 6e20 6375 nformation on cu\n+0015a840: 7374 6f6d 2073 6572 6961 6c69 7a61 7469 stom serializati\n+0015a850: 6f6e 2069 7320 6176 6169 6c61 626c 6520 on is available \n+0015a860: 696e 2074 6865 2067 534f 4150 2073 6f75 in the gSOAP sou\n+0015a870: 7263 6520 636f 6465 2070 6163 6b61 6765 rce code package\n+0015a880: 2069 6e20 7468 6520 3c65 6d3e 3c63 6f64 in the gsoap/custom direc\n+0015a8b0: 746f 7279 2c20 7768 6572 6520 796f 7520 tory, where you \n+0015a8c0: 6361 6e20 616c 736f 2066 696e 6420 7365 can also find se\n+0015a8d0: 7665 7261 6c20 6375 7374 6f6d 2073 6572 veral custom ser\n+0015a8e0: 6961 6c69 7a65 7273 2074 6f20 7573 6520 ializers to use \n+0015a8f0: 7769 7468 2079 6f75 7220 7072 6f6a 6563 with your projec\n+0015a900: 7473 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 ts.

      .

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

      ..Function \n+0015a970: 6361 6c6c 6261 636b 7320 666f 7220 6375 callbacks for cu\n+0015a980: 7374 6f6d 697a 6564 2049 2f4f 2061 6e64 stomized I/O and\n+0015a990: 2048 5454 5020 6861 6e64 6c69 6e67 3c2f HTTP handling.

      The follo\n+0015a9b0: 7769 6e67 206c 6973 7420 6f66 2066 756e wing list of fun\n+0015a9c0: 6374 696f 6e73 2063 616e 2062 6520 7573 ctions can be us\n+0015a9d0: 6564 2066 6f72 2063 7573 746f 6d69 7a65 ed for customize\n+0015a9e0: 6420 4854 5450 2068 616e 646c 696e 6720 d HTTP handling \n+0015a9f0: 616e 6420 492f 4f2e 3c2f 703e 0a3c 703e and I/O.

      .

      \n+0015aa00: 5365 6520 616c 736f 2041 5049 2064 6f63 See also API doc\n+0015aa10: 756d 656e 7461 7469 6f6e 204d 6f64 756c umentation Modul\n+0015aa20: 6520 3c61 2063 6c61 7373 3d22 656c 2220 e Callback fun\n+0015aa60: 6374 696f 6e73 3c2f 613e 2e3c 2f70 3e0a ctions.

      .\n+0015aa70: 3c70 3e54 6f20 7265 7365 7420 7468 6520

      To reset the \n+0015aa80: 6361 6c6c 6261 636b 2066 756e 6374 696f callback functio\n+0015aa90: 6e73 2074 6f20 7468 6520 696e 7465 726e ns to the intern\n+0015aaa0: 616c 2066 756e 6374 696f 6e73 206f 6620 al functions of \n+0015aab0: 7468 6520 656e 6769 6e65 2c20 7573 6520 the engine, use \n+0015aac0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_d\n+0015ab90: 6f6e 653c 2f61 3e3c 2f63 6f64 653e 2066 one f\n+0015aba0: 6f6c 6c6f 7765 6420 6279 203c 636f 6465 ollowed by soap_init\n+0015ac40: 3c2f 613e 3c2f 636f 6465 3e2e 2054 6869 . Thi\n+0015ac50: 7320 7265 2d69 6e69 7469 616c 697a 6573 s re-initializes\n+0015ac60: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap<\n+0015acc0: 2f63 6f64 653e 2063 6f6e 7465 7874 2c20 /code> context, \n+0015acd0: 7265 6d6f 7665 7320 616c 6c20 706c 7567 removes all plug\n+0015ace0: 696e 732c 2061 6e64 2072 6573 6574 7320 ins, and resets \n+0015acf0: 6675 6e63 7469 6f6e 2063 616c 6c62 6163 function callbac\n+0015ad00: 6b73 2e3c 2f70 3e0a 3c68 333e 3c61 2063 ks.

      .

      \n+0015ad30: 3c2f 613e 0a66 706f 7374 3c2f 6833 3e0a .fpost

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

      int (\n+0015ae10: 736f 6170 3a3a 6670 6f73 743c 2f61 3e29 soap::fpost)\n+0015ae20: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+0015ae30: 6170 2c20 636f 6e73 7420 6368 6172 202a ap, const char *\n+0015ae40: 656e 6470 6f69 6e74 2c20 636f 6e73 7420 endpoint, const \n+0015ae50: 6368 6172 202a 686f 7374 2c20 696e 7420 char *host, int \n+0015ae60: 706f 7274 2c20 636f 6e73 7420 6368 6172 port, const char\n+0015ae70: 202a 7061 7468 2c20 636f 6e73 7420 6368 *path, const ch\n+0015ae80: 6172 202a 6163 7469 6f6e 2c20 554c 4f4e ar *action, ULON\n+0015ae90: 4736 3420 636f 756e 7429 3c2f 636f 6465 G64 count)

      .

      This ca\n+0015aeb0: 6c6c 6261 636b 2069 7320 6361 6c6c 6564 llback is called\n+0015aec0: 2061 7420 7468 6520 7365 7276 6572 2073 at the server s\n+0015aed0: 6964 6520 6279 2074 6865 2065 6e67 696e ide by the engin\n+0015aee0: 6520 746f 2073 656e 6420 7468 6520 4854 e to send the HT\n+0015aef0: 5450 2068 6561 6465 7273 2074 6f20 7468 TP headers to th\n+0015af00: 6520 636f 6e6e 6563 7465 6420 636c 6965 e connected clie\n+0015af10: 6e74 2e20 5468 6520 7061 7261 6d65 7465 nt. The paramete\n+0015af20: 7220 3c63 6f64 653e 7374 6174 7573 3c2f r status should be \n+0015af40: 616e 2048 5454 5020 7374 6174 7573 2065 an HTTP status e\n+0015af50: 7272 6f72 2063 6f64 6520 6f72 203c 636f rror code or #SOAP_OK (200 OK) or <\n+0015af80: 636f 6465 3e23 534f 4150 5f48 544d 4c3c code>#SOAP_HTML<\n+0015af90: 2f63 6f64 653e 206f 7220 3c63 6f64 653e /code> or \n+0015afa0: 2353 4f41 505f 4649 4c45 3c2f 636f 6465 #SOAP_FILE. Using #\n+0015afc0: 534f 4150 5f48 544d 4c3c 2f63 6f64 653e SOAP_HTML\n+0015afd0: 2073 6574 7320 7468 6520 636f 6e74 656e sets the conten\n+0015afe0: 742d 7479 7065 2068 6561 6465 7220 746f t-type header to\n+0015aff0: 203c 636f 6465 3e74 6578 742f 6874 6d6c text/html\n+0015b000: 3b20 6368 6172 7365 743d 7574 662d 383c ; charset=utf-8<\n+0015b010: 2f63 6f64 653e 2e20 5573 696e 6720 3c63 /code>. Using #SOAP_FILE sets the c\n+0015b040: 6f6e 7465 6e74 2d74 7970 6520 6865 6164 ontent-type head\n+0015b050: 6572 2074 6f20 7468 6520 7661 6c75 6520 er to the value \n+0015b060: 6f66 203c 636f 6465 3e3c 6120 636c 6173 of soap::http_cont\n+0015b130: 656e 743c 2f61 3e3c 2f63 6f64 653e 2e20 ent. \n+0015b140: 4578 7472 6120 4854 5450 2068 6561 6465 Extra HTTP heade\n+0015b150: 7273 2061 7265 2061 6464 6564 2077 6865 rs are added whe\n+0015b160: 6e20 3c63 6f64 653e 3c61 2063 6c61 7373 n soap::htt\n+0015b220: 705f 6578 7472 615f 6865 6164 6572 3c2f p_extra_header is set\n+0015b240: 2074 6f20 6f6e 6520 6f72 206d 6f72 6520 to one or more \n+0015b250: 6865 6164 6572 206c 696e 6573 2073 6570 header lines sep\n+0015b260: 6172 6174 6564 2062 7920 4352 4c46 2e20 arated by CRLF. \n+0015b270: 5768 656e 2072 6564 6566 696e 696e 6720 When redefining \n+0015b280: 7468 6973 2063 616c 6c62 6163 6b2c 2075 this callback, u\n+0015b290: 7365 2066 756e 6374 696f 6e20 3c63 6f64 se function soap_send\n+0015b310: 3c2f 613e 3c2f 636f 6465 3e20 746f 2077 to w\n+0015b320: 7269 7465 2074 6865 2068 6561 6465 7220 rite the header \n+0015b330: 636f 6e74 656e 7473 2e20 5265 7475 726e contents. Return\n+0015b340: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK\n+0015b350: 3c2f 636f 6465 3e20 6f72 2061 203c 636f or a soap_status<\n+0015b420: 2f61 3e3c 2f63 6f64 653e 2065 7272 6f72 /a> error\n+0015b430: 2063 6f64 652e 2054 6865 2062 7569 6c74 code. The built\n+0015b440: 2d69 6e20 6675 6e63 7469 6f6e 2061 7373 -in function ass\n+0015b450: 6967 6e65 6420 746f 203c 636f 6465 3e3c igned to <\n+0015b460: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0015b470: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0015b480: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+0015b490: 6761 3364 3865 3865 3262 3761 6437 6631 ga3d8e8e2b7ad7f1\n+0015b4a0: 6163 3939 3563 3238 3762 3361 3966 3637 ac995c287b3a9f67\n+0015b4b0: 6139 2220 7469 746c 653d 2243 616c 6c62 a9\" title=\"Callb\n+0015b4c0: 6163 6b20 7468 6174 2070 6f70 756c 6174 ack that populat\n+0015b4d0: 6573 2061 6e64 2074 6865 6e20 7365 6e64 es and then send\n+0015b4e0: 7320 4854 5450 2068 6561 6465 7273 2066 s HTTP headers f\n+0015b4f0: 726f 6d20 7468 6520 7365 7276 6572 2d73 rom the server-s\n+0015b500: 6964 6520 746f 2061 2063 6f6e 6e65 6374 ide to a connect\n+0015b510: 6564 2063 6c69 656e 742e 223e 736f 6170 ed client.\">soap\n+0015b520: 3a3a 6672 6573 706f 6e73 653c 2f61 3e3c ::fresponse<\n+0015b530: 2f63 6f64 653e 2069 7320 3c63 6f64 653e /code> is \n+0015b540: 6874 7470 5f72 6573 706f 6e73 653c 2f63 http_response.

      .

      .fresponse\n+0015b590: 3c2f 6833 3e0a 3c70 3e3c 636f 6465 3e69

      .

      i\n+0015b5a0: 6e74 2028 3c61 2063 6c61 7373 3d22 656c nt (soap::fresponse\n+0015b670: 3c2f 613e 2928 7374 7275 6374 2073 6f61 )(struct soa\n+0015b680: 7020 2a73 6f61 702c 2069 6e74 2073 6f61 p *soap, int soa\n+0015b690: 705f 6572 726f 725f 636f 6465 2c20 554c p_error_code, UL\n+0015b6a0: 4f4e 4736 3420 636f 756e 7429 3c2f 636f ONG64 count)

      .

      This \n+0015b6c0: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call\n+0015b6d0: 6564 2061 7420 7468 6520 7365 7276 6572 ed at the server\n+0015b6e0: 2073 6964 6520 6279 2074 6865 2065 6e67 side by the eng\n+0015b6f0: 696e 6520 746f 2073 656e 6420 7468 6520 ine to send the \n+0015b700: 4854 5450 2068 6561 6465 7273 2074 6f20 HTTP headers to \n+0015b710: 7468 6520 636f 6e6e 6563 7465 6420 636c the connected cl\n+0015b720: 6965 6e74 2e20 5468 6520 7061 7261 6d65 ient. The parame\n+0015b730: 7465 7220 3c63 6f64 653e 7374 6174 7573 ter status\n+0015b740: 3c2f 636f 6465 3e20 7368 6f75 6c64 2062 should b\n+0015b750: 6520 616e 2048 5454 5020 7374 6174 7573 e an HTTP status\n+0015b760: 2065 7272 6f72 2063 6f64 6520 6f72 203c error code or <\n+0015b770: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK (200 OK) or\n+0015b790: 203c 636f 6465 3e23 534f 4150 5f48 544d #SOAP_HTM\n+0015b7a0: 4c3c 2f63 6f64 653e 206f 7220 3c63 6f64 L or #SOAP_FILE. Using #SOAP_HTML sets the cont\n+0015b7f0: 656e 742d 7479 7065 2068 6561 6465 7220 ent-type header \n+0015b800: 746f 203c 636f 6465 3e74 6578 742f 6874 to text/ht\n+0015b810: 6d6c 3b20 6368 6172 7365 743d 7574 662d ml; charset=utf-\n+0015b820: 383c 2f63 6f64 653e 2e20 5573 696e 6720 8. Using \n+0015b830: 3c63 6f64 653e 2353 4f41 505f 4649 4c45 #SOAP_FILE\n+0015b840: 3c2f 636f 6465 3e20 7365 7473 2074 6865 sets the\n+0015b850: 2063 6f6e 7465 6e74 2d74 7970 6520 6865 content-type he\n+0015b860: 6164 6572 2074 6f20 7468 6520 7661 6c75 ader to the valu\n+0015b870: 6520 6f66 203c 636f 6465 3e3c 6120 636c e of soap::http_co\n+0015b940: 6e74 656e 743c 2f61 3e3c 2f63 6f64 653e ntent\n+0015b950: 2e20 4578 7472 6120 4854 5450 2068 6561 . Extra HTTP hea\n+0015b960: 6465 7273 2061 7265 2061 6464 6564 2077 ders are added w\n+0015b970: 6865 6e20 3c63 6f64 653e 3c61 2063 6c61 hen soap::h\n+0015ba30: 7474 705f 6578 7472 615f 6865 6164 6572 ttp_extra_header\n+0015ba40: 3c2f 613e 3c2f 636f 6465 3e20 6973 2073 is s\n+0015ba50: 6574 2074 6f20 6f6e 6520 6f72 206d 6f72 et to one or mor\n+0015ba60: 6520 6865 6164 6572 206c 696e 6573 2073 e header lines s\n+0015ba70: 6570 6172 6174 6564 2062 7920 4352 4c46 eparated by CRLF\n+0015ba80: 2e20 5768 656e 2072 6564 6566 696e 696e . When redefinin\n+0015ba90: 6720 7468 6973 2063 616c 6c62 6163 6b2c g this callback,\n+0015baa0: 2075 7365 2066 756e 6374 696f 6e20 3c63 use function soap_se\n+0015bb20: 6e64 3c2f 613e 3c2f 636f 6465 3e20 746f nd to\n+0015bb30: 2077 7269 7465 2074 6865 2068 6561 6465 write the heade\n+0015bb40: 7220 636f 6e74 656e 7473 2e20 5265 7475 r contents. Retu\n+0015bb50: 726e 7320 3c63 6f64 653e 2353 4f41 505f rns #SOAP_\n+0015bb60: 4f4b 3c2f 636f 6465 3e20 6f72 2061 203c OK or a <\n+0015bb70: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_statu\n+0015bc30: 733c 2f61 3e3c 2f63 6f64 653e 2065 7272 s err\n+0015bc40: 6f72 2063 6f64 652e 2054 6865 2062 7569 or code. The bui\n+0015bc50: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2061 lt-in function a\n+0015bc60: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to so\n+0015bd30: 6170 3a3a 6672 6573 706f 6e73 653c 2f61 ap::fresponse is http_response<\n+0015bd60: 2f63 6f64 653e 2e3c 2f70 3e0a 3c68 333e /code>.

      .

      \n+0015bd70: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .fposthd\n+0015bda0: 723c 2f68 333e 0a3c 703e 3c63 6f64 653e r

      .

      \n+0015bdb0: 696e 7420 283c 6120 636c 6173 733d 2265 int (soap::fposthd\n+0015be60: 723c 2f61 3e29 2873 7472 7563 7420 736f r)(struct so\n+0015be70: 6170 202a 736f 6170 2c20 636f 6e73 7420 ap *soap, const \n+0015be80: 6368 6172 202a 6b65 792c 2063 6f6e 7374 char *key, const\n+0015be90: 2063 6861 7220 2a76 616c 293c 2f63 6f64 char *val)

      .

      This c\n+0015beb0: 616c 6c62 6163 6b20 6973 2063 616c 6c65 allback is calle\n+0015bec0: 6420 6279 203c 636f 6465 3e3c 6120 636c d by soa\n+0015bf90: 703a 3a66 706f 7374 3c2f 613e 3c2f 636f p::fpost and soap:\n+0015c070: 3a66 7265 7370 6f6e 7365 3c2f 613e 3c2f :fresponse to send an\n+0015c090: 2048 5454 5020 6865 6164 6572 2077 6974 HTTP header wit\n+0015c0a0: 6820 6120 6b65 7920 616e 6420 616e 206f h a key and an o\n+0015c0b0: 7074 696f 6e61 6c20 7661 6c75 652e 2052 ptional value. R\n+0015c0c0: 6574 7572 6e73 203c 636f 6465 3e23 534f eturns #SO\n+0015c0d0: 4150 5f4f 4b3c 2f63 6f64 653e 206f 7220 AP_OK or \n+0015c0e0: 6120 3c63 6f64 653e 3c61 2063 6c61 7373 a soap_st\n+0015c1a0: 6174 7573 3c2f 613e 3c2f 636f 6465 3e20 atus \n+0015c1b0: 2869 6e74 2920 6572 726f 7220 636f 6465 (int) error code\n+0015c1c0: 2e20 5468 6520 6275 696c 742d 696e 2066 . The built-in f\n+0015c1d0: 756e 6374 696f 6e20 6173 7369 676e 6564 unction assigned\n+0015c1e0: 2074 6f20 3c63 6f64 653e 3c61 2063 6c61 to soap::fp\n+0015c290: 6f73 7468 6472 3c2f 613e 3c2f 636f 6465 osthdr is http_\n+0015c2b0: 706f 7374 5f68 6561 6465 723c 2f63 6f64 post_header.

      .

      \n+0015c2f0: 3c2f 613e 0a66 7061 7273 653c 2f68 333e .fparse

      \n+0015c300: 0a3c 703e 3c63 6f64 653e 696e 7420 283c .

      int (<\n+0015c310: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0015c320: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0015c330: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+0015c340: 6761 3963 6230 3563 6539 3866 3834 3566 ga9cb05ce98f845f\n+0015c350: 3136 6339 3230 6334 3434 3236 6163 3335 16c920c44426ac35\n+0015c360: 6135 2220 7469 746c 653d 2243 616c 6c62 a5\" title=\"Callb\n+0015c370: 6163 6b20 7468 6174 2072 6561 6473 2061 ack that reads a\n+0015c380: 6e64 2070 6172 7365 7320 4854 5450 2061 nd parses HTTP a\n+0015c390: 6e64 204d 494d 4520 6865 6164 6572 732e nd MIME headers.\n+0015c3a0: 223e 736f 6170 3a3a 6670 6172 7365 3c2f \">soap::fparse)(struct soap \n+0015c3c0: 2a73 6f61 7029 3c2f 636f 6465 3e3c 2f70 *soap).

      This callba\n+0015c3e0: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by \n+0015c3f0: 7468 6520 656e 6769 6e65 2028 6173 2061 the engine (as a\n+0015c400: 2063 6c69 656e 7420 6f72 2073 6572 7665 client or serve\n+0015c410: 7229 2074 6f20 7265 6164 2061 6e64 2070 r) to read and p\n+0015c420: 6172 7365 2048 5454 5020 6865 6164 6572 arse HTTP header\n+0015c430: 7320 6f72 204d 494d 4520 6865 6164 6572 s or MIME header\n+0015c440: 732e 2057 6865 6e20 7265 6465 6669 6e65 s. When redefine\n+0015c450: 642c 2074 6869 7320 6675 6e63 7469 6f6e d, this function\n+0015c460: 2073 686f 756c 6420 6174 2072 6561 6420 should at read \n+0015c470: 6f72 2073 6b69 7020 7468 6520 656e 7469 or skip the enti\n+0015c480: 7265 2048 5454 5020 6865 6164 6572 2074 re HTTP header t\n+0015c490: 6f20 7265 6163 6820 7468 6520 6d65 7373 o reach the mess\n+0015c4a0: 6167 6520 626f 6479 2e20 4675 6e63 7469 age body. Functi\n+0015c4b0: 6f6e 203c 636f 6465 3e3c 6120 636c 6173 on soap_getline is use\n+0015c540: 6420 6279 2074 6869 7320 6361 6c6c 6261 d by this callba\n+0015c550: 636b 2074 6f20 7265 6164 2065 6163 6820 ck to read each \n+0015c560: 6865 6164 6572 206c 696e 6520 696e 746f header line into\n+0015c570: 2061 6e20 696e 7465 726e 616c 2062 7566 an internal buf\n+0015c580: 6665 7220 3c63 6f64 653e 3c61 2063 6c61 fer soap::msgbuf with <\n+0015c660: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>so\n+0015c6d0: 6170 5f67 6574 6c69 6e65 3c2f 613e 2873 ap_getline(s\n+0015c6e0: 6f61 702c 2073 6f61 702d 2667 743b 6d73 oap, soap->ms\n+0015c6f0: 6762 7566 2c20 7369 7a65 6f66 2873 6f61 gbuf, sizeof(soa\n+0015c700: 702d 2667 743b 6d73 6762 7566 2929 3c2f p->msgbuf)). Returns <\n+0015c720: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK, or a gSOAP\n+0015c740: 2065 7272 6f72 2063 6f64 652e 2054 6865 error code. The\n+0015c750: 2062 7569 6c74 2d69 6e20 6675 6e63 7469 built-in functi\n+0015c760: 6f6e 2061 7373 6967 6e65 6420 746f 203c on assigned to <\n+0015c770: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::fp\n+0015c810: 6172 7365 3c2f 613e 3c2f 636f 6465 3e20 arse \n+0015c820: 6973 203c 636f 6465 3e68 7474 705f 7061 is http_pa\n+0015c830: 7273 653c 2f63 6f64 653e 2e3c 2f70 3e0a rse.

      .\n+0015c840: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

      .fpa\n+0015c870: 7273 6568 6472 3c2f 6833 3e0a 3c70 3e3c rsehdr

      .

      <\n+0015c880: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (\n+0015c930: 736f 6170 3a3a 6670 6172 7365 6864 723c soap::fparsehdr<\n+0015c940: 2f61 3e29 2873 7472 7563 7420 736f 6170 /a>)(struct soap\n+0015c950: 202a 736f 6170 2c20 636f 6e73 7420 6368 *soap, const ch\n+0015c960: 6172 202a 6b65 792c 2063 6f6e 7374 2063 ar *key, const c\n+0015c970: 6861 7220 2a76 616c 293c 2f63 6f64 653e har *val)\n+0015c980: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

      .

      This cal\n+0015c990: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n+0015c9a0: 6279 203c 636f 6465 3e3c 6120 636c 6173 by soap\n+0015ca40: 3a3a 6670 6172 7365 3c2f 613e 3c2f 636f ::fparse, consumes an\n+0015ca60: 2048 5454 5020 6865 6164 6572 2074 6861 HTTP header tha\n+0015ca70: 7420 6973 2073 706c 6974 2069 6e20 6120 t is split in a \n+0015ca80: 6b65 792d 7661 6c75 6520 7061 6972 2061 key-value pair a\n+0015ca90: 6e64 2075 7064 6174 6573 2074 6865 203c nd updates the <\n+0015caa0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap\n+0015cb00: 2063 6f6e 7465 7874 2073 7461 7465 2061 context state a\n+0015cb10: 6363 6f72 6469 6e67 6c79 2e20 5468 6520 ccordingly. The \n+0015cb20: 636f 6e74 6578 7420 6973 2075 7064 6174 context is updat\n+0015cb30: 6564 2077 6974 6820 7468 6520 4854 5450 ed with the HTTP\n+0015cb40: 2068 6561 6465 7220 696e 666f 726d 6174 header informat\n+0015cb50: 696f 6e20 7265 6365 6976 6564 2c20 6275 ion received, bu\n+0015cb60: 7420 4854 5450 2068 6561 6465 7273 2061 t HTTP headers a\n+0015cb70: 7265 206e 6f74 206c 6974 6572 616c 6c79 re not literally\n+0015cb80: 2072 6574 6169 6e65 6420 6279 2074 6865 retained by the\n+0015cb90: 2065 6e67 696e 652e 2052 6574 7572 6e73 engine. Returns\n+0015cba0: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK<\n+0015cbb0: 2f63 6f64 653e 206f 7220 3c63 6f64 653e /code> or \n+0015cbc0: 2353 4f41 505f 5354 4f50 3c2f 636f 6465 #SOAP_STOP to prevent fur\n+0015cbe0: 7468 6572 2072 6561 6469 6e67 206f 6620 ther reading of \n+0015cbf0: 7468 6520 4854 5450 2062 6f64 792c 206f the HTTP body, o\n+0015cc00: 7220 6120 3c63 6f64 653e 3c61 2063 6c61 r a soap_\n+0015ccc0: 7374 6174 7573 3c2f 613e 3c2f 636f 6465 status (int) error co\n+0015cce0: 6465 2e20 5468 6520 6275 696c 742d 696e de. The built-in\n+0015ccf0: 2066 756e 6374 696f 6e20 6173 7369 676e function assign\n+0015cd00: 6564 2074 6f20 3c63 6f64 653e 3c61 2063 ed to soap::fparsehd\n+0015cdc0: 723c 2f61 3e3c 2f63 6f64 653e 2069 7320 r is \n+0015cdd0: 3c63 6f64 653e 6874 7470 5f70 6172 7365 http_parse\n+0015cde0: 5f68 6561 6465 723c 2f63 6f64 653e 2e3c _header.<\n+0015cdf0: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

      \n+0015ce20: 0a66 6765 743c 2f68 333e 0a3c 703e 3c63 .fget

      .

      int (soap:\n+0015cf00: 3a66 6765 743c 2f61 3e29 2873 7472 7563 :fget)(struc\n+0015cf10: 7420 736f 6170 202a 736f 6170 293c 2f63 t soap *soap)

      .

      This\n+0015cf30: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal\n+0015cf40: 6c65 6420 6279 2074 6865 2073 6572 7669 led by the servi\n+0015cf50: 6365 2064 6973 7061 7463 6865 7220 7768 ce dispatcher wh\n+0015cf60: 656e 2061 6e20 4854 5450 2047 4554 2072 en an HTTP GET r\n+0015cf70: 6571 7565 7374 2069 7320 7065 6e64 696e equest is pendin\n+0015cf80: 672e 2052 6564 6566 696e 6520 7468 6973 g. Redefine this\n+0015cf90: 2063 616c 6c62 6163 6b20 746f 2072 6573 callback to res\n+0015cfa0: 706f 6e64 2074 6f20 4854 5450 2047 4554 pond to HTTP GET\n+0015cfb0: 2072 6571 7565 7374 7320 7769 7468 2063 requests with c\n+0015cfc0: 6f6e 7465 6e74 2c20 7365 6520 7468 6520 ontent, see the \n+0015cfd0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 http_get<\n+0015d060: 2f61 3e3c 2f63 6f64 653e 2048 5454 5020 /a> HTTP \n+0015d070: 4745 5420 706c 7567 696e 2066 6f72 206d GET plugin for m\n+0015d080: 6f72 6520 6465 7461 696c 732e 2052 6574 ore details. Ret\n+0015d090: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP\n+0015d0a0: 5f4f 4b3c 2f63 6f64 653e 206f 7220 6120 _OK or a \n+0015d0b0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat\n+0015d170: 7573 3c2f 613e 3c2f 636f 6465 3e20 2869 us (i\n+0015d180: 6e74 2920 6572 726f 7220 636f 6465 2e20 nt) error code. \n+0015d190: 5468 6520 6275 696c 742d 696e 2066 756e The built-in fun\n+0015d1a0: 6374 696f 6e20 6173 7369 676e 6564 2074 ction assigned t\n+0015d1b0: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o soap::\n+0015d280: 6667 6574 3c2f 613e 3c2f 636f 6465 3e20 fget \n+0015d290: 6973 2074 6865 2069 6e74 6572 6e61 6c20 is the internal \n+0015d2a0: 7374 6174 6963 2066 756e 6374 696f 6e20 static function \n+0015d2b0: 3c63 6f64 653e 6874 7470 5f67 6574 3c2f http_get that retur\n+0015d2d0: 6e73 2074 6865 203c 636f 6465 3e23 534f ns the #SO\n+0015d2e0: 4150 5f47 4554 5f4d 4554 484f 443c 2f63 AP_GET_METHOD error.

      .\n+0015d300: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

      .fpu\n+0015d330: 743c 2f68 333e 0a3c 703e 3c63 6f64 653e t

      .

      \n+0015d340: 696e 7420 283c 6120 636c 6173 733d 2265 int (soap::fpu\n+0015d410: 743c 2f61 3e29 2873 7472 7563 7420 736f t)(struct so\n+0015d420: 6170 202a 736f 6170 293c 2f63 6f64 653e ap *soap)\n+0015d430: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

      .

      This cal\n+0015d440: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called \n+0015d450: 6279 2074 6865 2073 6572 7669 6365 2064 by the service d\n+0015d460: 6973 7061 7463 6865 7220 7768 656e 2061 ispatcher when a\n+0015d470: 6e20 4854 5450 2050 5554 2072 6571 7565 n HTTP PUT reque\n+0015d480: 7374 2069 7320 7065 6e64 696e 672e 2052 st is pending. R\n+0015d490: 6564 6566 696e 6520 7468 6973 2063 616c edefine this cal\n+0015d4a0: 6c62 6163 6b20 746f 2072 6573 706f 6e64 lback to respond\n+0015d4b0: 2074 6f20 4854 5450 2050 5554 2072 6571 to HTTP PUT req\n+0015d4c0: 7565 7374 732c 2073 6565 2074 6865 203c uests, see the <\n+0015d4d0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>http_post\n+0015d560: 3c2f 613e 3c2f 636f 6465 3e20 4854 5450 HTTP\n+0015d570: 2050 4f53 5420 706c 7567 696e 2066 6f72 POST plugin for\n+0015d580: 206d 6f72 6520 6465 7461 696c 732e 2052 more details. R\n+0015d590: 6574 7572 6e73 203c 636f 6465 3e23 534f eturns #SO\n+0015d5a0: 4150 5f4f 4b3c 2f63 6f64 653e 206f 7220 AP_OK or \n+0015d5b0: 6120 3c63 6f64 653e 3c61 2063 6c61 7373 a soap_st\n+0015d670: 6174 7573 3c2f 613e 3c2f 636f 6465 3e20 atus \n+0015d680: 6572 726f 7220 636f 6465 2e20 5468 6520 error code. The \n+0015d690: 6275 696c 742d 696e 2066 756e 6374 696f built-in functio\n+0015d6a0: 6e20 6173 7369 676e 6564 2074 6f20 3c63 n assigned to soap::fput\n+0015d780: 3c2f 613e 3c2f 636f 6465 3e20 6973 2074 is t\n+0015d790: 6865 2069 6e74 6572 6e61 6c20 7374 6174 he internal stat\n+0015d7a0: 6963 2066 756e 6374 696f 6e20 3c63 6f64 ic function http_put that returns t\n+0015d7d0: 6865 203c 636f 6465 3e23 534f 4150 5f50 he #SOAP_P\n+0015d7e0: 5554 5f4d 4554 484f 443c 2f63 6f64 653e UT_METHOD\n+0015d7f0: 2065 7272 6f72 2e3c 2f70 3e0a 3c68 333e error.

      .

      \n+0015d800: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .fpatch<\n+0015d830: 2f68 333e 0a3c 703e 3c63 6f64 653e 696e /h3>.

      in\n+0015d840: 7420 283c 6120 636c 6173 733d 2265 6c22 t (soap::f\n+0015d910: 7061 7463 683c 2f61 3e29 2873 7472 7563 patch)(struc\n+0015d920: 7420 736f 6170 202a 736f 6170 293c 2f63 t soap *soap)

      .

      This\n+0015d940: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal\n+0015d950: 6c65 6420 6279 2074 6865 2073 6572 7669 led by the servi\n+0015d960: 6365 2064 6973 7061 7463 6865 7220 7768 ce dispatcher wh\n+0015d970: 656e 2061 6e20 4854 5450 2050 4154 4348 en an HTTP PATCH\n+0015d980: 2072 6571 7565 7374 2069 7320 7065 6e64 request is pend\n+0015d990: 696e 672e 2052 6564 6566 696e 6520 7468 ing. Redefine th\n+0015d9a0: 6973 2063 616c 6c62 6163 6b20 746f 2072 is callback to r\n+0015d9b0: 6573 706f 6e64 2074 6f20 4854 5450 2050 espond to HTTP P\n+0015d9c0: 4154 4348 2072 6571 7565 7374 732c 2073 ATCH requests, s\n+0015d9d0: 6565 2074 6865 203c 636f 6465 3e3c 6120 ee the h\n+0015da60: 7474 705f 706f 7374 3c2f 613e 3c2f 636f ttp_post HTTP POST pl\n+0015da80: 7567 696e 2066 6f72 206d 6f72 6520 6465 ugin for more de\n+0015da90: 7461 696c 732e 2052 6574 7572 6e73 203c tails. Returns <\n+0015daa0: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK or a \n+0015dac0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_status\n+0015db80: 3c2f 636f 6465 3e20 6572 726f 7220 636f error co\n+0015db90: 6465 2e20 5468 6520 6275 696c 742d 696e de. The built-in\n+0015dba0: 2066 756e 6374 696f 6e20 6173 7369 676e function assign\n+0015dbb0: 6564 2074 6f20 3c63 6f64 653e 3c61 2063 ed to soap::fpatch is the\n+0015dca0: 2069 6e74 6572 6e61 6c20 7374 6174 6963 internal static\n+0015dcb0: 2066 756e 6374 696f 6e20 3c63 6f64 653e function \n+0015dcc0: 6874 7470 5f70 6174 6368 3c2f 636f 6465 http_patch that returns t\n+0015dce0: 6865 203c 636f 6465 3e23 534f 4150 5f50 he #SOAP_P\n+0015dcf0: 4154 4348 5f4d 4554 484f 443c 2f63 6f64 ATCH_METHOD error.

      ..fdel<\n+0015dd40: 2f68 333e 0a3c 703e 3c63 6f64 653e 696e /h3>.

      in\n+0015dd50: 7420 283c 6120 636c 6173 733d 2265 6c22 t (soap::f\n+0015de20: 6465 6c3c 2f61 3e29 2873 7472 7563 7420 del)(struct \n+0015de30: 736f 6170 202a 736f 6170 293c 2f63 6f64 soap *soap)

      .

      This c\n+0015de50: 616c 6c62 6163 6b20 6973 2063 616c 6c65 allback is calle\n+0015de60: 6420 6279 2074 6865 2073 6572 7669 6365 d by the service\n+0015de70: 2064 6973 7061 7463 6865 7220 7768 656e dispatcher when\n+0015de80: 2061 6e20 4854 5450 2044 454c 4554 4520 an HTTP DELETE \n+0015de90: 7265 7175 6573 7420 6973 2070 656e 6469 request is pendi\n+0015dea0: 6e67 2e20 5265 6465 6669 6e65 2074 6869 ng. Redefine thi\n+0015deb0: 7320 6361 6c6c 6261 636b 2074 6f20 7265 s callback to re\n+0015dec0: 7370 6f6e 6420 746f 2048 5454 5020 4445 spond to HTTP DE\n+0015ded0: 4c45 5445 2072 6571 7565 7374 732c 2073 LETE requests, s\n+0015dee0: 6565 2074 6865 203c 636f 6465 3e3c 6120 ee the h\n+0015df70: 7474 705f 706f 7374 3c2f 613e 3c2f 636f ttp_post HTTP POST pl\n+0015df90: 7567 696e 2066 6f72 206d 6f72 6520 6465 ugin for more de\n+0015dfa0: 7461 696c 732e 2052 6574 7572 6e73 203c tails. Returns <\n+0015dfb0: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK or a \n+0015dfd0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_status\n+0015e090: 3c2f 636f 6465 3e20 2869 6e74 2920 6572 (int) er\n+0015e0a0: 726f 7220 636f 6465 2e20 5468 6520 6275 ror code. The bu\n+0015e0b0: 696c 742d 696e 2066 756e 6374 696f 6e20 ilt-in function \n+0015e0c0: 6173 7369 676e 6564 2074 6f20 3c63 6f64 assigned to soap::fd\n+0015e1a0: 656c 3c2f 613e 3c2f 636f 6465 3e20 6973 el is\n+0015e1b0: 2074 6865 2069 6e74 6572 6e61 6c20 7374 the internal st\n+0015e1c0: 6174 6963 2066 756e 6374 696f 6e20 3c63 atic function http_del that returns\n+0015e1f0: 2074 6865 203c 636f 6465 3e23 534f 4150 the #SOAP\n+0015e200: 5f44 454c 5f4d 4554 484f 443c 2f63 6f64 _DEL_METHOD error.

      ..fopt<\n+0015e250: 2f68 333e 0a3c 703e 3c63 6f64 653e 696e /h3>.

      in\n+0015e260: 7420 283c 6120 636c 6173 733d 2265 6c22 t (soap::f\n+0015e330: 6f70 743c 2f61 3e29 2873 7472 7563 7420 opt)(struct \n+0015e340: 736f 6170 202a 736f 6170 293c 2f63 6f64 soap *soap)

      .

      Called\n+0015e360: 2062 7920 7468 6520 7365 7276 6963 6520 by the service \n+0015e370: 6469 7370 6174 6368 6572 2077 6865 6e20 dispatcher when \n+0015e380: 616e 2048 5454 5020 4f50 5449 4f4e 2072 an HTTP OPTION r\n+0015e390: 6571 7565 7374 2069 7320 7065 6e64 696e equest is pendin\n+0015e3a0: 672e 2052 6564 6566 696e 6520 7468 6973 g. Redefine this\n+0015e3b0: 2063 616c 6c62 6163 6b20 746f 2072 6573 callback to res\n+0015e3c0: 706f 6e64 2074 6f20 4854 5450 204f 5054 pond to HTTP OPT\n+0015e3d0: 494f 4e20 7265 7175 6573 7473 2c20 7365 ION requests, se\n+0015e3e0: 6520 7468 6520 3c63 6f64 653e 3c61 2063 e the ht\n+0015e470: 7470 5f70 6f73 743c 2f61 3e3c 2f63 6f64 tp_post HTTP POST plu\n+0015e490: 6769 6e20 666f 7220 6d6f 7265 2064 6574 gin for more det\n+0015e4a0: 6169 6c73 2e20 5265 7475 726e 7320 3c63 ails. Returns #SOAP_OK or a <\n+0015e4d0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0015e4e0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0015e4f0: 5f65 7272 6f72 732e 6874 6d6c 2367 6163 _errors.html#gac\n+0015e500: 3065 6164 6638 6637 3262 6163 6235 6234 0eadf8f72bacb5b4\n+0015e510: 3162 3735 3062 6561 6563 6130 3434 3422 1b750beaeca0444\"\n+0015e520: 2074 6974 6c65 3d22 5374 6174 7573 2061 title=\"Status a\n+0015e530: 6e64 2065 7272 6f72 2063 6f64 6573 2061 nd error codes a\n+0015e540: 7265 2069 6e74 2076 616c 7565 732c 2061 re int values, a\n+0015e550: 207a 6572 6f20 7661 6c75 6520 6f72 2023 zero value or #\n+0015e560: 534f 4150 5f4f 4b20 2830 2920 6d65 616e SOAP_OK (0) mean\n+0015e570: 7320 6e6f 2065 7272 6f72 2c2e 2e2e 223e s no error,...\">\n+0015e580: 736f 6170 5f73 7461 7475 733c 2f61 3e3c soap_status<\n+0015e590: 2f63 6f64 653e 2028 696e 7429 2065 7272 /code> (int) err\n+0015e5a0: 6f72 2063 6f64 652e 2054 6865 2062 7569 or code. The bui\n+0015e5b0: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2061 lt-in function a\n+0015e5c0: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to soap::fop\n+0015e6a0: 743c 2f61 3e3c 2f63 6f64 653e 2069 7320 t is \n+0015e6b0: 7468 6520 696e 7465 726e 616c 2073 7461 the internal sta\n+0015e6c0: 7469 6320 6675 6e63 7469 6f6e 203c 636f tic function http_200 that returns \n+0015e6f0: 4854 5450 2032 3030 204f 4b2e 3c2f 703e HTTP 200 OK.

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

      .fh\n+0015e730: 6561 643c 2f68 333e 0a3c 703e 3c63 6f64 ead

      .

      int (soap::\n+0015e810: 6668 6561 643c 2f61 3e29 2873 7472 7563 fhead)(struc\n+0015e820: 7420 736f 6170 202a 736f 6170 293c 2f63 t soap *soap)

      .

      This\n+0015e840: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal\n+0015e850: 6c65 6420 6279 2074 6865 2073 6572 7669 led by the servi\n+0015e860: 6365 2064 6973 7061 7463 6865 7220 7768 ce dispatcher wh\n+0015e870: 656e 2061 6e20 4854 5450 2048 4541 4420 en an HTTP HEAD \n+0015e880: 7265 7175 6573 7420 6973 2070 656e 6469 request is pendi\n+0015e890: 6e67 2e20 5265 6465 6669 6e65 2074 6869 ng. Redefine thi\n+0015e8a0: 7320 6361 6c6c 6261 636b 2074 6f20 7265 s callback to re\n+0015e8b0: 7370 6f6e 6420 746f 2048 5454 5020 4845 spond to HTTP HE\n+0015e8c0: 4144 2072 6571 7565 7374 7320 6d6f 7265 AD requests more\n+0015e8d0: 2073 7065 6369 6669 6361 6c6c 792e 2052 specifically. R\n+0015e8e0: 6574 7572 6e73 203c 636f 6465 3e23 534f eturns #SO\n+0015e8f0: 4150 5f4f 4b3c 2f63 6f64 653e 206f 7220 AP_OK or \n+0015e900: 6120 3c63 6f64 653e 3c61 2063 6c61 7373 a soap_st\n+0015e9c0: 6174 7573 3c2f 613e 3c2f 636f 6465 3e20 atus \n+0015e9d0: 2869 6e74 2920 6572 726f 7220 636f 6465 (int) error code\n+0015e9e0: 2e20 5468 6520 6275 696c 742d 696e 2066 . The built-in f\n+0015e9f0: 756e 6374 696f 6e20 6173 7369 676e 6564 unction assigned\n+0015ea00: 2074 6f20 3c63 6f64 653e 3c61 2063 6c61 to soa\n+0015ead0: 703a 3a66 6865 6164 3c2f 613e 3c2f 636f p::fhead is the inter\n+0015eaf0: 6e61 6c20 7374 6174 6963 2066 756e 6374 nal static funct\n+0015eb00: 696f 6e20 3c63 6f64 653e 6874 7470 5f32 ion http_2\n+0015eb10: 3030 3c2f 636f 6465 3e20 7468 6174 2072 00 that r\n+0015eb20: 6574 7572 6e73 2048 5454 5020 3230 3020 eturns HTTP 200 \n+0015eb30: 4f4b 2e3c 2f70 3e0a 3c68 333e 3c61 2063 OK.

      .

      \n+0015eb60: 3c2f 613e 0a66 666f 726d 3c2f 6833 3e0a .fform

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

      int (soap::fform<\n+0015ec50: 2f61 3e29 2873 7472 7563 7420 736f 6170 /a>)(struct soap\n+0015ec60: 202a 736f 6170 293c 2f63 6f64 653e 3c2f *soap).

      This callb\n+0015ec80: 6163 6b20 6973 2063 616c 6c65 6420 6279 ack is called by\n+0015ec90: 2074 6865 2048 5454 5020 464f 524d 2068 the HTTP FORM h\n+0015eca0: 616e 646c 6572 2070 6c75 6769 6e20 746f andler plugin to\n+0015ecb0: 2070 6172 7365 2048 544d 4c20 666f 726d parse HTML form\n+0015ecc0: 7320 7265 6365 6976 6564 2077 6974 6820 s received with \n+0015ecd0: 4854 5450 2050 4f53 5420 616e 6420 5055 HTTP POST and PU\n+0015ece0: 5420 7265 7175 6573 7473 2c20 7365 6520 T requests, see \n+0015ecf0: 7468 6520 3c63 6f64 653e 3b3a 6874 7470 the ;:http\n+0015ed00: 5f66 6f72 6d3c 2f63 6f64 653e 2048 5454 _form HTT\n+0015ed10: 5020 464f 524d 2070 6c75 6769 6e20 666f P FORM plugin fo\n+0015ed20: 7220 6d6f 7265 2064 6574 6169 6c73 2e20 r more details. \n+0015ed30: 5468 6520 4854 5450 2062 6f64 7920 7769 The HTTP body wi\n+0015ed40: 7468 2074 6865 2066 6f72 6d20 6461 7461 th the form data\n+0015ed50: 2073 686f 756c 6420 6265 2070 6172 7365 should be parse\n+0015ed60: 6420 6279 2074 6869 7320 6361 6c6c 6261 d by this callba\n+0015ed70: 636b 2c20 6f74 6865 7277 6973 6520 4854 ck, otherwise HT\n+0015ed80: 5450 206b 6565 702d 616c 6976 6520 6d65 TP keep-alive me\n+0015ed90: 7373 6167 6573 2077 696c 6c20 656e 6420 ssages will end \n+0015eda0: 7570 206f 7574 206f 6620 7379 6e63 2061 up out of sync a\n+0015edb0: 7320 6120 7265 7375 6c74 206f 6620 7468 s a result of th\n+0015edc0: 6520 6375 7272 656e 7420 706f 7369 7469 e current positi\n+0015edd0: 6f6e 206e 6f74 2062 6569 6e67 2061 6476 on not being adv\n+0015ede0: 616e 6365 6420 746f 2074 6865 2065 6e64 anced to the end\n+0015edf0: 206f 6620 7468 6520 4854 5450 2062 6f64 of the HTTP bod\n+0015ee00: 792e 2052 6574 7572 6e73 203c 636f 6465 y. Returns #SOAP_OK\n+0015ee20: 206f 7220 6120 3c63 6f64 653e 3c61 2063 or a soa\n+0015eee0: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status (int) error \n+0015ef00: 636f 6465 2e20 4e6f 2062 7569 6c74 2d69 code. No built-i\n+0015ef10: 6e20 6675 6e63 7469 6f6e 2069 7320 6173 n function is as\n+0015ef20: 7369 676e 6564 2074 6f20 3c63 6f64 653e signed to \n+0015ef30: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::ffor\n+0015f000: 6d3c 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 m..

      .f\n+0015f040: 6865 6164 6572 3c2f 6833 3e0a 3c70 3e3c header

      .

      <\n+0015f050: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (\n+0015f120: 736f 6170 3a3a 6668 6561 6465 723c 2f61 soap::fheader)(struct soap *\n+0015f140: 736f 6170 293c 2f63 6f64 653e 3c2f 703e soap)

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

      This callbac\n+0015f160: 6b20 6973 2063 616c 6c65 6420 696d 6d65 k is called imme\n+0015f170: 6469 6174 656c 7920 6166 7465 7220 7061 diately after pa\n+0015f180: 7273 696e 6720 6120 534f 4150 2048 6561 rsing a SOAP Hea\n+0015f190: 6465 7220 696e 746f 2074 6865 203c 636f der into the soap:\n+0015f260: 3a68 6561 6465 723c 2f61 3e3c 2f63 6f64 :header structure. Th\n+0015f280: 6520 534f 4150 2048 6561 6465 7220 7374 e SOAP Header st\n+0015f290: 7275 6374 7572 6520 3c63 6f64 653e 3c61 ructure soap::head\n+0015f360: 6572 3c2f 613e 3c2f 636f 6465 3e20 6361 er ca\n+0015f370: 6e20 6265 2069 6e73 7065 6374 6564 2062 n be inspected b\n+0015f380: 7920 7468 6973 2066 756e 6374 696f 6e20 y this function \n+0015f390: 616e 6420 7665 7269 6669 6564 206f 7220 and verified or \n+0015f3a0: 7265 6a65 6374 6564 2062 6566 6f72 6520 rejected before \n+0015f3b0: 7468 6520 7265 7374 206f 6620 7468 6520 the rest of the \n+0015f3c0: 6d65 7373 6167 6520 7769 7468 2074 6865 message with the\n+0015f3d0: 2053 4f41 5020 426f 6479 2069 7320 636f SOAP Body is co\n+0015f3e0: 6e73 756d 6564 2e20 5265 7475 726e 7320 nsumed. Returns \n+0015f3f0: 3c63 6f64 653e 2353 4f41 505f 4f4b 3c2f #SOAP_OK or a soap_status (int) e\n+0015f4e0: 7272 6f72 2063 6f64 652e 204e 6f20 6275 rror code. No bu\n+0015f4f0: 696c 742d 696e 2066 756e 6374 696f 6e20 ilt-in function \n+0015f500: 6973 2061 7373 6967 6e65 6420 746f 203c is assigned to <\n+0015f510: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap:\n+0015f5e0: 3a66 6865 6164 6572 3c2f 613e 3c2f 636f :fheader.

      .

      .fignore.

      int \n+0015f640: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap::fig\n+0015f710: 6e6f 7265 3c2f 613e 2928 7374 7275 6374 nore)(struct\n+0015f720: 2073 6f61 7020 2a73 6f61 702c 2063 6f6e soap *soap, con\n+0015f730: 7374 2063 6861 7220 2a74 6167 293c 2f63 st char *tag)

      .

      This\n+0015f750: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal\n+0015f760: 6c65 6420 7768 656e 2061 6e20 756e 7265 led when an unre\n+0015f770: 636f 676e 697a 6564 2058 4d4c 2065 6c65 cognized XML ele\n+0015f780: 6d65 6e74 2077 6173 2065 6e63 6f75 6e74 ment was encount\n+0015f790: 6572 6564 206f 6e20 7468 6520 696e 7075 ered on the inpu\n+0015f7a0: 7420 7468 6174 2063 6f75 6c64 2062 6520 t that could be \n+0015f7b0: 6967 6e6f 7265 6420 6465 7065 6e64 696e ignored dependin\n+0015f7c0: 6720 6f6e 2073 6f6d 6520 7370 6563 6966 g on some specif\n+0015f7d0: 6965 6420 6c6f 6769 632e 2054 6865 203c ied logic. The <\n+0015f7e0: 636f 6465 3e74 6167 3c2f 636f 6465 3e20 code>tag \n+0015f7f0: 7061 7261 6d65 7465 7220 6973 2074 6865 parameter is the\n+0015f800: 206f 6666 656e 6469 6e67 2058 4d4c 2065 offending XML e\n+0015f810: 6c65 6d65 6e74 2074 6167 206e 616d 6520 lement tag name \n+0015f820: 7374 7269 6e67 2e20 5468 6520 6361 6c6c string. The call\n+0015f830: 6261 636b 2073 686f 756c 6420 7265 7475 back should retu\n+0015f840: 726e 203c 636f 6465 3e23 534f 4150 5f4f rn #SOAP_O\n+0015f850: 4b3c 2f63 6f64 653e 2074 6f20 6967 6e6f K to igno\n+0015f860: 7265 2074 6865 2065 6c65 6d65 6e74 206f re the element o\n+0015f870: 7220 7265 7475 726e 2061 6e20 3c63 6f64 r return an soap_status error \n+0015f950: 636f 6465 2073 7563 6820 6173 203c 636f code such as #SOAP_TAG_MIS\n+0015f970: 4d41 5443 483c 2f63 6f64 653e 2074 6f20 MATCH to \n+0015f980: 7472 6967 6765 7220 6120 7661 6c69 6461 trigger a valida\n+0015f990: 7469 6f6e 2065 7272 6f72 2e20 5468 6973 tion error. This\n+0015f9a0: 2063 616c 6c62 6163 6b20 616c 736f 206f callback also o\n+0015f9b0: 7665 7272 6964 6573 203c 636f 6465 3e6d verrides m\n+0015f9c0: 7573 7455 6e64 6572 7374 616e 643c 2f63 ustUnderstand attributes \n+0015f9e0: 6f6e 2075 6e72 6563 6f67 6e69 7a65 6420 on unrecognized \n+0015f9f0: 534f 4150 2048 6561 6465 7220 656c 656d SOAP Header elem\n+0015fa00: 656e 7473 2074 6861 7420 6e6f 726d 616c ents that normal\n+0015fa10: 6c79 2072 6169 7365 2066 6175 6c74 732e ly raise faults.\n+0015fa20: 2049 7420 6973 2073 7472 6f6e 676c 7920 It is strongly \n+0015fa30: 7265 636f 6d6d 656e 6465 6420 7468 6174 recommended that\n+0015fa40: 2074 6865 2063 616c 6c62 6163 6b20 7265 the callback re\n+0015fa50: 7475 726e 7320 3c63 6f64 653e 2353 4f41 turns #SOA\n+0015fa60: 505f 4d55 5354 554e 4445 5253 5441 4e44 P_MUSTUNDERSTAND\n+0015fa70: 3c2f 636f 6465 3e20 7768 656e 203c 636f when soap:\n+0015fb40: 3a6d 7573 7455 6e64 6572 7374 616e 643c :mustUnderstand<\n+0015fb50: 2f61 3e3c 2f63 6f64 653e 2021 3d20 3c63 /a> != 0. Re\n+0015fb70: 7475 726e 7320 3c63 6f64 653e 2353 4f41 turns #SOA\n+0015fb80: 505f 4f4b 3c2f 636f 6465 3e20 6f72 2061 P_OK or a\n+0015fb90: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_sta\n+0015fc50: 7475 733c 2f61 3e3c 2f63 6f64 653e 2028 tus (\n+0015fc60: 696e 7429 2065 7272 6f72 2063 6f64 652e int) error code.\n+0015fc70: 204e 6f20 6275 696c 742d 696e 2066 756e No built-in fun\n+0015fc80: 6374 696f 6e20 6973 2061 7373 6967 6e65 ction is assigne\n+0015fc90: 6420 746f 203c 636f 6465 3e3c 6120 636c d to soap::fignore.

      .<\n+0015fd80: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.fsva\n+0015fdb0: 6c69 6461 7465 3c2f 6833 3e0a 3c70 3e3c lidate

      .

      <\n+0015fdc0: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (\n+0015fe60: 736f 6170 3a3a 6673 7661 6c69 6461 7465 soap::fsvalidate\n+0015fe70: 3c2f 613e 2928 7374 7275 6374 2073 6f61 )(struct soa\n+0015fe80: 7020 2a73 6f61 702c 2063 6f6e 7374 2063 p *soap, const c\n+0015fe90: 6861 7220 2a70 6174 7465 726e 2c20 636f har *pattern, co\n+0015fea0: 6e73 7420 6368 6172 202a 7374 7269 6e67 nst char *string\n+0015feb0: 293c 2f63 6f64 653e 3c2f 703e 0a3c 703e )

      .

      \n+0015fec0: 5468 6973 2063 616c 6c62 6163 6b20 6973 This callback is\n+0015fed0: 2063 616c 6c65 6420 746f 2076 616c 6964 called to valid\n+0015fee0: 6174 6520 6120 7374 7269 6e67 2061 6761 ate a string aga\n+0015fef0: 696e 7374 2061 6e20 584d 4c20 7265 6765 inst an XML rege\n+0015ff00: 7820 7061 7474 6572 6e2e 2050 6174 7465 x pattern. Patte\n+0015ff10: 726e 7320 7573 6520 584d 4c20 7363 6865 rns use XML sche\n+0015ff20: 6d61 2072 6567 6578 2073 796e 7461 782e ma regex syntax.\n+0015ff30: 2054 6869 7320 6361 6c6c 6261 636b 2061 This callback a\n+0015ff40: 6c6c 6f77 7320 7573 6572 2d64 6566 696e llows user-defin\n+0015ff50: 6564 2070 6174 7465 726e 2076 616c 6964 ed pattern valid\n+0015ff60: 6174 696f 6e20 7468 6174 2069 7320 6e6f ation that is no\n+0015ff70: 726d 616c 6c79 2064 6973 6162 6c65 642e rmally disabled.\n+0015ff80: 2052 6574 7572 6e73 203c 636f 6465 3e23 Returns #\n+0015ff90: 534f 4150 5f4f 4b3c 2f63 6f64 653e 2077 SOAP_OK w\n+0015ffa0: 6865 6e20 7468 6520 7374 7269 6e67 206d hen the string m\n+0015ffb0: 6174 6368 6573 2074 6865 2070 6174 7465 atches the patte\n+0015ffc0: 726e 206f 7220 3c63 6f64 653e 2353 4f41 rn or #SOA\n+0015ffd0: 505f 5459 5045 3c2f 636f 6465 3e20 7768 P_TYPE wh\n+0015ffe0: 656e 2074 6865 2073 7472 696e 6720 646f en the string do\n+0015fff0: 6573 206e 6f74 206d 6174 6368 2e20 4e6f es not match. No\n+00160000: 2062 7569 6c74 2d69 6e20 6675 6e63 7469 built-in functi\n+00160010: 6f6e 2069 7320 6173 7369 676e 6564 2074 on is assigned t\n+00160020: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o so\n+001600c0: 6170 3a3a 6673 7661 6c69 6461 7465 3c2f ap::fsvalidate.

      .<\n+001600e0: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.fwva\n+00160110: 6c69 6461 7465 3c2f 6833 3e0a 3c70 3e3c lidate

      .

      <\n+00160120: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (soap::fwval\n+001601d0: 6964 6174 653c 2f61 3e29 2873 7472 7563 idate)(struc\n+001601e0: 7420 736f 6170 202a 736f 6170 2c20 636f t soap *soap, co\n+001601f0: 6e73 7420 6368 6172 202a 7061 7474 6572 nst char *patter\n+00160200: 6e2c 2063 6f6e 7374 2077 6368 6172 5f74 n, const wchar_t\n+00160210: 202a 7374 7269 6e67 293c 2f63 6f64 653e *string)\n+00160220: 2054 6869 7320 6361 6c6c 6261 636b 2069 This callback i\n+00160230: 7320 6361 6c6c 6564 2074 6f20 7661 6c69 s called to vali\n+00160240: 6461 7465 2061 2077 6964 6520 7374 7269 date a wide stri\n+00160250: 6e67 2061 6761 696e 7374 2061 6e20 584d ng against an XM\n+00160260: 4c20 7265 6765 7820 7061 7474 6572 6e2e L regex pattern.\n+00160270: 2050 6174 7465 726e 7320 7573 6520 584d Patterns use XM\n+00160280: 4c20 7363 6865 6d61 2072 6567 6578 2073 L schema regex s\n+00160290: 796e 7461 782e 2054 6869 7320 6361 6c6c yntax. This call\n+001602a0: 6261 636b 2061 6c6c 6f77 7320 7573 6572 back allows user\n+001602b0: 2d64 6566 696e 6564 2070 6174 7465 726e -defined pattern\n+001602c0: 2076 616c 6964 6174 696f 6e20 7468 6174 validation that\n+001602d0: 2069 7320 6e6f 726d 616c 6c79 2064 6973 is normally dis\n+001602e0: 6162 6c65 642e 2052 6574 7572 6e73 203c abled. Returns <\n+001602f0: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK when the st\n+00160310: 7269 6e67 206d 6174 6368 6573 2074 6865 ring matches the\n+00160320: 2070 6174 7465 726e 206f 7220 3c63 6f64 pattern or #SOAP_TYPE when the str\n+00160350: 696e 6720 646f 6573 206e 6f74 206d 6174 ing does not mat\n+00160360: 6368 2e20 4e6f 2062 7569 6c74 2d69 6e20 ch. No built-in \n+00160370: 6675 6e63 7469 6f6e 2069 7320 6173 7369 function is assi\n+00160380: 676e 6564 2074 6f20 3c63 6f64 653e 3c61 gned to soap::f\n+00160430: 7776 616c 6964 6174 653c 2f61 3e3c 2f63 wvalidate.

      .

      .fseterror\n+00160480: 3c2f 6833 3e0a 3c70 3e3c 636f 6465 3e76

      .

      v\n+00160490: 6f69 6420 283c 6120 636c 6173 733d 2265 oid (soap::fse\n+00160540: 7465 7272 6f72 3c2f 613e 2928 7374 7275 terror)(stru\n+00160550: 6374 2073 6f61 7020 2a73 6f61 702c 2063 ct soap *soap, c\n+00160560: 6f6e 7374 2063 6861 7220 2a2a 636f 6465 onst char **code\n+00160570: 2c20 636f 6e73 7420 6368 6172 202a 2a73 , const char **s\n+00160580: 7472 696e 6729 3c2f 636f 6465 3e3c 2f70 tring).

      This callba\n+001605a0: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by \n+001605b0: 7468 6520 656e 6769 6e65 2077 6865 6e20 the engine when \n+001605c0: 616e 2065 7272 6f72 2069 7320 7261 6973 an error is rais\n+001605d0: 6564 2074 6f20 616c 6c6f 7720 696e 7370 ed to allow insp\n+001605e0: 6563 7469 6f6e 206f 7220 6f76 6572 7269 ection or overri\n+001605f0: 6469 6e67 206f 6620 7468 6520 6661 756c ding of the faul\n+00160600: 7420 636f 6465 206f 7220 6661 756c 7420 t code or fault \n+00160610: 7374 7269 6e67 206d 6573 7361 6765 7320 string messages \n+00160620: 6265 666f 7265 2074 6865 2065 7272 6f72 before the error\n+00160630: 2069 7320 7265 706f 7274 6564 206f 7220 is reported or \n+00160640: 7472 616e 736d 6974 7465 642e 204e 6f20 transmitted. No \n+00160650: 6275 696c 742d 696e 2066 756e 6374 696f built-in functio\n+00160660: 6e20 6973 2061 7373 6967 6e65 6420 746f n is assigned to\n+00160670: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::f\n+00160720: 7365 7465 7272 6f72 3c2f 613e 3c2f 636f seterror.

      .

      .fopen

      \n+00160770: 0a3c 703e 3c63 6f64 653e 534f 4150 5f53 .

      SOAP_S\n+00160780: 4f43 4b45 5420 283c 6120 636c 6173 733d OCKET (soap::fopen)(struct soap *\n+00160840: 736f 6170 2c20 636f 6e73 7420 6368 6172 soap, const char\n+00160850: 202a 656e 6470 6f69 6e74 2c20 636f 6e73 *endpoint, cons\n+00160860: 7420 6368 6172 202a 686f 7374 2c20 696e t char *host, in\n+00160870: 7420 706f 7274 293c 2f63 6f64 653e 3c2f t port).

      This callb\n+00160890: 6163 6b20 6973 2063 616c 6c65 6420 6279 ack is called by\n+001608a0: 2074 6865 2065 6e67 696e 6520 6174 2074 the engine at t\n+001608b0: 6865 2063 6c69 656e 742d 7369 6465 2062 he client-side b\n+001608c0: 7920 3c63 6f64 653e 3c61 2063 6c61 7373 y soap_connect<\n+00160950: 2f61 3e3c 2f63 6f64 653e 206f 7220 3c63 /a> or s\n+001609d0: 6f61 705f 636f 6e6e 6563 745f 636f 6d6d oap_connect_comm\n+001609e0: 616e 643c 2f61 3e3c 2f63 6f64 653e 2074 and t\n+001609f0: 6f20 6f70 656e 2061 2054 4350 206f 7220 o open a TCP or \n+00160a00: 5544 5020 636f 6e6e 6563 7469 6f6e 2074 UDP connection t\n+00160a10: 6f20 6120 7365 7276 6572 2073 7065 6369 o a server speci\n+00160a20: 6669 6564 2061 7420 616e 2065 6e64 706f fied at an endpo\n+00160a30: 696e 742e 2050 6172 616d 6574 6572 7320 int. Parameters \n+00160a40: 3c63 6f64 653e 686f 7374 3c2f 636f 6465 host and port\n+00160a60: 3c2f 636f 6465 3e20 6172 6520 6d69 6372 are micr\n+00160a70: 6f2d 7061 7273 6564 2066 726f 6d20 3c63 o-parsed from endpoint before being\n+00160aa0: 2070 6173 7365 6420 746f 203c 636f 6465 passed to soap\n+00160b50: 3a3a 666f 7065 6e3c 2f61 3e3c 2f63 6f64 ::fopen. Returns a va\n+00160b70: 6c69 6420 736f 636b 6574 206f 7220 3c63 lid socket or #SOAP_INVALI\n+00160b90: 445f 534f 434b 4554 3c2f 636f 6465 3e20 D_SOCKET \n+00160ba0: 7769 7468 2061 203c 636f 6465 3e3c 6120 with a soap::error set to\n+00160c70: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s\n+00160d30: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus\n+00160d40: 2028 696e 7429 2065 7272 6f72 2063 6f64 (int) error cod\n+00160d50: 6520 616e 6420 3c63 6f64 653e 3c61 2063 e and soap\n+00160de0: 3a3a 6572 726e 756d 3c2f 613e 3c2f 636f ::errnum set to errno of\n+00160e10: 2074 6865 2063 6f6e 6e65 6374 696f 6e20 the connection \n+00160e20: 6661 696c 7572 652e 2054 6865 2062 7569 failure. The bui\n+00160e30: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2061 lt-in function a\n+00160e40: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to soap\n+00160ef0: 3a3a 666f 7065 6e3c 2f61 3e3c 2f63 6f64 ::fopen is tcp_\n+00160f10: 636f 6e6e 6563 743c 2f63 6f64 653e 2e3c connect.<\n+00160f20: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

      \n+00160f50: 0a66 6163 6365 7074 3c2f 6833 3e0a 3c70 .faccept

      .SOAP_SOCK\n+00160f70: 4554 2028 3c61 2063 6c61 7373 3d22 656c ET (\n+00161020: 736f 6170 3a3a 6661 6363 6570 743c 2f61 soap::faccept)(struct soap *\n+00161040: 736f 6170 2c20 534f 4150 5f53 4f43 4b45 soap, SOAP_SOCKE\n+00161050: 5420 732c 2073 7472 7563 7420 736f 636b T s, struct sock\n+00161060: 6164 6472 202a 612c 2069 6e74 202a 6e29 addr *a, int *n)\n+00161070: 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 3e54

      .

      T\n+00161080: 6869 7320 6361 6c6c 6261 636b 2069 7320 his callback is \n+00161090: 6361 6c6c 6564 2062 7920 3c63 6f64 653e called by \n+001610a0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_ac\n+00161120: 6365 7074 3c2f 613e 3c2f 636f 6465 3e20 cept \n+00161130: 286f 7220 7468 6520 432b 2b20 7365 7276 (or the C++ serv\n+00161140: 6963 6520 636c 6173 7320 3c63 6f64 653e ice class \n+00161150: 6163 6365 7074 3c2f 636f 6465 3e20 6d65 accept me\n+00161160: 7468 6f64 2920 746f 2077 6169 7420 666f thod) to wait fo\n+00161170: 7220 616e 6420 6163 6365 7074 2061 2073 r and accept a s\n+00161180: 6f63 6b65 7420 636f 6e6e 6563 7469 6f6e ocket connection\n+00161190: 2072 6571 7565 7374 6564 2062 7920 6120 requested by a \n+001611a0: 636c 6965 6e74 2e20 5265 7475 726e 7320 client. Returns \n+001611b0: 6120 7661 6c69 6420 736f 636b 6574 206f a valid socket o\n+001611c0: 7220 3c63 6f64 653e 2353 4f41 505f 494e r #SOAP_IN\n+001611d0: 5641 4c49 445f 534f 434b 4554 3c2f 636f VALID_SOCKET when an erro\n+001611f0: 7220 6f63 6375 7272 6564 2061 6e64 2073 r occurred and s\n+00161200: 6574 7320 3c63 6f64 653e 3c61 2063 6c61 ets \n+001612b0: 736f 6170 3a3a 6572 726f 723c 2f61 3e3c soap::error<\n+001612c0: 2f63 6f64 653e 2074 6f20 6120 3c63 6f64 /code> to a soap_status value.\n+001613a0: 2054 6865 2062 7569 6c74 2d69 6e20 6675 The built-in fu\n+001613b0: 6e63 7469 6f6e 2061 7373 6967 6e65 6420 nction assigned \n+001613c0: 746f 203c 636f 6465 3e3c 6120 636c 6173 to soap::facce\n+00161480: 7074 3c2f 613e 3c2f 636f 6465 3e20 6973 pt is\n+00161490: 203c 636f 6465 3e74 6370 5f61 6363 6570 tcp_accep\n+001614a0: 743c 2f63 6f64 653e 2e3c 2f70 3e0a 3c68 t.

      ..fclos\n+001614e0: 653c 2f68 333e 0a3c 703e 3c63 6f64 653e e.

      \n+001614f0: 696e 7420 283c 6120 636c 6173 733d 2265 int (soap::fclo\n+00161590: 7365 3c2f 613e 2928 7374 7275 6374 2073 se)(struct s\n+001615a0: 6f61 7020 2a73 6f61 7029 3c2f 636f 6465 oap *soap)

      .

      This ca\n+001615c0: 6c6c 6261 636b 2069 7320 6361 6c6c 6564 llback is called\n+001615d0: 2062 7920 7468 6520 656e 6769 6e65 2061 by the engine a\n+001615e0: 7420 7468 6520 636c 6965 6e74 2d73 6964 t the client-sid\n+001615f0: 6520 746f 2063 6c6f 7365 2074 6865 2063 e to close the c\n+00161600: 7572 7265 6e74 2073 6f63 6b65 7420 636f urrent socket co\n+00161610: 6e6e 6563 7469 6f6e 2062 6566 6f72 6520 nnection before \n+00161620: 6120 6e65 7720 736f 636b 6574 2063 6f6e a new socket con\n+00161630: 6e65 6374 696f 6e20 6973 2065 7374 6162 nection is estab\n+00161640: 6c69 7368 6564 2e20 5468 6973 2063 616c lished. This cal\n+00161650: 6c62 6163 6b20 6d61 7920 6265 2063 616c lback may be cal\n+00161660: 6c65 6420 6d75 6c74 6970 6c65 2074 696d led multiple tim\n+00161670: 6573 2028 652e 672e 2062 7920 7468 6520 es (e.g. by the \n+00161680: 656e 6769 6e65 2061 6e64 2062 7920 706c engine and by pl\n+00161690: 7567 696e 7329 2074 6f20 636c 6f73 6520 ugins) to close \n+001616a0: 7468 6520 7361 6d65 2073 6f63 6b65 7420 the same socket \n+001616b0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n+00161770: 6170 3a3a 736f 636b 6574 3c2f 613e 3c2f ap::socket. Checks in\n+00161790: 7465 726e 616c 6c79 2069 6620 3c63 6f64 ternally if soap::\n+00161860: 736f 636b 6574 3c2f 613e 3c2f 636f 6465 socket == #SOAP\n+00161880: 5f49 4e56 414c 4944 5f53 4f43 4b45 543c _INVALID_SOCKET<\n+00161890: 2f63 6f64 653e 2062 6566 6f72 6520 636c /code> before cl\n+001618a0: 6f73 696e 672c 2077 6869 6368 206d 6561 osing, which mea\n+001618b0: 6e73 2074 6861 7420 7468 6520 736f 636b ns that the sock\n+001618c0: 6574 2077 6173 2061 6c72 6561 6479 2063 et was already c\n+001618d0: 6c6f 7365 642e 2052 6574 7572 6e73 203c losed. Returns <\n+001618e0: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK or a \n+00161900: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_status\n+001619c0: 3c2f 636f 6465 3e20 2869 6e74 2920 6572 (int) er\n+001619d0: 726f 7220 636f 6465 2e20 5468 6520 6275 ror code. The bu\n+001619e0: 696c 742d 696e 2066 756e 6374 696f 6e20 ilt-in function \n+001619f0: 6173 7369 676e 6564 2074 6f20 3c63 6f64 assigned to soap::fclose<\n+00161aa0: 2f61 3e3c 2f63 6f64 653e 2069 7320 3c63 /a> is tcp_disconne\n+00161ac0: 6374 3c2f 636f 6465 3e2e 3c2f 703e 0a3c ct.

      .<\n+00161ad0: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.fres\n+00161b00: 6f6c 7665 3c2f 6833 3e0a 3c70 3e3c 636f olve.

      int (\n+00161bb0: 736f 6170 3a3a 6672 6573 6f6c 7665 3c2f soap::fresolve)(struct soap \n+00161bd0: 2a73 6f61 702c 2063 6f6e 7374 2063 6861 *soap, const cha\n+00161be0: 7220 2a61 6464 722c 2073 7472 7563 7420 r *addr, struct \n+00161bf0: 696e 5f61 6464 7220 2a69 6e61 6464 7229 in_addr *inaddr)\n+00161c00: 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 3e54

      .

      T\n+00161c10: 6869 7320 6361 6c6c 6261 636b 2069 7320 his callback is \n+00161c20: 6361 6c6c 6564 2062 7920 3c63 6f64 653e called by \n+00161c30: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_bind (or the C+\n+00161cc0: 2b20 7365 7276 6963 6520 636c 6173 7320 + service class \n+00161cd0: 3c63 6f64 653e 6269 6e64 3c2f 636f 6465 bind method) at the\n+00161cf0: 2073 6572 7665 722d 7369 6465 2061 6e64 server-side and\n+00161d00: 2062 7920 3c63 6f64 653e 3c61 2063 6c61 by soap_connec\n+00161d90: 743c 2f61 3e3c 2f63 6f64 653e 206f 7220 t or \n+00161da0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_connect_co\n+00161e20: 6d6d 616e 643c 2f61 3e3c 2f63 6f64 653e mmand\n+00161e30: 2061 7420 7468 6520 636c 6965 6e74 2d73 at the client-s\n+00161e40: 6964 6520 7769 7468 2061 2068 6f73 7420 ide with a host \n+00161e50: 3c63 6f64 653e 6e61 6d65 3c2f 636f 6465 name parameter to r\n+00161e70: 6573 6f6c 7665 2074 6f20 6164 6472 6573 esolve to addres\n+00161e80: 7320 3c63 6f64 653e 696e 6164 6472 3c2f s inaddr by address\n+00161ea0: 2074 7261 6e73 6c61 7469 6f6e 2e20 5768 translation. Wh\n+00161eb0: 656e 2073 7563 6365 7373 6675 6c20 7365 en successful se\n+00161ec0: 7473 2070 6172 616d 6574 6572 203c 636f ts parameter inaddr\n+00161ee0: 2061 6e64 2072 6574 7572 6e73 203c 636f and returns #SOAP_OK or a s\n+00161fc0: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status (int) erro\n+00161fe0: 7220 636f 6465 2e20 5468 6520 6275 696c r code. The buil\n+00161ff0: 742d 696e 2066 756e 6374 696f 6e20 6173 t-in function as\n+00162000: 7369 676e 6564 2074 6f20 3c63 6f64 653e signed to \n+00162010: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fr\n+001620b0: 6573 6f6c 7665 3c2f 613e 3c2f 636f 6465 esolve is tcp_g\n+001620d0: 6574 686f 7374 3c2f 636f 6465 3e2e 3c2f ethost..

      .\n+00162110: 6663 6f6e 6e65 6374 3c2f 6833 3e0a 3c70 fconnect

      .int (soap::fc\n+001621d0: 6f6e 6e65 6374 3c2f 613e 2928 7374 7275 onnect)(stru\n+001621e0: 6374 2073 6f61 7020 2a73 6f61 702c 2063 ct soap *soap, c\n+001621f0: 6f6e 7374 2063 6861 7220 2a65 6e64 706f onst char *endpo\n+00162200: 696e 742c 2063 6f6e 7374 2063 6861 7220 int, const char \n+00162210: 2a68 6f73 742c 2069 6e74 2070 6f72 7429 *host, int port)\n+00162220: 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 3e54

      .

      T\n+00162230: 6869 7320 6361 6c6c 6261 636b 2069 7320 his callback is \n+00162240: 6361 6c6c 6564 2062 7920 7468 6520 656e called by the en\n+00162250: 6769 6e65 2074 6f20 6f70 7469 6f6e 616c gine to optional\n+00162260: 6c79 206f 7665 7272 6964 6520 636c 6965 ly override clie\n+00162270: 6e74 2d73 6964 6520 636f 6e6e 6563 7469 nt-side connecti\n+00162280: 6e67 2e20 5468 6520 7061 7261 6d65 7465 ng. The paramete\n+00162290: 7273 203c 636f 6465 3e68 6f73 743c 2f63 rs host and p\n+001622b0: 6f72 743c 2f63 6f64 653e 2077 6572 6520 ort were \n+001622c0: 6d69 6372 6f2d 7061 7273 6564 2066 726f micro-parsed fro\n+001622d0: 6d20 7468 6520 3c63 6f64 653e 656e 6470 m the endp\n+001622e0: 6f69 6e74 3c2f 636f 6465 3e20 7072 696f oint prio\n+001622f0: 7220 746f 2070 6173 7369 6e67 2074 6865 r to passing the\n+00162300: 6d20 746f 2074 6869 7320 6361 6c6c 6261 m to this callba\n+00162310: 636b 2e20 5265 7475 726e 7320 3c63 6f64 ck. Returns #SOAP_OK or a so\n+001623f0: 6170 5f73 7461 7475 733c 2f61 3e3c 2f63 ap_status (int) error\n+00162410: 2063 6f64 652e 204e 6f20 6275 696c 742d code. No built-\n+00162420: 696e 2066 756e 6374 696f 6e20 6973 2061 in function is a\n+00162430: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to soa\n+001624e0: 703a 3a66 636f 6e6e 6563 743c 2f61 3e3c p::fconnect<\n+001624f0: 2f63 6f64 653e 2e3c 2f70 3e0a 3c68 333e /code>.

      .

      \n+00162500: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .fdiscon\n+00162530: 6e65 6374 3c2f 6833 3e0a 3c70 3e3c 636f nect

      .

      int (soa\n+001625e0: 703a 3a66 6469 7363 6f6e 6e65 6374 3c2f p::fdisconnect)(struct soap \n+00162600: 2a73 6f61 7029 3c2f 636f 6465 3e3c 2f70 *soap).

      This callba\n+00162620: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by \n+00162630: 7468 6520 656e 6769 6e65 203c 636f 6465 the engine soap_closeso\n+001626c0: 636b 3c2f 613e 3c2f 636f 6465 3e20 6265 ck be\n+001626d0: 666f 7265 2074 6865 203c 636f 6465 3e3c fore the <\n+001626e0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001626f0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00162700: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+00162710: 6761 6239 3539 3164 6438 3064 6262 3065 gab9591dd80dbb0e\n+00162720: 3537 3137 3834 6261 6435 3432 3162 3232 571784bad5421b22\n+00162730: 3032 2220 7469 746c 653d 2243 616c 6c62 02\" title=\"Callb\n+00162740: 6163 6b20 7468 6174 2063 6c6f 7365 7320 ack that closes \n+00162750: 7468 6520 6375 7272 656e 7420 736f 636b the current sock\n+00162760: 6574 2063 6f6e 6e65 6374 696f 6e2e 223e et connection.\">\n+00162770: 736f 6170 3a3a 6663 6c6f 7365 3c2f 613e soap::fclose\n+00162780: 3c2f 636f 6465 3e20 6361 6c6c 6261 636b callback\n+00162790: 2069 7320 6361 6c6c 6564 2074 6f20 7368 is called to sh\n+001627a0: 7574 646f 776e 2f64 6973 636f 6e6e 6563 utdown/disconnec\n+001627b0: 742e 2052 6574 7572 6e73 203c 636f 6465 t. Returns #SOAP_OK\n+001627d0: 206f 7220 6120 3c63 6f64 653e 3c61 2063 or a soa\n+00162890: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status (int) error \n+001628b0: 636f 6465 2e20 4e6f 2062 7569 6c74 2d69 code. No built-i\n+001628c0: 6e20 6675 6e63 7469 6f6e 2069 7320 6173 n function is as\n+001628d0: 7369 676e 6564 2074 6f20 3c63 6f64 653e signed to \n+001628e0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fdisc\n+00162980: 6f6e 6e65 6374 3c2f 613e 3c2f 636f 6465 onnect.

      .

      <\n+001629c0: 2f61 3e0a 6663 6c6f 7365 736f 636b 6574 /a>.fclosesocket\n+001629d0: 3c2f 6833 3e0a 3c70 3e3c 636f 6465 3e69

      .

      i\n+001629e0: 6e74 2028 3c61 2063 6c61 7373 3d22 656c nt (soap::fclo\n+00162a70: 7365 736f 636b 6574 3c2f 613e 2928 7374 sesocket)(st\n+00162a80: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap,\n+00162a90: 2053 4f41 505f 534f 434b 4554 2073 6f63 SOAP_SOCKET soc\n+00162aa0: 6b29 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 k)

      .This callback i\n+00162ac0: 7320 6361 6c6c 6564 2074 6f20 636c 6f73 s called to clos\n+00162ad0: 6520 6120 736f 636b 6574 2062 7920 7468 e a socket by th\n+00162ae0: 6520 656e 6769 6e65 2e20 5265 7475 726e e engine. Return\n+00162af0: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK\n+00162b00: 3c2f 636f 6465 3e20 6f72 2061 203c 636f or a soap_status<\n+00162bd0: 2f61 3e3c 2f63 6f64 653e 2028 696e 7429 /a>
      (int)\n+00162be0: 2065 7272 6f72 2063 6f64 652e 2054 6865 error code. The\n+00162bf0: 2062 7569 6c74 2d69 6e20 6675 6e63 7469 built-in functi\n+00162c00: 6f6e 2061 7373 6967 6e65 6420 746f 203c on assigned to <\n+00162c10: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::fcl\n+00162ca0: 6f73 6573 6f63 6b65 743c 2f61 3e3c 2f63 osesocket is tc\n+00162cc0: 705f 636c 6f73 6573 6f63 6b65 743c 2f63 p_closesocket.

      .

      .fshutdown\n+00162d10: 736f 636b 6574 3c2f 6833 3e0a 3c70 3e3c socket

      .

      <\n+00162d20: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (\n+00162db0: 736f 6170 3a3a 6673 6875 7464 6f77 6e73 soap::fshutdowns\n+00162dc0: 6f63 6b65 743c 2f61 3e29 2873 7472 7563 ocket)(struc\n+00162dd0: 7420 736f 6170 202a 736f 6170 2c20 534f t soap *soap, SO\n+00162de0: 4150 5f53 4f43 4b45 5420 736f 636b 2c20 AP_SOCKET sock, \n+00162df0: 696e 7420 686f 7729 3c2f 636f 6465 3e3c int how)<\n+00162e00: 2f70 3e0a 3c70 3e54 6869 7320 6361 6c6c /p>.

      This call\n+00162e10: 6261 636b 2069 7320 6361 6c6c 6564 2074 back is called t\n+00162e20: 6f20 7368 7574 2064 6f77 6e20 6120 736f o shut down a so\n+00162e30: 636b 6574 2062 7920 7468 6520 656e 6769 cket by the engi\n+00162e40: 6e65 2e20 5265 7475 726e 7320 3c63 6f64 ne. Returns #SOAP_OK or a so\n+00162f20: 6170 5f73 7461 7475 733c 2f61 3e3c 2f63 ap_status (int) error\n+00162f40: 2063 6f64 652e 2054 6865 2062 7569 6c74 code. The built\n+00162f50: 2d69 6e20 6675 6e63 7469 6f6e 2061 7373 -in function ass\n+00162f60: 6967 6e65 6420 746f 203c 636f 6465 3e3c igned to <\n+00162f70: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00162f80: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00162f90: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+00162fa0: 6761 3531 6530 3964 6466 3736 3961 3264 ga51e09ddf769a2d\n+00162fb0: 6463 6438 3734 6662 3665 3666 6235 3238 dcd874fb6e6fb528\n+00162fc0: 3964 2220 7469 746c 653d 2243 616c 6c62 9d\" title=\"Callb\n+00162fd0: 6163 6b20 7468 6174 2073 6875 7473 2064 ack that shuts d\n+00162fe0: 6f77 6e20 6120 6769 7665 6e20 736f 636b own a given sock\n+00162ff0: 6574 2e22 3e73 6f61 703a 3a66 7368 7574 et.\">soap::fshut\n+00163000: 646f 776e 736f 636b 6574 3c2f 613e 3c2f downsocket is t\n+00163020: 6370 5f73 6875 7464 6f77 6e73 6f63 6b65 cp_shutdownsocke\n+00163030: 743c 2f63 6f64 653e 2e3c 2f70 3e0a 3c68 t.

      ..fpoll\n+00163070: 3c2f 6833 3e0a 3c70 3e3c 636f 6465 3e69 .

      i\n+00163080: 6e74 2028 3c61 2063 6c61 7373 3d22 656c nt (\n+00163140: 736f 6170 3a3a 6670 6f6c 6c3c 2f61 3e29 soap::fpoll)\n+00163150: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+00163160: 6170 293c 2f63 6f64 653e 3c2f 703e 0a3c ap)

      .<\n+00163170: 703e 5468 6973 2063 616c 6c62 6163 6b20 p>This callback \n+00163180: 6973 2063 616c 6c65 6420 6279 2074 6865 is called by the\n+00163190: 2065 6e67 696e 6520 746f 2077 6169 7420 engine to wait \n+001631a0: 666f 7220 6163 7469 7669 7479 206f 6e20 for activity on \n+001631b0: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap::socket or soap:\n+00163350: 3a6d 6173 7465 723c 2f61 3e3c 2f63 6f64 :master socket using \n+00163370: 3c63 6f64 653e 706f 6c6c 3c2f 636f 6465 poll or selec\n+00163390: 743c 2f63 6f64 653e 2e20 5469 6d65 7320 t. Times \n+001633a0: 6f75 7420 7768 656e 203c 636f 6465 3e3c out when <\n+001633b0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001633c0: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+001633d0: 6d6c 2361 3731 3162 6233 6135 3364 6537 ml#a711bb3a53de7\n+001633e0: 6363 3632 3432 3965 3464 3361 3265 3062 cc62429e4d3a2e0b\n+001633f0: 3534 3734 2220 7469 746c 653d 2255 7365 5474\" title=\"Use\n+00163400: 722d 6465 6669 6e61 626c 6520 7469 6d65 r-definable time\n+00163410: 6f75 7420 746f 2073 656e 6420 6120 7061 out to send a pa\n+00163420: 636b 6574 206f 6620 6461 7461 2c20 706f cket of data, po\n+00163430: 7369 7469 7665 2074 696d 656f 7574 2076 sitive timeout v\n+00163440: 616c 7565 7320 6172 6520 7365 636f 6e64 alues are second\n+00163450: 732c 2e2e 2e22 3e73 6f61 703a 3a73 656e s,...\">soap::sen\n+00163460: 645f 7469 6d65 6f75 743c 2f61 3e3c 2f63 d_timeout or soap::r\n+00163530: 6563 765f 7469 6d65 6f75 743c 2f61 3e3c ecv_timeout<\n+00163540: 2f63 6f64 653e 2061 7265 206e 6f6e 7a65 /code> are nonze\n+00163550: 726f 2e20 5265 7475 726e 7320 3c63 6f64 ro. Returns #SOAP_OK or a so\n+00163630: 6170 5f73 7461 7475 733c 2f61 3e3c 2f63 ap_status (int) error\n+00163650: 2063 6f64 652e 2054 6865 2062 7569 6c74 code. The built\n+00163660: 2d69 6e20 6675 6e63 7469 6f6e 2061 7373 -in function ass\n+00163670: 6967 6e65 6420 746f 203c 636f 6465 3e3c igned to <\n+00163680: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00163690: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+001636a0: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+001636b0: 6761 3230 3231 3061 6131 3731 3031 3962 ga20210aa171019b\n+001636c0: 3237 6566 3138 3264 3835 3365 3264 3665 27ef182d853e2d6e\n+001636d0: 3266 2220 7469 746c 653d 2243 616c 6c62 2f\" title=\"Callb\n+001636e0: 6163 6b20 7468 6174 2062 6c6f 636b 7320 ack that blocks \n+001636f0: 756e 7469 6c20 6163 7469 7669 7479 2069 until activity i\n+00163700: 7320 6465 7465 6374 6564 206f 6e20 7468 s detected on th\n+00163710: 6520 736f 6170 3a3a 736f 636b 6574 206f e soap::socket o\n+00163720: 7220 736f 6170 3a3a 6d61 7374 6572 2073 r soap::master s\n+00163730: 6f63 6b65 742c 2e2e 2e22 3e73 6f61 703a ocket,...\">soap:\n+00163740: 3a66 706f 6c6c 3c2f 613e 3c2f 636f 6465 :fpoll is soap_\n+00163760: 706f 6c6c 3c2f 636f 6465 3e2e 3c2f 703e poll.

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

      .fr\n+001637a0: 6563 763c 2f68 333e 0a3c 703e 3c63 6f64 ecv

      .

      size_t (soap::frecv)(struct soap \n+00163870: 2a73 6f61 702c 2063 6861 7220 2a62 7566 *soap, char *buf\n+00163880: 2c20 7369 7a65 5f74 206c 656e 293c 2f63 , size_t len)

      .

      This\n+001638a0: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal\n+001638b0: 6c65 6420 6279 2074 6865 2065 6e67 696e led by the engin\n+001638c0: 6520 746f 2072 6563 6569 7665 2028 6f72 e to receive (or\n+001638d0: 2072 6561 6429 2064 6174 6120 696e 746f read) data into\n+001638e0: 2061 2073 7065 6369 6669 6564 2062 7566 a specified buf\n+001638f0: 6665 7220 3c63 6f64 653e 6275 663c 2f63 fer buf and l\n+00163910: 656e 3c2f 636f 6465 3e2e 2054 6865 2073 en. The s\n+00163920: 6f75 7263 6520 666f 7220 7468 6520 6461 ource for the da\n+00163930: 7461 2074 6f20 7265 6164 2062 7920 7468 ta to read by th\n+00163940: 6973 2063 616c 6c62 6163 6b20 6973 203c is callback is <\n+00163950: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n+00163a10: 703a 3a69 733c 2f61 3e3c 2f63 6f64 653e p::is\n+00163a20: 2077 6865 6e20 6e6f 6e2d 4e55 4c4c 2c20 when non-NULL, \n+00163a30: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n+00163af0: 6170 3a3a 736f 636b 6574 3c2f 613e 3c2f ap::socket when valid\n+00163b10: 2c20 6f72 203c 636f 6465 3e3c 6120 636c , or soap::recvfd<\n+00163be0: 2f61 3e3c 2f63 6f64 653e 2e20 5265 7475 /a>. Retu\n+00163bf0: 726e 7320 3c63 6f64 653e 2353 4f41 505f rns #SOAP_\n+00163c00: 4f4b 3c2f 636f 6465 3e20 6f72 2061 203c OK or a <\n+00163c10: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_statu\n+00163cd0: 733c 2f61 3e3c 2f63 6f64 653e 2028 696e s (in\n+00163ce0: 7429 2065 7272 6f72 2063 6f64 652e 2054 t) error code. T\n+00163cf0: 6865 2062 7569 6c74 2d69 6e20 6675 6e63 he built-in func\n+00163d00: 7469 6f6e 2061 7373 6967 6e65 6420 746f tion assigned to\n+00163d10: 203c 636f 6465 3e3c 6120 636c 6173 733d \n+00163db0: 736f 6170 3a3a 6672 6563 763c 2f61 3e3c soap::frecv<\n+00163dc0: 2f63 6f64 653e 2069 7320 3c63 6f64 653e /code> is \n+00163dd0: 6672 6563 763c 2f63 6f64 653e 2e3c 2f70 frecv..

      .f\n+00163e10: 7365 6e64 3c2f 6833 3e0a 3c70 3e3c 636f send

      .

      int (soap::fsend)(struct soap *\n+00163ed0: 736f 6170 2c20 636f 6e73 7420 6368 6172 soap, const char\n+00163ee0: 202a 6275 662c 2073 697a 655f 7420 6c65 *buf, size_t le\n+00163ef0: 6e29 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 n)

      .This callback i\n+00163f10: 7320 6361 6c6c 6564 2062 7920 7468 6520 s called by the \n+00163f20: 656e 6769 6e65 2074 6f20 7365 6e64 2028 engine to send (\n+00163f30: 6f72 2077 7269 7465 2920 6461 7461 2073 or write) data s\n+00163f40: 7065 6369 6669 6564 2062 7920 3c63 6f64 pecified by data
      by\n+00163f60: 7465 7320 6f66 206c 656e 6774 6820 3c63 tes of length len. \n+00163f80: 5468 6520 7369 6e6b 2066 6f72 2074 6865 The sink for the\n+00163f90: 2064 6174 6120 746f 2062 6520 7365 6e74 data to be sent\n+00163fa0: 2074 6f20 6973 2074 7970 6963 616c 6c79 to is typically\n+00163fb0: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n+00164070: 6f61 703a 3a73 6f63 6b65 743c 2f61 3e3c oap::socket<\n+00164080: 2f63 6f64 653e 2c20 3c63 6f64 653e 3c61 /code>, soap::send\n+00164150: 6664 3c2f 613e 3c2f 636f 6465 3e20 6f72 fd or\n+00164160: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n+00164220: 6f61 703a 3a6f 733c 2f61 3e3c 2f63 6f64 oap::os. Returns #SOAP_OK or a so\n+00164310: 6170 5f73 7461 7475 733c 2f61 3e3c 2f63 ap_status (int) error\n+00164330: 2063 6f64 652e 2054 6865 2062 7569 6c74 code. The built\n+00164340: 2d69 6e20 6675 6e63 7469 6f6e 2061 7373 -in function ass\n+00164350: 6967 6e65 6420 746f 203c 636f 6465 3e3c igned to <\n+00164360: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00164370: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+00164380: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html#\n+00164390: 6761 6664 3532 6238 3036 3535 6534 6631 gafd52b80655e4f1\n+001643a0: 3032 3165 6464 3663 3535 6238 6466 6564 021edd6c55b8dfed\n+001643b0: 6666 2220 7469 746c 653d 2243 616c 6c62 ff\" title=\"Callb\n+001643c0: 6163 6b20 7468 6174 2073 656e 6473 2074 ack that sends t\n+001643d0: 6865 2067 6976 656e 2062 7974 6573 206f he given bytes o\n+001643e0: 6620 6461 7461 2e22 3e73 6f61 703a 3a66 f data.\">soap::f\n+001643f0: 7365 6e64 3c2f 613e 3c2f 636f 6465 3e20 send \n+00164400: 6973 203c 636f 6465 3e66 7365 6e64 3c2f is fsend.

      .

      <\n+00164420: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+00164430: 2069 643d 2261 7574 6f74 6f63 5f6d 6435 id=\"autotoc_md5\n+00164440: 3622 3e3c 2f61 3e0a 6673 6572 7665 726c 6\">.fserverl\n+00164450: 6f6f 703c 2f68 333e 0a3c 703e 3c63 6f64 oop

      .

      int (soa\n+00164530: 703a 3a66 7365 7276 656c 6f6f 703c 2f61 p::fserveloop)(struct soap *\n+00164550: 736f 6170 293c 2f63 6f64 653e 3c2f 703e soap)

      \n+00164560: 0a3c 703e 5468 6973 2063 616c 6c62 6163 .

      This callbac\n+00164570: 6b20 6973 2063 616c 6c65 6420 6166 7465 k is called afte\n+00164580: 7220 6561 6368 2073 7563 6365 7373 6675 r each successfu\n+00164590: 6c20 636f 6d70 6c65 7469 6f6e 206f 6620 l completion of \n+001645a0: 6120 7365 7276 6572 206f 7065 7261 7469 a server operati\n+001645b0: 6f6e 2069 6e20 7468 6520 7365 7276 6572 on in the server\n+001645c0: 206c 6f6f 702e 2045 7865 6375 7465 7320 loop. Executes \n+001645d0: 696d 6d65 6469 6174 656c 7920 6166 7465 immediately afte\n+001645e0: 7220 7365 6e64 696e 6720 7468 6520 7265 r sending the re\n+001645f0: 7370 6f6e 7365 2074 6f20 6120 636c 6965 sponse to a clie\n+00164600: 6e74 2061 6e64 2062 6566 6f72 6520 7468 nt and before th\n+00164610: 6520 6e65 7874 206b 6565 702d 616c 6976 e next keep-aliv\n+00164620: 6520 7365 7276 6572 206c 6f6f 7020 6974 e server loop it\n+00164630: 6572 6174 696f 6e20 7768 656e 2065 6e61 eration when ena\n+00164640: 626c 6564 2077 6974 6820 3c63 6f64 653e bled with \n+00164650: 2353 4f41 505f 494f 5f4b 4545 5041 4c49 #SOAP_IO_KEEPALI\n+00164660: 5645 3c2f 636f 6465 3e2e 2054 6869 7320 VE. This \n+00164670: 6361 6c6c 6261 636b 2063 616e 2062 6520 callback can be \n+00164680: 7573 6564 2074 6f20 7265 636c 6169 6d20 used to reclaim \n+00164690: 7265 736f 7572 6365 7320 696e 2074 6865 resources in the\n+001646a0: 206b 6565 702d 616c 6976 6520 7365 7276 keep-alive serv\n+001646b0: 6572 206c 6f6f 702c 2066 6f72 2065 7861 er loop, for exa\n+001646c0: 6d70 6c65 206d 616e 6167 6564 206d 656d mple managed mem\n+001646d0: 6f72 7920 6361 6e20 6265 2072 6563 6c61 ory can be recla\n+001646e0: 696d 6564 2062 7920 6361 6c6c 696e 6720 imed by calling \n+001646f0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_destro\n+001647b0: 793c 2f61 3e3c 2f63 6f64 653e 2061 6e64 y and\n+001647c0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_\n+00164890: 656e 643c 2f61 3e3c 2f63 6f64 653e 2069 end i\n+001648a0: 6e20 7468 6174 206f 7264 6572 2061 6e64 n that order and\n+001648b0: 2061 6c6c 2064 6573 6572 6961 6c69 7a65 all deserialize\n+001648c0: 6420 616e 6420 6f74 6865 7220 6479 6e61 d and other dyna\n+001648d0: 6d69 6361 6c6c 792d 616c 6c6f 6361 7465 mically-allocate\n+001648e0: 6420 6461 7461 206d 616e 6167 6564 2062 d data managed b\n+001648f0: 7920 7468 6520 636f 6e74 6578 7420 7769 y the context wi\n+00164900: 6c6c 2062 6520 6465 616c 6c6f 6361 7465 ll be deallocate\n+00164910: 642e 2052 6574 7572 6e73 203c 636f 6465 d. Returns #SOAP_OK\n+00164930: 206f 7220 6120 3c63 6f64 653e 3c61 2063 or a soa\n+001649f0: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status (int) error \n+00164a10: 636f 6465 2e20 4e6f 2062 7569 6c74 2d69 code. No built-i\n+00164a20: 6e20 6675 6e63 7469 6f6e 2069 7320 6173 n function is as\n+00164a30: 7369 676e 6564 2074 6f20 3c63 6f64 653e signed to \n+00164a40: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fser\n+00164b10: 7665 6c6f 6f70 3c2f 613e 3c2f 636f 6465 veloop.

      .

      <\n+00164b50: 2f61 3e0a 666d 616c 6c6f 633c 2f68 333e /a>.fmalloc

      \n+00164b60: 0a3c 703e 3c63 6f64 653e 766f 6964 2028 .

      void (\n+00164b70: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n+00164c10: 3a3a 666d 616c 6c6f 633c 2f61 3e29 2873 ::fmalloc)(s\n+00164c20: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+00164c30: 2c20 7369 7a65 5f74 2073 697a 6529 3c2f , size_t size)

      .

      Thi\n+00164c50: 7320 6361 6c6c 6261 636b 2063 616e 2062 s callback can b\n+00164c60: 6520 7573 6564 2074 6f20 6f76 6572 7269 e used to overri\n+00164c70: 6465 206d 656d 6f72 7920 616c 6c6f 6361 de memory alloca\n+00164c80: 7469 6f6e 2061 6e64 206d 616e 6167 656d tion and managem\n+00164c90: 656e 7420 646f 6e65 2062 7920 3c63 6f64 ent done by soap_malloc<\n+00164d50: 2f61 3e3c 2f63 6f64 653e 2069 6e20 432e /a> in C.\n+00164d60: 204d 656d 6f72 7920 616c 6c6f 6361 7465 Memory allocate\n+00164d70: 6420 7669 6120 7468 6973 2063 616c 6c62 d via this callb\n+00164d80: 6163 6b20 7769 6c6c 206e 6f74 2062 6520 ack will not be \n+00164d90: 6d61 6e61 6765 6420 616e 6420 6e6f 7420 managed and not \n+00164da0: 6265 2061 7574 6f6d 6174 6963 616c 6c79 be automatically\n+00164db0: 2072 656c 6561 7365 6420 6279 2074 6865 released by the\n+00164dc0: 2065 6e67 696e 652e 2049 6e73 7465 6164 engine. Instead\n+00164dd0: 2c20 7468 6520 6170 706c 6963 6174 696f , the applicatio\n+00164de0: 6e20 7573 696e 6720 7468 6973 2063 616c n using this cal\n+00164df0: 6c62 6163 6b20 7368 6f75 6c64 2072 656c lback should rel\n+00164e00: 6561 7365 2061 6c6c 6f63 6174 6564 206d ease allocated m\n+00164e10: 656d 6f72 792e 2041 6c6c 2061 6c6c 6f63 emory. All alloc\n+00164e20: 6174 696f 6e73 2064 6f6e 6520 6279 203c ations done by <\n+00164e30: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_mall\n+00164ee0: 6f63 3c2f 613e 3c2f 636f 6465 3e20 6172 oc ar\n+00164ef0: 6520 7265 706c 6163 6564 2077 6974 6820 e replaced with \n+00164f00: 6120 6361 6c6c 2074 6f20 3c63 6f64 653e a call to \n+00164f10: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n+00164fb0: 3a3a 666d 616c 6c6f 633c 2f61 3e3c 2f63 ::fmalloc. However, n\n+00164fd0: 6f20 6f74 6865 7220 616c 6c6f 6361 7469 o other allocati\n+00164fe0: 6f6e 732c 2073 7563 6820 6173 203c 636f ons, such as soap_n\n+00165080: 6577 3c2f 613e 3c2f 636f 6465 3e20 616e ew an\n+00165090: 6420 3c63 6f64 653e 736f 6170 5f6e 6577 d soap_new\n+001650a0: 5f54 3c2f 636f 6465 3e20 666f 7220 432b _T for C+\n+001650b0: 2b20 636c 6173 7365 7320 3c63 6f64 653e + classes \n+001650c0: 543c 2f63 6f64 653e 2061 7265 2061 6666 T are aff\n+001650d0: 6563 7465 642c 2062 6563 6175 7365 206f ected, because o\n+001650e0: 626a 6563 7473 2061 7265 2061 6c6c 6f63 bjects are alloc\n+001650f0: 6174 6564 2064 6966 6665 7265 6e74 6c79 ated differently\n+00165100: 2e20 5468 6973 2063 616c 6c62 6163 6b20 . This callback \n+00165110: 6973 2074 6865 7265 666f 7265 206e 6f74 is therefore not\n+00165120: 2075 7365 6675 6c20 666f 7220 432b 2b20 useful for C++ \n+00165130: 6170 706c 6963 6174 696f 6e73 2e20 5265 applications. Re\n+00165140: 7475 726e 7320 6120 706f 696e 7465 7220 turns a pointer \n+00165150: 746f 2064 796e 616d 6963 616c 6c79 2061 to dynamically a\n+00165160: 6c6c 6f63 6174 6564 206d 656d 6f72 7920 llocated memory \n+00165170: 6f72 204e 554c 4c20 6f6e 2066 6169 6c75 or NULL on failu\n+00165180: 7265 2074 6f20 616c 6c6f 6361 7465 2e20 re to allocate. \n+00165190: 4e6f 2062 7569 6c74 2d69 6e20 6675 6e63 No built-in func\n+001651a0: 7469 6f6e 2069 7320 6173 7369 676e 6564 tion is assigned\n+001651b0: 2074 6f20 3c63 6f64 653e 3c61 2063 6c61 to soap::fmal\n+00165260: 6c6f 633c 2f61 3e3c 2f63 6f64 653e 2e3c loc.<\n+00165270: 2f70 3e0a 3c64 6c20 636c 6173 733d 2273 /p>.

      \n+00165290: 3c64 743e 5761 726e 696e 673c 2f64 743e
      Warning
      \n+001652a0: 3c64 643e 4465 7072 6563 6174 6564 2073
      Deprecated s\n+001652b0: 696e 6365 2032 2e38 2e37 322e 2044 6566 ince 2.8.72. Def\n+001652c0: 696e 6520 3c63 6f64 653e 2353 4f41 505f ine #SOAP_\n+001652d0: 4d41 4c4c 4f43 3c2f 636f 6465 3e20 616e MALLOC an\n+001652e0: 6420 3c63 6f64 653e 2353 4f41 505f 4652 d #SOAP_FR\n+001652f0: 4545 3c2f 636f 6465 3e20 696e 7374 6561 EE instea\n+00165300: 642e 3c2f 6464 3e3c 2f64 6c3e 0a3c 6833 d.
      ..user v\n+00165340: 6172 6961 626c 653c 2f68 333e 0a3c 703e ariable.

      \n+00165350: 4120 3c63 6f64 653e 766f 6964 2a20 3c61 A void* soap::user\n+00165420: 3c2f 613e 3c2f 636f 6465 3e20 7661 7269 vari\n+00165430: 6162 6c65 2069 7320 6176 6169 6c61 626c able is availabl\n+00165440: 6520 746f 2070 6173 7320 7573 6572 2d64 e to pass user-d\n+00165450: 6566 696e 6564 2064 6174 6120 746f 2074 efined data to t\n+00165460: 6865 2063 616c 6c62 6163 6b73 2e3c 2f70 he callbacks..

      .E\n+001654a0: 7861 6d70 6c65 733c 2f68 333e 0a3c 703e xamples

      .

      \n+001654b0: 5468 6520 666f 6c6c 6f77 696e 6720 6578 The following ex\n+001654c0: 616d 706c 6520 7573 6573 2049 2f4f 2063 ample uses I/O c\n+001654d0: 616c 6c62 6163 6b73 2066 6f72 2063 7573 allbacks for cus\n+001654e0: 746f 6d69 7a65 6420 7365 7269 616c 697a tomized serializ\n+001654f0: 6174 696f 6e20 6f66 2064 6174 6120 696e ation of data in\n+00165500: 746f 2061 2066 6978 6564 2d73 697a 6520 to a fixed-size \n+00165510: 6275 6666 6572 2061 6e64 2064 6573 6572 buffer and deser\n+00165520: 6961 6c69 7a61 7469 6f6e 2062 6163 6b20 ialization back \n+00165530: 696e 746f 2061 2064 6174 6120 7374 7275 into a data stru\n+00165540: 6374 7572 653a 3c2f 703e 0a3c 6469 7620 cture:

      .
      cha\n+00165590: 723c 2f73 7061 6e3e 2062 7566 5b31 3030 r buf[100\n+001655a0: 3030 5d3b 203c 7370 616e 2063 6c61 7373 00]; // XM\n+001655c0: 4c20 6275 6666 6572 203c 2f73 7061 6e3e L buffer \n+001655d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      int le\n+00165610: 6e31 203d 2030 3b20 2020 203c 7370 616e n1 = 0; // #chars writt\n+00165640: 656e 203c 2f73 7061 6e3e 3c2f 6469 763e en
      \n+00165650: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      int\n+00165680: 3c2f 7370 616e 3e20 6c65 6e32 203d 2030 len2 = 0\n+00165690: 3b20 2020 203c 7370 616e 2063 6c61 7373 ; // #c\n+001656b0: 6861 7273 2072 6561 6420 3c2f 7370 616e hars read
      .
      .
      // mys\n+00165710: 656e 643a 2070 7574 2058 4d4c 2069 6e20 end: put XML in \n+00165720: 6275 665b 5d20 3c2f 7370 616e 3e3c 2f64 buf[] .
      \n+00165760: 696e 743c 2f73 7061 6e3e 206d 7973 656e int mysen\n+00165770: 6428 3c73 7061 6e20 636c 6173 733d 226b d(struct soa\n+001657c0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+001657f0: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, co\n+00165810: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n+00165840: 202a 732c 203c 7370 616e 2063 6c61 7373 *s, s\n+00165860: 697a 655f 743c 2f73 7061 6e3e 206e 2920 ize_t n) \n+00165870: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      {
      \n+00165890: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      i\n+001658c0: 663c 2f73 7061 6e3e 2028 6c65 6e31 202b f (len1 +\n+001658d0: 206e 2026 6774 3b20 3c73 7061 6e20 636c n > si\n+001658f0: 7a65 6f66 3c2f 7370 616e 3e28 6275 6629 zeof(buf)\n+00165900: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
      .
      <\n+00165920: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00165930: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+00165940: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> SOAP_\n+001659a0: 454f 463c 2f61 3e3b 203c 2f64 6976 3e0a EOF;
      .\n+001659b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      strcpy(buf +\n+001659d0: 206c 656e 312c 2073 293b 203c 2f64 6976 len1, s); .
      len1 += n;\n+00165a00: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      ..} \n+00165ac0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      \n+00165ae0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      // myre\n+00165b10: 6376 3a20 6765 7420 584d 4c20 6672 6f6d cv: get XML from\n+00165b20: 2062 7566 5b5d 203c 2f73 7061 6e3e 3c2f buf[] .
      size_t m\n+00165b70: 7972 6563 7628 3c73 7061 6e20 636c 6173 yrecv(stru\n+00165b90: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, char *s, \n+00165c40: 7369 7a65 5f74 3c2f 7370 616e 3e20 6e29 size_t n)\n+00165c50: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      {.
      \n+00165ca0: 6966 3c2f 7370 616e 3e20 286c 656e 3220 if (len2 \n+00165cb0: 2b20 6e20 2667 743b 206c 656e 3129 203c + n > len1) <\n+00165cc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      n = \n+00165ce0: 6c65 6e31 202d 206c 656e 323b 203c 2f64 len1 - len2; .
      strncpy(\n+00165d10: 732c 2062 7566 202b 206c 656e 322c 206e s, buf + len2, n\n+00165d20: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
      .
      le\n+00165d40: 6e32 202b 3d20 6e3b 203c 2f64 6976 3e0a n2 += n;
      .\n+00165d50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      re\n+00165d80: 7475 726e 3c2f 7370 616e 3e20 6e3b 203c turn n; <\n+00165d90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      }
      \n+00165db0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      .
      int main()
      .\n+00165e10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      {
      .
      struct soap soap;
      .
      struct ns__person p; \n+00165f10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      \n+00165f80: 736f 6170 5f69 6e69 7431 3c2f 613e 2826 soap_init1(&\n+00165f90: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+00165fc0: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, SOAP_XML\n+00166020: 5f54 5245 453c 2f61 3e29 3b20 3c2f 6469 _TREE); .
      len1 = le\n+00166050: 6e32 203d 2030 3b20 2020 2020 3c73 7061 n2 = 0; // reset buffe\n+00166080: 7220 706f 696e 7465 7273 203c 2f73 7061 r pointers
      .
      p.n\n+001660b0: 616d 6520 3d20 3c73 7061 6e20 636c 6173 ame = "John Doe\n+001660e0: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n+001660f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      p.age \n+00166110: 3d20 3235 3b20 3c2f 6469 763e 0a3c 6469 = 25;
      . \n+00166130: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+00166160: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .fsend = mysend; // assign call\n+001661f0: 6261 636b 203c 2f73 7061 6e3e 3c2f 6469 back .
      so\n+00166240: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.fr\n+001662a0: 6563 763c 2f61 3e20 3d20 6d79 7265 6376 ecv = myrecv\n+001662b0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // assig\n+001662d0: 6e20 6361 6c6c 6261 636b 203c 2f73 7061 n callback
      .
      if\n+00166320: 2028 736f 6170 5f77 7269 7465 5f6e 735f (soap_write_ns_\n+00166330: 5f70 6572 736f 6e28 2661 6d70 3b3c 6120 _person(&soap, &a\n+00166370: 6d70 3b70 2929 3c2f 6469 763e 0a3c 6469 mp;p))
      . \n+00166390: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
      .
      <\n+001663b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001663c0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001663d0: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga\n+001663e0: 3933 3161 3461 6236 6466 3235 3533 6234 931a4ab6df2553b4\n+001663f0: 3861 3063 3237 3066 3861 3061 3838 6166 8a0c270f8a0a88af\n+00166400: 223e 736f 6170 5f70 7269 6e74 5f66 6175 \">soap_print_fau\n+00166410: 6c74 3c2f 613e 2826 616d 703b 3c61 2063 lt(&soap, std\n+00166450: 6f75 7429 3b20 3c2f 6469 763e 0a3c 6469 out);
      . \n+00166470: 2020 2065 7869 7428 4558 4954 5f46 4149 exit(EXIT_FAI\n+00166480: 4c55 5245 293b 203c 2f64 6976 3e0a 3c64 LURE);
      .\n+001664a0: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
      .
      <\n+001664c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001664d0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_read_ns\n+001664f0: 5f5f 5065 7273 6f6e 2826 616d 703b 3c61 __Person(&soap, &\n+00166530: 616d 703b 7029 293c 2f64 6976 3e0a 3c64 amp;p))
      .\n+00166550: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
      .
      \n+00166570: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_print_fa\n+001665d0: 756c 743c 2f61 3e28 2661 6d70 3b3c 6120 ult(&soap, st\n+00166610: 646f 7574 293b 203c 2f64 6976 3e0a 3c64 dout);
      .\n+00166630: 2020 2020 6578 6974 2845 5849 545f 4641 exit(EXIT_FA\n+00166640: 494c 5552 4529 3b20 3c2f 6469 763e 0a3c ILURE);
      .<\n+00166650: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00166660: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
      . \n+00166680: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_destro\n+001666e0: 793c 2f61 3e28 2661 6d70 3b3c 6120 636c y(&soap); .
      soa\n+00166790: 705f 656e 643c 2f61 3e28 2661 6d70 3b3c p_end(&<\n+001667a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001667b0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001667c0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+001667d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      soap_done(&\n+00166850: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+00166880: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
      .}<\n+001668a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.\n+00166970: 3c64 6976 2063 6c61 7373 3d22 7474 6465
      size_t(* fre\n+00166990: 6376 2928 7374 7275 6374 2073 6f61 7020 cv)(struct soap \n+001669a0: 2a73 6f61 702c 2063 6861 7220 2a62 7566 *soap, char *buf\n+001669b0: 2c20 7369 7a65 5f74 206c 656e 293c 2f64 , size_t len)
      Callback t\n+001669e0: 6861 7420 7265 6365 6976 6573 2062 7974 hat receives byt\n+001669f0: 6573 206f 6620 6461 7461 2069 6e74 6f20 es of data into \n+00166a00: 7468 6520 6769 7665 6e20 6275 6666 6572 the given buffer\n+00166a10: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
      Def\n+00166a30: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n+00166a40: 736f 6170 322e 683a 3436 3037 3c2f 6469 soap2.h:4607
      .
      \n+00166ab0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
      so\n+00166b10: 6170 3a3a 6673 656e 643c 2f61 3e3c 2f64 ap::fsend
      int(* fse\n+00166b40: 6e64 2928 7374 7275 6374 2073 6f61 7020 nd)(struct soap \n+00166b50: 2a73 6f61 702c 2063 6f6e 7374 2063 6861 *soap, const cha\n+00166b60: 7220 2a64 6174 612c 2073 697a 655f 7420 r *data, size_t \n+00166b70: 6c65 6e29 3c2f 6469 763e 3c64 6976 2063 len)
      Cal\n+00166b90: 6c62 6163 6b20 7468 6174 2073 656e 6473 lback that sends\n+00166ba0: 2074 6865 2067 6976 656e 2062 7974 6573 the given bytes\n+00166bb0: 206f 6620 6461 7461 2e3c 2f64 6976 3e3c of data.
      <\n+00166bc0: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n+00166bd0: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n+00166be0: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n+00166bf0: 3436 3230 3c2f 6469 763e 3c2f 6469 763e 4620
      \n+00166c00: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

      A fix\n+00166c20: 6564 2d73 697a 6520 6275 6666 6572 2074 ed-size buffer t\n+00166c30: 6f20 7374 6f72 6520 7468 6520 6f75 7462 o store the outb\n+00166c40: 6f75 6e64 206d 6573 7361 6765 2073 656e ound message sen\n+00166c50: 7420 6973 206e 6f74 2066 6c65 7869 626c t is not flexibl\n+00166c60: 6520 746f 2068 616e 646c 6520 6c61 7267 e to handle larg\n+00166c70: 6520 636f 6e74 656e 742e 2054 6f20 7374 e content. To st\n+00166c80: 6f72 6520 7468 6520 6d65 7373 6167 6520 ore the message \n+00166c90: 696e 2061 6e20 6578 7061 6e64 696e 6720 in an expanding \n+00166ca0: 6275 6666 6572 3a3c 2f70 3e0a 3c64 6976 buffer:

      .
      struct\n+00166cf0: 203c 2f73 7061 6e3e 6275 6666 6572 203c buffer <\n+00166d00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      {
      .\n+00166d20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      si\n+00166d50: 7a65 5f74 3c2f 7370 616e 3e20 6c65 6e3b ze_t len;\n+00166d60: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      size_t max;
      .\n+00166db0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      ch\n+00166de0: 6172 3c2f 7370 616e 3e20 2a62 7566 3b20 ar *buf; \n+00166df0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      }; .
      .<\n+00166e40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00166e50: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int main() .
      {
      . \n+00166ea0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+00166ef0: 2f61 3e20 3c61 2063 6c61 7373 3d22 636f /a> soap<\n+00166f20: 2f61 3e3b 203c 2f64 6976 3e0a 3c64 6976 /a>;
      . \n+00166f40: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct ns__person p\n+00166f70: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
      .
      struct buffer *h = mal\n+00166fc0: 6c6f 6328 3c73 7061 6e20 636c 6173 733d loc(sizeof\n+00166fe0: 3c2f 7370 616e 3e28 3c73 7061 6e20 636c (st\n+00167000: 7275 6374 3c2f 7370 616e 3e20 6275 6666 ruct buff\n+00167010: 6572 2929 3b20 3c2f 6469 763e 0a3c 6469 er));
      . \n+00167030: 2068 2d26 6774 3b6c 656e 203d 2030 3b20 h->len = 0; \n+00167040: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      h->\n+00167060: 3b6d 6178 203d 2030 3b20 3c2f 6469 763e ;max = 0;
      \n+00167070: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      h->buf =\n+00167090: 204e 554c 4c3b 203c 2f64 6976 3e0a 3c64 NULL;
      .\n+001670b0: 2020 3c61 2063 6c61 7373 3d22 636f 6465
      soap_init\n+00167110: 313c 2f61 3e28 2661 6d70 3b3c 6120 636c 1(&soap, S\n+001671a0: 4f41 505f 584d 4c5f 5452 4545 3c2f 613e OAP_XML_TREE\n+001671b0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
      .
      soap.user \n+00167250: 3d20 283c 7370 616e 2063 6c61 7373 3d22 = (voi\n+00167270: 643c 2f73 7061 6e3e 2a29 683b 203c 7370 d*)h; // pass buffe\n+001672a0: 7220 6173 2061 2068 616e 646c 6520 746f r as a handle to\n+001672b0: 2074 6865 2063 616c 6c62 6163 6b20 3c2f the callback
      . \n+001672e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap.\n+00167310: 3c61 2063 6c61 7373 3d22 636f 6465 2220 fsend\n+00167370: 203d 206d 7973 656e 643b 2020 3c73 7061 = mysend; // assign call\n+001673a0: 6261 636b 203c 2f73 7061 6e3e 3c2f 6469 back .
      if (soap\n+001673f0: 5f77 7269 7465 5f6e 735f 5f70 6572 736f _write_ns__perso\n+00167400: 6e28 2661 6d70 3b3c 6120 636c 6173 733d n(&so\n+00167430: 6170 3c2f 613e 2c20 2661 6d70 3b70 2929 ap, &p))\n+00167440: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      {.
      soap\n+001674d0: 5f70 7269 6e74 5f66 6175 6c74 3c2f 613e _print_fault\n+001674e0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+00167510: 703c 2f61 3e2c 2073 7464 6f75 7429 3b20 p, stdout); \n+00167520: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      exi\n+00167540: 7428 4558 4954 5f46 4149 4c55 5245 293b t(EXIT_FAILURE);\n+00167550: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      } .
      if (h-\n+001675b0: 2667 743b 6c65 6e29 203c 2f64 6976 3e0a >len)
      .\n+001675c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      {
      . \n+001675f0: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // u\n+00167610: 7365 2068 2d26 6774 3b62 7566 5b30 2e2e se h->buf[0..\n+00167620: 682d 2667 743b 6c65 6e2d 315d 2063 6f6e h->len-1] con\n+00167630: 7465 6e74 203c 2f73 7061 6e3e 3c2f 6469 tent .
      /\n+00167670: 2f20 7468 656e 2063 6c65 616e 7570 3a20 / then cleanup: \n+00167680: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+001676a0: 2020 2020 682d 2667 743b 6c65 6e20 3d20 h->len = \n+001676b0: 303b 203c 2f64 6976 3e0a 3c64 6976 2063 0;
      .
      \n+001676d0: 682d 2667 743b 6d61 7820 3d20 303b 203c h->max = 0; <\n+001676e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      free\n+00167700: 2868 2d26 6774 3b62 7566 293b 203c 2f64 (h->buf); .
      h->\n+00167730: 6275 6620 3d20 4e55 4c4c 3b20 3c2f 6469 buf = NULL; .
      }
      .\n+00167760: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      soap_de\n+001677d0: 7374 726f 793c 2f61 3e28 2661 6d70 3b3c stroy(&<\n+001677e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001677f0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00167800: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+00167810: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      soap_end(&a\n+00167890: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
      . \n+001678e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_done(&s\n+00167970: 6f61 703c 2f61 3e29 3b3c 2f64 6976 3e0a oap);
      .\n+00167980: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      }
      .
      .
      int myse\n+001679f0: 6e64 283c 7370 616e 2063 6c61 7373 3d22 nd(struct<\n+00167a10: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n+00167a40: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+00167a70: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, c\n+00167a90: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *s, \n+00167ae0: 7369 7a65 5f74 3c2f 7370 616e 3e20 6e29 size_t n)\n+00167af0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      {.
      stru\n+00167b40: 6374 203c 2f73 7061 6e3e 6275 6666 6572 ct buffer\n+00167b50: 202a 6820 3d20 283c 7370 616e 2063 6c61 *h = (str\n+00167b70: 7563 7420 3c2f 7370 616e 3e62 7566 6665 uct buffe\n+00167b80: 722a 293c 6120 636c 6173 733d 2263 6f64 r*)soap->\n+00167c00: 7573 6572 3c2f 613e 3b20 3c73 7061 6e20 user; \n+00167c20: 2f2f 2067 6574 2062 7566 6665 7220 7468 // get buffer th\n+00167c30: 726f 7567 6820 6861 6e64 6c65 203c 2f73 rough handle
      .
      <\n+00167c60: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00167c70: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int m = h->ma\n+00167c90: 782c 206b 203d 2068 2d26 6774 3b6c 656e x, k = h->len\n+00167ca0: 202b 206e 3b20 3c2f 6469 763e 0a3c 6469 + n;
      . \n+00167cc0: 203c 7370 616e 2063 6c61 7373 3d22 636f // need t\n+00167ce0: 6f20 696e 6372 6561 7365 2073 7061 6365 o increase space\n+00167cf0: 3f20 3c2f 7370 616e 3e3c 2f64 6976 3e0a ?
      .\n+00167d00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      if (m == 0) \n+00167d20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      m =\n+00167d40: 2031 3032 343b 203c 2f64 6976 3e0a 3c64 1024;
      .\n+00167d60: 2020 3c73 7061 6e20 636c 6173 733d 226b else\n+00167d80: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
      .<\n+00167d90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00167da0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > w\n+00167dc0: 6869 6c65 3c2f 7370 616e 3e20 286b 2026 hile (k &\n+00167dd0: 6774 3b3d 206d 2920 3c2f 6469 763e 0a3c gt;= m)
      .<\n+00167de0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00167df0: 3e20 2020 2020 206d 202a 3d20 323b 203c > m *= 2; <\n+00167e00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      if (m\n+00167e40: 2021 3d20 682d 2667 743b 6d61 7829 203c != h->max) <\n+00167e50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      {.
      char *b\n+00167eb0: 7566 203d 206d 616c 6c6f 6328 6d29 3b20 uf = malloc(m); \n+00167ec0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      mem\n+00167ee0: 6370 7928 6275 662c 2068 2d26 6774 3b62 cpy(buf, h->b\n+00167ef0: 7566 2c20 682d 2667 743b 6c65 6e29 3b20 uf, h->len); \n+00167f00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      h-&\n+00167f20: 6774 3b6d 6178 203d 206d 3b20 3c2f 6469 gt;max = m; .
      if (h-\n+00167f70: 2667 743b 6275 6629 203c 2f64 6976 3e0a >buf)
      .\n+00167f80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      free(h-&\n+00167fa0: 6774 3b62 7566 293b 203c 2f64 6976 3e0a gt;buf);
      .\n+00167fb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      h->buf \n+00167fd0: 3d20 6275 663b 203c 2f64 6976 3e0a 3c64 = buf;
      .\n+00167ff0: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
      .
      m\n+00168010: 656d 6370 7928 682d 2667 743b 6275 6620 emcpy(h->buf \n+00168020: 2b20 682d 2667 743b 6c65 6e2c 2073 2c20 + h->len, s, \n+00168030: 6e29 3b20 3c2f 6469 763e 0a3c 6469 7620 n);
      .
      h\n+00168050: 2d26 6774 3b6c 656e 202b 3d20 6e3b 203c ->len += n; <\n+00168060: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      return SOAP_OK;
      .
      }.

      Th\n+00168140: 6520 666f 6c6c 6f77 696e 6720 6578 616d e following exam\n+00168150: 706c 6520 696c 6c75 7374 7261 7465 7320 ple illustrates \n+00168160: 6375 7374 6f6d 697a 6564 2049 2f4f 2061 customized I/O a\n+00168170: 6e64 2048 5454 5020 6865 6164 6572 2068 nd HTTP header h\n+00168180: 616e 646c 696e 672e 2054 6865 2058 4d4c andling. The XML\n+00168190: 206d 6573 7361 6765 2069 7320 7361 7665 message is save\n+001681a0: 6420 746f 2061 2066 696c 6520 746f 2064 d to a file to d\n+001681b0: 656d 6f6e 7374 7261 7465 2049 2f4f 2061 emonstrate I/O a\n+001681c0: 6e64 2048 5454 5020 6361 6c6c 6261 636b nd HTTP callback\n+001681d0: 732e 2054 6865 2063 6c69 656e 7420 7072 s. The client pr\n+001681e0: 6f78 7920 7468 656e 2072 6561 6473 2074 oxy then reads t\n+001681f0: 6865 2066 696c 6520 636f 6e74 656e 7473 he file contents\n+00168200: 2061 7320 7468 6520 7365 7276 6963 6520 as the service \n+00168210: 7265 7370 6f6e 7365 2e20 546f 2070 6572 response. To per\n+00168220: 666f 726d 2074 6869 7320 7472 6963 6b2c form this trick,\n+00168230: 2074 6865 2073 6572 7669 6365 2072 6573 the service res\n+00168240: 706f 6e73 6520 6861 7320 6578 6163 746c ponse has exactl\n+00168250: 7920 7468 6520 7361 6d65 2073 7472 7563 y the same struc\n+00168260: 7475 7265 2061 7320 7468 6520 7265 7175 ture as the requ\n+00168270: 6573 742e 2054 6869 7320 6973 2064 6563 est. This is dec\n+00168280: 6c61 7265 6420 6279 2074 6865 203c 636f lared by the struct ns__te\n+001682a0: 7374 3c2f 636f 6465 3e20 6f75 7470 7574 st output\n+001682b0: 2070 6172 616d 6574 6572 2070 6172 7420 parameter part \n+001682c0: 6f66 2074 6865 2073 6572 7669 6365 206f of the service o\n+001682d0: 7065 7261 7469 6f6e 2064 6563 6c61 7261 peration declara\n+001682e0: 7469 6f6e 2e20 5468 6973 2073 7472 7563 tion. This struc\n+001682f0: 7420 7265 7365 6d62 6c65 7320 7468 6520 t resembles the \n+00168300: 7365 7276 6963 6520 7265 7175 6573 7420 service request \n+00168310: 2873 6565 2074 6865 2067 656e 6572 6174 (see the generat\n+00168320: 6564 203c 656d 3e3c 636f 6465 3e73 6f61 ed soa\n+00168330: 7053 7475 622e 683c 2f63 6f64 653e 3c2f pStub.h file generat\n+00168350: 6564 2062 7920 736f 6170 6370 7032 2066 ed by soapcpp2 f\n+00168360: 726f 6d20 7468 6520 696e 7465 7266 6163 rom the interfac\n+00168370: 6520 6865 6164 6572 2066 696c 6520 696e e header file in\n+00168380: 7075 7429 2e3c 2f70 3e0a 3c70 3e54 6865 put).

      .

      The\n+00168390: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n+001683a0: 7220 6669 6c65 2066 6f72 2073 6f61 7063 r file for soapc\n+001683b0: 7070 3220 6973 3a3c 2f70 3e0a 3c64 6976 pp2 is:

      .
      //gsoa\n+00168400: 7020 6e73 2073 6572 7669 6365 206e 616d p ns service nam\n+00168410: 653a 2063 616c 6c62 6163 6b20 3c2f 7370 e: callback
      .
      //gsoap ns ser\n+00168460: 7669 6365 206e 616d 6573 7061 6365 3a20 vice namespace: \n+00168470: 7572 6e3a 6361 6c6c 6261 636b 203c 2f73 urn:callback
      .
      struct ns__person .
      {
      . \n+00168500: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha\n+00168520: 723c 2f73 7061 6e3e 202a 6e61 6d65 3b20 r *name; \n+00168530: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      int age;
      .\n+00168590: 7d3b 203c 2f64 6976 3e0a 3c64 6976 2063 };
      .
      int\n+001685d0: 206e 735f 5f74 6573 7428 3c73 7061 6e20 ns__test(\n+001685f0: 7374 7275 6374 3c2f 7370 616e 3e20 6e73 struct ns\n+00168600: 5f5f 7065 7273 6f6e 2069 6e2c 203c 7370 __person in, struct\n+00168630: 206e 735f 5f74 6573 7420 2661 6d70 3b6f ns__test &o\n+00168640: 7574 293b 3c2f 6469 763e 0a3c 2f64 6976 ut);
      .

      SOAP 1\n+0016ac50: 2e31 2f31 2e32 2052 5043 2065 6e63 6f64 .1/1.2 RPC encod\n+0016ac60: 696e 6720 7370 6563 6966 6965 7320 7468 ing specifies th\n+0016ac70: 6174 2053 4f41 502f 584d 4c20 656c 656d at SOAP/XML elem\n+0016ac80: 656e 7473 206d 6179 2062 6520 6967 6e6f ents may be igno\n+0016ac90: 7265 6420 7768 656e 2070 7265 7365 6e74 red when present\n+0016aca0: 2069 6e20 6120 534f 4150 2070 6179 6c6f in a SOAP paylo\n+0016acb0: 6164 206f 6e20 7468 6520 7265 6365 6976 ad on the receiv\n+0016acc0: 696e 6720 7369 6465 2e20 486f 7765 7665 ing side. Howeve\n+0016acd0: 722c 2064 6f63 756d 656e 742f 6c69 7465 r, document/lite\n+0016ace0: 7261 6c20 7374 796c 6520 6d65 7373 6167 ral style messag\n+0016acf0: 696e 6720 7661 6c69 6461 7465 7320 584d ing validates XM\n+0016ad00: 4c20 6d65 7373 6167 6573 2061 6e64 2065 L messages and e\n+0016ad10: 7874 7261 2065 6c65 6d65 6e74 7320 6361 xtra elements ca\n+0016ad20: 6e6e 6f74 206a 7573 7420 6265 2069 676e nnot just be ign\n+0016ad30: 6f72 6564 2061 7320 7375 6368 2e20 5769 ored as such. Wi\n+0016ad40: 7468 2053 4f41 5020 646f 6375 6d65 6e74 th SOAP document\n+0016ad50: 2f6c 6974 6572 616c 2073 7479 6c65 2069 /literal style i\n+0016ad60: 7420 6973 2072 6563 6f6d 6d65 6e64 6564 t is recommended\n+0016ad70: 2074 6f20 656e 6162 6c65 2074 6865 203c to enable the <\n+0016ad80: 636f 6465 3e23 534f 4150 5f58 4d4c 5f53 code>#SOAP_XML_S\n+0016ad90: 5452 4943 543c 2f63 6f64 653e 206d 6f64 TRICT mod\n+0016ada0: 6520 666c 6167 2e20 5769 7468 2053 4f41 e flag. With SOA\n+0016adb0: 5020 5250 4320 656e 636f 6469 6e67 2c20 P RPC encoding, \n+0016adc0: 7468 6520 656e 6769 6e65 2069 676e 6f72 the engine ignor\n+0016add0: 6573 2058 4d4c 2065 6c65 6d65 6e74 7320 es XML elements \n+0016ade0: 7468 6174 2061 7265 2075 6e6b 6e6f 776e that are unknown\n+0016adf0: 2062 7920 6465 6661 756c 742c 2075 6e6c by default, unl\n+0016ae00: 6573 7320 7468 6520 584d 4c20 6174 7472 ess the XML attr\n+0016ae10: 6962 7574 6520 3c65 6d3e 3c63 6f64 653e ibute \n+0016ae20: 6d75 7374 556e 6465 7273 7461 6e64 3d22 mustUnderstand=\"\n+0016ae30: 7472 7565 223c 2f63 6f64 653e 3c2f 656d true\" is present in \n+0016ae50: 7468 6520 584d 4c20 656c 656d 656e 742e the XML element.\n+0016ae60: 2049 7420 6d61 7920 6265 2075 6e64 6573 It may be undes\n+0016ae70: 6972 6162 6c65 2066 6f72 2065 6c65 6d65 irable for eleme\n+0016ae80: 6e74 7320 746f 2062 6520 6967 6e6f 7265 nts to be ignore\n+0016ae90: 6420 7768 656e 2074 6865 206f 7574 636f d when the outco\n+0016aea0: 6d65 206f 6620 7468 6520 6f6d 6973 7369 me of the omissi\n+0016aeb0: 6f6e 2069 7320 756e 6365 7274 6169 6e2e on is uncertain.\n+0016aec0: 2054 6865 203c 636f 6465 3e3c 6120 636c The soap::fignore callba\n+0016afb0: 636b 2063 616e 2062 6520 7365 7420 746f ck can be set to\n+0016afc0: 2061 2066 756e 6374 696f 6e20 7468 6174 a function that\n+0016afd0: 2072 6574 7572 6e73 203c 636f 6465 3e23 returns #\n+0016afe0: 534f 4150 5f4f 4b3c 2f63 6f64 653e 2069 SOAP_OK i\n+0016aff0: 6e20 6361 7365 2074 6865 2065 6c65 6d65 n case the eleme\n+0016b000: 6e74 2063 616e 2062 6520 7361 6665 6c79 nt can be safely\n+0016b010: 2069 676e 6f72 6564 2c20 6f72 203c 636f ignored, or #SOAP_MUSTUND\n+0016b030: 4552 5354 414e 443c 2f63 6f64 653e 2074 ERSTAND t\n+0016b040: 6f20 7468 726f 7720 616e 2065 7863 6570 o throw an excep\n+0016b050: 7469 6f6e 2c20 6f72 2074 6f20 7065 7266 tion, or to perf\n+0016b060: 6f72 6d20 736f 6d65 2061 7070 6c69 6361 orm some applica\n+0016b070: 7469 6f6e 2d73 7065 6369 6669 6320 6163 tion-specific ac\n+0016b080: 7469 6f6e 2e20 466f 7220 6578 616d 706c tion. For exampl\n+0016b090: 652c 2074 6f20 7468 726f 7720 616e 2065 e, to throw an e\n+0016b0a0: 7863 6570 7469 6f6e 2061 7320 736f 6f6e xception as soon\n+0016b0b0: 2061 7320 616e 2075 6e6b 6e6f 776e 2065 as an unknown e\n+0016b0c0: 6c65 6d65 6e74 2069 7320 656e 636f 756e lement is encoun\n+0016b0d0: 7465 7265 6420 6f6e 2074 6865 2069 6e70 tered on the inp\n+0016b0e0: 7574 2c20 7573 653a 3c2f 703e 0a3c 6469 ut, use:

      .
      i\n+0016b130: 6e74 3c2f 7370 616e 3e20 6d61 696e 2829 nt main()\n+0016b140: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      {
      \n+0016b160: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      .
      soap-><\n+0016b2b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0016b2c0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0016b2d0: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm\n+0016b2e0: 6c23 6761 3063 3265 3161 3062 3561 3531 l#ga0c2e1a0b5a51\n+0016b2f0: 3937 3132 3861 6631 6163 6334 3836 3632 97128af1acc48662\n+0016b300: 6231 6264 223e 6669 676e 6f72 653c 2f61 b1bd\">fignore = myignore; .
      ... // soap_call_\n+0016b360: 6e73 5f5f 7765 626d 6574 686f 6428 736f ns__webmethod(so\n+0016b370: 6170 2c20 2e2e 2e29 206f 7220 736f 6170 ap, ...) or soap\n+0016b380: 5f73 6572 7665 2873 6f61 7029 203c 2f73 _serve(soap)
      .
      }.
      .<\n+0016b3d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0016b3e0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int myignore(<\n+0016b410: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0016b420: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n+0016b490: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, const\n+0016b4b0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *t\n+0016b4e0: 6167 2920 3c2f 6469 763e 0a3c 6469 7620 ag)
      .
      {.
      return\n+0016b540: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_MUSTUN\n+0016b5a0: 4445 5253 5441 4e44 3c2f 613e 3b20 3c73 DERSTAND; // never ski\n+0016b5d0: 7020 656c 656d 656e 7473 2028 7365 6375 p elements (secu\n+0016b5e0: 7265 2920 3c2f 7370 616e 3e3c 2f64 6976 re) .
      }
      .
      int\n+0016b6f0: 282a 2066 6967 6e6f 7265 2928 7374 7275 (* fignore)(stru\n+0016b700: 6374 2073 6f61 7020 2a73 6f61 702c 2063 ct soap *soap, c\n+0016b710: 6f6e 7374 2063 6861 7220 2a74 6167 293c onst char *tag)<\n+0016b720: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
      Callback\n+0016b740: 2074 6f20 6361 7463 6820 756e 7265 636f to catch unreco\n+0016b750: 676e 697a 6564 2058 4d4c 2065 6c65 6d65 gnized XML eleme\n+0016b760: 6e74 7320 616e 6420 6f76 6572 7269 6465 nts and override\n+0016b770: 7320 2353 4f41 505f 584d 4c5f 5354 5249 s #SOAP_XML_STRI\n+0016b780: 4354 2076 616c 6964 6174 696f 6e20 6572 CT validation er\n+0016b790: 726f 7273 2066 6f72 2074 6865 732e 2e2e rors for thes...\n+0016b7a0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
      Defi\n+0016b7c0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds\n+0016b7d0: 6f61 7032 2e68 3a34 3434 333c 2f64 6976 oap2.h:4443
      .
      \n+0016b850: 3c61 2068 7265 663d 2267 726f 7570 5f5f SOAP_MUST\n+0016b8a0: 554e 4445 5253 5441 4e44 3c2f 613e 3c2f UNDERSTAND
      #define \n+0016b8d0: 534f 4150 5f4d 5553 5455 4e44 4552 5354 SOAP_MUSTUNDERST\n+0016b8e0: 414e 443c 2f64 6976 3e3c 6469 7620 636c AND
      A so\n+0016b900: 6170 5f73 7461 7475 7320 6572 726f 7220 ap_status error \n+0016b910: 636f 6465 3a20 616e 2058 4d4c 2065 6c65 code: an XML ele\n+0016b920: 6d65 6e74 2069 7320 7072 6573 656e 7420 ment is present \n+0016b930: 7769 7468 2061 206d 7573 7455 6e64 6572 with a mustUnder\n+0016b940: 7374 616e 6420 6174 7472 6962 7574 6520 stand attribute \n+0016b950: 7768 6963 6820 6d75 7374 2062 6520 756e which must be un\n+0016b960: 642e 2e2e 3c2f 6469 763e 3c64 6976 2063 d...
      \n+0016b980: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+0016b990: 7374 6473 6f61 7032 2e68 3a32 3439 303c stdsoap2.h:2490<\n+0016b9a0: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
      .

      To selecti\n+0016b9d0: 7665 6c79 2074 6872 6f77 2061 6e20 6578 vely throw an ex\n+0016b9e0: 6365 7074 696f 6e20 7768 656e 203c 656d ception when mustUnder\n+0016ba00: 7374 616e 643d 2274 7275 6522 3c2f 636f stand=\"true\" SOAP He\n+0016ba20: 6164 6572 2065 6c65 6d65 6e74 2069 7320 ader element is \n+0016ba30: 656e 636f 756e 7465 7265 6420 6f72 2077 encountered or w\n+0016ba40: 6865 6e20 616e 2075 6e6b 6e6f 776e 2065 hen an unknown e\n+0016ba50: 6c65 6d65 6e74 2069 7320 656e 636f 756e lement is encoun\n+0016ba60: 7465 7265 6420 6578 6365 7074 2066 6f72 tered except for\n+0016ba70: 2065 6c65 6d65 6e74 203c 656d 3e3c 636f element ns:xyz\n+0016ba90: 3c2f 656d 3e2c 2075 7365 3a3c 2f70 3e0a , use:

      .\n+0016baa0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
      int mai\n+0016baf0: 6e28 293c 2f64 6976 3e0a 3c64 6976 2063 n()
      .
      {.
      st\n+0016bb40: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = <\n+0016bbb0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0016bbc0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0016bbd0: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+0016bbe0: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68\n+0016bbf0: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498\n+0016bc00: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c\">soap_new\n+0016bc10: 2829 3b3c 2f64 6976 3e0a 3c64 6976 2063 ();
      .
      soap-&g\n+0016bc60: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;fignore\n+0016bcc0: 3c2f 613e 203d 2069 676e 6f72 653b 203c = ignore; <\n+0016bcd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      ... // soap_call\n+0016bd10: 5f6e 735f 5f77 6562 6d65 7468 6f64 2873 _ns__webmethod(s\n+0016bd20: 6f61 702c 202e 2e2e 2920 6f72 2073 6f61 oap, ...) or soa\n+0016bd30: 705f 7365 7276 6528 736f 6170 2920 3c2f p_serve(soap)
      .}<\n+0016bd60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      .\n+0016bd80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 ..\n+0016c000: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
      .
      \n+0016c020: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // tags &l\n+0016c040: 743b 6e73 3a73 6f6d 6545 6c65 6d65 6e74 t;ns:someElement\n+0016c050: 2667 743b 2063 616e 2062 6520 7361 6665 > can be safe\n+0016c060: 6c79 2069 676e 6f72 6564 3c2f 7370 616e ly ignored
      .
      if (soap_match_\n+0016c110: 7461 673c 2f61 3e28 3c61 2063 6c61 7373 tag(s\n+0016c140: 6f61 703c 2f61 3e2c 2074 6167 2c20 3c73 oap, tag, "\n+0016c170: 6e73 3a73 6f6d 6545 6c65 6d65 6e74 2671 ns:someElement&q\n+0016c180: 756f 743b 3c2f 7370 616e 3e29 203d 3d20 uot;) == \n+0016c190: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_OK)\n+0016c1f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      <\n+0016c210: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0016c220: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+0016c230: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> SOAP_\n+0016c290: 4f4b 3c2f 613e 3b3c 2f64 6976 3e0a 3c64 OK;
      .\n+0016c2b0: 2020 7d3c 2f64 6976 3e0a 3c64 6976 2063 }
      ..
      }.
      .\n+0016c3b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct
      Namespace <\n+0016c410: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0016c420: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0016c430: 705f 5f6e 616d 6573 7061 6365 2e68 746d p__namespace.htm\n+0016c440: 6c23 6761 6162 6661 6330 6133 6238 6433 l#gaabfac0a3b8d3\n+0016c450: 3834 3938 6263 3565 3165 3362 6334 3635 8498bc5e1e3bc465\n+0016c460: 6561 6436 223e 6e61 6d65 7370 6163 6573 ead6\">namespaces\n+0016c470: 3c2f 613e 5b5d 203d 203c 2f64 6976 3e0a [] =
      .\n+0016c480: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      {
      .
      { \n+0016c4b0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+0016c4d0: 743b 534f 4150 2d45 4e56 2671 756f 743b t;SOAP-ENV"\n+0016c4e0: 3c2f 7370 616e 3e2c 203c 7370 616e 2063 , "http:\n+0016c510: 2f2f 7363 6865 6d61 732e 786d 6c73 6f61 //schemas.xmlsoa\n+0016c520: 702e 6f72 672f 736f 6170 2f65 6e76 656c p.org/soap/envel\n+0016c530: 6f70 652f 2671 756f 743b 3c2f 7370 616e ope/" },
      . \n+0016c560: 7b20 3c73 7061 6e20 636c 6173 733d 2273 { &q\n+0016c580: 756f 743b 534f 4150 2d45 4e43 2671 756f uot;SOAP-ENC&quo\n+0016c590: 743b 3c2f 7370 616e 3e2c 203c 7370 616e t;, "htt\n+0016c5c0: 703a 2f2f 7363 6865 6d61 732e 786d 6c73 p://schemas.xmls\n+0016c5d0: 6f61 702e 6f72 672f 736f 6170 2f65 6e63 oap.org/soap/enc\n+0016c5e0: 6f64 696e 672f 2671 756f 743b 3c2f 7370 oding/" },
      .\n+0016c610: 2020 7b20 3c73 7061 6e20 636c 6173 733d { \n+0016c630: 2671 756f 743b 7873 6926 7175 6f74 3b3c "xsi"<\n+0016c640: 2f73 7061 6e3e 2c20 2020 2020 203c 7370 /span>, "h\n+0016c670: 7474 703a 2f2f 7777 772e 7733 2e6f 7267 ttp://www.w3.org\n+0016c680: 2f32 3030 312f 584d 4c53 6368 656d 612d /2001/XMLSchema-\n+0016c690: 696e 7374 616e 6365 2671 756f 743b 3c2f instance" },
      .\n+0016c6b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      { "xsd"\n+0016c6f0: 3b3c 2f73 7061 6e3e 2c20 2020 2020 203c ;, <\n+0016c700: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+0016c710: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+0016c720: 3b68 7474 703a 2f2f 7777 772e 7733 2e6f ;http://www.w3.o\n+0016c730: 7267 2f32 3030 312f 584d 4c53 6368 656d rg/2001/XMLSchem\n+0016c740: 6126 7175 6f74 3b3c 2f73 7061 6e3e 207d a" }\n+0016c750: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
      .
      { <\n+0016c770: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+0016c780: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+0016c790: 3b6e 7326 7175 6f74 3b3c 2f73 7061 6e3e ;ns"\n+0016c7a0: 2c20 2020 2020 2020 3c73 7061 6e20 636c , "some-U\n+0016c7d0: 5249 2671 756f 743b 3c2f 7370 616e 3e7d RI"}\n+0016c7e0: 2c20 3c73 7061 6e20 636c 6173 733d 2263 , // binds\n+0016c800: 2026 7175 6f74 3b6e 7326 7175 6f74 3b20 "ns" \n+0016c810: 6e61 6d65 7370 6163 6520 7072 6566 6978 namespace prefix\n+0016c820: 2074 6f20 7363 6865 6d61 2055 5249 3c2f to schema URI
      . \n+0016c850: 7b20 4e55 4c4c 2c20 4e55 4c4c 7d20 3c2f { NULL, NULL} .
      ];
      .\n+0016c880: 3c64 6976 2063 6c61 7373 3d22 7474 6322
      <\n+0016ca40: 703e 4675 6e63 7469 6f6e 203c 636f 6465 p>Function \n+0016cac0: 736f 6170 5f6d 6174 6368 5f74 6167 3c2f soap_match_tag compar\n+0016cae0: 6573 2074 776f 2074 6167 732e 2054 6865 es two tags. The\n+0016caf0: 2074 6869 7264 2070 6172 616d 6574 6572 third parameter\n+0016cb00: 206d 6179 2062 6520 6120 7061 7474 6572 may be a patter\n+0016cb10: 6e20 7768 6572 6520 3c63 6f64 653e 2a3c n where *<\n+0016cb20: 2f63 6f64 653e 2069 7320 6120 7769 6c64 /code> is a wild\n+0016cb30: 6361 7264 2061 6e64 203c 636f 6465 3e2d card and -\n+0016cb40: 3c2f 636f 6465 3e20 6973 2061 2073 696e is a sin\n+0016cb50: 676c 6520 6368 6172 6163 7465 7220 7769 gle character wi\n+0016cb60: 6c64 6361 7264 2e20 536f 2066 6f72 2065 ldcard. So for e\n+0016cb70: 7861 6d70 6c65 203c 636f 6465 3e73 6f61 xample soa\n+0016cb80: 705f 6d61 7463 685f 7461 6728 736f 6170 p_match_tag(soap\n+0016cb90: 2c20 7461 672c 2022 6e73 3a2a 2229 3c2f , tag, \"ns:*\") will match\n+0016cbb0: 2061 6e79 2065 6c65 6d65 6e74 2069 6e20 any element in \n+0016cbc0: 6e61 6d65 7370 6163 6520 3c63 6f64 653e namespace \n+0016cbd0: 6e73 3c2f 636f 6465 3e20 6f72 2077 6865 ns or whe\n+0016cbe0: 6e20 6e6f 206e 616d 6573 7061 6365 2070 n no namespace p\n+0016cbf0: 7265 6669 7820 6973 2070 7265 7365 6e74 refix is present\n+0016cc00: 2069 6e20 7468 6520 584d 4c20 6d65 7373 in the XML mess\n+0016cc10: 6167 652e 3c2f 703e 0a3c 703e 5468 6520 age.

      .

      The \n+0016cc20: 6361 6c6c 6261 636b 2063 616e 2061 6c73 callback can als\n+0016cc30: 6f20 6265 2075 7365 6420 746f 206b 6565 o be used to kee\n+0016cc40: 7020 7472 6163 6b20 6f66 2075 6e6b 6e6f p track of unkno\n+0016cc50: 776e 2065 6c65 6d65 6e74 7320 696e 2061 wn elements in a\n+0016cc60: 6e20 696e 7465 726e 616c 2064 6174 6120 n internal data \n+0016cc70: 7374 7275 6374 7572 6520 7375 6368 2061 structure such a\n+0016cc80: 7320 6120 6c69 7374 3a3c 2f70 3e0a 3c64 s a list:

      .
      stru\n+0016ccd0: 6374 203c 2f73 7061 6e3e 556e 6b6e 6f77 ct Unknow\n+0016cce0: 6e20 3c2f 6469 763e 0a3c 6469 7620 636c n
      .
      {.
      char *ta\n+0016cd40: 673b 203c 2f64 6976 3e0a 3c64 6976 2063 g;
      .
      struct Unknown *next;\n+0016cd90: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      }; ..\n+0016ced0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      {
      .
      char *s = (char*\n+0016cf50: 293c 6120 636c 6173 733d 2263 6f64 6522 )soap_mallo\n+0016cfb0: 633c 2f61 3e28 3c61 2063 6c61 7373 3d22 c(soa\n+0016cfe0: 703c 2f61 3e2c 2073 7472 6c65 6e28 7461 p, strlen(ta\n+0016cff0: 6729 2b31 293b 203c 2f64 6976 3e0a 3c64 g)+1);
      .\n+0016d010: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n+0016d030: 2f73 7061 6e3e 556e 6b6e 6f77 6e20 2a75 /span>Unknown *u\n+0016d040: 203d 2028 3c73 7061 6e20 636c 6173 733d = (struct\n+0016d060: 203c 2f73 7061 6e3e 556e 6b6e 6f77 6e2a Unknown*\n+0016d070: 293c 6120 636c 6173 733d 2263 6f64 6522 )soap_mallo\n+0016d0d0: 633c 2f61 3e28 3c61 2063 6c61 7373 3d22 c(soa\n+0016d100: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, siz\n+0016d120: 656f 663c 2f73 7061 6e3e 283c 7370 616e eof(struct U\n+0016d150: 6e6b 6e6f 776e 2929 3b20 3c2f 6469 763e nknown));
      \n+0016d160: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      i\n+0016d190: 663c 2f73 7061 6e3e 2028 7320 2661 6d70 f (s &\n+0016d1a0: 3b26 616d 703b 2075 2920 3c2f 6469 763e ;& u)
      \n+0016d1b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      {
      . \n+0016d1e0: 2020 2073 7472 6370 7928 732c 2074 6167 strcpy(s, tag\n+0016d1f0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
      .
      \n+0016d210: 752d 2667 743b 7461 6720 3d20 733b 203c u->tag = s; <\n+0016d220: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      u-&g\n+0016d240: 743b 6e65 7874 203d 2075 6c69 7374 3b20 t;next = ulist; \n+0016d250: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      uli\n+0016d270: 7374 203d 2075 3b20 3c2f 6469 763e 0a3c st = u;
      .<\n+0016d280: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0016d290: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
      .} \n+0016d2b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      \n+0016d2d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      int\n+0016d300: 3c2f 7370 616e 3e20 6d61 696e 2829 3c2f main().
      {
      .<\n+0016d330: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0016d340: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > struct \n+0016d360: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n+0016d390: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *soap; .
      stru\n+0016d420: 6374 203c 2f73 7061 6e3e 556e 6b6e 6f77 ct Unknow\n+0016d430: 6e20 2a75 6c69 7374 203d 204e 554c 4c3b n *ulist = NULL;\n+0016d440: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      soap_init(&\n+0016d4c0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+0016d4f0: 2f61 3e29 3b20 3c2f 6469 763e 0a3c 6469 /a>);
      . \n+0016d510: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+0016d540: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .fignore<\n+0016d5a0: 2f61 3e20 3d20 6d79 6967 6e6f 7265 3b20 /a> = myignore; \n+0016d5b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      ... <\n+0016d5d0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+0016d5e0: 656e 7422 3e2f 2f20 736f 6170 5f63 616c ent\">// soap_cal\n+0016d5f0: 6c5f 6e73 5f5f 7765 626d 6574 686f 6428 l_ns__webmethod(\n+0016d600: 736f 6170 2c20 2e2e 2e29 206f 7220 736f soap, ...) or so\n+0016d610: 6170 5f73 6572 7665 2873 6f61 7029 203c ap_serve(soap) <\n+0016d620: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      . \n+0016d640: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // pr\n+0016d660: 696e 7420 7468 6520 6c69 7374 206f 6620 int the list of \n+0016d670: 756e 6b6e 6f77 6e20 656c 656d 656e 7473 unknown elements\n+0016d680: 2073 746f 7265 6420 696e 2075 6c69 7374 stored in ulist\n+0016d690: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+0016d6b0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_dest\n+0016d710: 726f 793c 2f61 3e28 2661 6d70 3b3c 6120 roy(&soap);.
      so\n+0016d7c0: 6170 5f65 6e64 3c2f 613e 2826 616d 703b ap_end(&\n+0016d7d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+0016d800: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
      .
      soap_done(&\n+0016d880: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+0016d8b0: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
      .}<\n+0016d8d0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

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

      .How t\n+0016d950: 6f20 6861 6e64 6c65 2048 5454 5020 3330 o handle HTTP 30\n+0016d960: 3720 7465 6d70 6f72 6172 7920 7265 6469 7 temporary redi\n+0016d970: 7265 6374 3c2f 6832 3e0a 3c70 3e54 6865 rect

      .

      The\n+0016d980: 2063 6c69 656e 742d 7369 6465 2068 616e client-side han\n+0016d990: 646c 696e 6720 6f66 2048 5454 5020 3330 dling of HTTP 30\n+0016d9a0: 3720 636f 6465 2022 5465 6d70 6f72 6172 7 code \"Temporar\n+0016d9b0: 7920 5265 6469 7265 6374 2220 616e 6420 y Redirect\" and \n+0016d9c0: 616e 7920 6f66 2074 6865 2072 6564 6972 any of the redir\n+0016d9d0: 6563 7420 636f 6465 7320 3330 312c 2033 ect codes 301, 3\n+0016d9e0: 3032 2c20 616e 6420 3330 3320 6172 6520 02, and 303 are \n+0016d9f0: 6e6f 7420 6175 746f 6d61 7465 642e 2043 not automated. C\n+0016da00: 6c69 656e 7420 6170 706c 6963 6174 696f lient applicatio\n+0016da10: 6e20 6465 7665 6c6f 7065 7273 206d 6179 n developers may\n+0016da20: 2077 616e 7420 746f 2063 6f6e 7369 6465 want to conside\n+0016da30: 7220 6164 6469 6e67 2061 2066 6577 206c r adding a few l\n+0016da40: 696e 6573 206f 6620 636f 6465 2074 6f20 ines of code to \n+0016da50: 7375 7070 6f72 7420 7265 6469 7265 6374 support redirect\n+0016da60: 732e 2049 7420 7761 7320 6465 6369 6465 s. It was decide\n+0016da70: 6420 6e6f 7420 746f 2061 7574 6f6d 6174 d not to automat\n+0016da80: 6963 616c 6c79 2073 7570 706f 7274 2072 ically support r\n+0016da90: 6564 6972 6563 7473 2066 6f72 2074 6865 edirects for the\n+0016daa0: 2066 6f6c 6c6f 7769 6e67 2072 6561 736f following reaso\n+0016dab0: 6e73 3a3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 ns:

      .
        .Redirecting a s\n+0016dad0: 6563 7572 6520 4854 5450 5320 6164 6472 ecure HTTPS addr\n+0016dae0: 6573 7320 746f 2061 206e 6f6e 2d73 6563 ess to a non-sec\n+0016daf0: 7572 6520 4854 5450 2061 6464 7265 7373 ure HTTP address\n+0016db00: 2076 6961 2033 3037 2063 7265 6174 6573 via 307 creates\n+0016db10: 2061 2073 6563 7572 6974 7920 7675 6c6e a security vuln\n+0016db20: 6572 6162 696c 6974 792e 3c2f 6c69 3e0a erability..\n+0016db30: 3c6c 693e 4379 636c 6963 2072 6564 6972
      • Cyclic redir\n+0016db40: 6563 7473 206d 7573 7420 6265 2064 6574 ects must be det\n+0016db50: 6563 7465 6420 2865 2e67 2e20 616c 6c6f ected (e.g. allo\n+0016db60: 7769 6e67 206f 6e6c 7920 6120 6c69 6d69 wing only a limi\n+0016db70: 7465 6420 6e75 6d62 6572 206f 6620 7265 ted number of re\n+0016db80: 6469 7265 6374 206c 6576 656c 7329 2e3c direct levels).<\n+0016db90: 2f6c 693e 0a3c 6c69 3e52 6564 6972 6563 /li>.
      • Redirec\n+0016dba0: 7469 6e67 2048 5454 5020 504f 5354 2077 ting HTTP POST w\n+0016dbb0: 696c 6c20 7265 7375 6c74 2069 6e20 7265 ill result in re\n+0016dbc0: 2d73 6572 6961 6c69 7a61 7469 6f6e 2061 -serialization a\n+0016dbd0: 6e64 2072 652d 706f 7374 206f 6620 7468 nd re-post of th\n+0016dbe0: 6520 656e 7469 7265 2053 4f41 5020 7265 e entire SOAP re\n+0016dbf0: 7175 6573 742e 2054 6865 2053 4f41 5020 quest. The SOAP \n+0016dc00: 7265 7175 6573 7420 6d65 7373 6167 6520 request message \n+0016dc10: 6d75 7374 2062 6520 7265 2d70 6f73 7465 must be re-poste\n+0016dc20: 6420 696e 2069 7473 2065 6e74 6972 6574 d in its entiret\n+0016dc30: 7920 7768 656e 2072 652d 6973 7375 696e y when re-issuin\n+0016dc40: 6720 7468 6520 534f 4150 206f 7065 7261 g the SOAP opera\n+0016dc50: 7469 6f6e 2074 6f20 6120 6e65 7720 6164 tion to a new ad\n+0016dc60: 6472 6573 732e 3c2f 6c69 3e0a 3c2f 756c dress.
      • ..

        To implemen\n+0016dc80: 7420 636c 6965 6e74 2d73 6964 6520 3330 t client-side 30\n+0016dc90: 3720 7265 6469 7265 6374 2c20 6164 6420 7 redirect, add \n+0016dca0: 7468 6520 666f 6c6c 6f77 696e 6720 6c69 the following li\n+0016dcb0: 6e65 7320 6f66 2063 6f64 653a 3c2f 703e nes of code:

        \n+0016dcc0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
        c\n+0016dd00: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *endpoint = NU\n+0016dd40: 4c4c 3b20 3c73 7061 6e20 636c 6173 733d LL; // use\n+0016dd60: 2064 6566 6175 6c74 2065 6e64 706f 696e default endpoin\n+0016dd70: 7420 6769 7665 6e20 696e 2057 5344 4c20 t given in WSDL \n+0016dd80: 6f72 2073 7065 6369 6679 206f 6e65 2068 or specify one h\n+0016dd90: 6572 653c 2f73 7061 6e3e 3c2f 6469 763e ere
        \n+0016dda0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
        int\n+0016ddd0: 3c2f 7370 616e 3e20 7265 6469 7265 6374 redirect\n+0016dde0: 7320 3d20 3130 3b20 2020 2020 2020 2020 s = 10; \n+0016ddf0: 203c 7370 616e 2063 6c61 7373 3d22 636f // max re\n+0016de10: 6469 7265 6374 2063 6f75 6e74 203c 2f73 direct count
        .
        while (redirects--\n+0016de70: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
        .
        {.
        if (soap\n+0016ded0: 5f63 616c 6c5f 6e73 315f 5f6d 794d 6574 _call_ns1__myMet\n+0016dee0: 686f 6428 3c61 2063 6c61 7373 3d22 636f hod(soap<\n+0016df10: 2f61 3e2c 2065 6e64 706f 696e 742c 202e /a>, endpoint, .\n+0016df20: 2e2e 2929 203c 2f64 6976 3e0a 3c64 6976 ..))
        . \n+0016df40: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
        .
        if ((soap<\n+0016dfb0: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->error >=\n+0016e010: 2033 3031 2026 616d 703b 2661 6d70 3b20 301 && \n+0016e020: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+0016e050: 2667 743b 3c61 2063 6c61 7373 3d22 636f >err\n+0016e0a0: 6f72 3c2f 613e 2026 6c74 3b3d 2033 3033 or <= 303\n+0016e0b0: 2920 7c7c 203c 6120 636c 6173 733d 2263 ) || soap\n+0016e0e0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->error == 3\n+0016e140: 3037 2920 3c2f 6469 763e 0a3c 6469 7620 07)
        .
        \n+0016e160: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
        .
        \n+0016e180: 2065 6e64 706f 696e 7420 3d20 3c61 2063 endpoint = soap_strdup\n+0016e1f0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+0016e220: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , soap->e\n+0016e2a0: 6e64 706f 696e 743c 2f61 3e29 3b20 3c73 ndpoint); // endpoint \n+0016e2d0: 6672 6f6d 2048 5454 5020 3330 312c 2033 from HTTP 301, 3\n+0016e2e0: 3032 2c20 3330 332c 2033 3037 204c 6f63 02, 303, 307 Loc\n+0016e2f0: 6174 696f 6e20 6865 6164 6572 203c 2f73 ation header
        .
        \n+0016e320: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
        .
        <\n+0016e340: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0016e350: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
        . \n+0016e380: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
        .
        \n+0016e3a0: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // h\n+0016e3c0: 616e 646c 6520 6572 726f 7220 3c2f 7370 andle error
        .
        \n+0016e3f0: 2020 3c73 7061 6e20 636c 6173 733d 226b brea\n+0016e410: 6b3c 2f73 7061 6e3e 3b20 3c2f 6469 763e k;
        \n+0016e420: 0a3c 6469 7620 636c 6173 733d 226c 696e .
        }
        .\n+0016e440: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
        }
        . \n+0016e470: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else<\n+0016e490: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
      .\n+0016e4b0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
      .
      \n+0016e4d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 break<\n+0016e4f0: 2f73 7061 6e3e 3b20 3c73 7061 6e20 636c /span>; //\n+0016e510: 2061 6c6c 204f 4b20 6e6f 773c 2f73 7061 all OK now
      .
      }.
      }
      .<\n+0016e560: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

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

      .

      \n+0016e5b0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .\n+0016e5d0: 486f 7720 746f 2069 6d70 6c65 6d65 6e74 How to implement\n+0016e5e0: 2048 5454 5020 4745 542c 2050 5554 2c20 HTTP GET, PUT, \n+0016e5f0: 616e 6420 5041 5443 4820 7365 7276 6963 and PATCH servic\n+0016e600: 6573 3c2f 6832 3e0a 3c70 3e54 6f20 696d es

      .

      To im\n+0016e610: 706c 656d 656e 7420 4854 5450 2047 4554 plement HTTP GET\n+0016e620: 2072 6571 7565 7374 2072 6573 706f 6e73 request respons\n+0016e630: 6573 2c20 6465 6669 6e65 2074 6865 203c es, define the <\n+0016e640: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::fge\n+0016e710: 743c 2f61 3e3c 2f63 6f64 653e 2063 616c t cal\n+0016e720: 6c62 6163 6b20 6675 6e63 7469 6f6e 2e20 lback function. \n+0016e730: 5468 6520 6361 6c6c 6261 636b 2069 7320 The callback is \n+0016e740: 7265 7175 6972 6564 2074 6f20 7072 6f64 required to prod\n+0016e750: 7563 6520 6120 7265 7370 6f6e 7365 2074 uce a response t\n+0016e760: 6f20 7468 6520 7265 7175 6573 7420 696e o the request in\n+0016e770: 2074 6578 7475 616c 2066 6f72 6d2c 2073 textual form, s\n+0016e780: 7563 6820 6173 2061 2057 6562 2070 6167 uch as a Web pag\n+0016e790: 6520 6f72 2061 6e20 584d 4c20 6f72 204a e or an XML or J\n+0016e7a0: 534f 4e20 7265 7370 6f6e 7365 2e3c 2f70 SON response..

      You can als\n+0016e7c0: 6f20 7573 6520 7468 6520 3c63 6f64 653e o use the \n+0016e7d0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 http_get plugin whic\n+0016e870: 6820 6573 7365 6e74 6961 6c6c 7920 7365 h essentially se\n+0016e880: 7473 2074 6865 203c 636f 6465 3e3c 6120 ts the s\n+0016e950: 6f61 703a 3a66 6765 743c 2f61 3e3c 2f63 oap::fget callback an\n+0016e970: 6420 616c 736f 206b 6565 7073 2074 7261 d also keeps tra\n+0016e980: 636b 206f 6620 7468 6520 6e75 6d62 6572 ck of the number\n+0016e990: 206f 6620 4854 5450 2047 4554 2061 6e64 of HTTP GET and\n+0016e9a0: 2050 4f53 5420 7265 7175 6573 7473 206d POST requests m\n+0016e9b0: 6164 6520 6174 2074 6865 2073 6572 7665 ade at the serve\n+0016e9c0: 7220 7369 6465 2e3c 2f70 3e0a 3c70 3e54 r side.

      .

      T\n+0016e9d0: 6865 2066 6f6c 6c6f 7769 6e67 2065 7861 he following exa\n+0016e9e0: 6d70 6c65 2070 726f 6475 6365 7320 6120 mple produces a \n+0016e9f0: 5765 6220 7061 6765 2075 706f 6e20 6120 Web page upon a \n+0016ea00: 4854 5450 2047 4554 2072 6571 7565 7374 HTTP GET request\n+0016ea10: 2028 652e 672e 2066 726f 6d20 6120 6272 (e.g. from a br\n+0016ea20: 6f77 7365 7229 3a3c 2f70 3e0a 3c64 6976 owser):

      .
      in\n+0016ea70: 743c 2f73 7061 6e3e 206d 6169 6e28 293c t main()<\n+0016ea80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      {
      .\n+0016eaa0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      struct\n+0016ead0: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 s\n+0016eb00: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+0016eb30: 736f 6170 3c2f 613e 203d 203c 6120 636c soap = \n+0016eb90: 736f 6170 5f6e 6577 3c2f 613e 2829 3b20 soap_new(); \n+0016eba0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      soap-><\n+0016ebf0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0016ec00: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0016ec10: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm\n+0016ec20: 6c23 6761 6530 3232 3230 3466 6637 3030 l#gae022204ff700\n+0016ec30: 3464 6632 6435 6163 3965 3038 3363 6262 4df2d5ac9e083cbb\n+0016ec40: 3562 3136 223e 6667 6574 3c2f 613e 203d 5b16\">fget =\n+0016ec50: 203c 6120 636c 6173 733d 2263 6f64 6522 http_get; <\n+0016ecb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      ... //..\n+0016eda0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      ... //\n+0016edd0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+0016edf0: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
      .
      .
      in\n+0016ee40: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t http_ge\n+0016eea0: 743c 2f61 3e28 3c73 7061 6e20 636c 6173 t(stru\n+0016eec0: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap) .
      {
      . \n+0016ef60: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soap_respo\n+0016efe0: 6e73 653c 2f61 3e28 3c61 2063 6c61 7373 nse(s\n+0016f010: 6f61 703c 2f61 3e2c 203c 6120 636c 6173 oap, SOAP_HT\n+0016f070: 4d4c 3c2f 613e 2920 3c73 7061 6e20 636c ML) //\n+0016f090: 2048 5454 5020 7265 7370 6f6e 7365 2068 HTTP response h\n+0016f0a0: 6561 6465 7220 7769 7468 2074 6578 742f eader with text/\n+0016f0b0: 6874 6d6c 203c 2f73 7061 6e3e 3c2f 6469 html .
      || soap_\n+0016f130: 7365 6e64 3c2f 613e 283c 6120 636c 6173 send(\n+0016f160: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, "<\n+0016f190: 4854 4d4c 2667 743b 4d79 2057 6562 2073 HTML>My Web s\n+0016f1a0: 6572 7665 7220 6973 206f 7065 7261 7469 erver is operati\n+0016f1b0: 6f6e 616c 2e26 6c74 3b2f 4854 4d4c 2667 onal.</HTML&g\n+0016f1c0: 743b 2671 756f 743b 3c2f 7370 616e 3e29 t;")\n+0016f1d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      || <\n+0016f1f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0016f200: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+0016f210: 705f 5f69 6f2e 6874 6d6c 2367 6132 3930 p__io.html#ga290\n+0016f220: 6464 6234 3661 6664 6266 3565 6336 3636 ddb46afdbf5ec666\n+0016f230: 3962 3661 6338 6461 6361 3563 3922 3e73 9b6ac8daca5c9\">s\n+0016f240: 6f61 705f 656e 645f 7365 6e64 3c2f 613e oap_end_send\n+0016f250: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+0016f280: 2929 3c2f 6469 763e 0a3c 6469 7620 636c ))
      .
      <\n+0016f2a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0016f2b0: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+0016f2c0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> soap_clos\n+0016f320: 6573 6f63 6b3c 2f61 3e28 3c61 2063 6c61 esock(soap);.
      \n+0016f390: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return so\n+0016f3f0: 6170 5f63 6c6f 7365 736f 636b 3c2f 613e ap_closesock\n+0016f400: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+0016f430: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
      .
      }.
      soap::fg\n+0016f510: 6574 3c2f 613e 3c2f 6469 763e 3c64 6976 et
      \n+0016f530: 696e 7428 2a20 6667 6574 2928 7374 7275 int(* fget)(stru\n+0016f540: 6374 2073 6f61 7020 2a73 6f61 7029 3c2f ct soap *soap)
      Callback \n+0016f570: 746f 2069 6d70 6c65 6d65 6e74 206c 6f67 to implement log\n+0016f580: 6963 2061 7420 7468 6520 7365 7276 6572 ic at the server\n+0016f590: 2d73 6964 6520 746f 2073 6572 7665 2072 -side to serve r\n+0016f5a0: 6573 706f 6e73 6573 2074 6f20 4854 5450 esponses to HTTP\n+0016f5b0: 2047 4554 2072 6571 7565 7374 7320 6672 GET requests fr\n+0016f5c0: 6f6d 2063 6c69 656e 7473 2e3c 2f64 6976 om clients.
      Definitio\n+0016f5f0: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+0016f600: 683a 3433 3330 3c2f 6469 763e 3c2f 6469 h:4330
      .
      soap_r\n+0016f6c0: 6573 706f 6e73 653c 2f61 3e3c 2f64 6976 esponse
      int soap_re\n+0016f6f0: 7370 6f6e 7365 2873 7472 7563 7420 736f sponse(struct so\n+0016f700: 6170 202a 736f 6170 2c20 696e 7420 7374 ap *soap, int st\n+0016f710: 6174 7573 293c 2f64 6976 3e3c 6469 7620 atus)
      In\n+0016f730: 6974 6961 6c69 7a65 2074 6865 2063 6f6e itialize the con\n+0016f740: 7465 7874 2066 6f72 2073 6572 7665 722d text for server-\n+0016f750: 7369 6465 2073 656e 6469 6e67 2061 6e64 side sending and\n+0016f760: 2073 656e 6420 6120 4854 5450 2072 6573 send a HTTP res\n+0016f770: 706f 6e73 6520 6865 6164 6572 2e3c 2f64 ponse header.
      .
      soap_closesock<\n+0016f840: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
      int\n+0016f860: 2073 6f61 705f 636c 6f73 6573 6f63 6b28 soap_closesock(\n+0016f870: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+0016f880: 7029 3c2f 6469 763e 3c64 6976 2063 6c61 p)
      Close\n+0016f8a0: 2074 6865 2073 6f63 6b65 7420 636f 6e6e the socket conn\n+0016f8b0: 6563 7469 6f6e 2e3c 2f64 6976 3e3c 2f64 ection.
      .
      int http_get(st\n+0016f9a0: 7275 6374 2073 6f61 7020 2a2c 2073 7472 ruct soap *, str\n+0016f9b0: 7563 7420 736f 6170 5f70 6c75 6769 6e20 uct soap_plugin \n+0016f9c0: 2a2c 2076 6f69 6420 2a29 3c2f 6469 763e *, void *)
      \n+0016f9d0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
      The HTTP GET \n+0016f9f0: 706c 7567 696e 2072 6567 6973 7472 6174 plugin registrat\n+0016fa00: 696f 6e20 6675 6e63 7469 6f6e 2e3c 2f64 ion function.
      .
      SOAP_HTML
      #define \n+0016faf0: 534f 4150 5f48 544d 4c3c 2f64 6976 3e3c SOAP_HTML
      <\n+0016fb00: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+0016fb10: 223e 4120 7370 6563 6961 6c20 736f 6170 \">A special soap\n+0016fb20: 5f73 7461 7475 7320 6572 726f 7220 636f _status error co\n+0016fb30: 6465 2074 6f20 7369 676e 616c 2074 6861 de to signal tha\n+0016fb40: 7420 6120 6375 7374 6f6d 2048 5454 5020 t a custom HTTP \n+0016fb50: 7265 7370 6f6e 7365 2069 7320 7072 6573 response is pres\n+0016fb60: 656e 7420 616e 6420 6e6f 2048 5454 5020 ent and no HTTP \n+0016fb70: 7265 7370 6f6e 732e 2e2e 3c2f 6469 763e respons...
      \n+0016fb80: 3c64 6976 2063 6c61 7373 3d22 7474 6465
      Definition\n+0016fba0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n+0016fbb0: 3a32 3731 323c 2f64 6976 3e3c 2f64 6976 :2712
      .
      \n+0016fc80: 3c64 6976 2063 6c61 7373 3d22 7474 6465
      int soap_end\n+0016fca0: 5f73 656e 6428 7374 7275 6374 2073 6f61 _send(struct soa\n+0016fcb0: 7020 2a73 6f61 7029 3c2f 6469 763e 3c64 p *soap)
      Finalize the co\n+0016fce0: 6e74 6578 7420 6166 7465 7220 7365 6e64 ntext after send\n+0016fcf0: 696e 672e 3c2f 6469 763e 3c2f 6469 763e ing.
      \n+0016fd00: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

      The e\n+0016fd20: 7861 6d70 6c65 2062 656c 6f77 2070 726f xample below pro\n+0016fd30: 6475 6365 7320 6120 5753 444c 2066 696c duces a WSDL fil\n+0016fd40: 6520 7570 6f6e 2061 2048 5454 5020 4745 e upon a HTTP GE\n+0016fd50: 5420 7769 7468 2070 6174 6820 3c63 6f64 T with path ?wsdl:<\n+0016fd70: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

      int\n+0016fdc0: 203c 6120 636c 6173 733d 2263 6f64 6522 http_get(struct soap *soap)
      .
      {.
      FILE *f\n+0016fee0: 6420 3d20 4e55 4c4c 3b3c 2f64 6976 3e0a d = NULL;
      .\n+0016fef0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      ch\n+0016ff20: 6172 3c2f 7370 616e 3e20 2a73 203d 2073 ar *s = s\n+0016ff30: 7472 6368 7228 3c61 2063 6c61 7373 3d22 trchr(soa\n+0016ff60: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->path, '?\n+0016ffe0: 393b 3c2f 7370 616e 3e29 3b20 3c2f 6469 9;); .
      if (!s |\n+00170030: 7c20 7374 7263 6d70 2873 2c20 3c73 7061 | strcmp(s, "?w\n+00170060: 7364 6c26 7175 6f74 3b3c 2f73 7061 6e3e sdl"\n+00170070: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
      .
      \n+00170090: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n+001700b0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP\n+00170110: 5f47 4554 5f4d 4554 484f 443c 2f61 3e3b _GET_METHOD;\n+00170120: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      fd =\n+00170140: 203c 6120 636c 6173 733d 2263 6f64 6522 fopen(&q\n+001701c0: 756f 743b 6d79 7365 7276 6963 652e 7773 uot;myservice.ws\n+001701d0: 646c 2671 756f 743b 3c2f 7370 616e 3e2c dl",\n+001701e0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+00170200: 6f74 3b72 6226 7175 6f74 3b3c 2f73 7061 ot;rb"); // op\n+00170230: 656e 2057 5344 4c20 6669 6c65 2074 6f20 en WSDL file to \n+00170240: 636f 7079 203c 2f73 7061 6e3e 3c2f 6469 copy .
      if (!fd)\n+00170290: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      return 404; // return HTTP \n+00170300: 6e6f 7420 666f 756e 6420 6572 726f 7220 not found error \n+00170310: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+00170330: 2020 3c61 2063 6c61 7373 3d22 636f 6465
      soap->h\n+001703b0: 7474 705f 636f 6e74 656e 743c 2f61 3e20 ttp_content \n+001703c0: 3d20 3c73 7061 6e20 636c 6173 733d 2273 = &q\n+001703e0: 756f 743b 7465 7874 2f78 6d6c 2671 756f uot;text/xml&quo\n+001703f0: 743b 3c2f 7370 616e 3e3b 203c 7370 616e t;; // HTTP header \n+00170420: 7769 7468 2074 6578 742f 786d 6c20 636f with text/xml co\n+00170430: 6e74 656e 7420 3c2f 7370 616e 3e3c 2f64 ntent .
      if (soa\n+001704d0: 705f 7265 7370 6f6e 7365 3c2f 613e 283c p_response(<\n+001704e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001704f0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00170500: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+00170510: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n+00170560: 534f 4150 5f46 494c 453c 2f61 3e29 203d SOAP_FILE) =\n+00170570: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = SOAP_OK)
      .
      {.
      while (1)
      . \n+00170650: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
      .
      .
      \n+00170800: 2020 3c73 7061 6e20 636c 6173 733d 226b if (!r || soa\n+00170880: 705f 7365 6e64 5f72 6177 3c2f 613e 283c p_send_raw(<\n+00170890: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001708a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001708b0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001708c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+001708f0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >tmp\n+00170940: 6275 663c 2f61 3e2c 2072 2929 203c 2f64 buf, r)) .
      break;
      . \n+001709b0: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
      .
      }\n+001709d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      fclose(fd)\n+00170a50: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
      .
      soa\n+00170ac0: 705f 656e 645f 7365 6e64 3c2f 613e 283c p_end_send(<\n+00170ad0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00170ae0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00170af0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+00170b00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      ..\n+00170bf0: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
      .
      \n+00170c60: 3c61 2068 7265 663d 2267 726f 7570 5f5f SOAP_GET_\n+00170cb0: 4d45 5448 4f44 3c2f 613e 3c2f 6469 763e METHOD
      \n+00170cc0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
      #define SOAP\n+00170ce0: 5f47 4554 5f4d 4554 484f 443c 2f64 6976 _GET_METHOD
      A soap_statu\n+00170d10: 7320 6572 726f 7220 636f 6465 3a20 616e s error code: an\n+00170d20: 2048 5454 5020 4745 5420 7265 7175 6573 HTTP GET reques\n+00170d30: 7420 7761 7320 7265 6365 6976 6564 2062 t was received b\n+00170d40: 7920 7468 6520 7365 7276 6963 6520 6275 y the service bu\n+00170d50: 7420 7468 6520 4745 5420 7265 7175 6573 t the GET reques\n+00170d60: 7420 6361 6c6c 6261 632e 2e2e 3c2f 6469 t callbac...
      Definiti\n+00170d90: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+00170da0: 2e68 3a32 3339 373c 2f64 6976 3e3c 2f64 .h:2397
      .
      #define SOAP_F\n+00170e90: 494c 453c 2f64 6976 3e3c 6469 7620 636c ILE
      A sp\n+00170eb0: 6563 6961 6c20 736f 6170 5f73 7461 7475 ecial soap_statu\n+00170ec0: 7320 6572 726f 7220 636f 6465 2074 6f20 s error code to \n+00170ed0: 7369 676e 616c 2074 6861 7420 6120 6375 signal that a cu\n+00170ee0: 7374 6f6d 2066 696c 652d 6261 7365 6420 stom file-based \n+00170ef0: 4854 5450 2072 6573 706f 6e73 6520 6973 HTTP response is\n+00170f00: 2070 7265 7365 6e74 2061 6e64 206e 6f20 present and no \n+00170f10: 482e 2e2e 3c2f 6469 763e 3c64 6976 2063 H...
      \n+00170f30: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+00170f40: 7374 6473 6f61 7032 2e68 3a32 3731 393c stdsoap2.h:2719<\n+00170f50: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
      .\n+00170fc0: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_send_raw\n+00171010: 3c2f 613e 3c2f 6469 763e 3c64 6976 2063
      in\n+00171030: 7420 736f 6170 5f73 656e 645f 7261 7728 t soap_send_raw(\n+00171040: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+00171050: 702c 2063 6f6e 7374 2063 6861 7220 2a73 p, const char *s\n+00171060: 2c20 7369 7a65 5f74 206e 293c 2f64 6976 , size_t n)
      Send raw byt\n+00171090: 6573 2e3c 2f64 6976 3e3c 2f64 6976 3e0a es.
      .\n+001710a0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
      <\n+00171150: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+00171160: 6922 3e63 6861 7220 746d 7062 7566 5b53 i\">char tmpbuf[S\n+00171170: 4f41 505f 544d 504c 454e 5d3c 2f64 6976 OAP_TMPLEN]
      Internal buf\n+001711a0: 6665 7220 746f 2068 6f6c 6420 7465 6d70 fer to hold temp\n+001711b0: 6f72 6172 7920 7374 7269 6e67 7320 7375 orary strings su\n+001711c0: 6368 2061 7320 7374 7269 6e67 2072 6570 ch as string rep\n+001711d0: 7265 7365 6e74 6174 696f 6e73 206f 6620 resentations of \n+001711e0: 7072 696d 6974 6976 6520 7661 6c75 6573 primitive values\n+001711f0: 2c2e 2e2e 3c2f 6469 763e 3c64 6976 2063 ,...
      \n+00171210: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+00171220: 7374 6473 6f61 7032 2e68 3a34 3139 393c stdsoap2.h:4199<\n+00171230: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
      .
      soap::http_\n+001712e0: 636f 6e74 656e 743c 2f61 3e3c 2f64 6976 content
      const char \n+00171310: 2a20 6874 7470 5f63 6f6e 7465 6e74 3c2f * http_content
      String wi\n+00171340: 7468 2048 5454 5020 636f 6e74 656e 7420 th HTTP content \n+00171350: 7479 7065 2068 6561 6465 7220 7661 6c75 type header valu\n+00171360: 6520 7265 6365 6976 6564 2c20 6361 6e20 e received, can \n+00171370: 616c 736f 2062 6520 6173 7369 676e 6564 also be assigned\n+00171380: 2074 6f20 7370 6563 6966 7920 6120 636f to specify a co\n+00171390: 6e74 656e 7420 7479 7065 2068 2e2e 2e3c ntent type h...<\n+001713a0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
      Defin\n+001713c0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+001713d0: 6170 322e 683a 3239 3830 3c2f 6469 763e ap2.h:2980
      \n+001713e0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
      .
      This example sh\n+00171410: 6f77 7320 686f 7720 6f6e 6520 7072 6564 ows how one pred\n+00171420: 6574 6572 6d69 6e65 6420 6669 6c65 2069 etermined file i\n+00171430: 7320 7365 7276 6564 2e20 5468 6520 3c65 s served. The gsoap/sa\n+00171450: 6d70 6c65 732f 7765 6273 6572 7665 723c mples/webserver<\n+00171460: 2f63 6f64 653e 3c2f 656d 3e20 6465 6d6f /code> demo\n+00171470: 6e73 7472 6174 6573 2068 6f77 2066 696c nstrates how fil\n+00171480: 6573 2073 686f 756c 6420 6265 2073 6572 es should be ser\n+00171490: 7665 6420 696e 2067 656e 6572 616c 2c20 ved in general, \n+001714a0: 6279 2061 6464 696e 6720 7468 6520 6e65 by adding the ne\n+001714b0: 6365 7373 6172 7920 6c6f 6769 6320 746f cessary logic to\n+001714c0: 2061 6464 206d 6564 6961 2074 7970 6573 add media types\n+001714d0: 2074 6f20 4854 5450 2068 6561 6465 7273 to HTTP headers\n+001714e0: 2061 6e64 2074 6f20 7265 7374 7269 6374 and to restrict\n+001714f0: 2074 6865 2073 656c 6563 7469 6f6e 206f the selection o\n+00171500: 6620 6669 6c65 7320 7468 6174 2073 686f f files that sho\n+00171510: 756c 6420 6265 2073 6572 7665 642e 3c2f uld be served..
      <\n+00171540: 6474 3e57 6172 6e69 6e67 3c2f 6474 3e3c dt>Warning<\n+00171550: 6464 3e57 6865 6e20 7365 7276 696e 6720 dd>When serving \n+00171560: 6669 6c65 7320 6173 2072 6573 706f 6e73 files as respons\n+00171570: 6573 2074 6f20 7265 7175 6573 7473 2c20 es to requests, \n+00171580: 7765 206e 6565 6420 746f 2062 6520 7661 we need to be va\n+00171590: 7279 2063 6172 6566 756c 2c20 6265 6361 ry careful, beca\n+001715a0: 7573 6520 7765 2064 6f6e 2774 2077 616e use we don't wan\n+001715b0: 7420 7265 7175 6573 7473 2074 6f20 736e t requests to sn\n+001715c0: 6f6f 7020 6172 6f75 6e64 2069 6e20 6469 oop around in di\n+001715d0: 7265 6374 6f72 6965 7320 616e 6420 7365 rectories and se\n+001715e0: 7276 6520 6669 6c65 7320 7468 6174 2073 rve files that s\n+001715f0: 686f 756c 6420 6265 2070 726f 7465 6374 hould be protect\n+00171600: 6564 2066 726f 6d20 7075 626c 6963 2076 ed from public v\n+00171610: 6965 772e 2054 6865 7265 666f 7265 2c20 iew. Therefore, \n+00171620: 7768 656e 2061 6464 696e 6720 6c6f 6769 when adding logi\n+00171630: 6320 746f 2073 6572 7665 2066 696c 6573 c to serve files\n+00171640: 2c20 7765 206d 7573 7420 7265 6a65 6374 , we must reject\n+00171650: 2072 6571 7565 7374 2074 6861 7420 6861 request that ha\n+00171660: 7665 203c 636f 6465 3e3c 6120 636c 6173 ve \n+001716f0: 736f 6170 3a3a 7061 7468 3c2f 613e 3c2f soap::path values wit\n+00171710: 6820 6120 3c63 6f64 653e 2f3c 2f63 6f64 h a / or a \\<\n+00171730: 2f63 6f64 653e 2028 3c63 6f64 653e 3c61 /code> (soap::path<\n+001717d0: 2f61 3e3c 2f63 6f64 653e 2069 7320 6120 /a> is a \n+001717e0: 7374 7269 6e67 2077 6974 6820 7468 6520 string with the \n+001717f0: 7061 7468 2070 6172 7420 6f66 2074 6865 path part of the\n+00171800: 2055 524c 2c20 7374 6172 7469 6e67 2077 URL, starting w\n+00171810: 6974 6820 6120 3c63 6f64 653e 2f3c 2f63 ith a /). If these \n+00171830: 6172 6520 616c 6c6f 7765 642c 2074 6865 are allowed, the\n+00171840: 6e20 7765 206d 7573 7420 6174 206c 6561 n we must at lea\n+00171850: 7374 2063 6865 636b 2066 6f72 203c 636f st check for .. in \n+00171870: 7468 6520 7061 7468 2074 6f20 6176 6f69 the path to avoi\n+00171880: 6420 7265 7175 6573 7420 6672 6f6d 2073 d request from s\n+00171890: 6e6f 6f70 696e 6720 6172 6f75 6e64 2069 nooping around i\n+001718a0: 6e20 6869 6768 6572 2064 6972 6563 746f n higher directo\n+001718b0: 7269 6573 2061 6c6c 2074 6865 2077 6179 ries all the way\n+001718c0: 2075 7020 746f 2074 6865 2072 6f6f 742e up to the root.\n+001718d0: 3c2f 6464 3e3c 2f64 6c3e 0a3c 703e 466f
      .

      Fo\n+001718e0: 7220 6120 6f6e 652d 7761 7920 534f 4150 r a one-way SOAP\n+001718f0: 2f58 4d4c 206d 6573 7361 6765 2c20 796f /XML message, yo\n+00171900: 7520 6361 6e20 616c 736f 2072 6574 7572 u can also retur\n+00171910: 6e20 6120 534f 4150 2f58 4d4c 2072 6573 n a SOAP/XML res\n+00171920: 706f 6e73 653a 3c2f 703e 0a3c 6469 7620 ponse:

      .
      int\n+00171970: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 http_get\n+001719d0: 3c2f 613e 283c 7370 616e 2063 6c61 7373 (struc\n+001719f0: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t \n+00171a20: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap) .
      {
      . \n+00171a90: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n+00171ae0: 736f 6170 5f72 6573 706f 6e73 653c 2f61 soap_response(soap, SOAP_OK);
      . \n+00171ba0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n+00171bc0: 3c2f 7370 616e 3e20 736f 6170 5f73 656e soap_sen\n+00171bd0: 645f 6e73 315f 5f6d 7953 656e 644d 6574 d_ns1__mySendMet\n+00171be0: 686f 6452 6573 706f 6e73 6528 3c61 2063 hodResponse(soap, "&\n+00171c40: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 4e55 quot;, NU\n+00171c50: 4c4c 2c20 2e2e 2e20 7061 7261 6d73 202e LL, ... params .\n+00171c60: 2e2e 293b 203c 2f64 6976 3e0a 3c64 6976 ..);
      .} \n+00171c80: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
      .
      where ns1\n+00171cb0: 5f5f 6d79 5365 6e64 4d65 7468 6f64 5265 __mySendMethodRe\n+00171cc0: 7370 6f6e 7365 3c2f 636f 6465 3e20 6973 sponse is\n+00171cd0: 2061 206f 6e65 2d77 6179 206d 6573 7361 a one-way messa\n+00171ce0: 6765 2064 6563 6c61 7265 6420 696e 2061 ge declared in a\n+00171cf0: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade\n+00171d00: 7220 6669 6c65 2061 733a 3c2f 703e 0a3c r file as:

      .<\n+00171d10: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+00171d20: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
      int ns1_\n+00171d60: 5f6d 7953 656e 644d 6574 686f 6452 6573 _mySendMethodRes\n+00171d70: 706f 6e73 6528 2e2e 2e20 7061 7261 6d73 ponse(... params\n+00171d80: 202e 2e2e 2c20 3c73 7061 6e20 636c 6173 ..., \n+00171da0: 766f 6964 3c2f 7370 616e 3e29 3b3c 2f64 void);.

      Th\n+00171dd0: 6520 6765 6e65 7261 7465 6420 3c65 6d3e e generated \n+00171de0: 3c63 6f64 653e 736f 6170 436c 6965 6e74 soapClient\n+00171df0: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp\n+00171e00: 2069 6e63 6c75 6465 7320 7468 6520 7365 includes the se\n+00171e10: 6e64 696e 672d 7369 6465 2073 7475 6220 nding-side stub \n+00171e20: 6675 6e63 7469 6f6e 2e3c 2f70 3e0a 3c70 function.

      .The examples ab\n+00171e40: 6f76 6520 6172 6520 666f 7220 4854 5450 ove are for HTTP\n+00171e50: 2047 4554 2e20 546f 2069 6d70 6c65 6d65 GET. To impleme\n+00171e60: 6e74 2048 5454 5020 5055 5420 616e 6420 nt HTTP PUT and \n+00171e70: 5041 5443 4820 7365 7420 7468 6520 3c63 PATCH set the soap::fput\n+00171f50: 3c2f 613e 3c2f 636f 6465 3e20 616e 6420
      and \n+00171f60: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap\n+00172030: 3a3a 6670 6174 6368 3c2f 613e 3c2f 636f ::fpatch callback fun\n+00172050: 6374 696f 6e73 206f 7220 7573 6520 7468 ctions or use th\n+00172060: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e http_p\n+001720f0: 6f73 743c 2f61 3e3c 2f63 6f64 653e 2070 ost p\n+00172100: 6c75 6769 6e20 7768 6963 6820 6973 206d lugin which is m\n+00172110: 6f72 6520 6361 7061 626c 652e 3c2f 703e ore capable.

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

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

      .

      \n+00172180: 0a54 4350 2061 6e64 2048 5454 5020 6b65 .TCP and HTTP ke\n+00172190: 6570 2d61 6c69 7665 3c2f 6832 3e0a 3c70 ep-alive

      .To activate HTT\n+001721b0: 5020 6b65 6570 2d61 6c69 7665 2c20 7365 P keep-alive, se\n+001721c0: 7420 7468 6520 3c63 6f64 653e 2353 4f41 t the #SOA\n+001721d0: 505f 494f 5f4b 4545 5041 4c49 5645 3c2f P_IO_KEEPALIVE flag for b\n+001721f0: 6f74 6820 696e 7075 7420 616e 6420 6f75 oth input and ou\n+00172200: 7470 7574 206d 6f64 6573 2c20 7365 6520 tput modes, see \n+00172210: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section Ru\n+00172240: 6e2d 7469 6d65 2066 6c61 6773 3c2f 613e n-time flags\n+00172250: 202e 2046 6f72 2065 7861 6d70 6c65 3c2f . For example.
      struct <\n+001722b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001722c0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001722d0: 6874 6d6c 223e 736f 6170 3c2f 613e 203c html\">soap <\n+001722e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001722f0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00172300: 6874 6d6c 223e 736f 6170 3c2f 613e 3b20 html\">soap; \n+00172310: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .

      W\n+00172450: 6865 6e20 6120 636c 6965 6e74 206f 7220 hen a client or \n+00172460: 6120 7365 7276 6963 6520 636f 6d6d 756e a service commun\n+00172470: 6963 6174 6573 2077 6974 6820 616e 6f74 icates with anot\n+00172480: 6865 7220 636c 6965 6e74 206f 7220 7365 her client or se\n+00172490: 7276 6963 6520 7468 6174 2073 7570 706f rvice that suppo\n+001724a0: 7274 7320 6b65 6570 2061 6c69 7665 2c20 rts keep alive, \n+001724b0: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap::ke\n+00172570: 6570 5f61 6c69 7665 3c2f 613e 3c2f 636f ep_alive variable wil\n+00172590: 6c20 6265 2073 6574 2074 6f20 312c 206f l be set to 1, o\n+001725a0: 7468 6572 7769 7365 2069 7420 6973 2072 therwise it is r\n+001725b0: 6573 6574 2074 6f20 3020 696e 6469 6361 eset to 0 indica\n+001725c0: 7469 6e67 2074 6861 7420 7468 6520 6f74 ting that the ot\n+001725d0: 6865 7220 7061 7274 7920 7761 6e74 7320 her party wants \n+001725e0: 746f 2063 6c6f 7365 2074 6865 2063 6f6e to close the con\n+001725f0: 6e65 6374 696f 6e2e 2054 6865 2063 6f6e nection. The con\n+00172600: 6e65 6374 696f 6e20 6d61 7962 6520 7465 nection maybe te\n+00172610: 726d 696e 6174 6564 206f 6e20 6569 7468 rminated on eith\n+00172620: 6572 2065 6e64 2062 6566 6f72 6520 7468 er end before th\n+00172630: 6520 636f 6d6d 756e 6963 6174 696f 6e20 e communication \n+00172640: 636f 6d70 6c65 7465 642c 2066 6f72 2065 completed, for e\n+00172650: 7861 6d70 6c65 2077 6865 6e20 7468 6520 xample when the \n+00172660: 7365 7276 6572 206b 6565 702d 616c 6976 server keep-aliv\n+00172670: 6520 636f 6e6e 6563 7469 6f6e 2068 6173 e connection has\n+00172680: 2074 696d 6564 206f 7574 2e20 5468 6973 timed out. This\n+00172690: 206d 6179 2067 656e 6572 6174 6520 6120 may generate a \n+001726a0: 2242 726f 6b65 6e20 5069 7065 2220 7369 \"Broken Pipe\" si\n+001726b0: 676e 616c 206f 6e20 556e 6978 2f4c 696e gnal on Unix/Lin\n+001726c0: 7578 2070 6c61 7466 6f72 6d73 2e20 5468 ux platforms. Th\n+001726d0: 6973 2073 6967 6e61 6c20 6361 6e20 6265 is signal can be\n+001726e0: 2063 6175 6768 7420 7769 7468 2061 2073 caught with a s\n+001726f0: 6967 6e61 6c20 6861 6e64 6c65 723a 3c2f ignal handler:.

      signa\n+00172730: 6c28 5349 4750 4950 452c 2073 6967 7069 l(SIGPIPE, sigpi\n+00172740: 7065 5f68 616e 646c 6529 3b3c 2f64 6976 pe_handle);.

      wher\n+00172770: 652c 2066 6f72 2065 7861 6d70 6c65 3a3c e, for example:<\n+00172780: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

      void sigpipe_handle\n+001727e0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (int x) { }.

      Alt\n+00172830: 6572 6e61 7469 7665 6c79 2c20 6272 6f6b ernatively, brok\n+00172840: 656e 2070 6970 6573 2063 616e 2062 6520 en pipes can be \n+00172850: 6b65 7074 2073 696c 656e 7420 6279 2073 kept silent by s\n+00172860: 6574 7469 6e67 3a3c 2f70 3e0a 3c64 6976 etting:

      .
      soap<\n+001728c0: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.soc\n+00172910: 6b65 745f 666c 6167 733c 2f61 3e20 3d20 ket_flags = \n+00172920: 4d53 475f 4e4f 5349 474e 414c 3b3c 2f64 MSG_NOSIGNAL;.
      int\n+00172a00: 2073 6f63 6b65 745f 666c 6167 733c 2f64 socket_flags
      User-defin\n+00172a30: 6162 6c65 2073 6f63 6b65 7420 7365 6e64 able socket send\n+00172a40: 2061 6e64 2072 6563 7620 666c 6167 732c and recv flags,\n+00172a50: 2066 6f72 2065 7861 6d70 6c65 2061 7373 for example ass\n+00172a60: 6967 6e20 4d53 475f 4e4f 5349 474e 414c ign MSG_NOSIGNAL\n+00172a70: 2074 6f20 6469 7361 626c 6520 7369 6770 to disable sigp\n+00172a80: 6970 6520 2874 6865 2076 612e 2e2e 3c2f ipe (the va...
      Defini\n+00172ab0: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+00172ac0: 7032 2e68 3a33 3335 393c 2f64 6976 3e3c p2.h:3359
      <\n+00172ad0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

      \n+00172af0: 5468 6973 2073 6574 7469 6e67 2077 696c This setting wil\n+00172b00: 6c20 6e6f 7420 6765 6e65 7261 7465 2061 l not generate a\n+00172b10: 2053 4947 5049 5045 2062 7574 2072 6561 SIGPIPE but rea\n+00172b20: 642f 7772 6974 6520 6f70 6572 6174 696f d/write operatio\n+00172b30: 6e73 2072 6574 7572 6e20 3c63 6f64 653e ns return \n+00172b40: 2353 4f41 505f 454f 463c 2f63 6f64 653e #SOAP_EOF\n+00172b50: 2069 6e73 7465 6164 2e20 4e6f 7465 2074 instead. Note t\n+00172b60: 6861 7420 5769 6e64 6f77 7320 646f 6573 hat Windows does\n+00172b70: 206e 6f74 2073 7570 706f 7274 2073 6967 not support sig\n+00172b80: 6e61 6c73 2061 6e64 206c 6163 6b20 7468 nals and lack th\n+00172b90: 6520 3c63 6f64 653e 4d53 475f 4e4f 5349 e MSG_NOSI\n+00172ba0: 474e 414c 3c2f 636f 6465 3e20 666c 6167 GNAL flag\n+00172bb0: 2e3c 2f70 3e0a 3c70 3e49 6620 7468 6520 .

      .

      If the \n+00172bc0: 636c 6965 6e74 2064 6f65 7320 6e6f 7420 client does not \n+00172bd0: 636c 6f73 6520 7468 6520 636f 6e6e 6563 close the connec\n+00172be0: 7469 6f6e 2c20 7468 6520 7365 7276 6572 tion, the server\n+00172bf0: 2077 696c 6c20 7761 6974 2066 6f72 6576 will wait forev\n+00172c00: 6572 2077 6865 6e20 6e6f 203c 636f 6465 er when no soap\n+00172cc0: 3a3a 7265 6376 5f74 696d 656f 7574 3c2f ::recv_timeout is spe\n+00172ce0: 6369 6669 6564 2c20 736f 2062 6520 6361 cified, so be ca\n+00172cf0: 7265 6675 6c20 746f 2073 6574 2074 696d reful to set tim\n+00172d00: 656f 7574 732c 2053 6565 2053 6563 7469 eouts, See Secti\n+00172d10: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on Timeo\n+00172d40: 7574 206d 616e 6167 656d 656e 7420 666f ut management fo\n+00172d50: 7220 6e6f 6e2d 626c 6f63 6b69 6e67 206f r non-blocking o\n+00172d60: 7065 7261 7469 6f6e 733c 2f61 3e2e 2049 perations. I\n+00172d70: 6e20 6164 6469 7469 6f6e 2c20 6f74 6865 n addition, othe\n+00172d80: 7220 636c 6965 6e74 7320 7769 6c6c 2062 r clients will b\n+00172d90: 6520 6465 6e69 6564 2073 6572 7669 6365 e denied service\n+00172da0: 2061 7320 6c6f 6e67 2061 7320 6120 636c as long as a cl\n+00172db0: 6965 6e74 206b 6565 7073 2074 6865 2063 ient keeps the c\n+00172dc0: 6f6e 6e65 6374 696f 6e20 746f 2074 6865 onnection to the\n+00172dd0: 2073 6572 7665 7220 6f70 656e 2e20 546f server open. To\n+00172de0: 2070 7265 7665 6e74 2074 6869 7320 6672 prevent this fr\n+00172df0: 6f6d 2068 6170 7065 6e69 6e67 2c20 7468 om happening, th\n+00172e00: 6520 7365 7276 6963 6520 7368 6f75 6c64 e service should\n+00172e10: 2062 6520 6d75 6c74 692d 7468 7265 6164 be multi-thread\n+00172e20: 6564 2073 7563 6820 7468 6174 2065 6163 ed such that eac\n+00172e30: 6820 7468 7265 6164 2068 616e 646c 6573 h thread handles\n+00172e40: 2074 6865 2063 6c69 656e 7420 636f 6e6e the client conn\n+00172e50: 6563 7469 6f6e 3a3c 2f70 3e0a 3c64 6976 ection:

      .
      in\n+00172ea0: 743c 2f73 7061 6e3e 206d 6169 6e28 3c73 t main(int argc, char *\n+00172f00: 2a61 7267 7629 203c 2f64 6976 3e0a 3c64 *argv)
      .\n+00172f20: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
      .
      struct \n+00172f60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+00172f90: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00172fc0: 202a 7473 6f61 703b 203c 2f64 6976 3e0a *tsoap;
      .\n+00172fd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      THREAD_\n+00173040: 5459 5045 3c2f 613e 2074 6964 3b20 3c2f TYPE tid; .
      int m,\n+00173090: 2073 3b20 3c2f 6469 763e 0a3c 6469 7620 s;
      .
      <\n+001730b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001730c0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001730d0: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+001730e0: 6761 3363 3730 6235 3837 6663 3466 3635 ga3c70b587fc4f65\n+001730f0: 3535 3363 6665 3639 3735 3164 3161 3135 553cfe69751d1a15\n+00173100: 3765 223e 736f 6170 5f69 6e69 7432 3c2f 7e\">soap_init2(&s\n+00173140: 6f61 703c 2f61 3e2c 203c 6120 636c 6173 oap, SOAP\n+001731a0: 5f49 4f5f 4b45 4550 414c 4956 453c 2f61 _IO_KEEPALIVE, SOAP_IO_KE\n+00173210: 4550 414c 4956 453c 2f61 3e29 3b20 3c2f EPALIVE); .
      \n+00173260: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.max_keep_alive\n+001732c0: 3c2f 613e 203d 2031 3030 3b20 3c73 7061 = 100; // at most 100\n+001732f0: 2063 616c 6c73 2070 6572 206b 6565 702d calls per keep-\n+00173300: 616c 6976 6520 7365 7373 696f 6e20 3c2f alive session
      . \n+00173330: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap.\n+00173360: 3c61 2063 6c61 7373 3d22 636f 6465 2220 accept_\n+001733b0: 7469 6d65 6f75 743c 2f61 3e20 3d20 3630 timeout = 60\n+001733c0: 303b 203c 7370 616e 2063 6c61 7373 3d22 0; // opti\n+001733e0: 6f6e 616c 3a20 6c65 7420 7365 7276 6572 onal: let server\n+001733f0: 2074 696d 6520 6f75 7420 6166 7465 7220 time out after \n+00173400: 7465 6e20 6d69 6e75 7465 7320 6f66 2069 ten minutes of i\n+00173410: 6e61 6374 6976 6974 7920 3c2f 7370 616e nactivity
      ..
      if \n+00173570: 2821 3c61 2063 6c61 7373 3d22 636f 6465 (!soap_valid_s\n+001735d0: 6f63 6b65 743c 2f61 3e28 6d29 2920 3c2f ocket(m)) .
      {
      \n+00173600: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      soap_p\n+00173670: 7269 6e74 5f66 6175 6c74 3c2f 613e 2826 rint_fault(&\n+00173680: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap<\n+001736b0: 2f61 3e2c 2073 7464 6572 7229 3b20 3c2f /a>, stderr); .
      exit(\n+001736e0: 4558 4954 5f46 4149 4c55 5245 293b 203c EXIT_FAILURE); <\n+001736f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      } ..
      \n+00173910: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+00173940: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .socket\n+00173990: 5f66 6c61 6773 3c2f 613e 203d 204d 5347 _flags = MSG\n+001739a0: 5f4e 4f53 4947 4e41 4c3b 203c 7370 616e _NOSIGNAL; // use this
      .
      \n+001739f0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+00173a20: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .accept\n+00173a70: 5f66 6c61 6773 3c2f 613e 203d 2053 4f5f _flags = SO_\n+00173a80: 4e4f 5349 4750 4950 453b 203c 7370 616e NOSIGPIPE; // or this to p\n+00173ab0: 7265 7665 6e74 2053 4947 5049 5045 203c revent SIGPIPE <\n+00173ac0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      . \n+00173ae0: 2020 2073 203d 203c 6120 636c 6173 733d s = soap_acce\n+00173b40: 7074 3c2f 613e 2826 616d 703b 3c61 2063 pt(&soap); .
      if (\n+00173bc0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_valid_soc\n+00173c20: 6b65 743c 2f61 3e28 7329 2920 3c2f 6469 ket(s)) .
      {
      \n+00173c50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      fprintf\n+00173c70: 2873 7464 6572 722c 203c 7370 616e 2063 (stderr, "Accep\n+00173ca0: 7420 736f 636b 6574 2025 6420 636f 6e6e t socket %d conn\n+00173cb0: 6563 7469 6f6e 2066 726f 6d20 4950 2025 ection from IP %\n+00173cc0: 642e 2564 2e25 642e 2564 5c6e 2671 756f d.%d.%d.%d\\n&quo\n+00173cd0: 743b 3c2f 7370 616e 3e2c 2073 2c20 283c t;, s, (<\n+00173ce0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00173cf0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int)(soap\n+00173d30: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .ip\n+00173d80: 3c2f 613e 2667 743b 2667 743b 3234 2926 >>24)&\n+00173d90: 616d 703b 3078 4646 2c20 283c 7370 616e amp;0xFF, (int)\n+00173dc0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+00173df0: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .ip\n+00173e40: 2667 743b 2667 743b 3136 2926 616d 703b >>16)&\n+00173e50: 3078 4646 2c20 283c 7370 616e 2063 6c61 0xFF, (int)(soap.ip>\n+00173f00: 2667 743b 3829 2661 6d70 3b30 7846 462c >8)&0xFF,\n+00173f10: 2028 3c73 7061 6e20 636c 6173 733d 226b (int<\n+00173f30: 2f73 7061 6e3e 293c 6120 636c 6173 733d /span>)so\n+00173f60: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.\n+00173fb0: 6970 3c2f 613e 2661 6d70 3b30 7846 4629 ip&0xFF)\n+00173fc0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
      .
      \n+00173fe0: 2074 736f 6170 203d 203c 6120 636c 6173 tsoap = so\n+00174040: 6170 5f63 6f70 793c 2f61 3e28 2661 6d70 ap_copy(&\n+00174050: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n+00174080: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
      .
      \n+001740a0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (!tsoap).
      <\n+001740f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00174100: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00174110: 705f 5f69 6f2e 6874 6d6c 2367 6130 6361 p__io.html#ga0ca\n+00174120: 3063 3634 6463 3736 6166 3836 3137 3935 0c64dc76af861795\n+00174130: 3661 3632 6366 3131 3764 6239 3422 3e73 6a62cf117db94\">s\n+00174140: 6f61 705f 666f 7263 655f 636c 6f73 6573 oap_force_closes\n+00174150: 6f63 6b3c 2f61 3e28 2661 6d70 3b3c 6120 ock(&soap);.
      else
      .
      \n+001741f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 whi\n+00174210: 6c65 3c2f 7370 616e 3e20 283c 6120 636c le (\n+00174270: 5448 5245 4144 5f43 5245 4154 453c 2f61 THREAD_CREATE(&tid, (void*(*)(void*))p\n+001742e0: 726f 6365 7373 5f72 6571 7565 7374 2c20 rocess_request, \n+001742f0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (void<\n+00174310: 2f73 7061 6e3e 2a29 7473 6f61 7029 293c /span>*)tsoap))<\n+00174320: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      \n+00174340: 2020 736c 6565 7028 3129 3b20 3c73 7061 sleep(1); // failed, try\n+00174370: 2061 6761 696e 3c2f 7370 616e 3e3c 2f64 again.
      }.
      else if (soap.errn\n+00174480: 756d 3c2f 613e 2920 3c73 7061 6e20 636c um) //\n+001744a0: 2061 6363 6570 7420 6661 696c 6564 2c20 accept failed, \n+001744b0: 7472 7920 6167 6169 6e20 6166 7465 7220 try again after \n+001744c0: 3120 7365 636f 6e64 3c2f 7370 616e 3e3c 1 second<\n+001744d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      {..
      \n+001745d0: 2020 736c 6565 7028 3129 3b3c 2f64 6976 sleep(1);.
      }
      .\n+00174600: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      \n+00174630: 656c 7365 3c2f 7370 616e 3e3c 2f64 6976 else.
      {
      .\n+00174660: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      fprintf(\n+00174680: 7374 6465 7272 2c20 3c73 7061 6e20 636c stderr, "Server\n+001746b0: 2074 696d 6564 206f 7574 5c6e 2671 756f timed out\\n&quo\n+001746c0: 743b 3c2f 7370 616e 3e29 3b3c 2f64 6976 t;);.
      break\n+00174710: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
      .
      }\n+00174730: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      } .
      return\n+00174790: 2030 3b20 3c2f 6469 763e 0a3c 6469 7620 0;
      .
      } <\n+001747b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      .\n+001747d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      void\n+00174800: 3c2f 7370 616e 3e20 2a70 726f 6365 7373 *process\n+00174810: 5f72 6571 7565 7374 283c 7370 616e 2063 _request(void *\n+00174840: 7473 6f61 7029 203c 2f64 6976 3e0a 3c64 tsoap)
      .\n+00174860: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
      .
      struct \n+001748a0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+001748d0: 203d 2028 3c73 7061 6e20 636c 6173 733d = (struct\n+001748f0: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 s\n+00174920: 6f61 703c 2f61 3e2a 2974 736f 6170 3b3c oap*)tsoap;<\n+00174930: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.. \n+00174a30: 2028 283c 7370 616e 2063 6c61 7373 3d22 ((struct \n+00174a50: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n+00174a80: 6170 3c2f 613e 2a29 3c61 2063 6c61 7373 ap*)s\n+00174ab0: 6f61 703c 2f61 3e29 2d26 6774 3b72 6563 oap)->rec\n+00174ac0: 765f 7469 6d65 6f75 7420 3d20 3630 3b20 v_timeout = 60; \n+00174ad0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // Timeout\n+00174af0: 2061 6674 6572 2031 206d 696e 7574 6520 after 1 minute \n+00174b00: 7374 616c 6c20 6f6e 2072 6563 7620 3c2f stall on recv
      . \n+00174b30: 2828 3c73 7061 6e20 636c 6173 733d 226b ((struct <\n+00174b50: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n+00174b80: 703c 2f61 3e2a 293c 6120 636c 6173 733d p*)so\n+00174bb0: 6170 3c2f 613e 292d 2667 743b 7365 6e64 ap)->send\n+00174bc0: 5f74 696d 656f 7574 203d 2031 303b 203c _timeout = 10; <\n+00174bd0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00174be0: 656e 7422 3e2f 2f20 5469 6d65 6f75 7420 ent\">// Timeout \n+00174bf0: 6166 7465 7220 3130 2073 6563 6f6e 6420 after 10 second \n+00174c00: 7374 616c 6c20 6f6e 2073 656e 6420 3c2f stall on send
      . \n+00174c30: 3c61 2063 6c61 7373 3d22 636f 6465 2220 \n+00174c80: 736f 6170 5f73 6572 7665 3c2f 613e 283c soap_serve(<\n+00174c90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00174ca0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00174cb0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+00174cc0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      ...
      soap_free\n+00174ea0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+00174ed0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
      .
      return NULL; .
      }
      .
      U\n+00175000: 4c4f 4e47 3634 2063 6f75 6e74 3c2f 6469 LONG64 count
      Message len\n+00175030: 6774 6820 636f 756e 7465 7220 7661 6c75 gth counter valu\n+00175040: 6520 6f66 2074 6865 206d 6573 7361 6765 e of the message\n+00175050: 2072 6563 6569 7665 6420 616e 6420 636f received and co\n+00175060: 756e 7465 7220 7661 6c75 6520 6f66 2074 unter value of t\n+00175070: 6865 2048 5454 5020 636f 6e74 656e 7420 he HTTP content \n+00175080: 6c65 6e67 7468 2068 6561 2e2e 2e3c 2f64 length hea...
      Definit\n+001750b0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap\n+001750c0: 322e 683a 3432 3034 3c2f 6469 763e 3c2f 2.h:4204
      .
      in\n+001751a0: 7420 6163 6365 7074 5f66 6c61 6773 3c2f t accept_flags
      User-defi\n+001751d0: 6e61 626c 6520 7365 7473 6f63 6b6f 7074 nable setsockopt\n+001751e0: 206c 6576 656c 2053 4f4c 5f53 4f43 4b45 level SOL_SOCKE\n+001751f0: 5420 666c 6167 7320 2830 2062 7920 6465 T flags (0 by de\n+00175200: 6661 756c 7429 2c20 7768 656e 206e 6f6e fault), when non\n+00175210: 7a65 726f 2073 6574 7320 7468 6520 736f zero sets the so\n+00175220: 6170 3a3a 736f 636b 6574 2066 2e2e 2e3c ap::socket f...<\n+00175230: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
      Defin\n+00175250: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso\n+00175260: 6170 322e 683a 3334 3533 3c2f 6469 763e ap2.h:3453
      \n+00175270: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
      .
      A client call w\n+001752a0: 696c 6c20 6175 746f 6d61 7469 6361 6c6c ill automaticall\n+001752b0: 7920 6174 7465 6d70 7420 746f 2072 652d y attempt to re-\n+001752c0: 6573 7461 626c 6973 6820 6120 636f 6e6e establish a conn\n+001752d0: 6563 7469 6f6e 2074 6f20 6120 7365 7276 ection to a serv\n+001752e0: 6572 2077 6865 6e20 7468 6520 7365 7276 er when the serv\n+001752f0: 6572 2068 6173 2074 6572 6d69 6e61 7465 er has terminate\n+00175300: 6420 7468 6520 636f 6e6e 6563 7469 6f6e d the connection\n+00175310: 2066 6f72 2061 6e79 2072 6561 736f 6e2e for any reason.\n+00175320: 2054 6869 7320 7761 792c 2061 2073 6571 This way, a seq\n+00175330: 7565 6e63 6520 6f66 2063 616c 6c73 2063 uence of calls c\n+00175340: 616e 2062 6520 6d61 6465 2074 6f20 7468 an be made to th\n+00175350: 6520 7365 7276 6572 2077 6869 6c65 206b e server while k\n+00175360: 6565 7069 6e67 2074 6865 2063 6f6e 6e65 eeping the conne\n+00175370: 6374 696f 6e20 6f70 656e 2e20 436c 6965 ction open. Clie\n+00175380: 6e74 2073 7475 6220 6675 6e63 7469 6f6e nt stub function\n+00175390: 7320 706f 6c6c 2074 6865 2073 6572 7665 s poll the serve\n+001753a0: 7220 746f 2063 6865 636b 2069 6620 7468 r to check if th\n+001753b0: 6520 636f 6e6e 6563 7469 6f6e 2069 7320 e connection is \n+001753c0: 7374 696c 6c20 6f70 656e 2e20 5768 656e still open. When\n+001753d0: 2074 6865 2063 6f6e 6e65 6374 696f 6e20 the connection \n+001753e0: 7761 7320 7465 726d 696e 6174 6564 2062 was terminated b\n+001753f0: 7920 7468 6520 7365 7276 6572 2c20 7468 y the server, th\n+00175400: 6520 636c 6965 6e74 2077 696c 6c20 6175 e client will au\n+00175410: 746f 6d61 7469 6361 6c6c 7920 7265 636f tomatically reco\n+00175420: 6e6e 6563 742e 203c 6272 2020 2f3e 0a3c nnect.
      .<\n+00175430: 2f70 3e0a 3c70 3e41 2063 6c69 656e 7420 /p>.

      A client \n+00175440: 6d61 7920 636c 6561 7220 7468 6520 3c63 may clear the #SOAP_IO_KEE\n+00175460: 5041 4c49 5645 3c2f 636f 6465 3e20 666c PALIVE fl\n+00175470: 6167 206a 7573 7420 6265 666f 7265 2074 ag just before t\n+00175480: 6865 206c 6173 7420 6361 6c6c 2074 6f20 he last call to \n+00175490: 6120 7365 7276 6572 2074 6f20 6c65 7420 a server to let \n+001754a0: 7468 6520 7365 7276 6572 206b 6e6f 7720 the server know \n+001754b0: 6974 2077 616e 7473 2074 6f20 636c 6f73 it wants to clos\n+001754c0: 6520 7468 6520 636f 6e6e 6563 7469 6f6e e the connection\n+001754d0: 2061 6674 6572 2074 6869 7320 6c61 7374 after this last\n+001754e0: 2063 616c 6c2e 2054 6869 7320 7769 6c6c call. This will\n+001754f0: 2063 6c6f 7365 2074 6865 2073 6f63 6b65 close the socke\n+00175500: 7420 6166 7465 7220 7468 6520 6361 6c6c t after the call\n+00175510: 2061 6e64 2061 6c73 6f20 696e 666f 726d and also inform\n+00175520: 7320 7468 6520 7365 7276 6572 2074 6f20 s the server to \n+00175530: 6772 6163 6566 756c 6c79 2063 6c6f 7365 gracefully close\n+00175540: 2074 6865 2063 6f6e 6e65 6374 696f 6e2e the connection.\n+00175550: 3c2f 703e 0a3c 703e 5468 6520 636c 6965

      .

      The clie\n+00175560: 6e74 2d73 6964 6520 6361 6e20 616c 736f nt-side can also\n+00175570: 2073 6574 2074 6865 2054 4350 206b 6565 set the TCP kee\n+00175580: 702d 616c 6976 6520 736f 636b 6574 2070 p-alive socket p\n+00175590: 726f 7065 7274 6965 732c 2075 7369 6e67 roperties, using\n+001755a0: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap::tcp_kee\n+00175670: 705f 616c 6976 653c 2f61 3e3c 2f63 6f64 p_alive flag (set to \n+00175690: 3120 746f 2065 6e61 626c 6529 2c20 3c63 1 to enable), soap::tcp_kee\n+00175750: 705f 6964 6c65 3c2f 613e 3c2f 636f 6465 p_idle to set the TCP_KEEPIDLE<\n+00175780: 2f63 6f64 653e 2076 616c 7565 2c20 3c63 /code> value, soap::tcp_ke\n+00175840: 6570 5f69 6e74 766c 3c2f 613e 3c2f 636f ep_intvl to set the <\n+00175860: 636f 6465 3e54 4350 5f4b 4545 5049 4e54 code>TCP_KEEPINT\n+00175870: 564c 3c2f 636f 6465 3e20 7661 6c75 652c VL value,\n+00175880: 2061 6e64 203c 636f 6465 3e3c 6120 636c and soap::t\n+00175930: 6370 5f6b 6565 705f 636e 743c 2f61 3e3c cp_keep_cnt<\n+00175940: 2f63 6f64 653e 2074 6f20 7365 7420 7468 /code> to set th\n+00175950: 6520 3c63 6f64 653e 5443 505f 4b45 4550 e TCP_KEEP\n+00175960: 434e 543c 2f63 6f64 653e 2076 616c 7565 CNT value\n+00175970: 2e3c 2f70 3e0a 3c70 3e49 6620 6120 636c .

      .

      If a cl\n+00175980: 6965 6e74 2069 7320 696e 2074 6865 206d ient is in the m\n+00175990: 6964 646c 6520 6f66 2073 6f61 7020 6361 iddle of soap ca\n+001759a0: 6c6c 2074 6861 7420 6d69 6768 7420 7461 ll that might ta\n+001759b0: 6b65 2061 206c 6f6e 6720 7469 6d65 2061 ke a long time a\n+001759c0: 6e64 2074 6865 2073 6572 7665 7220 676f nd the server go\n+001759d0: 6573 2061 7761 792f 646f 776e 2074 6865 es away/down the\n+001759e0: 2063 616c 6c65 7220 646f 6573 206e 6f74 caller does not\n+001759f0: 2067 6574 2061 6e79 2066 6565 6462 6163 get any feedbac\n+00175a00: 6b20 756e 7469 6c20 7468 6520 3c63 6f64 k until the soa\n+00175ac0: 703a 3a72 6563 765f 7469 6d65 6f75 743c p::recv_timeout<\n+00175ad0: 2f61 3e3c 2f63 6f64 653e 2069 7320 7265 /a> is re\n+00175ae0: 6163 6865 642e 2045 6e61 626c 696e 6720 ached. Enabling \n+00175af0: 5443 5020 6b65 6570 2061 6c69 7665 206f TCP keep alive o\n+00175b00: 6e20 7379 7374 656d 7320 7468 6174 2073 n systems that s\n+00175b10: 7570 706f 7274 2069 7420 616c 6c6f 7773 upport it allows\n+00175b20: 2066 6f72 2061 2066 6173 7465 7220 636f for a faster co\n+00175b30: 6e6e 6563 7469 6f6e 2074 6561 7264 6f77 nnection teardow\n+00175b40: 6e20 6465 7465 6374 696f 6e20 666f 7220 n detection for \n+00175b50: 6170 706c 6963 6174 696f 6e73 2074 6861 applications tha\n+00175b60: 7420 6e65 6564 2069 742e 3c2f 703e 0a3c t need it.

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

      .

      .HTT\n+00175bd0: 5020 6368 756e 6b65 6420 7472 616e 7366 P chunked transf\n+00175be0: 6572 2065 6e63 6f64 696e 673c 2f68 323e er encoding

      \n+00175bf0: 0a3c 703e 4f75 7462 6f75 6e64 2048 5454 .

      Outbound HTT\n+00175c00: 5020 6d65 7373 6167 6573 2061 7265 206e P messages are n\n+00175c10: 6f74 2063 6875 6e6b 6564 2075 6e6c 6573 ot chunked unles\n+00175c20: 7320 7468 6520 3c63 6f64 653e 2353 4f41 s the #SOA\n+00175c30: 505f 494f 5f43 4855 4e4b 3c2f 636f 6465 P_IO_CHUNK flag is enable\n+00175c50: 642e 2043 6875 6e6b 696e 6720 6d61 7920 d. Chunking may \n+00175c60: 696d 7072 6f76 6520 7468 6520 7370 6565 improve the spee\n+00175c70: 6420 6f66 206d 6573 7361 6765 2073 656e d of message sen\n+00175c80: 6469 6e67 2077 6974 6820 4854 5450 2c20 ding with HTTP, \n+00175c90: 6265 6361 7573 6520 7468 6520 6d65 7373 because the mess\n+00175ca0: 6167 6520 6c65 6e67 7468 2064 6f65 7320 age length does \n+00175cb0: 6e6f 7420 6e65 6564 2074 6f20 6265 2064 not need to be d\n+00175cc0: 6574 6572 6d69 6e65 6420 696e 2061 6476 etermined in adv\n+00175cd0: 616e 6365 2066 6f72 2074 6865 2048 5454 ance for the HTT\n+00175ce0: 5020 636f 6e74 656e 7420 6c65 6e67 7468 P content length\n+00175cf0: 2068 6561 6465 722e 3c2f 703e 0a3c 703e header.

      .

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

      .HTTP\n+00175d60: 2062 7566 6665 7265 6420 7365 6e64 733c buffered sends<\n+00175d70: 2f68 323e 0a3c 703e 5468 6520 656e 7469 /h2>.

      The enti\n+00175d80: 7265 206f 7574 626f 756e 6420 6d65 7373 re outbound mess\n+00175d90: 6167 6520 6361 6e20 6265 2073 746f 7265 age can be store\n+00175da0: 6420 696e 2061 2062 7566 6665 7220 746f d in a buffer to\n+00175db0: 2064 6574 6572 6d69 6e65 2074 6865 2048 determine the H\n+00175dc0: 5454 5020 636f 6e74 656e 7420 6c65 6e67 TTP content leng\n+00175dd0: 7468 2072 6174 6865 7220 7468 616e 2074 th rather than t\n+00175de0: 6865 2074 776f 2d70 6861 7365 2065 6e63 he two-phase enc\n+00175df0: 6f64 696e 6720 7573 6564 2062 7920 6753 oding used by gS\n+00175e00: 4f41 5020 636c 6965 6e74 2d73 6964 6520 OAP client-side \n+00175e10: 7374 7562 2066 756e 6374 696f 6e73 2061 stub functions a\n+00175e20: 6e64 2073 6572 7665 722d 7369 6465 2073 nd server-side s\n+00175e30: 6b65 6c65 746f 6e20 6675 6e63 7469 6f6e keleton function\n+00175e40: 7320 6765 6e65 7261 7465 6420 6279 2073 s generated by s\n+00175e50: 6f61 7063 7070 322c 2077 6869 6368 2070 oapcpp2, which p\n+00175e60: 6572 666f 726d 2061 2073 6570 6172 6174 erform a separat\n+00175e70: 6520 7061 7373 206f 7665 7220 7468 6520 e pass over the \n+00175e80: 6461 7461 2074 6f20 6465 7465 726d 696e data to determin\n+00175e90: 6520 7468 6520 6c65 6e67 7468 206f 6620 e the length of \n+00175ea0: 7468 6520 6f75 7462 6f75 6e64 206d 6573 the outbound mes\n+00175eb0: 7361 6765 2e20 5365 7474 696e 6720 7468 sage. Setting th\n+00175ec0: 6520 666c 6167 203c 636f 6465 3e23 534f e flag #SO\n+00175ed0: 4150 5f49 4f5f 5354 4f52 453c 2f63 6f64 AP_IO_STORE for the outpu\n+00175ef0: 7420 6d6f 6465 2077 696c 6c20 6275 6666 t mode will buff\n+00175f00: 6572 2074 6865 2065 6e74 6972 6520 6d65 er the entire me\n+00175f10: 7373 6167 652e 2054 6869 7320 6d61 7920 ssage. This may \n+00175f20: 6f72 206d 6179 206e 6f74 2073 7065 6564 or may not speed\n+00175f30: 2075 7020 7468 6520 7472 616e 736d 6973 up the transmis\n+00175f40: 7369 6f6e 206f 6620 6d65 7373 6167 6573 sion of messages\n+00175f50: 2c20 6465 7065 6e64 696e 6720 6f6e 2074 , depending on t\n+00175f60: 6865 2063 6f6e 7465 6e74 2c20 6275 7420 he content, but \n+00175f70: 6d61 7920 7265 7175 6972 6520 7369 676e may require sign\n+00175f80: 6966 6963 616e 7420 7374 6f72 6167 6520 ificant storage \n+00175f90: 7370 6163 6520 746f 2068 6f6c 6420 6c61 space to hold la\n+00175fa0: 7267 6520 6d65 7373 6167 6573 2074 656d rge messages tem\n+00175fb0: 706f 7261 7269 6c79 2e3c 2f70 3e0a 3c70 porarily.

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

      .HTTP authenti\n+00176030: 6361 7469 6f6e 3c2f 6832 3e0a 3c70 3e54 cation

      .

      T\n+00176040: 6865 2066 6f6c 6c6f 7769 6e67 2073 6563 he following sec\n+00176050: 7469 6f6e 7320 6578 706c 6169 6e20 686f tions explain ho\n+00176060: 7720 746f 2061 7574 6865 6e74 6963 6174 w to authenticat\n+00176070: 6520 7769 7468 2048 5454 5020 6265 6172 e with HTTP bear\n+00176080: 6572 2c20 6261 7369 632c 2064 6967 6573 er, basic, diges\n+00176090: 742c 2061 6e64 204e 544c 4d2e 2050 726f t, and NTLM. Pro\n+001760a0: 7879 2061 7574 6865 6e74 6963 6174 696f xy authenticatio\n+001760b0: 6e20 6973 2061 6c73 6f20 636f 7665 7265 n is also covere\n+001760c0: 642e 3c2f 703e 0a3c 703e 596f 7520 636f d.

      .

      You co\n+001760d0: 756c 6420 616c 736f 2075 7365 2074 6865 uld also use the\n+001760e0: 2057 696e 496e 6574 2070 6c75 6769 6e20 WinInet plugin \n+001760f0: 6176 6169 6c61 626c 6520 696e 2074 6865 available in the\n+00176100: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n+00176110: 2f6d 6f64 5f67 736f 6170 3c2f 636f 6465 /mod_gsoap directory\n+00176130: 206f 6620 7468 6520 6753 4f41 5020 736f of the gSOAP so\n+00176140: 7572 6365 2063 6f64 6520 7061 636b 6167 urce code packag\n+00176150: 6520 746f 2073 696d 706c 6966 7920 496e e to simplify In\n+00176160: 7465 726e 6574 2061 6363 6573 7320 666f ternet access fo\n+00176170: 7220 6753 4f41 5020 636c 6965 6e74 2061 r gSOAP client a\n+00176180: 7070 6c69 6361 7469 6f6e 7320 616e 6420 pplications and \n+00176190: 6465 616c 2077 6974 6820 656e 6372 7970 deal with encryp\n+001761a0: 7469 6f6e 2c20 7072 6f78 6965 732c 2061 tion, proxies, a\n+001761b0: 6e64 2061 7574 6865 6e74 6963 6174 696f nd authenticatio\n+001761c0: 6e2c 2073 6565 2074 6865 2067 534f 4150 n, see the gSOAP\n+001761d0: 203c 6120 6872 6566 3d22 2e2e 2f2e 2e2f WinInet\n+00176200: 2070 6c75 6769 6e3c 2f61 3e20 646f 6375 plugin docu\n+00176210: 6d65 6e74 6174 696f 6e2e 3c2f 703e 0a3c mentation.

      .<\n+00176220: 703e 5468 6520 6753 4f41 5020 4355 524c p>The gSOAP CURL\n+00176230: 2070 6c75 6769 6e20 6361 6e20 616c 736f plugin can also\n+00176240: 2062 6520 7573 6564 2074 6f20 6465 7665 be used to deve\n+00176250: 6c6f 7020 6753 4f41 5020 636c 6965 6e74 lop gSOAP client\n+00176260: 2061 7070 6c69 6361 7469 6f6e 7320 616e applications an\n+00176270: 6420 4355 524c 2069 6d70 6c65 6d65 6e74 d CURL implement\n+00176280: 7320 7661 7269 6f75 7320 4854 5450 2061 s various HTTP a\n+00176290: 7574 6865 6e74 6963 6174 696f 6e20 6d65 uthentication me\n+001762a0: 7468 6f64 732c 2073 6565 2074 6865 2067 thods, see the g\n+001762b0: 534f 4150 203c 6120 6872 6566 3d22 2e2e SOAP CURL p\n+001762e0: 6c75 6769 6e3c 2f61 3e20 646f 6375 6d65 lugin docume\n+001762f0: 6e74 6174 696f 6e2e 3c2f 703e 0a3c 703e ntation.

      .

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

      .HTTP bea\n+00176370: 7265 7220 6175 7468 656e 7469 6361 7469 rer authenticati\n+00176380: 6f6e 3c2f 6833 3e0a 3c70 3e48 5454 5020 on

      .

      HTTP \n+00176390: 6265 6172 6572 2061 7574 6865 6e74 6963 bearer authentic\n+001763a0: 6174 696f 6e20 6973 2065 6e61 626c 6564 ation is enabled\n+001763b0: 2061 7420 7468 6520 636c 6965 6e74 2d73 at the client-s\n+001763c0: 6964 6520 6279 2073 6574 7469 6e67 2074 ide by setting t\n+001763d0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap::bearer string \n+001764b0: 746f 2074 6865 2062 6561 7265 7220 746f to the bearer to\n+001764c0: 6b65 6e3a 3c2f 703e 0a3c 6469 7620 636c ken:

      .
      <\n+001764e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001764f0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct soap\n+00176540: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+00176570: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa\n+001765d0: 705f 6e65 773c 2f61 3e28 293b 203c 2f64 p_new(); .
      soa\n+00176620: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->bearer = \n+00176680: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+001766a0: 743b 2e2e 2e26 7175 6f74 3b3c 2f73 7061 t;...";
      .
      if\n+001766f0: 2028 736f 6170 5f63 616c 6c5f 6e73 5f5f (soap_call_ns__\n+00176700: 7765 626d 6574 686f 6428 3c61 2063 6c61 webmethod(soap, ...))\n+00176740: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      ... <\n+00176760: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00176770: 656e 7422 3e2f 2f20 6572 726f 723c 2f73 ent\">// error
      .
      else
      .
      ...\n+001767e0: 203c 7370 616e 2063 6c61 7373 3d22 636f // OK
      .<\n+001769b0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+001769c0: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

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

      .

      .HTTP b\n+00176a30: 6173 6963 2061 7574 6865 6e74 6963 6174 asic authenticat\n+00176a40: 696f 6e3c 2f68 333e 0a3c 703e 4854 5450 ion

      .

      HTTP\n+00176a50: 2062 6173 6963 2061 7574 6865 6e74 6963 basic authentic\n+00176a60: 6174 696f 6e20 6973 2065 6e61 626c 6564 ation is enabled\n+00176a70: 2061 7420 7468 6520 636c 6965 6e74 2d73 at the client-s\n+00176a80: 6964 6520 6279 2073 6574 7469 6e67 2074 ide by setting t\n+00176a90: 6865 203c 636f 6465 3e63 6f6e 7374 2063 he const c\n+00176aa0: 6861 722a 203c 6120 636c 6173 733d 2265 har* soa\n+00176b60: 703a 3a75 7365 7269 643c 2f61 3e3c 2f63 p::userid and c\n+00176b80: 6f6e 7374 2063 6861 722a 203c 6120 636c onst char* soap::passwd<\n+00176c50: 2f61 3e3c 2f63 6f64 653e 2073 7472 696e /a> strin\n+00176c60: 6773 2074 6f20 6120 7573 6572 6e61 6d65 gs to a username\n+00176c70: 2061 6e64 2070 6173 7377 6f72 642c 2072 and password, r\n+00176c80: 6573 7065 6374 6976 656c 792e 2041 2073 espectively. A s\n+00176c90: 6572 7665 7220 6d61 7920 7265 7175 6573 erver may reques\n+00176ca0: 7420 7573 6572 2061 7574 6865 6e74 6963 t user authentic\n+00176cb0: 6174 696f 6e20 616e 6420 6465 6e69 6573 ation and denies\n+00176cc0: 2061 6363 6573 7320 2848 5454 5020 3430 access (HTTP 40\n+00176cd0: 3120 6572 726f 7229 2077 6865 6e20 7468 1 error) when th\n+00176ce0: 6520 636c 6965 6e74 2074 7269 6573 2074 e client tries t\n+00176cf0: 6f20 636f 6e6e 6563 7420 7769 7468 6f75 o connect withou\n+00176d00: 7420 4854 5450 2061 7574 6865 6e74 6963 t HTTP authentic\n+00176d10: 6174 696f 6e20 286f 7220 7769 7468 2074 ation (or with t\n+00176d20: 6865 2077 726f 6e67 2061 7574 6865 6e74 he wrong authent\n+00176d30: 6963 6174 696f 6e20 696e 666f 726d 6174 ication informat\n+00176d40: 696f 6e29 2e3c 2f70 3e0a 3c70 3e42 6173 ion).

      .

      Bas\n+00176d50: 6963 2061 7574 6865 6e74 6963 6174 696f ic authenticatio\n+00176d60: 6e20 7368 6f75 6c64 206f 6e6c 7920 6265 n should only be\n+00176d70: 2075 7365 6420 6f76 6572 2048 5454 5053 used over HTTPS\n+00176d80: 2c20 6265 6361 7573 6520 7468 6520 6372 , because the cr\n+00176d90: 6564 656e 7469 616c 7320 6172 6520 7365 edentials are se\n+00176da0: 6e74 2069 6e20 7468 6520 636c 6561 7220 nt in the clear \n+00176db0: 7769 7468 2048 5454 502e 2053 6565 2053 with HTTP. See S\n+00176dc0: 6563 7469 6f6e 203c 6120 636c 6173 733d ection The HTTP dig\n+00176e00: 6573 7420 6175 7468 656e 7469 6361 7469 est authenticati\n+00176e10: 6f6e 2070 6c75 6769 6e3c 2f61 3e20 746f on plugin to\n+00176e20: 2075 7365 2074 6865 2048 5454 5020 6469 use the HTTP di\n+00176e30: 6765 7374 2070 6c75 6769 6e20 7468 6174 gest plugin that\n+00176e40: 2069 7320 7361 6665 2066 6f72 2061 7574 is safe for aut\n+00176e50: 6865 6e74 6963 6174 696f 6e20 6f76 6572 hentication over\n+00176e60: 2048 5454 502e 3c2f 703e 0a3c 703e 4865 HTTP.

      .

      He\n+00176e70: 7265 2069 7320 616e 2065 7861 6d70 6c65 re is an example\n+00176e80: 2063 6c69 656e 7420 636f 6465 2066 7261 client code fra\n+00176e90: 676d 656e 7420 746f 2073 6574 2074 6865 gment to set the\n+00176ea0: 2048 5454 5020 6175 7468 656e 7469 6361 HTTP authentica\n+00176eb0: 7469 6f6e 2075 7365 726e 616d 6520 616e tion username an\n+00176ec0: 6420 7061 7373 776f 7264 3a3c 2f70 3e0a d password:

      .\n+00176ed0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
      st\n+00176f10: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = <\n+00176f80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00176f90: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00176fa0: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+00176fb0: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68\n+00176fc0: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498\n+00176fd0: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c\">soap_new\n+00176fe0: 2829 3b20 3c2f 6469 763e 0a3c 6469 7620 ();
      .
      soap->\n+00177030: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;userid\n+00177080: 3c2f 613e 203d 203c 7370 616e 2063 6c61 = "guest&q\n+001770b0: 756f 743b 3c2f 7370 616e 3e3b 203c 2f64 uot;; .
      soa\n+00177100: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->passwd = \n+00177160: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+00177180: 743b 7669 7369 7426 7175 6f74 3b3c 2f73 t;visit";
      .<\n+001771b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001771c0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_call_ns\n+001771e0: 5f5f 7765 626d 6574 686f 6428 3c61 2063 __webmethod(soap, ...\n+00177220: 2929 3c2f 6469 763e 0a3c 6469 7620 636c ))
      .
      ...\n+00177240: 203c 7370 616e 2063 6c61 7373 3d22 636f // error<\n+00177260: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      .<\n+00177280: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00177290: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
      .
      .\n+001772c0: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // succ\n+001772e0: 6573 733c 2f73 7061 6e3e 3c2f 6469 763e ess
      \n+001772f0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
      soap::\n+00177390: 7061 7373 7764 3c2f 613e 3c2f 6469 763e passwd
      \n+001773a0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
      const char *\n+001773c0: 2070 6173 7377 643c 2f64 6976 3e3c 6469 passwd
      \n+001773e0: 5573 6572 2d64 6566 696e 6162 6c65 2048 User-definable H\n+001773f0: 5454 5020 616e 6420 4e54 4c4d 2061 7574 TTP and NTLM aut\n+00177400: 686f 7269 7a61 7469 6f6e 2070 6173 7377 horization passw\n+00177410: 6f72 6420 7374 7269 6e67 2072 6571 7569 ord string requi\n+00177420: 7265 6420 666f 7220 4854 5450 2062 6173 red for HTTP bas\n+00177430: 6963 2061 6e64 204e 544c 4d20 6175 7468 ic and NTLM auth\n+00177440: 656e 7469 632e 2e2e 3c2f 6469 763e 3c64 entic...
      Definition:<\n+00177470: 2f62 3e20 7374 6473 6f61 7032 2e68 3a33 /b> stdsoap2.h:3\n+00177480: 3832 373c 2f64 6976 3e3c 2f64 6976 3e0a 827

      .\n+00177490: 3c64 6976 2063 6c61 7373 3d22 7474 6322
      <\n+00177540: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+00177550: 6922 3e63 6f6e 7374 2063 6861 7220 2a20 i\">const char * \n+00177560: 7573 6572 6964 3c2f 6469 763e 3c64 6976 userid
      U\n+00177580: 7365 722d 6465 6669 6e61 626c 6520 4854 ser-definable HT\n+00177590: 5450 2061 6e64 204e 544c 4d20 6175 7468 TP and NTLM auth\n+001775a0: 6f72 697a 6174 696f 6e20 7573 6572 2069 orization user i\n+001775b0: 6420 7374 7269 6e67 2066 6f72 2048 5454 d string for HTT\n+001775c0: 5020 6261 7369 6320 616e 6420 4e54 4c4d P basic and NTLM\n+001775d0: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n+001775e0: 6279 2074 2e2e 2e3c 2f64 6976 3e3c 6469 by t...
      \n+00177600: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:38\n+00177620: 3232 3c2f 6469 763e 3c2f 6469 763e 0a3c 22
      .<\n+00177630: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

      A clien\n+00177650: 7420 534f 4150 2072 6571 7565 7374 2077 t SOAP request w\n+00177660: 696c 6c20 6861 7665 2074 6865 2066 6f6c ill have the fol\n+00177670: 6c6f 7769 6e67 2048 5454 5020 6865 6164 lowing HTTP head\n+00177680: 6572 3a20 3c2f 703e 3c70 7265 2063 6c61 er:

      PO\n+001776a0: 5354 202f 5858 5820 4854 5450 2f31 2e31  ST /XXX HTTP/1.1\n+001776b0: 200a 486f 7374 3a20 5959 5920 0a55 7365   .Host: YYY .Use\n+001776c0: 722d 4167 656e 743a 2067 534f 4150 2f32  r-Agent: gSOAP/2\n+001776d0: 2e38 200a 436f 6e74 656e 742d 5479 7065  .8 .Content-Type\n+001776e0: 3a20 7465 7874 2f78 6d6c 3b20 6368 6172  : text/xml; char\n+001776f0: 7365 743d 7574 662d 3820 0a43 6f6e 7465  set=utf-8 .Conte\n+00177700: 6e74 2d4c 656e 6774 683a 205a 5a5a 200a  nt-Length: ZZZ .\n+00177710: 4175 7468 6f72 697a 6174 696f 6e3a 2042  Authorization: B\n+00177720: 6173 6963 205a 3356 6c63 3351 365a 3356  asic Z3Vlc3Q6Z3V\n+00177730: 6c63 3351 3d20 0a3c 2f70 7265 3e3c 703e  lc3Q= .

      \n+00177740: 2041 2063 6c69 656e 7420 6d75 7374 2073 A client must s\n+00177750: 6574 2074 6865 203c 636f 6465 3e63 6f6e et the con\n+00177760: 7374 2063 6861 722a 203c 6120 636c 6173 st char* soap::userid and const char* <\n+00177850: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00177860: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00177870: 6d6c 2361 3232 6432 3139 6339 3866 3066 ml#a22d219c98f0f\n+00177880: 6366 3435 3636 3431 3237 3763 6336 3431 cf456641277cc641\n+00177890: 3734 6133 2220 7469 746c 653d 2255 7365 74a3\" title=\"Use\n+001778a0: 722d 6465 6669 6e61 626c 6520 4854 5450 r-definable HTTP\n+001778b0: 2061 6e64 204e 544c 4d20 6175 7468 6f72 and NTLM author\n+001778c0: 697a 6174 696f 6e20 7061 7373 776f 7264 ization password\n+001778d0: 2073 7472 696e 6720 7265 7175 6972 6564 string required\n+001778e0: 2066 6f72 2048 5454 5020 6261 7369 6320 for HTTP basic \n+001778f0: 616e 6420 4e54 4c4d 2061 7574 6865 6e74 and NTLM authent\n+00177900: 6963 2e2e 2e22 3e73 6f61 703a 3a70 6173 ic...\">soap::pas\n+00177910: 7377 643c 2f61 3e3c 2f63 6f64 653e 2073 swd s\n+00177920: 7472 696e 6773 2066 6f72 2065 6163 6820 trings for each \n+00177930: 6361 6c6c 2074 6861 7420 7265 7175 6972 call that requir\n+00177940: 6573 2063 6c69 656e 7420 6175 7468 656e es client authen\n+00177950: 7469 6361 7469 6f6e 2e20 5468 6520 7374 tication. The st\n+00177960: 7269 6e67 7320 6172 6520 7265 7365 7420 rings are reset \n+00177970: 6166 7465 7220 6561 6368 2073 7563 6365 after each succe\n+00177980: 7373 6675 6c20 6f72 2075 6e73 7563 6365 ssful or unsucce\n+00177990: 7373 6675 6c20 6361 6c6c 2e3c 2f70 3e0a ssful call.

      .\n+001779a0: 3c70 3e57 6865 6e20 7072 6573 656e 742c

      When present,\n+001779b0: 2074 6865 203c 636f 6465 3e57 5757 2d41 the WWW-A\n+001779c0: 7574 6865 6e74 6963 6174 653c 2f63 6f64 uthenticate HTTP header r\n+001779e0: 6574 7572 6e65 6420 6279 2074 6865 2073 eturned by the s\n+001779f0: 6572 7665 7220 7769 7468 2074 6865 2061 erver with the a\n+00177a00: 7574 6865 6e74 6963 6174 696f 6e20 7265 uthentication re\n+00177a10: 616c 6d20 6973 2073 746f 7265 6420 696e alm is stored in\n+00177a20: 2074 6865 2074 6865 203c 636f 6465 3e3c the the <\n+00177a30: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00177a40: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00177a50: 6d6c 2361 3864 6265 3537 6435 3966 3638 ml#a8dbe57d59f68\n+00177a60: 3364 3939 3330 3561 3434 6234 6437 3933 3d99305a44b4d793\n+00177a70: 3962 6664 2220 7469 746c 653d 2254 6865 9bfd\" title=\"The\n+00177a80: 2048 5454 5020 616e 6420 4e54 4c4d 2061 HTTP and NTLM a\n+00177a90: 7574 686f 7269 7a61 7469 6f6e 2072 6561 uthorization rea\n+00177aa0: 6c6d 2f64 6f6d 6169 6e20 7374 7269 6e67 lm/domain string\n+00177ab0: 2072 6563 6569 7665 6420 6279 2074 6865 received by the\n+00177ac0: 2063 6c69 656e 7420 7769 7468 2074 6865 client with the\n+00177ad0: 2057 5757 2d41 7574 6865 6e74 6963 6174 WWW-Authenticat\n+00177ae0: 6520 2e2e 2e22 3e73 6f61 703a 3a61 7574 e ...\">soap::aut\n+00177af0: 6872 6561 6c6d 3c2f 613e 3c2f 636f 6465 hrealm string. This i\n+00177b10: 7320 7573 6566 756c 2066 6f72 2063 6c69 s useful for cli\n+00177b20: 656e 7473 2074 6f20 7573 6520 7468 6973 ents to use this\n+00177b30: 2064 6f6d 6169 6e20 696e 666f 726d 6174 domain informat\n+00177b40: 696f 6e20 746f 2072 6573 706f 6e64 2074 ion to respond t\n+00177b50: 6f20 6175 7468 656e 7469 6361 7469 6f6e o authentication\n+00177b60: 2072 6571 7565 7374 732e 3c2f 703e 0a3c requests.

      .<\n+00177b70: 703e 4120 7374 616e 642d 616c 6f6e 6520 p>A stand-alone \n+00177b80: 6753 4f41 5020 5765 6220 5365 7276 6963 gSOAP Web Servic\n+00177b90: 6520 6170 706c 6963 6174 696f 6e20 6361 e application ca\n+00177ba0: 6e20 656e 666f 7263 6520 4854 5450 2061 n enforce HTTP a\n+00177bb0: 7574 6865 6e74 6963 6174 696f 6e20 6f6e uthentication on\n+00177bc0: 2063 6c69 656e 7473 2062 7920 6368 6563 clients by chec\n+00177bd0: 6b69 6e67 2074 6865 203c 636f 6465 3e63 king the c\n+00177be0: 6f6e 7374 2063 6861 722a 203c 6120 636c onst char* soap::userid<\n+00177cb0: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a> and <\n+00177cc0: 636f 6465 3e63 6f6e 7374 2063 6861 722a code>const char*\n+00177cd0: 203c 6120 636c 6173 733d 2265 6c22 2068 soap::p\n+00177d90: 6173 7377 643c 2f61 3e3c 2f63 6f64 653e asswd\n+00177da0: 2073 7472 696e 6773 2e20 5468 6573 6520 strings. These \n+00177db0: 7374 7269 6e67 7320 6172 6520 7365 7420 strings are set \n+00177dc0: 7768 656e 2061 2063 6c69 656e 7420 7265 when a client re\n+00177dd0: 7175 6573 7420 636f 6e74 6169 6e73 2048 quest contains H\n+00177de0: 5454 5020 6175 7468 656e 7469 6361 7469 TTP authenticati\n+00177df0: 6f6e 2068 6561 6465 7273 2e20 5468 6520 on headers. The \n+00177e00: 7374 7269 6e67 7320 7368 6f75 6c64 2062 strings should b\n+00177e10: 6520 6368 6563 6b65 6420 696e 2065 6163 e checked in eac\n+00177e20: 6820 7365 7276 6963 6520 6d65 7468 6f64 h service method\n+00177e30: 2028 7468 6174 2072 6571 7569 7265 7320 (that requires \n+00177e40: 6175 7468 656e 7469 6361 7469 6f6e 2074 authentication t\n+00177e50: 6f20 6578 6563 7574 6529 2e3c 2f70 3e0a o execute).

      .\n+00177e60: 3c70 3e48 6572 6520 6973 2061 6e20 6578

      Here is an ex\n+00177e70: 616d 706c 6520 7365 7276 6963 6520 6d65 ample service me\n+00177e80: 7468 6f64 2069 6d70 6c65 6d65 6e74 6174 thod implementat\n+00177e90: 696f 6e20 7468 6174 2065 6e66 6f72 6365 ion that enforce\n+00177ea0: 6420 636c 6965 6e74 2061 7574 6865 6e74 d client authent\n+00177eb0: 6963 6174 696f 6e3a 3c2f 703e 0a3c 6469 ication:

      .
      i\n+00177f00: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 7765 nt ns__we\n+00177f10: 626d 6574 686f 6428 3c73 7061 6e20 636c bmethod(st\n+00177f30: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, ..\n+00177fa0: 2e29 203c 2f64 6976 3e0a 3c64 6976 2063 .)
      .
      {.
      if (!soap-&g\n+00178030: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;useri\n+00178080: 643c 2f61 3e3c 2f64 6976 3e0a 3c64 6976 d
      . \n+001780a0: 207c 7c20 213c 6120 636c 6173 733d 2263 || !soap\n+001780d0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->passwd.
      || strcm\n+00178150: 7028 3c61 2063 6c61 7373 3d22 636f 6465 p(soap->u\n+001781d0: 7365 7269 643c 2f61 3e2c 203c 7370 616e serid, "gue\n+00178200: 7374 2671 756f 743b 3c2f 7370 616e 3e29 st")\n+00178210: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      || s\n+00178230: 7472 636d 7028 3c61 2063 6c61 7373 3d22 trcmp(soa\n+00178260: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->passwd, <\n+001782c0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+001782d0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+001782e0: 3b76 6973 6974 2671 756f 743b 3c2f 7370 ;visit"))
      . \n+00178310: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
      .
      <\n+00178330: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00178340: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00178350: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+00178360: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;auth\n+001783b0: 7265 616c 6d3c 2f61 3e20 3d20 3c73 7061 realm = "..\n+001783e0: 2e26 7175 6f74 3b3c 2f73 7061 6e3e 3b20 ."; \n+001783f0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // domain \n+00178410: 7265 616c 6d20 6163 6365 7373 6564 2028 realm accessed (\n+00178420: 6f70 7469 6f6e 616c 2c20 4e55 4c4c 2074 optional, NULL t\n+00178430: 6f20 6f6d 6974 293c 2f73 7061 6e3e 3c2f o omit).
      return 401;
      .<\n+00178490: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001784a0: 3e20 207d 3c2f 6469 763e 0a3c 6469 7620 > }
      .
      .\n+001784c0: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // webm\n+001784e0: 6574 686f 6420 6c6f 6769 633c 2f73 7061 ethod logic
      ..}<\n+001785b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      <\n+00178600: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+00178610: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n+00178650: 6f61 703a 3a61 7574 6872 6561 6c6d 3c2f oap::authrealm
      .

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

      .HTTP NTLM \n+00178a10: 6175 7468 656e 7469 6361 7469 6f6e 3c2f authentication.

      HTTP NTLM\n+00178a30: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication \n+00178a40: 6973 2065 6e61 626c 6564 2061 7420 7468 is enabled at th\n+00178a50: 6520 636c 6965 6e74 2d73 6964 6520 6279 e client-side by\n+00178a60: 2069 6e73 7461 6c6c 696e 6720 3c63 6f64 installing libntlm\n+00178a80: 2066 726f 6d20 3c61 2068 7265 663d 2268 from ht\n+00178ab0: 7470 3a2f 2f77 7777 2e6e 6f6e 676e 752e tp://www.nongnu.\n+00178ac0: 6f72 672f 6c69 626e 746c 6d3c 2f61 3e20 org/libntlm \n+00178ad0: 616e 6420 636f 6d70 696c 696e 6720 616c and compiling al\n+00178ae0: 6c20 7072 6f6a 6563 7420 736f 7572 6365 l project source\n+00178af0: 2063 6f64 6573 2077 6974 6820 7468 6520 codes with the \n+00178b00: 636f 6d70 696c 652d 7469 6d65 2066 6c61 compile-time fla\n+00178b10: 6720 3c63 6f64 653e 2357 4954 485f 4e54 g #WITH_NT\n+00178b20: 4c4d 3c2f 636f 6465 3e2e 3c2f 703e 0a3c LM.

      .<\n+00178b30: 703e 496e 2079 6f75 7220 6170 706c 6963 p>In your applic\n+00178b40: 6174 696f 6e20 636f 6465 2073 6574 2074 ation code set t\n+00178b50: 6865 203c 636f 6465 3e63 6f6e 7374 2063 he const c\n+00178b60: 6861 722a 203c 6120 636c 6173 733d 2265 har* soa\n+00178c20: 703a 3a75 7365 7269 643c 2f61 3e3c 2f63 p::userid and c\n+00178c40: 6f6e 7374 2063 6861 722a 203c 6120 636c onst char* soap::passwd<\n+00178d10: 2f61 3e3c 2f63 6f64 653e 2073 7472 696e /a> strin\n+00178d20: 6773 2074 6f20 6120 7573 6572 6e61 6d65 gs to a username\n+00178d30: 2061 6e64 2070 6173 7377 6f72 642e 2041 and password. A\n+00178d40: 2073 6572 7665 7220 6d61 7920 7265 7175 server may requ\n+00178d50: 6573 7420 4e54 4c4d 2061 7574 6865 6e74 est NTLM authent\n+00178d60: 6963 6174 696f 6e20 616e 6420 6465 6e69 ication and deni\n+00178d70: 6573 2061 6363 6573 7320 2848 5454 5020 es access (HTTP \n+00178d80: 3430 3120 6175 7468 656e 7469 6361 7469 401 authenticati\n+00178d90: 6f6e 2072 6571 7569 7265 6420 6f72 2048 on required or H\n+00178da0: 5454 5020 3430 3720 4854 5450 2070 726f TTP 407 HTTP pro\n+00178db0: 7879 2061 7574 6865 6e74 6963 6174 696f xy authenticatio\n+00178dc0: 6e20 7265 7175 6972 6564 2920 7768 656e n required) when\n+00178dd0: 2074 6865 2063 6c69 656e 7420 7472 6965 the client trie\n+00178de0: 7320 746f 2063 6f6e 6e65 6374 2077 6974 s to connect wit\n+00178df0: 686f 7574 2048 5454 5020 6175 7468 656e hout HTTP authen\n+00178e00: 7469 6361 7469 6f6e 2028 6f72 2077 6974 tication (or wit\n+00178e10: 6820 7468 6520 7772 6f6e 6720 6175 7468 h the wrong auth\n+00178e20: 656e 7469 6361 7469 6f6e 2069 6e66 6f72 entication infor\n+00178e30: 6d61 7469 6f6e 292e 3c2f 703e 0a3c 703e mation).

      .

      \n+00178e40: 4865 7265 2069 7320 616e 2065 7861 6d70 Here is an examp\n+00178e50: 6c65 2063 6c69 656e 7420 636f 6465 2066 le client code f\n+00178e60: 7261 676d 656e 7420 746f 2073 6574 2074 ragment to set t\n+00178e70: 6865 204e 544c 4d20 6175 7468 656e 7469 he NTLM authenti\n+00178e80: 6361 7469 6f6e 2075 7365 726e 616d 6520 cation username \n+00178e90: 616e 6420 7061 7373 776f 7264 3a3c 2f70 and password:.

      \n+00178ee0: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap *<\n+00178f20: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00178f30: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+00178f40: 6874 6d6c 223e 736f 6170 3c2f 613e 203d html\">soap =\n+00178f50: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_new1<\n+00178fb0: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(SOAP_IO_K\n+00179010: 4545 5041 4c49 5645 3c2f 613e 293b 203c EEPALIVE); <\n+00179020: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      if (soa\n+00179060: 705f 6361 6c6c 5f6e 735f 5f77 6562 6d65 p_call_ns__webme\n+00179070: 7468 6f64 283c 6120 636c 6173 733d 2263 thod(soap\n+001790a0: 3c2f 613e 2c20 2e2e 2e29 2920 3c2f 6469 , ...)) .
      {
      . \n+001790e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soa\n+00179130: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->error == \n+00179190: 3430 3129 203c 2f64 6976 3e0a 3c64 6976 401)
      . \n+001791b0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
      .
      soap-&g\n+00179200: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;useri\n+00179250: 643c 2f61 3e20 3d20 3c73 7061 6e20 636c d = "Zaphod\n+00179280: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n+00179290: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
      if (soap_call_ns_\n+001793c0: 5f77 6562 6d65 7468 6f64 283c 6120 636c _webmethod(soap, ...)\n+00179400: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
      .
      \n+00179420: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // er\n+00179440: 726f 723c 2f73 7061 6e3e 3c2f 6469 763e ror
      \n+00179450: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      else.
      ... <\n+001794b0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001794c0: 656e 7422 3e2f 2f20 7375 6363 6573 733c ent\">// success<\n+001794d0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      . \n+001794f0: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
      .
      }.

      The\n+00179530: 2066 6f6c 6c6f 7769 6e67 204e 544c 4d20 following NTLM \n+00179540: 6861 6e64 7368 616b 6520 6265 7477 6565 handshake betwee\n+00179550: 6e20 7468 6520 636c 6965 6e74 2043 2061 n the client C a\n+00179560: 6e64 2073 6572 7665 7220 5320 6973 2070 nd server S is p\n+00179570: 6572 666f 726d 6564 3a20 3c2f 703e 3c70 erformed:

      1: C -->\n+001795a0: 2053 2026 616d 703b 2050 4f53 5420 2e2e S & POST ..\n+001795b0: 2e20 0a20 2020 2020 2020 2020 2020 2026 . . &\n+001795c0: 616d 703b 2043 6f6e 7465 6e74 2d54 7970 amp; Content-Typ\n+001795d0: 653a 2074 6578 742f 786d 6c3b 2063 6861 e: text/xml; cha\n+001795e0: 7273 6574 3d75 7466 2d38 200a 0a32 3a20 rset=utf-8 ..2: \n+001795f0: 4320 266c 743b 2d2d 2020 5320 2661 6d70 C <-- S &\n+00179600: 3b20 3430 3120 556e 6175 7468 6f72 697a ; 401 Unauthoriz\n+00179610: 6564 200a 2020 2020 2020 2020 2020 2020 ed . \n+00179620: 2661 6d70 3b20 5757 572d 4175 7468 656e & WWW-Authen\n+00179630: 7469 6361 7465 3a20 4e54 4c4d 200a 0a33 ticate: NTLM ..3\n+00179640: 3a20 4320 202d 2d26 6774 3b20 5320 2661 : C --> S &a\n+00179650: 6d70 3b20 4745 5420 2e2e 2e20 0a20 2020 mp; GET ... . \n+00179660: 2020 2020 2020 2020 2026 616d 703b 2041 & A\n+00179670: 7574 686f 7269 7a61 7469 6f6e 3a20 4e54 uthorization: NT\n+00179680: 4c4d 2026 6c74 3b62 6173 6536 342d 656e LM <base64-en\n+00179690: 636f 6465 6420 7479 7065 2d31 2d6d 6573 coded type-1-mes\n+001796a0: 7361 6765 2667 743b 200a 0a34 3a20 4320 sage> ..4: C \n+001796b0: 266c 743b 2d2d 2020 5320 2661 6d70 3b20 <-- S & \n+001796c0: 3430 3120 556e 6175 7468 6f72 697a 6564 401 Unauthorized\n+001796d0: 200a 2020 2020 2020 2020 2020 2020 2661 . &a\n+001796e0: 6d70 3b20 5757 572d 4175 7468 656e 7469 mp; WWW-Authenti\n+001796f0: 6361 7465 3a20 4e54 4c4d 2026 6c74 3b62 cate: NTLM <b\n+00179700: 6173 6536 342d 656e 636f 6465 6420 7479 ase64-encoded ty\n+00179710: 7065 2d32 2d6d 6573 7361 6765 2667 743b pe-2-message>\n+00179720: 200a 0a35 3a20 4320 202d 2d26 6774 3b20 ..5: C --> \n+00179730: 5320 2661 6d70 3b20 504f 5354 202e 2e2e S & POST ...\n+00179740: 200a 2020 2020 2020 2020 2020 2020 2661 . &a\n+00179750: 6d70 3b20 436f 6e74 656e 742d 5479 7065 mp; Content-Type\n+00179760: 3a20 7465 7874 2f78 6d6c 3b20 6368 6172 : text/xml; char\n+00179770: 7365 743d 7574 662d 3820 0a20 2020 2020 set=utf-8 . \n+00179780: 2020 2020 2020 2026 616d 703b 2041 7574 & Aut\n+00179790: 686f 7269 7a61 7469 6f6e 3a20 4e54 4c4d horization: NTLM\n+001797a0: 2026 6c74 3b62 6173 6536 342d 656e 636f <base64-enco\n+001797b0: 6465 6420 7479 7065 2d33 2d6d 6573 7361 ded type-3-messa\n+001797c0: 6765 2667 743b 200a 0a36 3a20 4320 266c ge> ..6: C &l\n+001797d0: 743b 2d2d 2020 5320 2661 6d70 3b20 3230 t;-- S & 20\n+001797e0: 3020 4f4b 0a3c 2f70 7265 3e3c 703e 2077 0 OK.

      w\n+001797f0: 6865 7265 2073 7461 6765 7320 3120 616e here stages 1 an\n+00179800: 6420 3220 696e 6469 6361 7465 7320 6120 d 2 indicates a \n+00179810: 636c 6965 6e74 2061 7474 656d 7074 696e client attemptin\n+00179820: 6720 746f 2063 6f6e 6e65 6374 2077 6974 g to connect wit\n+00179830: 686f 7574 2061 7574 686f 7269 7a61 7469 hout authorizati\n+00179840: 6f6e 2069 6e66 6f72 6d61 7469 6f6e 2c20 on information, \n+00179850: 7768 6963 6820 6973 2074 6865 2066 6972 which is the fir\n+00179860: 7374 206d 6574 686f 6420 6361 6c6c 2069 st method call i\n+00179870: 6e20 7468 6520 636f 6465 2061 626f 7665 n the code above\n+00179880: 2e20 5374 6167 6520 3320 746f 2036 2068 . Stage 3 to 6 h\n+00179890: 6170 7065 6e20 7769 7468 2074 6865 2070 appen with the p\n+001798a0: 726f 7065 7220 636c 6965 6e74 2061 7574 roper client aut\n+001798b0: 6865 6e74 6963 6174 696f 6e20 7365 7420 hentication set \n+001798c0: 7769 7468 203c 636f 6465 3e63 6f6e 7374 with const\n+001798d0: 2063 6861 722a 203c 6120 636c 6173 733d char* s\n+00179990: 6f61 703a 3a75 7365 7269 643c 2f61 3e3c oap::userid<\n+001799a0: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and const char* soap::passw\n+00179a80: 643c 2f61 3e3c 2f63 6f64 653e 2e20 4f70 d. Op\n+00179a90: 7469 6f6e 616c 6c79 2c20 7468 6520 3c63 tionally, the const char* \n+00179ab0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::au\n+00179b70: 7468 7265 616c 6d3c 2f61 3e3c 2f63 6f64 threalm string should\n+00179b90: 2062 6520 7365 7420 6173 2077 656c 6c20 be set as well \n+00179ba0: 746f 2069 6e64 6963 6174 6520 7468 6520 to indicate the \n+00179bb0: 646f 6d61 696e 2061 6363 6573 7365 6420 domain accessed \n+00179bc0: 2874 6869 7320 7374 7269 6e67 2069 7320 (this string is \n+00179bd0: 6e6f 726d 616c 6c79 2073 6574 2077 6865 normally set whe\n+00179be0: 6e20 7468 6520 7365 7276 6572 2072 6573 n the server res\n+00179bf0: 706f 6e64 7320 7769 7468 2048 5454 5020 ponds with HTTP \n+00179c00: 3430 3120 736f 2074 6865 2063 6c69 656e 401 so the clien\n+00179c10: 7420 7265 6365 6976 6573 2074 6869 7320 t receives this \n+00179c20: 7365 7276 6572 2064 6f6d 6169 6e20 696e server domain in\n+00179c30: 666f 726d 6174 696f 6e29 2e20 4e54 4c4d formation). NTLM\n+00179c40: 2061 7574 6865 6e74 6963 6174 6573 2063 authenticates c\n+00179c50: 6f6e 6e65 6374 696f 6e73 2c20 6e6f 7420 onnections, not \n+00179c60: 7265 7175 6573 7473 2e20 5768 656e 2074 requests. When t\n+00179c70: 6865 2063 6f6e 6e65 6374 696f 6e20 6973 he connection is\n+00179c80: 206b 6570 7420 616c 6976 652c 2073 7562 kept alive, sub\n+00179c90: 7365 7175 656e 7420 6d65 7373 6167 6573 sequent messages\n+00179ca0: 2063 616e 2062 6520 6578 6368 616e 6765 can be exchange\n+00179cb0: 6420 7769 7468 6f75 7420 7265 2d61 7574 d without re-aut\n+00179cc0: 6865 6e74 6963 6174 696f 6e2e 3c2f 703e hentication.

      \n+00179cd0: 0a3c 703e 546f 2061 766f 6964 2074 6865 .

      To avoid the\n+00179ce0: 206f 7665 7268 6561 6420 6f66 2074 6865 overhead of the\n+00179cf0: 2066 6972 7374 2072 656a 6563 7465 6420 first rejected \n+00179d00: 6361 6c6c 2c20 7573 653a 3c2f 703e 0a3c call, use:

      .<\n+00179d10: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+00179d20: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
      str\n+00179d50: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap *soap = soap_new1\n+00179e20: 283c 6120 636c 6173 733d 2263 6f64 6522 (SOAP_IO_KEEP\n+00179e80: 414c 4956 453c 2f61 3e29 3b20 3c2f 6469 ALIVE); ..<\n+00179f70: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00179f80: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n+00179fb0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->us\n+0017a000: 6572 6964 3c2f 613e 203d 203c 7370 616e erid = "Zap\n+0017a030: 686f 6426 7175 6f74 3b3c 2f73 7061 6e3e hod"\n+0017a040: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
      .
      soap-><\n+0017a090: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0017a0a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0017a0b0: 6874 6d6c 2361 3232 6432 3139 6339 3866 html#a22d219c98f\n+0017a0c0: 3066 6366 3435 3636 3431 3237 3763 6336 0fcf456641277cc6\n+0017a0d0: 3431 3734 6133 223e 7061 7373 7764 3c2f 4174a3\">passwd = "Beeblebro\n+0017a110: 7826 7175 6f74 3b3c 2f73 7061 6e3e 3b20 x"; \n+0017a120: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      ..
      if (s\n+0017a240: 6f61 705f 6361 6c6c 5f6e 735f 5f77 6562 oap_call_ns__web\n+0017a250: 6d65 7468 6f64 283c 6120 636c 6173 733d method(so\n+0017a280: 6170 3c2f 613e 2c20 2e2e 2e29 2920 3c2f ap, ...)) .
      ... // error
      .
      else\n+0017a310: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      ... <\n+0017a330: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+0017a340: 656e 7422 3e2f 2f20 7375 6363 6573 733c ent\">// success<\n+0017a350: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      .
      soap::ntlm\n+0017a400: 5f63 6861 6c6c 656e 6765 3c2f 613e 3c2f _challenge
      const ch\n+0017a430: 6172 202a 206e 746c 6d5f 6368 616c 6c65 ar * ntlm_challe\n+0017a440: 6e67 653c 2f64 6976 3e3c 6469 7620 636c nge
      User\n+0017a460: 2d64 6566 696e 6162 6c65 204e 544c 4d20 -definable NTLM \n+0017a470: 6175 7468 656e 7469 6361 7469 6f6e 2063 authentication c\n+0017a480: 6861 6c6c 656e 6765 206b 6579 2073 7472 hallenge key str\n+0017a490: 696e 672e 3c2f 6469 763e 3c64 6976 2063 ing.
      \n+0017a4b0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+0017a4c0: 7374 6473 6f61 7032 2e68 3a33 3837 383c stdsoap2.h:3878<\n+0017a4d0: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
      .

      When the a\n+0017a500: 7574 6865 6e74 6963 6174 696f 6e20 6661 uthentication fa\n+0017a510: 696c 7320 2873 7461 6765 2031 2061 6e64 ils (stage 1 and\n+0017a520: 2032 292c 2074 6865 2073 6572 7669 6365 2), the service\n+0017a530: 2072 6573 706f 6e73 6520 7769 7468 2048 response with H\n+0017a540: 5454 5020 6572 726f 7220 636f 6465 2022 TTP error code \"\n+0017a550: 3430 3120 556e 6175 7468 6f72 697a 6564 401 Unauthorized\n+0017a560: 2220 616e 6420 3c63 6f64 653e 3c61 2063 \" and soap::error is set \n+0017a630: 746f 2048 5454 5020 636f 6465 2034 3031 to HTTP code 401\n+0017a640: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

      .

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

      .

      \n+0017a680: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 <\n+0017a6b0: 2f61 3e0a 4854 5450 2070 726f 7879 204e /a>.HTTP proxy N\n+0017a6c0: 544c 4d20 6175 7468 656e 7469 6361 7469 TLM authenticati\n+0017a6d0: 6f6e 3c2f 6833 3e0a 3c70 3e46 6f72 2048 on

      .

      For H\n+0017a6e0: 5454 5020 3430 3720 5072 6f78 7920 4175 TTP 407 Proxy Au\n+0017a6f0: 7468 656e 7469 6361 7469 6f6e 2052 6571 thentication Req\n+0017a700: 7569 7265 6420 7365 7420 7468 6520 3c63 uired set the soap::proxy_u\n+0017a7d0: 7365 7269 643c 2f61 3e3c 2f63 6f64 653e serid\n+0017a7e0: 2061 6e64 203c 636f 6465 3e3c 6120 636c and soap:\n+0017a8a0: 3a70 726f 7879 5f70 6173 7377 643c 2f61 :proxy_passwd:

      .
      stru\n+0017a900: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap *soap = soap_new1(\n+0017a9d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_IO_KEEPA\n+0017aa30: 4c49 5645 3c2f 613e 293b 203c 2f64 6976 LIVE); .
      soap<\n+0017aa80: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->proxy_host \n+0017aae0: 3d20 3c73 7061 6e20 636c 6173 733d 2273 = &q\n+0017ab00: 756f 743b 2e2e 2e26 7175 6f74 3b3c 2f73 uot;...";
      .<\n+0017ab30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0017ab40: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0017ab50: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+0017ab60: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;prox\n+0017abb0: 795f 706f 7274 3c2f 613e 203d 202e 2e2e y_port = ...\n+0017abc0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
      .
      if (\n+0017ac00: 736f 6170 5f63 616c 6c5f 6e73 5f5f 7765 soap_call_ns__we\n+0017ac10: 626d 6574 686f 6428 3c61 2063 6c61 7373 bmethod(s\n+0017ac40: 6f61 703c 2f61 3e2c 202e 2e2e 2929 203c oap, ...)) <\n+0017ac50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      {
      .\n+0017ac70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      if\n+0017aca0: 3c2f 7370 616e 3e20 283c 6120 636c 6173 (\n+0017acd0: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->error \n+0017ad30: 3d3d 2034 3037 2920 3c2f 6469 763e 0a3c == 407)
      .<\n+0017ad40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0017ad50: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
      .
      \n+0017ad70: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+0017ada0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->pr\n+0017adf0: 6f78 795f 7573 6572 6964 3c2f 613e 203d oxy_userid =\n+0017ae00: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+0017ae20: 6f74 3b5a 6170 686f 6426 7175 6f74 3b3c ot;Zaphod"<\n+0017ae30: 2f73 7061 6e3e 3b20 3c2f 6469 763e 0a3c /span>;
      .<\n+0017ae40: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0017ae50: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap\n+0017ae80: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->proxy_passwd = "Beeblebro\n+0017af10: 7826 7175 6f74 3b3c 2f73 7061 6e3e 3b20 x"; \n+0017af20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      soap->\n+0017af70: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;authre\n+0017afc0: 616c 6d3c 2f61 3e20 3d20 3c73 7061 6e20 alm = "Ursa\n+0017aff0: 2d4d 696e 6f72 2671 756f 743b 3c2f 7370 -Minor";
      . \n+0017b020: 2020 3c73 7061 6e20 636c 6173 733d 226b if (soap_call\n+0017b050: 5f6e 735f 5f77 6562 6d65 7468 6f64 283c _ns__webmethod(<\n+0017b060: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0017b070: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0017b080: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+0017b090: 2e2e 2e29 2920 3c2f 6469 763e 0a3c 6469 ...))
      . \n+0017b0b0: 2020 2020 202e 2e2e 203c 7370 616e 2063 ... /\n+0017b0d0: 2f20 6572 726f 723c 2f73 7061 6e3e 3c2f / error.
      else\n+0017b120: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      .\n+0017b140: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // succ\n+0017b160: 6573 733c 2f73 7061 6e3e 3c2f 6469 763e ess
      \n+0017b170: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
      soap::\n+0017b210: 7072 6f78 795f 706f 7274 3c2f 613e 3c2f proxy_port
      int prox\n+0017b240: 795f 706f 7274 3c2f 6469 763e 3c64 6976 y_port
      U\n+0017b260: 7365 722d 6465 6669 6e61 626c 6520 7072 ser-definable pr\n+0017b270: 6f78 7920 706f 7274 2077 6869 6368 2073 oxy port which s\n+0017b280: 686f 756c 6420 6265 2073 6574 2074 6f20 hould be set to \n+0017b290: 636f 6e6e 6563 7420 7468 726f 7567 6820 connect through \n+0017b2a0: 616e 2048 5454 5020 7072 6f78 7920 2874 an HTTP proxy (t\n+0017b2b0: 6865 2076 616c 7565 2069 7320 3830 3830 he value is 8080\n+0017b2c0: 2062 7920 2e2e 2e3c 2f64 6976 3e3c 6469 by ...
      \n+0017b2e0: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:39\n+0017b300: 3036 3c2f 6469 763e 3c2f 6469 763e 0a3c 06
      .<\n+0017b310: 6469 7620 636c 6173 733d 2274 7463 2220 div class=\"ttc\" \n+0017b320: 6964 3d22 6173 7472 7563 7473 6f61 705f id=\"astructsoap_\n+0017b330: 6874 6d6c 5f61 3765 3765 3965 3964 3635 html_a7e7e9e9d65\n+0017b340: 6262 6136 3233 3732 3938 6366 3265 6437 bba6237298cf2ed7\n+0017b350: 6365 6335 3939 223e 3c64 6976 2063 6c61 cec599\">
      soap::pr\n+0017b3b0: 6f78 795f 7573 6572 6964 3c2f 613e 3c2f oxy_userid
      const ch\n+0017b3e0: 6172 202a 2070 726f 7879 5f75 7365 7269 ar * proxy_useri\n+0017b3f0: 643c 2f64 6976 3e3c 6469 7620 636c 6173 d
      User-d\n+0017b410: 6566 696e 6162 6c65 2070 726f 7879 2061 efinable proxy a\n+0017b420: 7574 686f 7269 7a61 7469 6f6e 2075 7365 uthorization use\n+0017b430: 7220 6964 2073 7472 696e 6720 746f 2061 r id string to a\n+0017b440: 7574 6865 6e74 6963 6174 6520 616e 6420 uthenticate and \n+0017b450: 636f 6e6e 6563 7420 746f 2061 6e20 4854 connect to an HT\n+0017b460: 5450 2070 726f 7879 2e3c 2f64 6976 3e3c TP proxy.
      <\n+0017b470: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n+0017b480: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n+0017b490: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n+0017b4a0: 3339 3131 3c2f 6469 763e 3c2f 6469 763e 3911
      \n+0017b4b0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
      soap::\n+0017b550: 7072 6f78 795f 686f 7374 3c2f 613e 3c2f proxy_host
      const ch\n+0017b580: 6172 202a 2070 726f 7879 5f68 6f73 743c ar * proxy_host<\n+0017b590: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
      User-def\n+0017b5b0: 696e 6162 6c65 2070 726f 7879 2068 6f73 inable proxy hos\n+0017b5c0: 7420 6e61 6d65 2073 7472 696e 6720 7768 t name string wh\n+0017b5d0: 6963 6820 7368 6f75 6c64 2062 6520 7365 ich should be se\n+0017b5e0: 7420 746f 2063 6f6e 6e65 6374 2074 6872 t to connect thr\n+0017b5f0: 6f75 6768 2061 6e20 4854 5450 2070 726f ough an HTTP pro\n+0017b600: 7879 2e3c 2f64 6976 3e3c 6469 7620 636c xy.
      D\n+0017b620: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s\n+0017b630: 7464 736f 6170 322e 683a 3339 3031 3c2f tdsoap2.h:3901
      .
      \n+0017b700: 3c64 6976 2063 6c61 7373 3d22 7474 6465
      const char *\n+0017b720: 2070 726f 7879 5f70 6173 7377 643c 2f64 proxy_passwd
      User-defin\n+0017b750: 6162 6c65 2070 726f 7879 2061 7574 686f able proxy autho\n+0017b760: 7269 7a61 7469 6f6e 2070 6173 7377 6f72 rization passwor\n+0017b770: 6420 7374 7269 6e67 2074 6f20 6175 7468 d string to auth\n+0017b780: 656e 7469 6361 7465 2061 6e64 2063 6f6e enticate and con\n+0017b790: 6e65 6374 2074 6f20 616e 2048 5454 5020 nect to an HTTP \n+0017b7a0: 7072 6f78 792e 3c2f 6469 763e 3c64 6976 proxy.
      <\n+0017b7c0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:391\n+0017b7e0: 363c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6
      .

      To avoid\n+0017b810: 2074 6865 206f 7665 7268 6561 6420 6f66 the overhead of\n+0017b820: 2074 6865 2066 6972 7374 2072 656a 6563 the first rejec\n+0017b830: 7465 6420 6361 6c6c 2c20 7573 653a 3c2f ted call, use:.

      struct <\n+0017b890: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0017b8a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0017b8b0: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+0017b8c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+0017b8f0: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new1\n+0017b950: 3c2f 613e 283c 6120 636c 6173 733d 2263 (SOAP_IO_\n+0017b9b0: 4b45 4550 414c 4956 453c 2f61 3e29 3b20 KEEPALIVE); \n+0017b9c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      \n+0017ba00: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->proxy_host\n+0017ba60: 3c2f 613e 203d 203c 7370 616e 2063 6c61 = "...&quo\n+0017ba90: 743b 3c2f 7370 616e 3e3b 203c 2f64 6976 t;; .
      soap<\n+0017bae0: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->proxy_port \n+0017bb40: 3d20 2e2e 2e3b 203c 2f64 6976 3e0a 3c64 = ...;
      .\n+0017bb60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+0017bb90: 2667 743b 3c61 2063 6c61 7373 3d22 636f >pro\n+0017bbe0: 7879 5f75 7365 7269 643c 2f61 3e20 3d20 xy_userid = \n+0017bbf0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+0017bc10: 743b 5a61 7068 6f64 2671 756f 743b 3c2f t;Zaphod";
      .\n+0017bc40: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+0017bc70: 2667 743b 3c61 2063 6c61 7373 3d22 636f >pro\n+0017bcc0: 7879 5f70 6173 7377 643c 2f61 3e20 3d20 xy_passwd = \n+0017bcd0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+0017bcf0: 743b 4265 6562 6c65 6272 6f78 2671 756f t;Beeblebrox&quo\n+0017bd00: 743b 3c2f 7370 616e 3e3b 203c 2f64 6976 t;; .
      soap<\n+0017bd50: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->authrealm =\n+0017bdb0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+0017bdd0: 6f74 3b55 7273 612d 4d69 6e6f 7226 7175 ot;Ursa-Minor&qu\n+0017bde0: 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 ot;; ..<\n+0017bed0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0017bee0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >if (soap_call_\n+0017bf10: 6e73 5f5f 7765 626d 6574 686f 6428 3c61 ns__webmethod(soap, .\n+0017bf50: 2e2e 2929 203c 2f64 6976 3e0a 3c64 6976 ..))
      . \n+0017bf70: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // err\n+0017bf90: 6f72 3c2f 7370 616e 3e3c 2f64 6976 3e0a or
      .\n+0017bfa0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      else\n+0017bfd0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+0017bff0: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // s\n+0017c010: 7563 6365 7373 3c2f 7370 616e 3e3c 2f64 uccess.

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

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

      \n+0017c0a0: 3c2f 613e 0a48 5454 5020 7072 6f78 7920 .HTTP proxy \n+0017c0b0: 6261 7369 6320 6175 7468 656e 7469 6361 basic authentica\n+0017c0c0: 7469 6f6e 3c2f 6833 3e0a 3c70 3e48 5454 tion

      .

      HTT\n+0017c0d0: 5020 7072 6f78 7920 6175 7468 656e 7469 P proxy authenti\n+0017c0e0: 6361 7469 6f6e 2028 6261 7369 6329 2069 cation (basic) i\n+0017c0f0: 7320 656e 6162 6c65 6420 6174 2074 6865 s enabled at the\n+0017c100: 2063 6c69 656e 742d 7369 6465 2062 7920 client-side by \n+0017c110: 7365 7474 696e 6720 7468 6520 3c63 6f64 setting the soap::proxy_use\n+0017c1e0: 7269 643c 2f61 3e3c 2f63 6f64 653e 2061 rid a\n+0017c1f0: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd soap::p\n+0017c2b0: 726f 7879 5f70 6173 7377 643c 2f61 3e3c roxy_passwd<\n+0017c2c0: 2f63 6f64 653e 2073 7472 696e 6773 2074 /code> strings t\n+0017c2d0: 6f20 6120 7573 6572 6e61 6d65 2061 6e64 o a username and\n+0017c2e0: 2070 6173 7377 6f72 642c 2072 6573 7065 password, respe\n+0017c2f0: 6374 6976 656c 792e 2046 6f72 2065 7861 ctively. For exa\n+0017c300: 6d70 6c65 2c20 6120 7072 6f78 7920 7365 mple, a proxy se\n+0017c310: 7276 6572 206d 6179 2072 6571 7565 7374 rver may request\n+0017c320: 2075 7365 7220 6175 7468 656e 7469 6361 user authentica\n+0017c330: 7469 6f6e 2e20 4f74 6865 7277 6973 652c tion. Otherwise,\n+0017c340: 2061 6363 6573 7320 6973 2064 656e 6965 access is denie\n+0017c350: 6420 6279 2074 6865 2070 726f 7879 2028 d by the proxy (\n+0017c360: 4854 5450 2034 3037 2065 7272 6f72 292e HTTP 407 error).\n+0017c370: 2045 7861 6d70 6c65 2063 6c69 656e 7420 Example client \n+0017c380: 636f 6465 2066 7261 676d 656e 7420 746f code fragment to\n+0017c390: 2073 6574 2070 726f 7879 2073 6572 7665 set proxy serve\n+0017c3a0: 722c 2075 7365 726e 616d 652c 2061 6e64 r, username, and\n+0017c3b0: 2070 6173 7377 6f72 643a 3c2f 703e 0a3c password:

      .<\n+0017c3c0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+0017c3d0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
      str\n+0017c400: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap *soap = soap_new(\n+0017c4d0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
      .
      soap->\n+0017c520: 3c61 2063 6c61 7373 3d22 636f 6465 2220 proxy_h\n+0017c570: 6f73 743c 2f61 3e20 3d20 3c73 7061 6e20 ost = "xx.x\n+0017c5a0: 782e 7878 2e78 7826 7175 6f74 3b3c 2f73 x.xx.xx"; // I\n+0017c5d0: 5020 6f72 2064 6f6d 6169 6e20 3c2f 7370 P or domain
      .
      soap->\n+0017c630: 3c61 2063 6c61 7373 3d22 636f 6465 2220 proxy_p\n+0017c680: 6f72 743c 2f61 3e20 3d20 3830 3830 3b20 ort = 8080; \n+0017c690: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      \n+0017c6d0: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->proxy_user\n+0017c730: 6964 3c2f 613e 203d 203c 7370 616e 2063 id = "guest\n+0017c760: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; <\n+0017c770: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.

      A\n+0017c870: 2063 6c69 656e 7420 534f 4150 2072 6571 client SOAP req\n+0017c880: 7565 7374 2077 696c 6c20 6861 7665 2074 uest will have t\n+0017c890: 6865 2066 6f6c 6c6f 7769 6e67 2048 5454 he following HTT\n+0017c8a0: 5020 6865 6164 6572 3a20 3c2f 703e 3c70 P header:

      POST /XXX HT\n+0017c8d0: 5450 2f31 2e31 200a 486f 7374 3a20 5959 TP/1.1 .Host: YY\n+0017c8e0: 5920 0a55 7365 722d 4167 656e 743a 2067 Y .User-Agent: g\n+0017c8f0: 534f 4150 2f32 2e38 200a 436f 6e74 656e SOAP/2.8 .Conten\n+0017c900: 742d 5479 7065 3a20 7465 7874 2f78 6d6c t-Type: text/xml\n+0017c910: 3b20 6368 6172 7365 743d 7574 662d 3820 ; charset=utf-8 \n+0017c920: 0a43 6f6e 7465 6e74 2d4c 656e 6774 683a .Content-Length:\n+0017c930: 205a 5a5a 200a 5072 6f78 792d 4175 7468 ZZZ .Proxy-Auth\n+0017c940: 6f72 697a 6174 696f 6e3a 2042 6173 6963 orization: Basic\n+0017c950: 205a 3356 6c63 3351 365a 3356 6c63 3351 Z3Vlc3Q6Z3Vlc3Q\n+0017c960: 3d20 0a3c 2f70 7265 3e3c 703e 2057 6865 = .

      Whe\n+0017c970: 6e20 582d 466f 7277 6172 6465 642d 466f n X-Forwarded-Fo\n+0017c980: 7220 6865 6164 6572 7320 6172 6520 7265 r headers are re\n+0017c990: 7475 726e 6564 2062 7920 7468 6520 7072 turned by the pr\n+0017c9a0: 6f78 792c 2074 6865 2068 6561 6465 7220 oxy, the header \n+0017c9b0: 6361 6e20 6265 2061 6363 6573 7365 6420 can be accessed \n+0017c9c0: 696e 2074 6865 203c 636f 6465 3e3c 6120 in the soap::proxy_\n+0017ca60: 6672 6f6d 3c2f 613e 3c2f 636f 6465 3e20 from \n+0017ca70: 7374 7269 6e67 2e3c 2f70 3e0a 3c70 3e54 string.

      .

      T\n+0017ca80: 6865 2043 4f4e 4e45 4354 206d 6574 686f he CONNECT metho\n+0017ca90: 6420 6973 2075 7365 6420 666f 7220 4854 d is used for HT\n+0017caa0: 5450 2070 726f 7879 2061 7574 6865 6e74 TP proxy authent\n+0017cab0: 6963 6174 696f 6e3a 203c 2f70 3e3c 7072 ication:

      CONNECT serve\n+0017cae0: 722e 6578 616d 706c 652e 636f 6d3a 3830 r.example.com:80\n+0017caf0: 2048 5454 502f 312e 310a 3c2f 7072 653e HTTP/1.1.\n+0017cb00: 3c70 3e20 496e 2073 6f6d 6520 6361 7365

      In some case\n+0017cb10: 732c 2079 6f75 2077 696c 6c20 6e6f 7469 s, you will noti\n+0017cb20: 6365 2074 6861 7420 7468 6520 486f 7374 ce that the Host\n+0017cb30: 2048 5454 5020 6865 6164 6572 2075 7365 HTTP header use\n+0017cb40: 7320 7468 6520 434f 4e4e 4543 5420 7072 s the CONNECT pr\n+0017cb50: 6f74 6f63 6f6c 3a20 3c2f 703e 3c70 7265 otocol:

      CONNECT server\n+0017cb80: 2e65 7861 6d70 6c65 2e63 6f6d 3a38 3020 .example.com:80 \n+0017cb90: 4854 5450 2f31 2e31 200a 486f 7374 3a20 HTTP/1.1 .Host: \n+0017cba0: 7365 7276 6572 2e65 7861 6d70 6c65 2e63 server.example.c\n+0017cbb0: 6f6d 3a38 300a 3c2f 7072 653e 3c70 3e20 om:80.

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

      .Performa\n+0017cc20: 6e63 6520 696d 7072 6f76 656d 656e 7420 nce improvement \n+0017cc30: 7469 7073 3c2f 6832 3e0a 3c70 3e48 6572 tips

      .

      Her\n+0017cc40: 6520 6172 6520 736f 6d65 2074 6970 7320 e are some tips \n+0017cc50: 796f 7520 6361 6e20 7573 6520 746f 2073 you can use to s\n+0017cc60: 7065 6564 2075 7020 6753 4f41 502e 2054 peed up gSOAP. T\n+0017cc70: 6865 2064 6566 6175 6c74 2073 6574 7469 he default setti\n+0017cc80: 6e67 7320 6172 6520 6368 6f73 656e 2074 ngs are chosen t\n+0017cc90: 6f20 6d61 7869 6d69 7a65 2070 6f72 7461 o maximize porta\n+0017cca0: 6269 6c69 7479 2061 6e64 2063 6f6d 7061 bility and compa\n+0017ccb0: 7469 6269 6c69 7479 2e20 5468 6520 7365 tibility. The se\n+0017ccc0: 7474 696e 6773 2063 616e 2062 6520 7477 ttings can be tw\n+0017ccd0: 6561 6b65 6420 746f 206f 7074 696d 697a eaked to optimiz\n+0017cce0: 6520 7468 6520 7065 7266 6f72 6d61 6e63 e the performanc\n+0017ccf0: 6520 6173 2066 6f6c 6c6f 7773 3a3c 2f70 e as follows:.

        .
      • Incre\n+0017cd10: 6173 6520 7468 6520 6275 6666 6572 2073 ase the buffer s\n+0017cd20: 697a 6520 3c63 6f64 653e 2353 4f41 505f ize #SOAP_\n+0017cd30: 4255 464c 454e 3c2f 636f 6465 3e20 6279 BUFLEN by\n+0017cd40: 2063 6861 6e67 696e 6720 7468 6520 3c63 changing the #SOAP_BUFLEN\n+0017cd60: 3c2f 636f 6465 3e20 6d61 6372 6f20 696e macro in\n+0017cd70: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n+0017cd80: 2f73 7464 736f 6170 322e 683c 2f63 6f64 /stdsoap2.h. Use buf\n+0017cda0: 6665 7220 7369 7a65 2032 5e31 383d 3236 fer size 2^18=26\n+0017cdb0: 3231 3434 2066 6f72 2065 7861 6d70 6c65 2144 for example\n+0017cdc0: 2e3c 2f6c 693e 0a3c 6c69 3e55 7365 2048 .
      • .
      • Use H\n+0017cdd0: 5454 5020 6b65 6570 2d61 6c69 7665 2061 TTP keep-alive a\n+0017cde0: 7420 7468 6520 636c 6965 6e74 2d73 6964 t the client-sid\n+0017cdf0: 652c 2073 6565 2053 6563 7469 6f6e 203c e, see Section <\n+0017ce00: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0017ce10: 663d 2269 6e64 6578 2e68 746d 6c23 6b65 f=\"index.html#ke\n+0017ce20: 6570 616c 6976 6522 3e54 4350 2061 6e64 epalive\">TCP and\n+0017ce30: 2048 5454 5020 6b65 6570 2d61 6c69 7665 HTTP keep-alive\n+0017ce40: 3c2f 613e 202c 2077 6865 6e20 7468 6520 , when the \n+0017ce50: 636c 6965 6e74 206e 6565 6473 2074 6f20 client needs to \n+0017ce60: 6d61 6b65 2061 2073 6572 6965 7320 6f66 make a series of\n+0017ce70: 2063 616c 6c73 2074 6f20 7468 6520 7361 calls to the sa\n+0017ce80: 6d65 2073 6572 7665 722e 2053 6572 7665 me server. Serve\n+0017ce90: 722d 7369 6465 206b 6565 702d 616c 6976 r-side keep-aliv\n+0017cea0: 6520 7375 7070 6f72 7420 6361 6e20 6772 e support can gr\n+0017ceb0: 6561 746c 7920 696d 7072 6f76 6520 7065 eatly improve pe\n+0017cec0: 7266 6f72 6d61 6e63 6520 6f66 2062 6f74 rformance of bot\n+0017ced0: 6820 636c 6965 6e74 2061 6e64 2073 6572 h client and ser\n+0017cee0: 7665 722e 2042 7574 2062 6520 6177 6172 ver. But be awar\n+0017cef0: 6520 7468 6174 2063 6c69 656e 7473 2061 e that clients a\n+0017cf00: 6e64 2073 6572 7669 6365 7320 756e 6465 nd services unde\n+0017cf10: 7220 556e 6978 2f4c 696e 7578 2072 6571 r Unix/Linux req\n+0017cf20: 7569 7265 2073 6967 6e61 6c20 6861 6e64 uire signal hand\n+0017cf30: 6c65 7273 2074 6f20 6361 7463 6820 6472 lers to catch dr\n+0017cf40: 6f70 7065 6420 636f 6e6e 6563 7469 6f6e opped connection\n+0017cf50: 732e 3c2f 6c69 3e0a 3c6c 693e 5573 6520 s.
      • .
      • Use \n+0017cf60: 4854 5450 2063 6875 6e6b 6564 2074 7261 HTTP chunked tra\n+0017cf70: 6e73 6665 7273 2c20 7365 6520 5365 6374 nsfers, see Sect\n+0017cf80: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion HTTP\n+0017cfb0: 2063 6875 6e6b 6564 2074 7261 6e73 6665 chunked transfe\n+0017cfc0: 7220 656e 636f 6469 6e67 3c2f 613e 202e r encoding .\n+0017cfd0: 3c2f 6c69 3e0a 3c6c 693e 446f 206e 6f74
      • .
      • Do not\n+0017cfe0: 2075 7365 2067 7a69 7020 636f 6d70 7265 use gzip compre\n+0017cff0: 7373 696f 6e2c 2073 696e 6365 2074 6865 ssion, since the\n+0017d000: 206f 7665 7268 6561 6420 6f66 2063 6f6d overhead of com\n+0017d010: 7072 6573 7369 6f6e 2069 7320 7479 7069 pression is typi\n+0017d020: 6361 6c6c 7920 6869 6768 6572 2074 6861 cally higher tha\n+0017d030: 6e20 7468 6520 6261 6e64 7769 6474 6820 n the bandwidth \n+0017d040: 6761 696e 732e 3c2f 6c69 3e0a 3c6c 693e gains.
      • .
      • \n+0017d050: 5365 7420 7468 6520 3c63 6f64 653e 2353 Set the #S\n+0017d060: 4f41 505f 584d 4c5f 5452 4545 3c2f 636f OAP_XML_TREE flag to disa\n+0017d080: 626c 6520 6964 2d72 6566 206d 756c 7469 ble id-ref multi\n+0017d090: 2d72 6566 206f 626a 6563 7420 7365 7269 -ref object seri\n+0017d0a0: 616c 697a 6174 696f 6e2e 2054 6869 7320 alization. This \n+0017d0b0: 626f 6f73 7473 2070 6572 666f 726d 616e boosts performan\n+0017d0c0: 6365 2073 6967 6e69 6669 6361 6e74 6c79 ce significantly\n+0017d0d0: 2061 6e64 2077 6f72 6b73 2077 6974 6820 and works with \n+0017d0e0: 534f 4150 2064 6f63 756d 656e 742f 6c69 SOAP document/li\n+0017d0f0: 7465 7261 6c20 7374 796c 6520 2869 2e65 teral style (i.e\n+0017d100: 2e20 6e6f 2069 642d 7265 6620 6772 6170 . no id-ref grap\n+0017d110: 6820 7365 7269 616c 697a 6174 696f 6e20 h serialization \n+0017d120: 6173 2072 6571 7569 7265 6420 7769 7468 as required with\n+0017d130: 2053 4f41 5020 656e 636f 6469 6e67 2073 SOAP encoding s\n+0017d140: 7479 6c65 292e 2044 6f20 6e6f 7420 7573 tyle). Do not us\n+0017d150: 6520 7468 6973 2066 6f72 2053 4f41 5020 e this for SOAP \n+0017d160: 5250 4320 656e 636f 6465 6420 6d65 7373 RPC encoded mess\n+0017d170: 6167 696e 672e 3c2f 6c69 3e0a 3c6c 693e aging.
      • .
      • \n+0017d180: 436f 6d70 696c 6520 3c65 6d3e 3c63 6f64 Compile gsoap/stdsoap2\n+0017d1a0: 2e63 3c2f 636f 6465 3e3c 2f65 6d3e 2061 .c a\n+0017d1b0: 6e64 203c 656d 3e3c 636f 6465 3e67 736f nd gso\n+0017d1c0: 6170 2f73 7464 736f 6170 322e 6370 703c ap/stdsoap2.cpp<\n+0017d1d0: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and \n+0017d1e0: 616c 6c20 6f74 6865 7220 736f 7572 6365 all other source\n+0017d1f0: 2063 6f64 6573 2077 6974 6820 7468 6520 codes with the \n+0017d200: 636f 6d70 696c 6520 7469 6d65 2066 6c61 compile time fla\n+0017d210: 6720 3c63 6f64 653e 2357 4954 485f 4e4f g #WITH_NO\n+0017d220: 4944 5245 463c 2f63 6f64 653e 2074 6f20 IDREF to \n+0017d230: 696d 7072 6f76 6520 7065 7266 6f72 6d61 improve performa\n+0017d240: 6e63 6520 6576 656e 2062 6574 7465 7220 nce even better \n+0017d250: 6279 2070 6572 6d61 6e65 6e74 6c79 2064 by permanently d\n+0017d260: 6973 6162 6c69 6e67 2069 642d 7265 6620 isabling id-ref \n+0017d270: 6d75 6c74 692d 7265 6620 6f62 6a65 6374 multi-ref object\n+0017d280: 2073 6572 6961 6c69 7a61 7469 6f6e 2e20 serialization. \n+0017d290: 446f 206e 6f74 2075 7365 2074 6869 7320 Do not use this \n+0017d2a0: 666f 7220 534f 4150 2052 5043 2065 6e63 for SOAP RPC enc\n+0017d2b0: 6f64 6564 206d 6573 7361 6769 6e67 2e3c oded messaging.<\n+0017d2c0: 2f6c 693e 0a3c 6c69 3e44 6f20 6e6f 7420 /li>.
      • Do not \n+0017d2d0: 7573 6520 4445 4255 4720 6d6f 6465 2c20 use DEBUG mode, \n+0017d2e0: 7369 6e63 6520 7468 6520 6f76 6572 6865 since the overhe\n+0017d2f0: 6164 206f 6620 6c6f 6767 696e 6720 6973 ad of logging is\n+0017d300: 2073 6967 6e69 6669 6361 6e74 2e3c 2f6c significant..
      .

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

      .<\n+0017d350: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.Safety gua\n+0017d380: 7264 733c 2f68 323e 0a3c 703e 5468 6520 rds

      .

      The \n+0017d390: 666f 6c6c 6f77 696e 6720 7365 7474 696e following settin\n+0017d3a0: 6773 2061 7265 2069 6d70 6f72 7461 6e74 gs are important\n+0017d3b0: 2074 6f20 656e 7375 7265 2074 6861 7420 to ensure that \n+0017d3c0: 584d 4c20 6d65 7373 6167 696e 6720 6973 XML messaging is\n+0017d3d0: 2073 6166 6520 6279 2064 6566 696e 696e safe by definin\n+0017d3e0: 6720 7265 6173 6f6e 6162 6c65 2058 4d4c g reasonable XML\n+0017d3f0: 206d 6573 7361 6765 2072 6573 7472 6963 message restric\n+0017d400: 7469 6f6e 732e 2041 6c73 6f20 6d65 7373 tions. Also mess\n+0017d410: 6167 696e 6720 7469 6d65 6f75 7473 2073 aging timeouts s\n+0017d420: 686f 756c 6420 6265 2073 6574 2061 7320 hould be set as \n+0017d430: 6578 706c 6169 6e65 6420 696e 2053 6563 explained in Sec\n+0017d440: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion Tim\n+0017d470: 656f 7574 206d 616e 6167 656d 656e 7420 eout management \n+0017d480: 666f 7220 6e6f 6e2d 626c 6f63 6b69 6e67 for non-blocking\n+0017d490: 206f 7065 7261 7469 6f6e 733c 2f61 3e2e operations.\n+0017d4a0: 3c2f 703e 0a3c 703e 5468 6520 584d 4c20

      .

      The XML \n+0017d4b0: 7061 7273 6572 2069 7320 636f 6e66 6967 parser is config\n+0017d4c0: 7572 6564 2074 6f20 7265 7374 7269 6374 ured to restrict\n+0017d4d0: 2074 6865 2058 4d4c 206e 6573 7469 6e67 the XML nesting\n+0017d4e0: 2064 6570 7468 206c 6576 656c 2074 6f20 depth level to \n+0017d4f0: 3c63 6f64 653e 2353 4f41 505f 4d41 584c #SOAP_MAXL\n+0017d500: 4556 454c 3c2f 636f 6465 3e20 616e 6420 EVEL and \n+0017d510: 7265 7374 7269 6374 7320 7468 6520 7265 restricts the re\n+0017d520: 7065 6174 6564 206f 6363 7572 7265 6e63 peated occurrenc\n+0017d530: 6520 6f66 2065 6c65 6d65 6e74 7320 7468 e of elements th\n+0017d540: 6174 2061 7265 2064 6573 6572 6961 6c69 at are deseriali\n+0017d550: 7a65 6420 696e 746f 2061 7272 6179 7320 zed into arrays \n+0017d560: 616e 6420 636f 6e74 6169 6e65 7273 2062 and containers b\n+0017d570: 7920 3c63 6f64 653e 2353 4f41 505f 4d41 y #SOAP_MA\n+0017d580: 584f 4343 5552 533c 2f63 6f64 653e 2e20 XOCCURS. \n+0017d590: 5468 6573 6520 6d61 6372 6f73 2063 616e These macros can\n+0017d5a0: 2062 6520 6368 616e 6765 642c 2062 7574 be changed, but\n+0017d5b0: 2079 6f75 2063 616e 2061 6c73 6f20 6368 you can also ch\n+0017d5c0: 616e 6765 2074 6865 2066 6f6c 6c6f 7769 ange the followi\n+0017d5d0: 6e67 2063 6f6e 7465 7874 2061 7474 7269 ng context attri\n+0017d5e0: 6275 7465 7320 6174 2072 756e 2d74 696d butes at run-tim\n+0017d5f0: 652c 2065 2e67 2e20 746f 2065 6e68 616e e, e.g. to enhan\n+0017d600: 6365 2074 6865 2073 6166 6574 7920 666f ce the safety fo\n+0017d610: 7220 7370 6563 6966 6963 2073 6572 7669 r specific servi\n+0017d620: 6365 2061 6e64 2f6f 7220 636c 6965 6e74 ce and/or client\n+0017d630: 206f 7065 7261 7469 6f6e 733a 3c2f 703e operations:

      \n+0017d640: 0a3c 756c 3e0a 3c6c 693e 3c63 6f64 653e ..

      X\n+0017dce0: 4d4c 2073 6368 656d 6120 7661 6c69 6461 ML schema valida\n+0017dcf0: 7469 6f6e 2063 6f6e 7374 7261 696e 7473 tion constraints\n+0017dd00: 2061 7265 2065 6e66 6f72 6365 6420 7769 are enforced wi\n+0017dd10: 7468 2074 6865 203c 636f 6465 3e23 534f th the #SO\n+0017dd20: 4150 5f58 4d4c 5f53 5452 4943 543c 2f63 AP_XML_STRICT context fla\n+0017dd40: 672e 2054 6865 2073 6368 656d 6120 6d61 g. The schema ma\n+0017dd50: 784c 656e 6774 6820 7661 6c69 6461 7469 xLength validati\n+0017dd60: 6f6e 2063 6f6e 7374 7261 696e 7420 6f76 on constraint ov\n+0017dd70: 6572 7275 6c65 7320 7468 6520 3c63 6f64 errules the soap::maxle\n+0017de40: 6e67 7468 3c2f 613e 3c2f 636f 6465 3e20 ngth \n+0017de50: 6775 6172 642e 2054 6865 2073 6368 656d guard. The schem\n+0017de60: 6120 6d61 784f 6363 7572 7320 7661 6c69 a maxOccurs vali\n+0017de70: 6461 7469 6f6e 2063 6f6e 7374 7261 696e dation constrain\n+0017de80: 7420 646f 6573 206e 6f74 206f 7665 7272 t does not overr\n+0017de90: 756c 6520 7468 6520 3c63 6f64 653e 3c61 ule the soap::maxo\n+0017df60: 6363 7572 733c 2f61 3e3c 2f63 6f64 653e ccurs\n+0017df70: 2067 7561 7264 2c20 736f 2061 7272 6179 guard, so array\n+0017df80: 7320 616e 6420 636f 6e74 6169 6e65 7273 s and containers\n+0017df90: 2061 7265 2061 6c77 6179 7320 7265 7374 are always rest\n+0017dfa0: 7269 6374 6564 2069 6e20 6c65 6e67 7468 ricted in length\n+0017dfb0: 2062 7920 7468 6973 2067 7561 7264 2e3c by this guard.<\n+0017dfc0: 2f70 3e0a 3c70 3e4f 7468 6572 2063 6f6d /p>.

      Other com\n+0017dfd0: 7069 6c65 2d74 696d 6520 636f 6e66 6967 pile-time config\n+0017dfe0: 7572 6174 696f 6e20 7365 7474 696e 6773 uration settings\n+0017dff0: 2061 7265 3a3c 2f70 3e0a 3c75 6c3e 0a3c are:

      .
        .<\n+0017e000: 6c69 3e3c 636f 6465 3e23 534f 4150 5f4d li>#SOAP_M\n+0017e010: 4158 414c 4c4f 4353 495a 453c 2f63 6f64 AXALLOCSIZE the maximum s\n+0017e030: 697a 6520 6f66 2061 2062 6c6f 636b 206f ize of a block o\n+0017e040: 6620 6d65 6d6f 7279 2074 6861 7420 3c63 f memory that malloc can allocate.<\n+0017e070: 2f6c 693e 0a3c 6c69 3e3c 636f 6465 3e23 /li>.
      • #\n+0017e080: 534f 4150 5f4d 4158 4152 5241 5953 495a SOAP_MAXARRAYSIZ\n+0017e090: 453c 2f63 6f64 653e 2074 6865 206d 6178 E the max\n+0017e0a0: 696d 756d 2061 6c6c 6f63 6174 696f 6e20 imum allocation \n+0017e0b0: 7468 7265 7368 6f6c 6420 746f 2070 7265 threshold to pre\n+0017e0c0: 2d61 6c6c 6f63 6174 6520 534f 4150 2061 -allocate SOAP a\n+0017e0d0: 7272 6179 7320 696e 206d 656d 6f72 792e rrays in memory.\n+0017e0e0: 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 653e
      • .
      • \n+0017e0f0: 2353 4f41 505f 4d41 5844 494d 4553 495a #SOAP_MAXDIMESIZ\n+0017e100: 453c 2f63 6f64 653e 2074 6865 206d 6178 E the max\n+0017e110: 696d 756d 2044 494d 4520 6174 7461 6368 imum DIME attach\n+0017e120: 6d65 6e74 2073 697a 6520 616c 6c6f 7765 ment size allowe\n+0017e130: 6420 746f 2072 6563 6569 7665 2e3c 2f6c d to receive..
      • #SO\n+0017e150: 4150 5f4d 4158 4549 4e54 523c 2f63 6f64 AP_MAXEINTR maximum numbe\n+0017e170: 7220 6f66 2045 494e 5452 2069 6e74 6572 r of EINTR inter\n+0017e180: 7275 7074 7320 746f 2069 676e 6f72 6520 rupts to ignore \n+0017e190: 7768 696c 6520 706f 6c6c 696e 6720 6120 while polling a \n+0017e1a0: 736f 636b 6574 2066 6f72 2070 656e 6469 socket for pendi\n+0017e1b0: 6e67 2061 6374 6976 6974 792e 3c2f 6c69 ng activity..
      .

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

      ..Timeout ma\n+0017e230: 6e61 6765 6d65 6e74 2066 6f72 206e 6f6e nagement for non\n+0017e240: 2d62 6c6f 636b 696e 6720 6f70 6572 6174 -blocking operat\n+0017e250: 696f 6e73 3c2f 6832 3e0a 3c70 3e53 6f63 ions.

      Soc\n+0017e260: 6b65 7420 636f 6e6e 6563 742c 2061 6363 ket connect, acc\n+0017e270: 6570 742c 2073 656e 642c 2061 6e64 2072 ept, send, and r\n+0017e280: 6563 6569 7665 2074 696d 656f 7574 2076 eceive timeout v\n+0017e290: 616c 7565 7320 6361 6e20 6265 2073 6574 alues can be set\n+0017e2a0: 2074 6f20 6d61 6e61 6765 2073 6f63 6b65 to manage socke\n+0017e2b0: 7420 636f 6d6d 756e 6963 6174 696f 6e20 t communication \n+0017e2c0: 7469 6d65 6f75 7473 2e20 5468 6520 3c63 timeouts. The soap\n+0017e390: 3a3a 636f 6e6e 6563 745f 7469 6d65 6f75 ::connect_timeou\n+0017e3a0: 743c 2f61 3e3c 2f63 6f64 653e 2c20 3c63 t, soap\n+0017e470: 3a3a 6163 6365 7074 5f74 696d 656f 7574 ::accept_timeout\n+0017e480: 3c2f 613e 3c2f 636f 6465 3e2c 203c 636f , soap:\n+0017e540: 3a73 656e 645f 7469 6d65 6f75 743c 2f61 :send_timeout, \n+0017e560: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap:\n+0017e610: 3a72 6563 765f 7469 6d65 6f75 743c 2f61 :recv_timeout and soap::tra\n+0017e6f0: 6e73 6665 725f 7469 6d65 6f75 743c 2f61 nsfer_timeout context\n+0017e710: 2061 7474 7269 6275 7465 7320 6f66 2074 attributes of t\n+0017e720: 6865 2063 7572 7265 6e74 2063 6f6e 7465 he current conte\n+0017e730: 7874 203c 636f 6465 3e3c 6120 636c 6173 xt soap can be set \n+0017e7a0: 746f 2074 6865 2061 7070 726f 7072 6961 to the appropria\n+0017e7b0: 7465 2075 7365 722d 6465 6669 6e65 6420 te user-defined \n+0017e7c0: 736f 636b 6574 2073 656e 642c 2072 6563 socket send, rec\n+0017e7d0: 6569 7665 2c20 616e 6420 6163 6365 7074 eive, and accept\n+0017e7e0: 2074 696d 656f 7574 2076 616c 7565 732e timeout values.\n+0017e7f0: 2041 2070 6f73 6974 6976 6520 7661 6c75 A positive valu\n+0017e800: 6520 6d65 6173 7572 6573 2074 6865 2074 e measures the t\n+0017e810: 696d 656f 7574 2069 6e20 7365 636f 6e64 imeout in second\n+0017e820: 732e 2041 206e 6567 6174 6976 6520 7469 s. A negative ti\n+0017e830: 6d65 6f75 7420 7661 6c75 6520 6d65 6173 meout value meas\n+0017e840: 7572 6573 2074 6865 2074 696d 656f 7574 ures the timeout\n+0017e850: 2069 6e20 6d69 6372 6f73 6563 6f6e 6473 in microseconds\n+0017e860: 2028 3130 5e2d 3620 7365 6329 2e3c 2f70 (10^-6 sec)..

      The <\n+0017e880: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0017e890: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+0017e8a0: 6d6c 2361 6633 3262 3566 3339 3735 6561 ml#af32b5f3975ea\n+0017e8b0: 6332 6264 3132 3032 3537 3135 3135 3835 c2bd120257151585\n+0017e8c0: 3931 3633 2220 7469 746c 653d 2255 7365 9163\" title=\"Use\n+0017e8d0: 722d 6465 6669 6e61 626c 6520 7469 6d65 r-definable time\n+0017e8e0: 6f75 7420 7768 656e 2077 6169 7469 6e67 out when waiting\n+0017e8f0: 2074 6f20 636f 6e6e 6563 7420 746f 2061 to connect to a\n+0017e900: 2073 6572 7665 7220 6174 2074 6865 2063 server at the c\n+0017e910: 6c69 656e 742d 7369 6465 2c20 706f 7369 lient-side, posi\n+0017e920: 7469 7665 2074 696d 656f 7574 2076 616c tive timeout val\n+0017e930: 7565 2e2e 2e22 3e73 6f61 703a 3a63 6f6e ue...\">soap::con\n+0017e940: 6e65 6374 5f74 696d 656f 7574 3c2f 613e nect_timeout\n+0017e950: 3c2f 636f 6465 3e20 7370 6563 6966 6965 specifie\n+0017e960: 7320 7468 6520 7469 6d65 6f75 7420 666f s the timeout fo\n+0017e970: 7220 3c63 6f64 653e 736f 6170 5f63 616c r soap_cal\n+0017e980: 6c5f 6e73 5f5f 7765 626d 6574 686f 643c l_ns__webmethod<\n+0017e990: 2f63 6f64 653e 2073 7475 6220 6675 6e63 /code> stub func\n+0017e9a0: 7469 6f6e 2063 616c 6c73 2061 6e64 2066 tion calls and f\n+0017e9b0: 6f72 2043 2b2b 2070 726f 7879 2063 6c61 or C++ proxy cla\n+0017e9c0: 7373 2063 616c 6c73 2e3c 2f70 3e0a 3c70 ss calls.

      .The soap::accept_\n+0017eaa0: 7469 6d65 6f75 743c 2f61 3e3c 2f63 6f64 timeout specifies the\n+0017eac0: 2074 696d 656f 7574 2066 6f72 203c 636f timeout for soap\n+0017eb50: 5f61 6363 6570 743c 2f61 3e3c 2f63 6f64 _accept calls.

      .The soap::send_ti\n+0017ec30: 6d65 6f75 743c 2f61 3e3c 2f63 6f64 653e meout\n+0017ec40: 2061 6e64 203c 636f 6465 3e3c 6120 636c and soap::recv\n+0017ed00: 5f74 696d 656f 7574 3c2f 613e 3c2f 636f _timeout specify the \n+0017ed20: 7469 6d65 6f75 7420 666f 7220 6e6f 6e2d timeout for non-\n+0017ed30: 626c 6f63 6b69 6e67 2073 6f63 6b65 7420 blocking socket \n+0017ed40: 492f 4f20 6f70 6572 6174 696f 6e73 2e20 I/O operations. \n+0017ed50: 5468 6973 2069 7320 7468 6520 6d61 7869 This is the maxi\n+0017ed60: 6d75 6d20 6465 6c61 7920 6f6e 2074 6865 mum delay on the\n+0017ed70: 2073 6f63 6b65 7420 6f70 6572 6174 696f socket operatio\n+0017ed80: 6e20 7065 726d 6974 7465 642e 3c2f 703e n permitted.

      \n+0017ed90: 0a3c 703e 5468 6520 3c63 6f64 653e 3c61 .

      The soap::transfer\n+0017ee60: 5f74 696d 656f 7574 3c2f 613e 3c2f 636f _timeout is new since\n+0017ee80: 2032 2e38 2e34 3820 616e 6420 6c69 6d69 2.8.48 and limi\n+0017ee90: 7473 2074 6865 2074 696d 6520 6120 6d65 ts the time a me\n+0017eea0: 7373 6167 6520 7365 6e64 2061 6e64 2061 ssage send and a\n+0017eeb0: 206d 6573 7361 6765 2072 6563 6569 7665 message receive\n+0017eec0: 206f 7065 7261 7469 6f6e 2063 616e 2074 operation can t\n+0017eed0: 616b 652e 2054 6869 7320 7661 6c75 6520 ake. This value \n+0017eee0: 7368 6f75 6c64 2062 6520 7573 6564 2069 should be used i\n+0017eef0: 6e20 636f 6d62 696e 6174 696f 6e20 7769 n combination wi\n+0017ef00: 7468 203c 636f 6465 3e3c 6120 636c 6173 th soap::send_time\n+0017efc0: 6f75 743c 2f61 3e3c 2f63 6f64 653e 2061 out a\n+0017efd0: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd soap::recv_t\n+0017f090: 696d 656f 7574 3c2f 613e 3c2f 636f 6465 imeout for accurate t\n+0017f0b0: 696d 656f 7574 2063 6f6e 7472 6f6c 2e20 imeout control. \n+0017f0c0: 5468 6520 3c63 6f64 653e 3c61 2063 6c61 The soap::recv_max\n+0017f190: 6c65 6e67 7468 3c2f 613e 3c2f 636f 6465 length value when non\n+0017f1b0: 2d7a 6572 6f20 6c69 6d69 7473 2074 6865 -zero limits the\n+0017f1c0: 206c 656e 6774 6820 6f66 206d 6573 7361 length of messa\n+0017f1d0: 6765 7320 7468 6174 2063 616e 2062 6520 ges that can be \n+0017f1e0: 7265 6365 6976 6564 2069 6e20 6279 7465 received in byte\n+0017f1f0: 7320 696e 2074 6f74 616c 2069 6e20 6465 s in total in de\n+0017f200: 636f 6d70 7265 7373 6564 2066 6f72 6d20 compressed form \n+0017f210: 286d 6573 7361 6765 206c 656e 6774 6820 (message length \n+0017f220: 696e 636c 7564 6573 2048 5454 5020 6865 includes HTTP he\n+0017f230: 6164 6572 7320 616e 6420 4854 5450 2063 aders and HTTP c\n+0017f240: 6875 6e6b 2073 697a 6520 6669 656c 6473 hunk size fields\n+0017f250: 292e 2054 6865 2076 616c 7565 206f 6620 ). The value of \n+0017f260: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n+0017f320: 6170 3a3a 7265 6376 5f6d 6178 6c65 6e67 ap::recv_maxleng\n+0017f330: 7468 3c2f 613e 3c2f 636f 6465 3e20 6973 th is\n+0017f340: 2032 4742 2062 7920 6465 6661 756c 742e 2GB by default.\n+0017f350: 3c2f 703e 0a3c 703e 4578 616d 706c 653a

      .

      Example:\n+0017f360: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

      .
      struct soap\n+0017f3e0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap = soap_ne\n+0017f470: 773c 2f61 3e28 293b 203c 2f64 6976 3e0a w();
      .\n+0017f480: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      soap->s\n+0017f510: 656e 645f 7469 6d65 6f75 743c 2f61 3e20 end_timeout \n+0017f520: 3d20 3130 3b20 3c2f 6469 763e 0a3c 6469 = 10;
      .<\n+0017f540: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0017f550: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0017f560: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+0017f570: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;recv\n+0017f5c0: 5f74 696d 656f 7574 3c2f 613e 203d 2031 _timeout = 1\n+0017f5d0: 303b 203c 2f64 6976 3e0a 3c64 6976 2063 0;
      .
      soap->\n+0017f620: 3c61 2063 6c61 7373 3d22 636f 6465 2220 recv_ti\n+0017f670: 6d65 6f75 743c 2f61 3e20 3d20 3630 3b20 meout = 60; \n+0017f680: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
      .
      This will resul\n+0017f6b0: 7420 696e 2061 2074 696d 656f 7574 2069 t in a timeout i\n+0017f6c0: 6620 6e6f 2064 6174 6120 6361 6e20 6265 f no data can be\n+0017f6d0: 2073 656e 6420 696e 2031 3020 7365 636f send in 10 seco\n+0017f6e0: 6e64 7320 616e 6420 6e6f 2064 6174 6120 nds and no data \n+0017f6f0: 6973 2072 6563 6569 7665 6420 7769 7468 is received with\n+0017f700: 696e 2031 3020 7365 636f 6e64 7320 6166 in 10 seconds af\n+0017f710: 7465 7220 696e 6974 6961 7469 6e67 2061 ter initiating a\n+0017f720: 2073 656e 6420 6f72 2072 6563 6569 7665 send or receive\n+0017f730: 206f 7065 7261 7469 6f6e 206f 7665 7220 operation over \n+0017f740: 7468 6520 736f 636b 6574 2e20 4120 7661 the socket. A va\n+0017f750: 6c75 6520 6f66 207a 6572 6f20 6469 7361 lue of zero disa\n+0017f760: 626c 6573 2074 696d 656f 7574 2c20 666f bles timeout, fo\n+0017f770: 7220 6578 616d 706c 653a 3c2f 703e 0a3c r example:

      .<\n+0017f780: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+0017f790: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
      str\n+0017f7c0: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap *soap = soap_new(\n+0017f890: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
      .
      soap->\n+0017f8e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 send_ti\n+0017f930: 6d65 6f75 743c 2f61 3e20 3d20 303b 203c meout = 0; <\n+0017f940: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      s\n+0017f980: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->recv_timeou\n+0017f9e0: 743c 2f61 3e20 3d20 303b 2020 3c2f 6469 t = 0; ..<\n+0017faa0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

      When a \n+0017fac0: 7469 6d65 6f75 7420 6f63 6375 7273 2069 timeout occurs i\n+0017fad0: 6e20 7468 6520 7365 6e64 206f 7220 7265 n the send or re\n+0017fae0: 6365 6976 6520 6f70 6572 6174 696f 6e73 ceive operations\n+0017faf0: 2c20 6120 3c63 6f64 653e 2353 4f41 505f , a #SOAP_\n+0017fb00: 454f 463c 2f63 6f64 653e 2065 7863 6570 EOF excep\n+0017fb10: 7469 6f6e 2077 696c 6c20 6265 2072 6169 tion will be rai\n+0017fb20: 7365 6420 2822 656e 6420 6f66 2066 696c sed (\"end of fil\n+0017fb30: 6520 6f72 206e 6f20 696e 7075 7422 292e e or no input\").\n+0017fb40: 204e 6567 6174 6976 6520 7469 6d65 6f75 Negative timeou\n+0017fb50: 7420 7661 6c75 6573 206d 6561 7375 7265 t values measure\n+0017fb60: 2074 696d 656f 7574 7320 696e 206d 6963 timeouts in mic\n+0017fb70: 726f 7365 636f 6e64 732c 2066 6f72 2065 roseconds, for e\n+0017fb80: 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 xample:

      .
      #\n+0017fbd0: 6465 6669 6e65 2075 5365 6320 2a2d 3120 define uSec *-1 \n+0017fbe0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+0017fc00: 3c73 7061 6e20 636c 6173 733d 2270 7265 #defi\n+0017fc20: 6e65 206d 5365 6320 2a2d 3130 3030 203c ne mSec *-1000 <\n+0017fc30: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      . \n+0017fc50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      s\n+0017fc80: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap = \n+0017fcf0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_new();
      .soap-&g\n+0017fda0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;accep\n+0017fdf0: 745f 7469 6d65 6f75 743c 2f61 3e20 3d20 t_timeout = \n+0017fe00: 3130 2075 5365 633b 203c 2f64 6976 3e0a 10 uSec;
      .\n+0017fe10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      soap->s\n+0017fea0: 656e 645f 7469 6d65 6f75 743c 2f61 3e20 end_timeout \n+0017feb0: 3d20 3230 206d 5365 633b 203c 2f64 6976 = 20 mSec; .
      Warning
      Many Linu\n+00180070: 7820 7665 7273 696f 6e73 2064 6f20 6e6f x versions do no\n+00180080: 7420 7375 7070 6f72 7420 6e6f 6e2d 626c t support non-bl\n+00180090: 6f63 6b69 6e67 203c 636f 6465 3e63 6f6e ocking con\n+001800a0: 6e65 6374 2829 3c2f 636f 6465 3e2e 2054 nect(). T\n+001800b0: 6865 7265 666f 7265 2c20 7365 7474 696e herefore, settin\n+001800c0: 6720 3c63 6f64 653e 3c61 2063 6c61 7373 g \n+00180180: 736f 6170 3a3a 636f 6e6e 6563 745f 7469 soap::connect_ti\n+00180190: 6d65 6f75 743c 2f61 3e3c 2f63 6f64 653e meout\n+001801a0: 2066 6f72 206e 6f6e 2d62 6c6f 636b 696e for non-blockin\n+001801b0: 6720 3c63 6f64 653e 736f 6170 5f63 616c g soap_cal\n+001801c0: 6c5f 6e73 5f5f 7765 626d 6574 686f 643c l_ns__webmethod<\n+001801d0: 2f63 6f64 653e 2063 616c 6c73 206d 6179 /code> calls may\n+001801e0: 206e 6f74 2077 6f72 6b20 756e 6465 7220 not work under \n+001801f0: 4c69 6e75 782e 3c2f 6464 3e0a 3c64 643e Linux.
      .
      \n+00180200: 0a49 6e74 6572 7275 7074 7320 2845 494e .Interrupts (EIN\n+00180210: 5452 2920 6361 6e20 6166 6665 6374 2074 TR) can affect t\n+00180220: 6865 2062 6c6f 636b 696e 6720 7469 6d65 he blocking time\n+00180230: 2069 6e20 492f 4f20 6f70 6572 6174 696f in I/O operatio\n+00180240: 6e73 2e20 5468 6520 6d61 7869 6d75 6d20 ns. The maximum \n+00180250: 6e75 6d62 6572 206f 6620 4549 4e54 5220 number of EINTR \n+00180260: 7468 6174 2077 696c 6c20 6e6f 7420 7472 that will not tr\n+00180270: 6967 6765 7220 616e 2065 7272 6f72 2069 igger an error i\n+00180280: 7320 7365 7420 6279 203c 636f 6465 3e23 s set by #\n+00180290: 534f 4150 5f4d 4158 4549 4e54 523c 2f63 SOAP_MAXEINTR in gsoap/stdsoap2\n+001802c0: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 .h, \n+001802d0: 7768 6963 6820 6973 2031 3020 6279 2064 which is 10 by d\n+001802e0: 6566 6175 6c74 2e20 4561 6368 2045 494e efault. Each EIN\n+001802f0: 5452 206d 6179 2069 6e63 7265 6173 6520 TR may increase \n+00180300: 7468 6520 626c 6f63 6b69 6e67 2074 696d the blocking tim\n+00180310: 6520 6279 2075 7020 746f 206f 6e65 2073 e by up to one s\n+00180320: 6563 6f6e 642c 2075 7020 746f 203c 636f econd, up to #SOAP_MAXEINT\n+00180340: 523c 2f63 6f64 653e 2073 6563 6f6e 6473 R seconds\n+00180350: 2074 6f74 616c 2e3c 2f64 643e 3c2f 646c total.
      .

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

      .

      .Closing conne\n+001803d0: 6374 696f 6e73 2062 7920 666f 7263 653c ctions by force<\n+001803e0: 2f68 323e 0a3c 703e 546f 2063 6c6f 7365 /h2>.

      To close\n+001803f0: 2061 2073 6f63 6b65 7420 636f 6e6e 6563 a socket connec\n+00180400: 7469 6f6e 2062 7920 666f 7263 652c 2079 tion by force, y\n+00180410: 6f75 2063 616e 2075 7365 203c 636f 6465 ou can use soap_force_clos\n+00180430: 6573 6f63 6b28 736f 6170 293c 2f63 6f64 esock(soap), which closes\n+00180450: 2074 6865 2063 6f6e 6e65 6374 696f 6e20 the connection \n+00180460: 7265 6761 7264 6c65 7373 2069 6620 6b65 regardless if ke\n+00180470: 6570 2d61 6c69 7665 2069 7320 6163 7469 ep-alive is acti\n+00180480: 7665 2e20 4279 2063 6f6e 7472 6173 742c ve. By contrast,\n+00180490: 203c 636f 6465 3e73 6f61 705f 636c 6f73 soap_clos\n+001804a0: 6573 6f63 6b28 736f 6170 293c 2f63 6f64 esock(soap) only closes t\n+001804c0: 6865 2063 6f6e 6e65 6374 696f 6e20 7768 he connection wh\n+001804d0: 656e 206b 6565 702d 616c 6976 6520 6973 en keep-alive is\n+001804e0: 206e 6f74 2061 6374 6976 652e 3c2f 703e not active.

      \n+001804f0: 0a3c 703e 546f 2066 6f72 6365 2d63 6c6f .

      To force-clo\n+00180500: 7365 2061 2063 6f6e 6e65 6374 696f 6e20 se a connection \n+00180510: 6672 6f6d 2061 6e6f 7468 6572 2074 6872 from another thr\n+00180520: 6561 642c 2063 6f6d 7069 6c65 2073 7464 ead, compile std\n+00180530: 736f 6170 322e 6320 6f72 2073 7464 736f soap2.c or stdso\n+00180540: 6170 322e 6370 7020 616e 6420 796f 7572 ap2.cpp and your\n+00180550: 2070 726f 6a65 6374 2073 6f75 7263 6520 project source \n+00180560: 636f 6465 2077 6974 6820 3c63 6f64 653e code with \n+00180570: 2357 4954 485f 5345 4c46 5f50 4950 453c #WITH_SELF_PIPE<\n+00180580: 2f63 6f64 653e 2074 6f20 656e 6162 6c65 /code> to enable\n+00180590: 2074 6869 7320 6665 6174 7572 652e 2055 this feature. U\n+001805a0: 7365 203c 636f 6465 3e73 6f61 705f 636c se soap_cl\n+001805b0: 6f73 655f 636f 6e6e 6563 7469 6f6e 2873 ose_connection(s\n+001805c0: 6f61 7029 3c2f 636f 6465 3e20 6f6e 2074 oap) on t\n+001805d0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap context tha\n+00180640: 7420 6d75 7374 2063 6c6f 7365 2e20 596f t must close. Yo\n+00180650: 7520 6361 6e20 6d61 6b65 2074 6869 7320 u can make this \n+00180660: 6361 6c6c 2066 726f 6d20 616e 6f74 6865 call from anothe\n+00180670: 7220 7468 7265 6164 2061 6e64 2070 6173 r thread and pas\n+00180680: 7320 7468 6520 3c63 6f64 653e 3c61 2063 s the soap\n+001806e0: 3c2f 636f 6465 3e20 636f 6e74 6578 7420 context \n+001806f0: 746f 2074 6869 7320 6675 6e63 7469 6f6e to this function\n+00180700: 206f 6620 7468 6520 7468 7265 6164 2074 of the thread t\n+00180710: 6861 7420 6d75 7374 2063 6c6f 7365 2063 hat must close c\n+00180720: 6f6e 6e65 6374 696f 6e73 2e3c 2f70 3e0a onnections.

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

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

      .

      .\n+00180790: 536f 636b 6574 206f 7074 696f 6e73 2061 Socket options a\n+001807a0: 6e64 2066 6c61 6773 3c2f 6832 3e0a 3c70 nd flags

      .Socket communic\n+001807c0: 6174 696f 6e73 2063 616e 2062 6520 636f ations can be co\n+001807d0: 6e74 726f 6c6c 6564 2077 6974 6820 736f ntrolled with so\n+001807e0: 636b 6574 206f 7074 696f 6e73 2061 6e64 cket options and\n+001807f0: 2066 6c61 6773 2e20 5468 6520 3c63 6f64 flags. The so\n+00180850: 6170 3c2f 613e 3c2f 636f 6465 3e20 636f ap
      co\n+00180860: 6e74 6578 7420 666c 6167 7320 6172 653a ntext flags are:\n+00180870: 3c2f 703e 0a3c 756c 3e0a 3c6c 693e 3c63

      .
      .\n+00180fd0: 3c70 3e53 6565 2074 6865 206f 7065 7261

      See the opera\n+00180fe0: 7469 6e67 2073 7973 7465 6d20 6d61 6e75 ting system manu\n+00180ff0: 616c 2070 6167 6573 206f 6620 3c63 6f64 al pages of send an\n+00181010: 6420 3c63 6f64 653e 7265 6376 3c2f 636f d recv for soap::sock\n+001810f0: 6574 5f66 6c61 6773 3c2f 613e 3c2f 636f et_flags values and s\n+00181110: 6565 2074 6865 206f 7065 7261 7469 6e67 ee the operating\n+00181120: 2073 7973 7465 6d20 6d61 6e75 616c 2070 system manual p\n+00181130: 6167 6573 206f 6620 3c63 6f64 653e 7365 ages of se\n+00181140: 7473 6f63 6b6f 7074 3c2f 636f 6465 3e20 tsockopt \n+00181150: 666f 7220 3c63 6f64 653e 3c61 2063 6c61 for soap::connect_\n+00181220: 666c 6167 733c 2f61 3e3c 2f63 6f64 653e flags\n+00181230: 2c20 3c63 6f64 653e 3c61 2063 6c61 7373 , \n+001812f0: 736f 6170 3a3a 6269 6e64 5f66 6c61 6773 soap::bind_flags\n+00181300: 3c2f 613e 3c2f 636f 6465 3e2c 2061 6e64 , and\n+00181310: 203c 636f 6465 3e3c 6120 636c 6173 733d s\n+001813d0: 6f61 703a 3a61 6363 6570 745f 666c 6167 oap::accept_flag\n+001813e0: 733c 2f61 3e3c 2f63 6f64 653e 2028 6c65 s (le\n+001813f0: 7665 6c20 3c63 6f64 653e 534f 4c5f 534f vel SOL_SO\n+00181400: 434b 4554 3c2f 636f 6465 3e29 2076 616c CKET) val\n+00181410: 7565 732e 2054 6865 7365 203c 636f 6465 ues. These SO_ sock\n+00181430: 6574 206f 7074 696f 6e20 666c 6167 7320 et option flags \n+00181440: 2873 6565 203c 636f 6465 3e73 6574 736f (see setso\n+00181450: 636b 6f70 743c 2f63 6f64 653e 206d 616e ckopt man\n+00181460: 7561 6c20 7061 6765 7329 2063 616e 2062 ual pages) can b\n+00181470: 6520 6269 742d 7769 7365 206f 722d 6564 e bit-wise or-ed\n+00181480: 2074 6f20 7365 7420 6d75 6c74 6970 6c65 to set multiple\n+00181490: 2073 6f63 6b65 7420 6f70 7469 6f6e 7320 socket options \n+001814a0: 6174 206f 6e63 652e 3c2f 703e 0a3c 703e at once.

      .

      \n+001814b0: 5468 6520 636c 6965 6e74 2d73 6964 6520 The client-side \n+001814c0: 666c 6167 203c 636f 6465 3e3c 6120 636c flag soap::connect\n+00181590: 5f66 6c61 6773 3c2f 613e 3c2f 636f 6465 _flags = SO_LIN\n+001815b0: 4745 523c 2f63 6f64 653e 2069 7320 7375 GER is su\n+001815c0: 7070 6f72 7465 6420 7769 7468 2076 616c pported with val\n+001815d0: 7565 7320 3c63 6f64 653e 6c5f 6f6e 6f66 ues l_onof\n+001815e0: 663c 2f63 6f64 653e 203d 2031 2061 6e64 f = 1 and\n+001815f0: 203c 636f 6465 3e6c 5f6c 696e 6765 723c l_linger<\n+00181600: 2f63 6f64 653e 203d 203c 636f 6465 3e3c /code> = <\n+00181610: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00181620: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00181630: 6d6c 2361 3066 3464 3032 3530 3533 6664 ml#a0f4d025053fd\n+00181640: 6537 3732 3136 6130 6361 3637 3430 3737 e77216a0ca674077\n+00181650: 3139 3864 2220 7469 746c 653d 2255 7365 198d\" title=\"Use\n+00181660: 722d 6465 6669 6e61 626c 6520 6c69 6e67 r-definable ling\n+00181670: 6572 2074 696d 6520 7661 6c75 652c 2072 er time value, r\n+00181680: 6571 7569 7265 7320 7468 6520 534f 5f4c equires the SO_L\n+00181690: 494e 4745 5220 7365 7473 6f63 6b6f 7074 INGER setsockopt\n+001816a0: 2066 6c61 6720 7661 6c75 6520 746f 2062 flag value to b\n+001816b0: 6520 6173 7369 676e 6564 2074 6f20 736f e assigned to so\n+001816c0: 6170 2e2e 2e22 3e73 6f61 703a 3a6c 696e ap...\">soap::lin\n+001816d0: 6765 725f 7469 6d65 3c2f 613e 3c2f 636f ger_time. The <\n+001816f0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00181700: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00181710: 6d6c 2361 3066 3464 3032 3530 3533 6664 ml#a0f4d025053fd\n+00181720: 6537 3732 3136 6130 6361 3637 3430 3737 e77216a0ca674077\n+00181730: 3139 3864 2220 7469 746c 653d 2255 7365 198d\" title=\"Use\n+00181740: 722d 6465 6669 6e61 626c 6520 6c69 6e67 r-definable ling\n+00181750: 6572 2074 696d 6520 7661 6c75 652c 2072 er time value, r\n+00181760: 6571 7569 7265 7320 7468 6520 534f 5f4c equires the SO_L\n+00181770: 494e 4745 5220 7365 7473 6f63 6b6f 7074 INGER setsockopt\n+00181780: 2066 6c61 6720 7661 6c75 6520 746f 2062 flag value to b\n+00181790: 6520 6173 7369 676e 6564 2074 6f20 736f e assigned to so\n+001817a0: 6170 2e2e 2e22 3e73 6f61 703a 3a6c 696e ap...\">soap::lin\n+001817b0: 6765 725f 7469 6d65 3c2f 613e 3c2f 636f ger_time determines t\n+001817d0: 6865 2077 6169 7420 7469 6d65 2028 7468 he wait time (th\n+001817e0: 6520 7469 6d65 2072 6573 6f6c 7574 696f e time resolutio\n+001817f0: 6e20 6973 2073 7973 7465 6d20 6465 7065 n is system depe\n+00181800: 6e64 656e 742c 2074 686f 7567 6820 6163 ndent, though ac\n+00181810: 636f 7264 696e 6720 746f 2073 6f6d 6520 cording to some \n+00181820: 6578 7065 7274 7320 6f6e 6c79 207a 6572 experts only zer\n+00181830: 6f20 616e 6420 6e6f 6e7a 6572 6f20 7661 o and nonzero va\n+00181840: 6c75 6573 206d 6174 7465 7229 2e20 5468 lues matter). Th\n+00181850: 6520 6c69 6e67 6572 206f 7074 696f 6e20 e linger option \n+00181860: 6361 6e20 6265 2075 7365 6420 746f 206d can be used to m\n+00181870: 616e 6167 6520 7468 6520 6e75 6d62 6572 anage the number\n+00181880: 206f 6620 636f 6e6e 6563 7469 6f6e 7320 of connections \n+00181890: 7468 6174 2072 656d 6169 6e20 696e 203c that remain in <\n+001818a0: 636f 6465 3e54 494d 455f 5741 4954 3c2f code>TIME_WAIT state at t\n+001818c0: 6865 2073 6572 7665 7220 7369 6465 2e3c he server side.<\n+001818d0: 2f70 3e0a 3c70 3e46 6f72 2065 7861 6d70 /p>.

      For examp\n+001818e0: 6c65 2c20 746f 2064 6973 6162 6c65 2053 le, to disable S\n+001818f0: 4947 5049 5045 2073 6967 6e61 6c73 206f IGPIPE signals o\n+00181900: 6e20 556e 6978 2f4c 696e 7578 2070 6c61 n Unix/Linux pla\n+00181910: 7466 6f72 6d73 2075 7365 3a20 3c63 6f64 tforms use: soap::\n+001819e0: 736f 636b 6574 5f66 6c61 6773 3c2f 613e socket_flags\n+001819f0: 3c2f 636f 6465 3e20 3d20 3c63 6f64 653e = \n+00181a00: 4d53 475f 4e4f 5349 474e 414c 3c2f 636f MSG_NOSIGNAL and/or soap::c\n+00181ae0: 6f6e 6e65 6374 5f66 6c61 6773 3c2f 613e onnect_flags\n+00181af0: 3c2f 636f 6465 3e20 3d20 3c63 6f64 653e = \n+00181b00: 534f 5f4e 4f53 4947 5049 5045 3c2f 636f SO_NOSIGPIPE (i.e. client\n+00181b20: 2d73 6964 6520 636f 6e6e 6563 7429 2064 -side connect) d\n+00181b30: 6570 656e 6469 6e67 206f 6e20 796f 7572 epending on your\n+00181b40: 2070 6c61 7466 6f72 6d2e 3c2f 703e 0a3c platform.

      .<\n+00181b50: 703e 5573 6520 3c63 6f64 653e 3c61 2063 p>Use soap::bind_f\n+00181c20: 6c61 6773 3c2f 613e 3c2f 636f 6465 3e20 lags \n+00181c30: 3d20 3c63 6f64 653e 534f 5f52 4555 5345 = SO_REUSE\n+00181c40: 4144 4452 3c2f 636f 6465 3e20 746f 2065 ADDR to e\n+00181c50: 6e61 626c 6520 7365 7276 6572 2d73 6964 nable server-sid\n+00181c60: 6520 706f 7274 2072 6575 7365 2061 6e64 e port reuse and\n+00181c70: 206c 6f63 616c 2070 6f72 7420 7368 6172 local port shar\n+00181c80: 696e 6720 2862 7574 2062 6520 6177 6172 ing (but be awar\n+00181c90: 6520 6f66 2074 6865 2070 6f73 7369 626c e of the possibl\n+00181ca0: 6520 7365 6375 7269 7479 2069 6d70 6c69 e security impli\n+00181cb0: 6361 7469 6f6e 7320 7375 6368 2061 7320 cations such as \n+00181cc0: 706f 7274 2068 696a 6163 6b69 6e67 292e port hijacking).\n+00181cd0: 3c2f 703e 0a3c 703e 4e6f 7465 2074 6861

      .

      Note tha\n+00181ce0: 7420 796f 7520 6861 7665 2061 6363 6573 t you have acces\n+00181cf0: 7320 746f 2074 6865 203c 636f 6465 3e3c s to the <\n+00181d00: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+00181d10: 663d 2273 7472 7563 7473 6f61 702e 6874 f=\"structsoap.ht\n+00181d20: 6d6c 2220 7469 746c 653d 2243 6f6e 7465 ml\" title=\"Conte\n+00181d30: 7874 2077 6974 6820 7468 6520 656e 6769 xt with the engi\n+00181d40: 6e65 2073 7461 7465 2e22 3e73 6f61 703c ne state.\">soap<\n+00181d50: 2f61 3e2d 2667 743b 6d61 7374 6572 3c2f /a>->master socket val\n+00181d70: 7565 2072 6574 7572 6e65 6420 6279 203c ue returned by <\n+00181d80: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_bind<\n+00181e00: 2f61 3e3c 2f63 6f64 653e 2073 6f20 796f /a> so yo\n+00181e10: 7520 6361 6e20 7365 7420 6d75 6c74 6970 u can set multip\n+00181e20: 6c65 2073 6f63 6b65 7420 6f70 7469 6f6e le socket option\n+00181e30: 7320 6279 2063 616c 6c69 6e67 203c 636f s by calling setsockopt as follows:\n+00181e60: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

      .
      .<\n+00182000: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00182010: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >if (soap_val\n+00182090: 6964 5f73 6f63 6b65 743c 2f61 3e28 736f id_socket(so\n+001820a0: 636b 2929 203c 2f64 6976 3e0a 3c64 6976 ck))
      .{<\n+001820c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      setsoc\n+001820e0: 6b6f 7074 2873 6f63 6b2c 202e 2e2e 2c20 kopt(sock, ..., \n+001820f0: 2e2e 2e2c 202e 2e2e 2c20 2e2e 2e29 3b3c ..., ..., ...);<\n+00182100: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      setsoc\n+00182120: 6b6f 7074 2873 6f63 6b2c 202e 2e2e 2c20 kopt(sock, ..., \n+00182130: 2e2e 2e2c 202e 2e2e 2c20 2e2e 2e29 3b3c ..., ..., ...);<\n+00182140: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

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

      .Overriding th\n+001821d0: 6520 686f 7374 2061 6e64 2070 6f72 7420 e host and port \n+001821e0: 746f 2063 6f6e 6e65 6374 3c2f 6832 3e0a to connect

      .\n+001821f0: 3c70 3e54 6f20 6f76 6572 7269 6465 2074

      To override t\n+00182200: 6865 2068 6f73 7420 616e 6420 706f 7274 he host and port\n+00182210: 206f 6620 7468 6520 636c 6965 6e74 2063 of the client c\n+00182220: 6f6e 6e65 6374 696e 6720 746f 2061 2073 onnecting to a s\n+00182230: 6572 7665 722c 2073 6574 203c 636f 6465 erver, set soap::o\n+00182300: 7665 7272 6964 655f 686f 7374 3c2f 613e verride_host\n+00182310: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and soap::\n+001823e0: 6f76 6572 7269 6465 5f70 6f72 743c 2f61 override_port:

      .
      soa\n+00182450: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->override_host\n+001824b0: 3c2f 613e 203d 203c 7370 616e 2063 6c61 = "example\n+001824e0: 2e63 6f6d 2671 756f 743b 3c2f 7370 616e .com"; // host\n+00182510: 206e 616d 6520 6f72 2049 5020 6164 6472 name or IP addr\n+00182520: 6573 7320 3c2f 7370 616e 3e3c 2f64 6976 ess ..
      <\n+001826f0: 6469 7620 636c 6173 733d 2274 7464 6563 div class=\"ttdec\n+00182700: 6922 3e63 6f6e 7374 2063 6861 7220 2a20 i\">const char * \n+00182710: 6f76 6572 7269 6465 5f68 6f73 743c 2f64 override_host
      User-defin\n+00182740: 6162 6c65 2073 7472 696e 6720 746f 206f able string to o\n+00182750: 7665 7272 6964 6520 7468 6520 686f 7374 verride the host\n+00182760: 206e 616d 6520 6f72 2049 5020 6164 6472 name or IP addr\n+00182770: 6573 7320 696e 2074 6865 2048 5454 5020 ess in the HTTP \n+00182780: 6865 6164 6572 2077 6865 6e20 636f 6e6e header when conn\n+00182790: 6563 7469 6e67 2061 7420 742e 2e2e 3c2f ecting at t...
      Defini\n+001827c0: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+001827d0: 7032 2e68 3a34 3035 343c 2f64 6976 3e3c p2.h:4054
      <\n+001827e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      <\n+00182830: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+00182840: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e\">s\n+00182880: 6f61 703a 3a6f 7665 7272 6964 655f 706f oap::override_po\n+00182890: 7274 3c2f 613e 3c2f 6469 763e 3c64 6976 rt
      \n+001828b0: 696e 7420 6f76 6572 7269 6465 5f70 6f72 int override_por\n+001828c0: 743c 2f64 6976 3e3c 6469 7620 636c 6173 t
      User-d\n+001828e0: 6566 696e 6162 6c65 2070 6f72 7420 6e75 efinable port nu\n+001828f0: 6d62 6572 2074 6f20 6f76 6572 7269 6465 mber to override\n+00182900: 2074 6865 2070 6f72 7420 6164 6472 6573 the port addres\n+00182910: 7320 696e 2074 6865 2048 5454 5020 6865 s in the HTTP he\n+00182920: 6164 6572 2077 6865 6e20 636f 6e6e 6563 ader when connec\n+00182930: 7469 6e67 2061 7420 7468 6520 636c 692e ting at the cli.\n+00182940: 2e2e 3c2f 6469 763e 3c64 6976 2063 6c61 ..
      De\n+00182960: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st\n+00182970: 6473 6f61 7032 2e68 3a34 3035 393c 2f64 dsoap2.h:4059
      .
      \n+00182990: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

      The soap_ssl_\n+00185e80: 7365 7276 6572 5f63 6f6e 7465 7874 3c2f server_context functi\n+00185ea0: 6f6e 2069 6e69 7469 616c 697a 6573 2074 on initializes t\n+00185eb0: 6865 2073 6572 7665 722d 7369 6465 2053 he server-side S\n+00185ec0: 534c 2063 6f6e 7465 7874 2e20 5468 6520 SL context. The \n+00185ed0: 3c65 6d3e 3c63 6f64 653e 7365 7276 6572 server\n+00185ee0: 2e70 656d 3c2f 636f 6465 3e3c 2f65 6d3e .pem\n+00185ef0: 206b 6579 2066 696c 6520 6973 2074 6865 key file is the\n+00185f00: 2073 6572 7665 7227 7320 7072 6976 6174 server's privat\n+00185f10: 6520 6b65 7920 636f 6e63 6174 656e 6174 e key concatenat\n+00185f20: 6564 2077 6974 6820 6974 7320 6365 7274 ed with its cert\n+00185f30: 6966 6963 6174 652e 2054 6865 203c 656d ificate. The cacert.pe\n+00185f50: 6d3c 2f63 6f64 653e 3c2f 656d 3e20 6973 m is\n+00185f60: 2075 7365 6420 746f 2061 7574 6865 6e74 used to authent\n+00185f70: 6963 6174 6520 636c 6965 6e74 7320 616e icate clients an\n+00185f80: 6420 636f 6e74 6169 6e73 2074 6865 2063 d contains the c\n+00185f90: 6c69 656e 7420 6365 7274 6966 6963 6174 lient certificat\n+00185fa0: 6573 2e20 416c 7465 726e 6174 6976 656c es. Alternativel\n+00185fb0: 7920 6120 6469 7265 6374 6f72 7920 6e61 y a directory na\n+00185fc0: 6d65 2063 616e 2062 6520 7370 6563 6966 me can be specif\n+00185fd0: 6965 642e 2054 6869 7320 6469 7265 6374 ied. This direct\n+00185fe0: 6f72 7920 6973 2061 7373 756d 6564 2074 ory is assumed t\n+00185ff0: 6f20 636f 6e74 6169 6e20 7468 6520 6365 o contain the ce\n+00186000: 7274 6966 6963 6174 6573 2e20 5468 6520 rtificates. The \n+00186010: 3c65 6d3e 3c63 6f64 653e 6468 3531 322e dh512.\n+00186020: 7065 6d3c 2f63 6f64 653e 3c2f 656d 3e20 pem \n+00186030: 6669 6c65 2073 7065 6369 6669 6573 2074 file specifies t\n+00186040: 6861 7420 4448 2077 696c 6c20 6265 2075 hat DH will be u\n+00186050: 7365 6420 666f 7220 6b65 7920 6167 7265 sed for key agre\n+00186060: 656d 656e 7420 696e 7374 6561 6420 6f66 ement instead of\n+00186070: 2052 5341 2e20 4120 6e75 6d65 7269 6320 RSA. A numeric \n+00186080: 7661 6c75 6520 6772 6561 7465 7220 7468 value greater th\n+00186090: 616e 2035 3132 2063 616e 2062 6520 7072 an 512 can be pr\n+001860a0: 6f76 6964 6564 2069 6e73 7465 6164 2061 ovided instead a\n+001860b0: 7320 6120 7374 7269 6e67 2063 6f6e 7374 s a string const\n+001860c0: 616e 7420 2865 2e67 2e20 3c63 6f64 653e ant (e.g. \n+001860d0: 2235 3132 223c 2f63 6f64 653e 2920 746f \"512\") to\n+001860e0: 2061 6c6c 6f77 2074 6865 2065 6e67 696e allow the engin\n+001860f0: 6520 746f 2067 656e 6572 6174 6520 7468 e to generate th\n+00186100: 6520 4448 2070 6172 616d 6574 6572 7320 e DH parameters \n+00186110: 6f6e 2074 6865 2066 6c79 2028 7468 6973 on the fly (this\n+00186120: 2063 616e 2074 616b 6520 6120 7768 696c can take a whil\n+00186130: 6529 2072 6174 6865 7220 7468 616e 2072 e) rather than r\n+00186140: 6574 7269 6576 696e 6720 7468 656d 2066 etrieving them f\n+00186150: 726f 6d20 6120 6669 6c65 2e20 5468 6520 rom a file. The \n+00186160: 7261 6e64 6669 6c65 2065 6e74 7279 2063 randfile entry c\n+00186170: 616e 2062 6520 7573 6564 2074 6f20 7365 an be used to se\n+00186180: 6564 2074 6865 2050 524e 472e 2054 6865 ed the PRNG. The\n+00186190: 206c 6173 7420 656e 7472 7920 656e 6162 last entry enab\n+001861a0: 6c65 2073 6572 7665 722d 7369 6465 2073 le server-side s\n+001861b0: 6573 7369 6f6e 2063 6163 6869 6e67 2074 ession caching t\n+001861c0: 6f20 7370 6565 6420 7570 2054 4c53 2e20 o speed up TLS. \n+001861d0: 4120 756e 6971 7565 2073 6572 7665 7220 A unique server \n+001861e0: 6e61 6d65 2069 7320 7265 7175 6972 6564 name is required\n+001861f0: 2e3c 2f70 3e0a 3c70 3e59 6f75 2063 616e .

      .

      You can\n+00186200: 2073 7065 6369 6679 2061 2063 6970 6865 specify a ciphe\n+00186210: 7220 6c69 7374 2074 6f20 7573 6520 7769 r list to use wi\n+00186220: 7468 2054 4c53 7631 2e32 2061 6e64 2062 th TLSv1.2 and b\n+00186230: 656c 6f77 2077 6974 6820 3c63 6f64 653e elow with \n+00186240: 5353 4c5f 4354 585f 7365 745f 6369 7068 SSL_CTX_set_ciph\n+00186250: 6572 5f6c 6973 7428 736f 6170 2d26 6774 er_list(soap->\n+00186260: 3b63 7478 2c20 222e 2e2e 2229 3c2f 636f ;ctx, \"...\") where \n+00186280: 736f 6170 2d26 6774 3b63 7478 3c2f 636f soap->ctx is the SSL c\n+001862a0: 6f6e 7465 7874 2063 7265 6174 6564 2062 ontext created b\n+001862b0: 7920 3c63 6f64 653e 3c61 2063 6c61 7373 y soap_\n+00186340: 7373 6c5f 7365 7276 6572 5f63 6f6e 7465 ssl_server_conte\n+00186350: 7874 2829 3c2f 613e 3c2f 636f 6465 3e2e xt().\n+00186360: 204c 696b 6577 6973 652c 2075 7365 203c Likewise, use <\n+00186370: 636f 6465 3e53 534c 5f43 5458 5f73 6574 code>SSL_CTX_set\n+00186380: 5f63 6970 6865 7273 7569 7465 7328 736f _ciphersuites(so\n+00186390: 6170 2d26 6774 3b63 7478 2c20 222e 2e2e ap->ctx, \"...\n+001863a0: 2229 3c2f 636f 6465 3e20 746f 2063 6f6e \") to con\n+001863b0: 6669 6775 7265 2074 6865 2061 7661 696c figure the avail\n+001863c0: 6162 6c65 2054 4c53 7631 2e33 2063 6970 able TLSv1.3 cip\n+001863d0: 6865 7273 7569 7465 732e 3c2f 703e 0a3c hersuites.

      .<\n+001863e0: 703e 5765 2072 6566 6572 2074 6f20 7468 p>We refer to th\n+001863f0: 6520 4f70 656e 5353 4c20 646f 6375 6d65 e OpenSSL docume\n+00186400: 6e74 6174 696f 6e20 616e 6420 6d61 6e75 ntation and manu\n+00186410: 616c 2070 6167 6573 206f 6620 3c63 6f64 al pages of SSL_CTX_set_ci\n+00186430: 7068 6572 5f6c 6973 743c 2f63 6f64 653e pher_list\n+00186440: 2061 6e64 203c 636f 6465 3e53 534c 5f43 and SSL_C\n+00186450: 5458 5f73 6574 5f63 6970 6865 7273 7569 TX_set_ciphersui\n+00186460: 7465 733c 2f63 6f64 653e 2066 6f72 2064 tes for d\n+00186470: 6574 6169 6c73 206f 6e20 7468 6520 6c61 etails on the la\n+00186480: 7465 7374 2063 6970 6865 7220 6c69 7374 test cipher list\n+00186490: 7320 616e 6420 7375 6974 6573 2061 7661 s and suites ava\n+001864a0: 696c 6162 6c65 2074 6f20 7573 652e 3c2f ilable to use..

      The GNUTLS\n+001864c0: 206d 7574 6578 206c 6f63 6b20 7365 7475 mutex lock setu\n+001864d0: 7020 6973 2061 7574 6f6d 6174 6963 616c p is automatical\n+001864e0: 6c79 2070 6572 666f 726d 6564 2069 6e20 ly performed in \n+001864f0: 7468 6520 656e 6769 6e65 2c20 6275 7420 the engine, but \n+00186500: 6f6e 6c79 2077 6865 6e20 504f 5349 5820 only when POSIX \n+00186510: 7468 7265 6164 7320 6172 6520 6465 7465 threads are dete\n+00186520: 6374 6564 2061 6e64 2061 7661 696c 6162 cted and availab\n+00186530: 6c65 2e3c 2f70 3e0a 3c70 3e41 6c6c 204f le.

      .

      All O\n+00186540: 7065 6e53 534c 2076 6572 7369 6f6e 7320 penSSL versions \n+00186550: 7072 696f 7220 746f 2031 2e31 2e30 2072 prior to 1.1.0 r\n+00186560: 6571 7569 7265 206d 7574 6578 206c 6f63 equire mutex loc\n+00186570: 6b73 2074 6f20 6265 2065 7870 6c69 6369 ks to be explici\n+00186580: 746c 7920 7365 7420 7570 2069 6e20 796f tly set up in yo\n+00186590: 7572 2063 6f64 6520 666f 7220 6d75 6c74 ur code for mult\n+001865a0: 692d 7468 7265 6164 6564 2061 7070 6c69 i-threaded appli\n+001865b0: 6361 7469 6f6e 7320 6279 2063 616c 6c69 cations by calli\n+001865c0: 6e67 203c 636f 6465 3e3c 6120 636c 6173 ng CRYPTO_\n+00186690: 7468 7265 6164 5f73 6574 7570 2829 3c2f thread_setup() and CRYPTO_thread_c\n+00186750: 6c65 616e 7570 2829 3c2f 613e 3c2f 636f leanup() as was shown\n+00186770: 2069 6e20 7468 6520 636f 6465 2061 626f in the code abo\n+00186780: 7665 2e20 4f70 656e 5353 4c20 312e 312e ve. OpenSSL 1.1.\n+00186790: 3020 616e 6420 6772 6561 7465 7220 646f 0 and greater do\n+001867a0: 6573 206e 6f74 2072 6571 7569 7265 2074 es not require t\n+001867b0: 6865 7365 206c 6f63 6b73 2074 6f20 6265 hese locks to be\n+001867c0: 2073 6574 2075 702e 2049 6620 796f 7520 set up. If you \n+001867d0: 6172 6520 6e6f 7420 7375 7265 2077 6869 are not sure whi\n+001867e0: 6368 2076 6572 7369 6f6e 206f 6620 4f70 ch version of Op\n+001867f0: 656e 5353 4c20 796f 7520 6d61 7920 6265 enSSL you may be\n+00186800: 2075 7369 6e67 2077 6974 6820 796f 7572 using with your\n+00186810: 206d 756c 7469 2d74 6872 6561 6465 6420 multi-threaded \n+00186820: 6170 706c 6963 6174 696f 6e2c 2074 6865 application, the\n+00186830: 6e20 7365 7420 7570 2074 6865 206c 6f63 n set up the loc\n+00186840: 6b73 2e3c 2f70 3e0a 3c70 3e46 6f72 2055 ks.

      .

      For U\n+00186850: 6e69 7820 616e 6420 4c69 6e75 782c 206d nix and Linux, m\n+00186860: 616b 6520 7375 7265 2079 6f75 2068 6176 ake sure you hav\n+00186870: 6520 7369 676e 616c 2068 616e 646c 6572 e signal handler\n+00186880: 7320 7365 7420 696e 2079 6f75 7220 7365 s set in your se\n+00186890: 7276 6963 6520 616e 642f 6f72 2063 6c69 rvice and/or cli\n+001868a0: 656e 7420 6170 706c 6963 6174 696f 6e73 ent applications\n+001868b0: 2074 6f20 6361 7463 6820 6272 6f6b 656e to catch broken\n+001868c0: 2063 6f6e 6e65 6374 696f 6e73 2028 3c63 connections (SIGPIPE):

      .
      <\n+00186900: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00186910: 3e73 6967 6e61 6c28 5349 4750 4950 452c >signal(SIGPIPE,\n+00186920: 2073 6967 7069 7065 5f68 616e 646c 6529 sigpipe_handle)\n+00186930: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
      .
      <\n+00186950: 703e 7768 6572 652c 2066 6f72 2065 7861 p>where, for exa\n+00186960: 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 2063 mple:

      .
      \n+00186980: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      void\n+001869b0: 3c2f 7370 616e 3e20 7369 6770 6970 655f sigpipe_\n+001869c0: 6861 6e64 6c65 283c 7370 616e 2063 6c61 handle(int x) {\n+001869f0: 207d 3c2f 6469 763e 0a3c 2f64 6976 3e3c }
      .
      <\n+00186a00: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+00186a10: 3c70 3e42 7920 6465 6661 756c 742c 2063

      By default, c\n+00186a20: 6c69 656e 7473 2061 7265 206e 6f74 2072 lients are not r\n+00186a30: 6571 7569 7265 6420 746f 2061 7574 6865 equired to authe\n+00186a40: 6e74 6963 6174 652e 2054 6f20 7265 7175 nticate. To requ\n+00186a50: 6972 6520 636c 6965 6e74 2061 7574 6865 ire client authe\n+00186a60: 6e74 6963 6174 696f 6e20 7573 6520 7468 ntication use th\n+00186a70: 6520 666f 6c6c 6f77 696e 673a 3c2f 703e e following:

      \n+00186a80: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
      if (s\n+00186b20: 6f61 705f 7373 6c5f 7365 7276 6572 5f63 oap_ssl_server_c\n+00186b30: 6f6e 7465 7874 3c2f 613e 2826 616d 703b ontext(&\n+00186b40: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00186b70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      S\n+00186be0: 4f41 505f 5353 4c5f 5245 5155 4952 455f OAP_SSL_REQUIRE_\n+00186bf0: 434c 4945 4e54 5f41 5554 4845 4e54 4943 CLIENT_AUTHENTIC\n+00186c00: 4154 494f 4e3c 2f61 3e2c 203c 2f64 6976 ATION, .
      "server\n+00186c50: 2e70 656d 2671 756f 743b 3c2f 7370 616e .pem",
      .
      \n+00186c80: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo\n+00186ca0: 743b 7061 7373 776f 7264 2671 756f 743b t;password"\n+00186cb0: 3c2f 7370 616e 3e2c 203c 2f64 6976 3e0a ,
      .\n+00186cc0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      "cacert.p\n+00186d00: 656d 2671 756f 743b 3c2f 7370 616e 3e2c em",\n+00186d10: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      NU\n+00186d30: 4c4c 2c20 3c2f 6469 763e 0a3c 6469 7620 LL,
      .
      \n+00186d50: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+00186d70: 6f74 3b64 6835 3132 2e70 656d 2671 756f ot;dh512.pem&quo\n+00186d80: 743b 3c2f 7370 616e 3e2c 203c 2f64 6976 t;, .
      NULL, .
      NULL)\n+00186dd0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
      .
      {.\n+001870a0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
      Definition\n+001870c0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n+001870d0: 3a35 3835 343c 2f64 6976 3e3c 2f64 6976 :5854
      .

      This\n+00187100: 2072 6571 7569 7265 7320 6561 6368 2063 requires each c\n+00187110: 6c69 656e 7420 746f 2061 7574 6865 6e74 lient to authent\n+00187120: 6963 6174 6520 7769 7468 2069 7473 2063 icate with its c\n+00187130: 6572 7469 6669 6361 7465 2c20 696e 2061 ertificate, in a\n+00187140: 6464 6974 696f 6e20 666f 7220 7468 6520 ddition for the \n+00187150: 7365 7276 6572 2074 6f20 6175 7468 656e server to authen\n+00187160: 7469 6361 7465 2074 6f20 7468 6520 636c ticate to the cl\n+00187170: 6965 6e74 2e3c 2f70 3e0a 3c70 3e53 696e ient.

      .

      Sin\n+00187180: 6365 2072 656c 6561 7365 2076 6572 7369 ce release versi\n+00187190: 6f6e 2032 2e38 2e32 302c 2053 534c 2076 on 2.8.20, SSL v\n+001871a0: 3320 6973 2064 6973 6162 6c65 642e 2054 3 is disabled. T\n+001871b0: 6f20 656e 6162 6c65 2053 534c 2076 3320 o enable SSL v3 \n+001871c0: 746f 6765 7468 6572 2077 6974 6820 544c together with TL\n+001871d0: 5320 312e 3020 616e 6420 6869 6768 6572 S 1.0 and higher\n+001871e0: 2c20 7573 6520 3c63 6f64 653e 2353 4f41 , use #SOA\n+001871f0: 505f 5353 4c76 335f 544c 5376 313c 2f63 P_SSLv3_TLSv1 with \n+00187210: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_ssl_serv\n+001872a0: 6572 5f63 6f6e 7465 7874 3c2f 613e 3c2f er_context. To use TL\n+001872c0: 5320 312e 3120 616e 6420 312e 3220 7573 S 1.1 and 1.2 us\n+001872d0: 6520 3c63 6f64 653e 534f 4150 5f54 4c53 e SOAP_TLS\n+001872e0: 7631 5f31 207c 2053 4f41 505f 544c 5376 v1_1 | SOAP_TLSv\n+001872f0: 315f 323c 2f63 6f64 653e 2e20 546f 2075 1_2. To u\n+00187300: 7365 2054 4c53 2031 2e32 206f 6e6c 7920 se TLS 1.2 only \n+00187310: 7573 6520 3c63 6f64 653e 2353 4f41 505f use #SOAP_\n+00187320: 544c 5376 315f 323c 2f63 6f64 653e 2e20 TLSv1_2. \n+00187330: 546f 2075 7365 2053 534c 2076 3320 6f6e To use SSL v3 on\n+00187340: 6c79 2075 7365 203c 636f 6465 3e23 534f ly use #SO\n+00187350: 4150 5f53 534c 7633 3c2f 636f 6465 3e2e AP_SSLv3.\n+00187360: 3c2f 703e 0a3c 703e 5468 6520 3c63 6f64

      .

      The cacert \n+00187380: 6669 6c65 2061 6e64 203c 636f 6465 3e63 file and c\n+00187390: 6170 6174 683c 2f63 6f64 653e 2061 7265 apath are\n+001873a0: 206f 7074 696f 6e61 6c2e 2045 6974 6865 optional. Eithe\n+001873b0: 7220 6f6e 6520 6361 6e20 6265 2073 7065 r one can be spe\n+001873c0: 6369 6669 6564 2077 6865 6e20 636c 6965 cified when clie\n+001873d0: 6e74 7320 6d75 7374 2072 756e 206f 6e20 nts must run on \n+001873e0: 6e6f 6e2d 7472 7573 7465 6420 7379 7374 non-trusted syst\n+001873f0: 656d 7320 283c 636f 6465 3e63 6170 6174 ems (capat\n+00187400: 683c 2f63 6f64 653e 2069 7320 6e6f 7420 h is not \n+00187410: 7573 6564 2077 6974 6820 474e 5554 4c53 used with GNUTLS\n+00187420: 292e 2057 6520 7761 6e74 2074 6f20 6176 ). We want to av\n+00187430: 6f69 6420 7374 6f72 696e 6720 7472 7573 oid storing trus\n+00187440: 7465 6420 6365 7274 6966 6963 6174 6573 ted certificates\n+00187450: 2069 6e20 7468 6520 6465 6661 756c 7420 in the default \n+00187460: 6c6f 6361 7469 6f6e 206f 6e20 7468 6520 location on the \n+00187470: 6669 6c65 2073 7973 7465 6d20 7768 656e file system when\n+00187480: 2074 6861 7420 6973 206e 6f74 2073 6563 that is not sec\n+00187490: 7572 652e 2054 6865 7265 666f 7265 2c20 ure. Therefore, \n+001874a0: 6120 666c 6174 203c 656d 3e3c 636f 6465 a flat cacert.pem file or \n+001874d0: 6469 7265 6374 6f72 7920 6361 6e20 6265 directory can be\n+001874e0: 2073 7065 6369 6669 6564 2074 6f20 7374 specified to st\n+001874f0: 6f72 6520 7472 7573 7465 6420 6365 7274 ore trusted cert\n+00187500: 6966 6963 6174 6573 2e3c 2f70 3e0a 3c70 ificates.

      .The gSOAP packa\n+00187520: 6765 2069 6e63 6c75 6465 7320 6120 3c65 ge includes a cacerts.\n+00187540: 7065 6d3c 2f63 6f64 653e 3c2f 656d 3e20 pem \n+00187550: 6669 6c65 2077 6974 6820 7468 6520 6365 file with the ce\n+00187560: 7274 6966 6963 6174 6573 206f 6620 616c rtificates of al\n+00187570: 6c20 6365 7274 6966 6963 6174 6520 6175 l certificate au\n+00187580: 7468 6f72 6974 6965 732e 2059 6f75 2063 thorities. You c\n+00187590: 616e 2075 7365 2074 6869 7320 6669 6c65 an use this file\n+001875a0: 2074 6f20 7665 7269 6679 2074 6865 2061 to verify the a\n+001875b0: 7574 6865 6e74 6963 6174 696f 6e20 6f66 uthentication of\n+001875c0: 2073 6572 7665 7273 2074 6861 7420 7072 servers that pr\n+001875d0: 6f76 6964 6520 6365 7274 6966 6963 6174 ovide certificat\n+001875e0: 6573 2069 7373 7565 6420 6279 2074 6865 es issued by the\n+001875f0: 7365 2043 4173 2e3c 2f70 3e0a 3c70 3e54 se CAs.

      .

      T\n+00187600: 6865 203c 656d 3e3c 636f 6465 3e63 6163 he cac\n+00187610: 6572 742e 7065 6d3c 2f63 6f64 653e 3c2f ert.pem, c\n+00187630: 6c69 656e 742e 7065 6d3c 2f63 6f64 653e lient.pem\n+00187640: 3c2f 656d 3e2c 2061 6e64 203c 656d 3e3c , and <\n+00187650: 636f 6465 3e73 6572 7665 722e 7065 6d3c code>server.pem<\n+00187660: 2f63 6f64 653e 3c2f 656d 3e20 6669 6c65 /code> file\n+00187670: 7320 696e 2074 6865 2067 534f 4150 2070 s in the gSOAP p\n+00187680: 6163 6b61 6765 2061 7265 2065 7861 6d70 ackage are examp\n+00187690: 6c65 7320 6f66 2073 656c 662d 7369 676e les of self-sign\n+001876a0: 6564 2063 6572 7469 6669 6361 7465 732e ed certificates.\n+001876b0: 2054 6865 203c 656d 3e3c 636f 6465 3e63 The c\n+001876c0: 6c69 656e 742e 7065 6d3c 2f63 6f64 653e lient.pem\n+001876d0: 3c2f 656d 3e20 616e 6420 3c65 6d3e 3c63 and server.pem conta\n+00187700: 696e 2074 6865 2063 6c69 656e 742f 7365 in the client/se\n+00187710: 7276 6572 2070 7269 7661 7465 206b 6579 rver private key\n+00187720: 2063 6f6e 6361 7465 6e61 7465 6420 7769 concatenated wi\n+00187730: 7468 2074 6865 2063 6572 7469 6669 6361 th the certifica\n+00187740: 7465 2e20 5468 6520 6b65 7966 696c 6573 te. The keyfiles\n+00187750: 2028 3c65 6d3e 3c63 6f64 653e 636c 6965 (clie\n+00187760: 6e74 2e70 656d 3c2f 636f 6465 3e3c 2f65 nt.pem and server.pem) are cre\n+001877a0: 6174 6564 2062 7920 636f 6e63 6174 656e ated by concaten\n+001877b0: 6174 696e 6720 7468 6520 7072 6976 6174 ating the privat\n+001877c0: 6520 6b65 7920 5045 4d20 7769 7468 2074 e key PEM with t\n+001877d0: 6865 2063 6572 7469 6669 6361 7465 2050 he certificate P\n+001877e0: 454d 2e20 5468 6520 6b65 7966 696c 6520 EM. The keyfile \n+001877f0: 7368 6f75 6c64 206e 6f74 2062 6520 7368 should not be sh\n+00187800: 6172 6564 2077 6974 6820 616e 7920 7061 ared with any pa\n+00187810: 7274 792e 2057 6974 6820 4f70 656e 5353 rty. With OpenSS\n+00187820: 4c2c 2079 6f75 2063 616e 2065 6e63 7279 L, you can encry\n+00187830: 7074 2074 6865 206b 6579 6669 6c65 7320 pt the keyfiles \n+00187840: 7769 7468 2061 2070 6173 7377 6f72 6420 with a password \n+00187850: 746f 206f 6666 6572 2073 6f6d 6520 7072 to offer some pr\n+00187860: 6f74 6563 7469 6f6e 2061 6e64 2074 6865 otection and the\n+00187870: 2070 6173 7377 6f72 6420 6973 2075 7365 password is use\n+00187880: 6420 696e 2074 6865 2063 6c69 656e 742f d in the client/\n+00187890: 7365 7276 6572 2063 6f64 6520 746f 2072 server code to r\n+001878a0: 6561 6420 7468 6520 6b65 7966 696c 652e ead the keyfile.\n+001878b0: 2047 4e55 544c 5320 646f 6573 206e 6f74 GNUTLS does not\n+001878c0: 2073 7570 706f 7274 2074 6869 7320 6665 support this fe\n+001878d0: 6174 7572 6520 616e 6420 6361 6e6e 6f74 ature and cannot\n+001878e0: 2065 6e63 7279 7074 206f 7220 6465 6372 encrypt or decr\n+001878f0: 7970 7420 6120 6b65 7966 696c 652e 3c2f ypt a keyfile..

      <\n+00187920: 6474 3e57 6172 6e69 6e67 3c2f 6474 3e3c dt>Warning<\n+00187930: 6464 3e49 7420 6973 2069 6d70 6f72 7461 dd>It is importa\n+00187940: 6e74 2074 6861 7420 7468 6520 3c63 6f64 nt that the #WITH_OPENSSL<\n+00187960: 2f63 6f64 653e 206d 6163 726f 206d 7573 /code> macro mus\n+00187970: 7420 6265 2063 6f6e 7369 7374 656e 746c t be consistentl\n+00187980: 7920 6465 6669 6e65 6420 746f 2063 6f6d y defined to com\n+00187990: 7069 6c65 2074 6865 2073 6f75 7263 6573 pile the sources\n+001879a0: 2c20 7375 6368 2061 7320 3c65 6d3e 3c63 , such as gsoap/stdsoa\n+001879c0: 7032 2e63 7070 3c2f 636f 6465 3e3c 2f65 p2.cpp, so\n+001879e0: 6170 432e 6370 703c 2f63 6f64 653e 3c2f apC.cpp, s\n+00187a00: 6f61 7043 6c69 656e 742e 6370 703c 2f63 oapClient.cpp, <\n+00187a20: 636f 6465 3e73 6f61 7053 6572 7665 722e code>soapServer.\n+00187a30: 6370 703c 2f63 6f64 653e 3c2f 656d 3e2c cpp,\n+00187a40: 2061 6e64 2061 6c6c 2061 7070 6c69 6361 and all applica\n+00187a50: 7469 6f6e 2073 6f75 7263 6573 2074 6861 tion sources tha\n+00187a60: 7420 696e 636c 7564 6520 3c65 6d3e 3c63 t include gsoap/stdsoa\n+00187a80: 7032 2e68 3c2f 636f 6465 3e3c 2f65 6d3e p2.h\n+00187a90: 206f 7220 3c65 6d3e 3c63 6f64 653e 736f or so\n+00187aa0: 6170 482e 683c 2f63 6f64 653e 3c2f 656d apH.h. If the macros\n+00187ac0: 2061 7265 206e 6f74 2063 6f6e 7369 7374 are not consist\n+00187ad0: 656e 746c 7920 7573 6564 2c20 7468 6520 ently used, the \n+00187ae0: 6170 706c 6963 6174 696f 6e20 7769 6c6c application will\n+00187af0: 2063 7261 7368 2064 7565 2074 6f20 6120 crash due to a \n+00187b00: 6d69 736d 6174 6368 6573 2069 6e20 7468 mismatches in th\n+00187b10: 6520 6465 636c 6172 6174 696f 6e20 616e e declaration an\n+00187b20: 6420 6163 6365 7373 206f 6620 7468 6520 d access of the \n+00187b30: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context.<\n+00187ba0: 2f64 6c3e 0a3c 703e 5365 6520 616c 736f /dl>.

      See also\n+00187bb0: 2041 5049 2064 6f63 756d 656e 7461 7469 API documentati\n+00187bc0: 6f6e 204d 6f64 756c 6520 3c61 2063 6c61 on Module SSL/TLS co\n+00187c00: 6e74 6578 7420 616e 6420 6675 6e63 7469 ntext and functi\n+00187c10: 6f6e 733c 2f61 3e20 666f 7220 6d6f 7265 ons for more\n+00187c20: 2064 6574 6169 6c73 206f 6e20 7468 6520 details on the \n+00187c30: 5353 4c2f 544c 5320 6675 6e63 7469 6f6e SSL/TLS function\n+00187c40: 732e 3c2f 703e 0a3c 703e f09f 949d 203c s.

      .

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

      ..Secur\n+00187cb0: 6520 636c 6965 6e74 7320 7769 7468 2048 e clients with H\n+00187cc0: 5454 5053 3c2f 6832 3e0a 3c70 3e54 6f20 TTPS

      .

      To \n+00187cd0: 7574 696c 697a 6520 4854 5450 532f 5353 utilize HTTPS/SS\n+00187ce0: 4c2c 2079 6f75 206e 6565 6420 746f 2069 L, you need to i\n+00187cf0: 6e73 7461 6c6c 2074 6865 204f 7065 6e53 nstall the OpenS\n+00187d00: 534c 206c 6962 7261 7279 206f 6e20 796f SL library on yo\n+00187d10: 7572 2070 6c61 7466 6f72 6d20 6f72 2047 ur platform or G\n+00187d20: 4e55 544c 5320 666f 7220 6120 6c69 6768 NUTLS for a ligh\n+00187d30: 742d 7765 6967 6874 2053 534c 2f54 4c53 t-weight SSL/TLS\n+00187d40: 206c 6962 7261 7279 2e20 4166 7465 7220 library. After \n+00187d50: 696e 7374 616c 6c61 7469 6f6e 2c20 636f installation, co\n+00187d60: 6d70 696c 6520 616c 6c20 7468 6520 736f mpile all the so\n+00187d70: 7572 6365 7320 6f66 2079 6f75 7220 6170 urces of your ap\n+00187d80: 706c 6963 6174 696f 6e20 7769 7468 2063 plication with c\n+00187d90: 6f6d 7069 6c65 2d74 696d 6520 666c 6167 ompile-time flag\n+00187da0: 203c 636f 6465 3e23 5749 5448 5f4f 5045 #WITH_OPE\n+00187db0: 4e53 534c 3c2f 636f 6465 3e20 286f 7220 NSSL (or \n+00187dc0: 3c63 6f64 653e 2357 4954 485f 474e 5554 #WITH_GNUT\n+00187dd0: 4c53 3c2f 636f 6465 3e20 7768 656e 2075 LS when u\n+00187de0: 7369 6e67 2047 4e55 544c 5329 2e20 466f sing GNUTLS). Fo\n+00187df0: 7220 6578 616d 706c 6520 6f6e 204c 696e r example on Lin\n+00187e00: 7578 3a20 3c2f 703e 3c70 7265 2063 6c61 ux:

       c\n+00187e20: 2b2b 202d 4457 4954 485f 4f50 454e 5353  ++ -DWITH_OPENSS\n+00187e30: 4c20 6d79 636c 6965 6e74 2e63 7070 2073  L myclient.cpp s\n+00187e40: 7464 736f 6170 2e63 7070 2073 6f61 7043  tdsoap.cpp soapC\n+00187e50: 2e63 7070 2073 6f61 7043 6c69 656e 742e  .cpp soapClient.\n+00187e60: 6370 7020 2d6c 7373 6c20 2d6c 6372 7970  cpp -lssl -lcryp\n+00187e70: 746f 0a3c 2f70 7265 3e3c 703e 206f 7220  to.

      or \n+00187e80: 556e 6978 3a20 3c2f 703e 3c70 7265 2063 Unix:

      \n+00187ea0: 2063 2b2b 202d 4457 4954 485f 4f50 454e   c++ -DWITH_OPEN\n+00187eb0: 5353 4c20 6d79 636c 6965 6e74 2e63 7070  SSL myclient.cpp\n+00187ec0: 2073 7464 736f 6170 2e63 7070 2073 6f61   stdsoap.cpp soa\n+00187ed0: 7043 2e63 7070 2073 6f61 7043 6c69 656e  pC.cpp soapClien\n+00187ee0: 742e 6370 7020 2d6c 786e 6574 202d 6c73  t.cpp -lxnet -ls\n+00187ef0: 6f63 6b65 7420 2d6c 6e73 6c20 2d6c 7373  ocket -lnsl -lss\n+00187f00: 6c20 2d6c 6372 7970 746f 0a3c 2f70 7265  l -lcrypto.

      or you can \n+00187f20: 6164 6420 7468 6520 666f 6c6c 6f77 696e add the followin\n+00187f30: 6720 6c69 6e65 2074 6f20 3c65 6d3e 3c63 g line to soapdefs.h:

      .\n+00187f60: 3c64 6976 2063 6c61 7373 3d22 6672 6167
      #define WITH_\n+00187fb0: 4f50 454e 5353 4c3c 2f73 7061 6e3e 3c2f OPENSSL.

      a\n+00187fe0: 6e64 2063 6f6d 7069 6c65 2077 6974 6820 nd compile with \n+00187ff0: 636f 6d70 696c 652d 7469 6d65 2066 6c61 compile-time fla\n+00188000: 6720 3c63 6f64 653e 2357 4954 485f 534f g #WITH_SO\n+00188010: 4150 4445 4653 5f48 3c2f 636f 6465 3e20 APDEFS_H \n+00188020: 746f 2069 6e63 6c75 6465 203c 656d 3e3c to include <\n+00188030: 636f 6465 3e73 6f61 7064 6566 732e 683c code>soapdefs.h<\n+00188040: 2f63 6f64 653e 3c2f 656d 3e20 696e 2079 /code> in y\n+00188050: 6f75 7220 7072 6f6a 6563 742e 2041 6c74 our project. Alt\n+00188060: 6572 6e61 7469 7665 6c79 2c20 636f 6d70 ernatively, comp\n+00188070: 696c 6520 7769 7468 2047 4e55 544c 533a ile with GNUTLS:\n+00188080: 203c 2f70 3e3c 7072 6520 636c 6173 733d

       c++ \n+001880a0: 2d44 5749 5448 5f47 4e55 544c 5320 6d79  -DWITH_GNUTLS my\n+001880b0: 636c 6965 6e74 2e63 7070 2073 7464 736f  client.cpp stdso\n+001880c0: 6170 2e63 7070 2073 6f61 7043 2e63 7070  ap.cpp soapC.cpp\n+001880d0: 2073 6f61 7043 6c69 656e 742e 6370 7020   soapClient.cpp \n+001880e0: 2d6c 676e 7574 6c73 202d 6c67 6372 7970  -lgnutls -lgcryp\n+001880f0: 7420 2d6c 6770 672d 6572 726f 720a 3c2f  t -lgpg-error.

      A client \n+00188110: 7072 6f67 7261 6d20 7369 6d70 6c79 2075 program simply u\n+00188120: 7365 7320 7468 6520 7072 6566 6978 203c ses the prefix <\n+00188130: 656d 3e3c 636f 6465 3e68 7474 7073 3a3c em>https:<\n+00188140: 2f63 6f64 653e 3c2f 656d 3e20 696e 7374 /code> inst\n+00188150: 6561 6420 6f66 203c 656d 3e3c 636f 6465 ead of http: in the endpoi\n+00188180: 6e74 2055 524c 206f 6620 6120 7365 7276 nt URL of a serv\n+00188190: 6963 6520 6f70 6572 6174 696f 6e20 6361 ice operation ca\n+001881a0: 6c6c 2074 6f20 6120 5765 6220 5365 7276 ll to a Web Serv\n+001881b0: 6963 6520 746f 2075 7365 2065 6e63 7279 ice to use encry\n+001881c0: 7074 6564 2074 7261 6e73 6665 7273 2028 pted transfers (\n+001881d0: 6966 2074 6865 2073 6572 7669 6365 2073 if the service s\n+001881e0: 7570 706f 7274 7320 4854 5450 5329 2e20 upports HTTPS). \n+001881f0: 596f 7520 6e65 6564 2074 6f20 7370 6563 You need to spec\n+00188200: 6966 7920 7468 6520 636c 6965 6e74 2d73 ify the client-s\n+00188210: 6964 6520 6b65 7920 6669 6c65 2061 6e64 ide key file and\n+00188220: 2070 6173 7377 6f72 6420 6f66 2074 6865 password of the\n+00188230: 206b 6579 6669 6c65 3a3c 2f70 3e0a 3c64 keyfile:

      .
      stru\n+00188280: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap soap;
      \n+001882f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      soap_ssl_ini\n+00188360: 743c 2f61 3e28 293b 203c 7370 616e 2063 t(); /\n+00188380: 2a20 696e 6974 204f 7065 6e53 534c 2028 * init OpenSSL (\n+00188390: 736b 6970 7069 6e67 2074 6869 7320 6f72 skipping this or\n+001883a0: 2063 616c 6c69 6e67 206d 756c 7469 706c calling multipl\n+001883b0: 6520 7469 6d65 7320 6973 204f 4b2c 2073 e times is OK, s\n+001883c0: 696e 6365 2074 6865 2065 6e67 696e 6520 ince the engine \n+001883d0: 7769 6c6c 2069 6e69 7420 5353 4c20 6175 will init SSL au\n+001883e0: 746f 6d61 7469 6361 6c6c 7929 202a 2f3c tomatically) */<\n+001883f0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      .<\n+00188410: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00188420: 656e 7422 3e2f 2a20 736f 6170 5f73 736c ent\">/* soap_ssl\n+00188430: 5f6e 6f69 6e69 7428 293b 202a 2f3c 2f73 _noinit(); */ /* do\n+00188460: 206e 6f74 2069 6e69 7420 4f70 656e 5353 not init OpenSS\n+00188470: 4c20 2869 6620 5353 4c20 6973 2061 6c72 L (if SSL is alr\n+00188480: 6561 6479 2069 6e69 7469 616c 697a 6564 eady initialized\n+00188490: 2065 6c73 6577 6865 7265 2069 6e20 7468 elsewhere in th\n+001884a0: 6973 2061 7070 6c69 6361 7469 6f6e 2920 is application) \n+001884b0: 2a2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a */
      .\n+001884c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      soap_init\n+00188530: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap);.
      if\n+001885a0: 3c2f 7370 616e 3e20 283c 6120 636c 6173 (soap_s\n+00188600: 736c 5f63 6c69 656e 745f 636f 6e74 6578 sl_client_contex\n+00188610: 743c 2f61 3e28 2661 6d70 3b3c 6120 636c t(&soap, .
      SOAP_SSL\n+001886c0: 5f44 4546 4155 4c54 3c2f 613e 2c20 3c2f _DEFAULT, .
      "clien\n+00188710: 742e 7065 6d26 7175 6f74 3b3c 2f73 7061 t.pem", /* keyfile: req\n+00188750: 7569 7265 6420 6f6e 6c79 2077 6865 6e20 uired only when \n+00188760: 636c 6965 6e74 206d 7573 7420 6175 7468 client must auth\n+00188770: 656e 7469 6361 7465 2074 6f20 7365 7276 enticate to serv\n+00188780: 6572 2028 7365 6520 5353 4c20 646f 6373 er (see SSL docs\n+00188790: 206f 6e20 686f 7720 746f 206f 6274 6169 on how to obtai\n+001887a0: 6e20 7468 6973 2066 696c 6529 202a 2f3c n this file) */<\n+001887b0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
      .\n+001887d0: 2020 3c73 7061 6e20 636c 6173 733d 2273 &q\n+001887f0: 756f 743b 7061 7373 776f 7264 2671 756f uot;password&quo\n+00188800: 743b 3c2f 7370 616e 3e2c 2020 2020 2020 t;, \n+00188810: 2020 2020 3c73 7061 6e20 636c 6173 733d /* pas\n+00188830: 7377 6f72 6420 746f 2072 6561 6420 7468 sword to read th\n+00188840: 6520 6b65 7920 6669 6c65 2028 6e6f 7420 e key file (not \n+00188850: 7573 6564 2077 6974 6820 474e 5554 4c53 used with GNUTLS\n+00188860: 2920 2a2f 3c2f 7370 616e 3e20 3c2f 6469 ) */ .
      "cacerts\n+001888b0: 2e70 656d 2671 756f 743b 3c2f 7370 616e .pem", /\n+001888e0: 2a20 6361 6365 7274 2066 696c 6520 746f * cacert file to\n+001888f0: 2073 746f 7265 2074 7275 7374 6564 2063 store trusted c\n+00188900: 6572 7469 6669 6361 7465 7320 286e 6565 ertificates (nee\n+00188910: 6465 6420 746f 2076 6572 6966 7920 7365 ded to verify se\n+00188920: 7276 6572 2920 2a2f 3c2f 7370 616e 3e20 rver) */ \n+00188930: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      NULL,\n+00188950: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00188960: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* capath \n+00188980: 746f 2064 6972 6563 746f 7279 2077 6974 to directory wit\n+00188990: 6820 7472 7573 7465 6420 6365 7274 6966 h trusted certif\n+001889a0: 6963 6174 6573 202a 2f3c 2f73 7061 6e3e icates */\n+001889b0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      NULL\n+001889d0: 2020 2020 2020 2020 203c 7370 616e 2063 /\n+001889f0: 2a20 6966 2072 616e 6466 696c 6521 3d4e * if randfile!=N\n+00188a00: 554c 4c3a 2075 7365 2061 2066 696c 6520 ULL: use a file \n+00188a10: 7769 7468 2072 616e 646f 6d20 6461 7461 with random data\n+00188a20: 2074 6f20 7365 6564 2072 616e 646f 6d6e to seed randomn\n+00188a30: 6573 7320 2a2f 3c2f 7370 616e 3e20 203c ess */ <\n+00188a40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      )) .
      {
      . \n+00188a90: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_print_fa\n+00188af0: 756c 743c 2f61 3e28 2661 6d70 3b3c 6120 ult(&soap, st\n+00188b30: 6465 7272 293b 203c 2f64 6976 3e0a 3c64 derr);
      .\n+00188b50: 2020 6578 6974 2845 5849 545f 4641 494c exit(EXIT_FAIL\n+00188b60: 5552 4529 3b20 3c2f 6469 763e 0a3c 6469 URE);
      .}\n+00188b80: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      soap_c\n+00188ba0: 616c 6c5f 6e73 5f5f 6d79 6d65 7468 6f64 all_ns__mymethod\n+00188bb0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+00188be0: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, "https:/\n+00188c10: 2f64 6f6d 6169 6e2f 7061 7468 2f73 6563 /domain/path/sec\n+00188c20: 7572 652e 6367 6926 7175 6f74 3b3c 2f73 ure.cgi", "", ...);.
      int soap_ssl_cl\n+00188d60: 6965 6e74 5f63 6f6e 7465 7874 2873 7472 ient_context(str\n+00188d70: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+00188d80: 736f 6170 5f73 736c 5f66 6c61 6773 2066 soap_ssl_flags f\n+00188d90: 6c61 6773 2c20 636f 6e73 7420 6368 6172 lags, const char\n+00188da0: 202a 6b65 7966 696c 652c 2063 6f6e 7374 *keyfile, const\n+00188db0: 2063 6861 7220 2a70 6173 7377 6f72 642c char *password,\n+00188dc0: 2063 6f6e 7374 2063 6861 7220 2a63 6166 const char *caf\n+00188dd0: 696c 652c 2063 6f6e 7374 2063 6861 7220 ile, const char \n+00188de0: 2a63 6170 6174 682c 2063 6f6e 7374 2063 *capath, const c\n+00188df0: 6861 7220 2a72 616e 6466 696c 6529 3c2f har *randfile)
      Initializ\n+00188e20: 6520 7468 6520 636c 6965 6e74 2d73 6964 e the client-sid\n+00188e30: 6520 5353 4c2f 544c 5320 636f 6e74 6578 e SSL/TLS contex\n+00188e40: 742e 3c2f 6469 763e 3c2f 6469 763e 0a3c t.
      .<\n+00188e50: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

      By defa\n+00188e70: 756c 742c 2073 6572 7665 7220 6175 7468 ult, server auth\n+00188e80: 656e 7469 6361 7469 6f6e 2069 7320 656e entication is en\n+00188e90: 6162 6c65 6420 616e 6420 7468 6520 3c65 abled and the cacerts.\n+00188eb0: 7065 6d3c 2f63 6f64 653e 3c2f 656d 3e20 pem \n+00188ec0: 6f72 203c 636f 6465 3e63 6170 6174 683c or capath<\n+00188ed0: 2f63 6f64 653e 2028 6e6f 7420 7573 6564 /code> (not used\n+00188ee0: 2077 6974 6820 474e 5554 4c53 2920 6d75 with GNUTLS) mu\n+00188ef0: 7374 2062 6520 7365 7420 736f 2074 6861 st be set so tha\n+00188f00: 7420 7468 6520 4341 2063 6572 7469 6669 t the CA certifi\n+00188f10: 6361 7465 7320 6f66 2074 6865 2073 6572 cates of the ser\n+00188f20: 7665 7228 7329 2061 7265 2061 6363 6573 ver(s) are acces\n+00188f30: 7369 626c 6520 6174 2072 756e 2074 696d sible at run tim\n+00188f40: 652e 2054 6865 203c 656d 3e3c 636f 6465 e. The cacerts.pem file in\n+00188f70: 636c 7564 6564 2069 6e20 7468 6520 6753 cluded in the gS\n+00188f80: 4f41 5020 736f 7572 6365 2063 6f64 6520 OAP source code \n+00188f90: 7061 636b 6167 6520 636f 6e74 6169 6e73 package contains\n+00188fa0: 2074 6865 2063 6572 7469 6669 6361 7465 the certificate\n+00188fb0: 7320 6f66 2063 6f6d 6d6f 6e20 4341 732e s of common CAs.\n+00188fc0: 2054 6869 7320 6669 6c65 206d 7573 7420 This file must \n+00188fd0: 6265 2073 7570 706c 6965 6420 7769 7468 be supplied with\n+00188fe0: 2074 6865 2063 6c69 656e 742c 2069 6620 the client, if \n+00188ff0: 7365 7276 6572 2061 7574 6865 6e74 6963 server authentic\n+00189000: 6174 696f 6e20 6973 2072 6571 7569 7265 ation is require\n+00189010: 642e 2041 6c74 6572 6e61 7469 7665 6c79 d. Alternatively\n+00189020: 2c20 796f 7520 6361 6e20 7573 6520 7468 , you can use th\n+00189030: 6520 3c65 6d3e 3c63 6f64 653e 6773 6f61 e gsoa\n+00189040: 702f 706c 7567 696e 2f63 6163 6572 7473 p/plugin/cacerts\n+00189050: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2061 .h a\n+00189060: 6e64 203c 656d 3e3c 636f 6465 3e67 736f nd gso\n+00189070: 6170 2f70 6c75 6769 6e2f 6361 6365 7274 ap/plugin/cacert\n+00189080: 732e 633c 2f63 6f64 653e 3c2f 656d 3e20 s.c \n+00189090: 636f 6465 2074 6f20 656d 6265 6420 4341 code to embed CA\n+001890a0: 2063 6572 7469 6669 6361 7465 7320 696e certificates in\n+001890b0: 2079 6f75 7220 636c 6965 6e74 2063 6f64 your client cod\n+001890c0: 652e 3c2f 703e 0a3c 703e 596f 7520 6361 e.

      .

      You ca\n+001890d0: 6e20 7370 6563 6966 7920 6120 6369 7068 n specify a ciph\n+001890e0: 6572 206c 6973 7420 746f 2075 7365 2077 er list to use w\n+001890f0: 6974 6820 544c 5376 312e 3220 616e 6420 ith TLSv1.2 and \n+00189100: 6265 6c6f 7720 7769 7468 203c 636f 6465 below with SSL_CTX_set_cip\n+00189120: 6865 725f 6c69 7374 2873 6f61 702d 2667 her_list(soap-&g\n+00189130: 743b 6374 782c 2022 2e2e 2e22 293c 2f63 t;ctx, \"...\") where soap->ctx is the SSL \n+00189170: 636f 6e74 6578 7420 6372 6561 7465 6420 context created \n+00189180: 6279 203c 636f 6465 3e3c 6120 636c 6173 by soap\n+00189210: 5f73 736c 5f63 6c69 656e 745f 636f 6e74 _ssl_client_cont\n+00189220: 6578 7428 293c 2f61 3e3c 2f63 6f64 653e ext()\n+00189230: 2e20 4c69 6b65 7769 7365 2c20 7573 6520 . Likewise, use \n+00189240: 3c63 6f64 653e 5353 4c5f 4354 585f 7365 SSL_CTX_se\n+00189250: 745f 6369 7068 6572 7375 6974 6573 2873 t_ciphersuites(s\n+00189260: 6f61 702d 2667 743b 6374 782c 2022 2e2e oap->ctx, \"..\n+00189270: 2e22 293c 2f63 6f64 653e 2074 6f20 636f .\") to co\n+00189280: 6e66 6967 7572 6520 7468 6520 6176 6169 nfigure the avai\n+00189290: 6c61 626c 6520 544c 5376 312e 3320 6369 lable TLSv1.3 ci\n+001892a0: 7068 6572 7375 6974 6573 2e3c 2f70 3e0a phersuites.

      .\n+001892b0: 3c70 3e57 6520 7265 6665 7220 746f 2074

      We refer to t\n+001892c0: 6865 204f 7065 6e53 534c 2064 6f63 756d he OpenSSL docum\n+001892d0: 656e 7461 7469 6f6e 2061 6e64 206d 616e entation and man\n+001892e0: 7561 6c20 7061 6765 7320 6f66 203c 636f ual pages of SSL_CTX_set_c\n+00189300: 6970 6865 725f 6c69 7374 3c2f 636f 6465 ipher_list and SSL_\n+00189320: 4354 585f 7365 745f 6369 7068 6572 7375 CTX_set_ciphersu\n+00189330: 6974 6573 3c2f 636f 6465 3e20 666f 7220 ites for \n+00189340: 6465 7461 696c 7320 6f6e 2074 6865 206c details on the l\n+00189350: 6174 6573 7420 6369 7068 6572 206c 6973 atest cipher lis\n+00189360: 7473 2061 6e64 2073 7569 7465 7320 6176 ts and suites av\n+00189370: 6169 6c61 626c 6520 746f 2075 7365 2e3c ailable to use.<\n+00189380: 2f70 3e0a 3c70 3e4f 7468 6572 2063 6c69 /p>.

      Other cli\n+00189390: 656e 742d 7369 6465 2053 534c 206f 7074 ent-side SSL opt\n+001893a0: 696f 6e73 2061 7265 203c 636f 6465 3e23 ions are #\n+001893b0: 534f 4150 5f53 534c 5f53 4b49 505f 484f SOAP_SSL_SKIP_HO\n+001893c0: 5354 5f43 4845 434b 3c2f 636f 6465 3e20 ST_CHECK \n+001893d0: 746f 2073 6b69 7020 7468 6520 686f 7374 to skip the host\n+001893e0: 206e 616d 6520 7665 7269 6669 6361 7469 name verificati\n+001893f0: 6f6e 2063 6865 636b 2061 6e64 203c 636f on check and #SOAP_SSL_ALL\n+00189410: 4f57 5f45 5850 4952 4544 5f43 4552 5449 OW_EXPIRED_CERTI\n+00189420: 4649 4341 5445 3c2f 636f 6465 3e20 746f FICATE to\n+00189430: 2061 6c6c 6f77 2063 6f6e 6e65 6374 696e allow connectin\n+00189440: 6720 746f 2061 2068 6f73 7420 7769 7468 g to a host with\n+00189450: 2061 6e20 6578 7069 7265 6420 6365 7274 an expired cert\n+00189460: 6966 6963 6174 652e 2046 6f72 2065 7861 ificate. For exa\n+00189470: 6d70 6c65 2c3c 2f70 3e0a 3c64 6976 2063 mple,

      .
      \n+00189490: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .<\n+00189540: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+00189550: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+00189560: 705f 5f73 736c 2e68 746d 6c23 6761 3537 p__ssl.html#ga57\n+00189570: 3062 3236 3261 6339 6435 3566 6335 3039 0b262ac9d55fc509\n+00189580: 6631 6635 3939 3964 6561 6131 3866 223e f1f5999deaa18f\">\n+00189590: 736f 6170 5f73 736c 5f69 6e69 743c 2f61 soap_ssl_init(); /* in\n+001895c0: 6974 204f 7065 6e53 534c 2028 736b 6970 it OpenSSL (skip\n+001895d0: 7069 6e67 2074 6869 7320 6f72 2063 616c ping this or cal\n+001895e0: 6c69 6e67 206d 756c 7469 706c 6520 7469 ling multiple ti\n+001895f0: 6d65 7320 6973 204f 4b2c 2073 696e 6365 mes is OK, since\n+00189600: 2074 6865 2065 6e67 696e 6520 7769 6c6c the engine will\n+00189610: 2069 6e69 7420 5353 4c20 6175 746f 6d61 init SSL automa\n+00189620: 7469 6361 6c6c 7929 202a 2f3c 2f73 7061 tically) */
      .
      /* soap_ssl_noi\n+00189670: 6e69 7428 293b 202a 2f3c 2f73 7061 6e3e nit(); */\n+00189680: 203c 7370 616e 2063 6c61 7373 3d22 636f /* do not\n+001896a0: 2069 6e69 7420 4f70 656e 5353 4c20 2869 init OpenSSL (i\n+001896b0: 6620 5353 4c20 6973 2061 6c72 6561 6479 f SSL is already\n+001896c0: 2069 6e69 7469 616c 697a 6564 2065 6c73 initialized els\n+001896d0: 6577 6865 7265 2069 6e20 7468 6973 2061 ewhere in this a\n+001896e0: 7070 6c69 6361 7469 6f6e 2920 2a2f 3c2f pplication) */
      .soap_init\n+00189770: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa\n+001897a0: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
      .\n+001897c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_ssl_c\n+00189840: 6c69 656e 745f 636f 6e74 6578 743c 2f61 lient_context(&so\n+00189880: 6170 3c2f 613e 2c20 3c2f 6469 763e 0a3c ap,
      .<\n+00189890: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001898a0: 3e20 203c 6120 636c 6173 733d 2263 6f64 > SOAP_SSL_REQ\n+00189900: 5549 5245 5f53 4552 5645 525f 4155 5448 UIRE_SERVER_AUTH\n+00189910: 454e 5449 4341 5449 4f4e 3c2f 613e 2020 ENTICATION \n+00189920: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      | SO\n+00189990: 4150 5f53 534c 5f53 4b49 505f 484f 5354 AP_SSL_SKIP_HOST\n+001899a0: 5f43 4845 434b 3c2f 613e 2c20 3c2f 6469 _CHECK, ..
      "c\n+00189a80: 6c69 656e 742e 7065 6d26 7175 6f74 3b3c lient.pem"<\n+00189a90: 2f73 7061 6e3e 2c20 2020 2020 2020 203c /span>, <\n+00189aa0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00189ab0: 656e 7422 3e2f 2a20 6b65 7966 696c 653a ent\">/* keyfile:\n+00189ac0: 2072 6571 7569 7265 6420 6f6e 6c79 2077 required only w\n+00189ad0: 6865 6e20 636c 6965 6e74 206d 7573 7420 hen client must \n+00189ae0: 6175 7468 656e 7469 6361 7465 2074 6f20 authenticate to \n+00189af0: 7365 7276 6572 2028 7365 6520 5353 4c20 server (see SSL \n+00189b00: 646f 6373 206f 6e20 686f 7720 746f 206f docs on how to o\n+00189b10: 6274 6169 6e20 7468 6973 2066 696c 6529 btain this file)\n+00189b20: 202a 2f3c 2f73 7061 6e3e 203c 2f64 6976 */ .
      "password\n+00189b70: 2671 756f 743b 3c2f 7370 616e 3e2c 2020 ", \n+00189b80: 2020 2020 2020 2020 3c73 7061 6e20 636c /*\n+00189ba0: 2070 6173 7377 6f72 6420 746f 2072 6561 password to rea\n+00189bb0: 6420 7468 6520 6b65 7920 6669 6c65 2028 d the key file (\n+00189bc0: 6e6f 7420 7573 6564 2077 6974 6820 474e not used with GN\n+00189bd0: 5554 4c53 2920 2a2f 3c2f 7370 616e 3e20 UTLS) */ \n+00189be0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      "cac\n+00189c20: 6572 7473 2e70 656d 2671 756f 743b 3c2f erts.pem", /* cacert fil\n+00189c60: 6520 746f 2073 746f 7265 2074 7275 7374 e to store trust\n+00189c70: 6564 2063 6572 7469 6669 6361 7465 7320 ed certificates \n+00189c80: 286e 6565 6465 6420 746f 2076 6572 6966 (needed to verif\n+00189c90: 7920 7365 7276 6572 2920 2a2f 3c2f 7370 y server) */
      .
      NU\n+00189cc0: 4c4c 2c20 2020 2020 2020 2020 2020 2020 LL, \n+00189cd0: 2020 203c 7370 616e 2063 6c61 7373 3d22 /* capa\n+00189cf0: 7468 2074 6f20 6469 7265 6374 6f72 7920 th to directory \n+00189d00: 7769 7468 2074 7275 7374 6564 2063 6572 with trusted cer\n+00189d10: 7469 6669 6361 7465 7320 2a2f 3c2f 7370 tificates */
      .
      N\n+00189d40: 554c 4c20 2020 2020 2020 2020 3c73 7061 ULL /* if randfile\n+00189d70: 213d 4e55 4c4c 3a20 7573 6520 6120 6669 !=NULL: use a fi\n+00189d80: 6c65 2077 6974 6820 7261 6e64 6f6d 2064 le with random d\n+00189d90: 6174 6120 746f 2073 6565 6420 7261 6e64 ata to seed rand\n+00189da0: 6f6d 6e65 7373 202a 2f3c 2f73 7061 6e3e omness */\n+00189db0: 2020 3c2f 6469 763e 0a3c 6469 7620 636c
      .
      )) .
      {
      .<\n+00189df0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00189e00: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_print\n+00189e60: 5f66 6175 6c74 3c2f 613e 2826 616d 703b _fault(&\n+00189e70: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+00189ea0: 2073 7464 6572 7229 3b20 3c2f 6469 763e stderr);
      \n+00189eb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      exit(EXIT_F\n+00189ed0: 4149 4c55 5245 293b 203c 2f64 6976 3e0a AILURE);
      .\n+00189ee0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      }
      .
      soa\n+00189f10: 705f 6361 6c6c 5f6e 735f 5f6d 796d 6574 p_call_ns__mymet\n+00189f20: 686f 6428 2661 6d70 3b3c 6120 636c 6173 hod(&\n+00189f50: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, "http\n+00189f80: 733a 2f2f 646f 6d61 696e 2f70 6174 682f s://domain/path/\n+00189f90: 7365 6375 7265 2e63 6769 2671 756f 743b secure.cgi"\n+00189fa0: 3c2f 7370 616e 3e2c 203c 7370 616e 2063 , ""\n+00189fd0: 3b3c 2f73 7061 6e3e 2c20 2e2e 2e29 3b3c ;, ...);<\n+00189fe0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      S\n+0018a090: 4f41 505f 5353 4c5f 534b 4950 5f48 4f53 OAP_SSL_SKIP_HOS\n+0018a0a0: 545f 4348 4543 4b3c 2f61 3e3c 2f64 6976 T_CHECK
      #define SOA\n+0018a0d0: 505f 5353 4c5f 534b 4950 5f48 4f53 545f P_SSL_SKIP_HOST_\n+0018a0e0: 4348 4543 4b3c 2f64 6976 3e3c 6469 7620 CHECK
      so\n+0018a100: 6170 5f73 736c 5f66 6c61 6773 2066 6c61 ap_ssl_flags fla\n+0018a110: 6720 666f 7220 636c 6965 6e74 7320 746f g for clients to\n+0018a120: 2061 6c6c 6f77 2063 6c69 656e 7473 2074 allow clients t\n+0018a130: 6f20 736b 6970 2063 6f6d 6d6f 6e20 6e61 o skip common na\n+0018a140: 6d65 2063 6865 636b 7320 6167 6169 6e73 me checks agains\n+0018a150: 7420 7468 6520 686f 7374 206e 616d 6520 t the host name \n+0018a160: 6f66 202e 2e2e 3c2f 6469 763e 3c64 6976 of ...
      <\n+0018a180: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:586\n+0018a1a0: 383c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 8
      .<\n+0018a200: 6469 7620 636c 6173 733d 2274 746e 616d div class=\"ttnam\n+0018a210: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e\">SOAP_SSL_\n+0018a260: 5245 5155 4952 455f 5345 5256 4552 5f41 REQUIRE_SERVER_A\n+0018a270: 5554 4845 4e54 4943 4154 494f 4e3c 2f61 UTHENTICATION
      <\n+0018a2d0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+0018a2e0: 223e 736f 6170 5f73 736c 5f66 6c61 6773 \">soap_ssl_flags\n+0018a2f0: 2066 6c61 6720 666f 7220 636c 6965 6e74 flag for client\n+0018a300: 7320 746f 2072 6571 7569 7265 2073 6572 s to require ser\n+0018a310: 7665 7273 2074 6f20 6175 7468 656e 7469 vers to authenti\n+0018a320: 6361 7465 2074 6f20 636c 6965 6e74 7320 cate to clients \n+0018a330: 6475 7269 6e67 2074 6865 2048 5454 5053 during the HTTPS\n+0018a340: 2068 616e 6473 682e 2e2e 3c2f 6469 763e handsh...
      \n+0018a350: 3c64 6976 2063 6c61 7373 3d22 7474 6465
      Definition\n+0018a370: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n+0018a380: 3a35 3836 323c 2f64 6976 3e3c 2f64 6976 :5862
      .
      .

      For syst\n+0018a590: 656d 7320 6261 7365 6420 6f6e 204d 6963 ems based on Mic\n+0018a5a0: 726f 736f 6674 2077 696e 646f 7773 2c20 rosoft windows, \n+0018a5b0: 7468 6520 5769 6e49 6e65 7420 6d6f 6475 the WinInet modu\n+0018a5c0: 6c65 2063 616e 2062 6520 7573 6564 2069 le can be used i\n+0018a5d0: 6e73 7465 6164 2c20 7365 6520 3c63 6f64 nstead, see mod_gsoap/gsoa\n+0018a5f0: 705f 7769 6e2f 7769 6e69 6e65 743c 2f63 p_win/wininet.

      .

      Sin\n+0018a610: 6365 2072 656c 6561 7365 2076 6572 7369 ce release versi\n+0018a620: 6f6e 2032 2e38 2e32 3020 5353 4c20 7633 on 2.8.20 SSL v3\n+0018a630: 2069 7320 6469 7361 626c 6564 2e20 546f is disabled. To\n+0018a640: 2065 6e61 626c 6520 5353 4c20 7633 2074 enable SSL v3 t\n+0018a650: 6f67 6574 6865 7220 7769 7468 2054 4c53 ogether with TLS\n+0018a660: 2031 2e30 2061 6e64 2068 6967 6865 722c 1.0 and higher,\n+0018a670: 2075 7365 203c 636f 6465 3e23 534f 4150 use #SOAP\n+0018a680: 5f53 534c 7633 5f54 4c53 7631 3c2f 636f _SSLv3_TLSv1 with <\n+0018a6a0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0018a6b0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0018a6c0: 5f73 736c 2e68 746d 6c23 6761 3334 3932 _ssl.html#ga3492\n+0018a6d0: 3436 3563 6464 3861 6137 3166 6537 3436 465cdd8aa71fe746\n+0018a6e0: 3139 3964 3338 3432 6361 6337 2220 7469 199d3842cac7\" ti\n+0018a6f0: 746c 653d 2249 6e69 7469 616c 697a 6520 tle=\"Initialize \n+0018a700: 7468 6520 7365 7276 6572 2d73 6964 6520 the server-side \n+0018a710: 5353 4c2f 544c 5320 636f 6e74 6578 742e SSL/TLS context.\n+0018a720: 223e 736f 6170 5f73 736c 5f73 6572 7665 \">soap_ssl_serve\n+0018a730: 725f 636f 6e74 6578 743c 2f61 3e3c 2f63 r_context. To use TLS\n+0018a750: 2031 2e31 2061 6e64 2031 2e32 2075 7365 1.1 and 1.2 use\n+0018a760: 203c 636f 6465 3e53 4f41 505f 544c 5376 SOAP_TLSv\n+0018a770: 315f 3120 7c20 534f 4150 5f54 4c53 7631 1_1 | SOAP_TLSv1\n+0018a780: 5f32 3c2f 636f 6465 3e2e 2054 6f20 7573 _2. To us\n+0018a790: 6520 544c 5320 312e 3220 6f6e 6c79 2075 e TLS 1.2 only u\n+0018a7a0: 7365 203c 636f 6465 3e23 534f 4150 5f54 se #SOAP_T\n+0018a7b0: 4c53 7631 5f32 3c2f 636f 6465 3e2e 2054 LSv1_2. T\n+0018a7c0: 6f20 7573 6520 5353 4c20 7633 206f 6e6c o use SSL v3 onl\n+0018a7d0: 7920 7573 6520 3c63 6f64 653e 2353 4f41 y use #SOA\n+0018a7e0: 505f 5353 4c76 333c 2f63 6f64 653e 2e3c P_SSLv3.<\n+0018a7f0: 2f70 3e0a 3c70 3e54 6f20 6469 7361 626c /p>.

      To disabl\n+0018a800: 6520 7365 7276 6572 2061 7574 6865 6e74 e server authent\n+0018a810: 6963 6174 696f 6e20 666f 7220 7465 7374 ication for test\n+0018a820: 696e 6720 7075 7270 6f73 6573 2c20 7573 ing purposes, us\n+0018a830: 6520 7468 6520 666f 6c6c 6f77 696e 673a e the following:\n+0018a840: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

      ..
      NULL\n+0018a9e0: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
      .
      NUL\n+0018aa00: 4c2c 203c 2f64 6976 3e0a 3c64 6976 2063 L,
      .
      NU\n+0018aa20: 4c4c 2c20 3c2f 6469 763e 0a3c 6469 7620 LL,
      .
      N\n+0018aa40: 554c 4c2c 203c 2f64 6976 3e0a 3c64 6976 ULL,
      . \n+0018aa60: 4e55 4c4c 203c 2f64 6976 3e0a 3c64 6976 NULL
      .))\n+0018aa80: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      {.
      soap_pr\n+0018ab10: 696e 745f 6661 756c 743c 2f61 3e28 2661 int_fault(&a\n+0018ab20: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, stderr); .
      #\n+0018ac90: 6465 6669 6e65 2053 4f41 505f 5353 4c5f define SOAP_SSL_\n+0018aca0: 4e4f 5f41 5554 4845 4e54 4943 4154 494f NO_AUTHENTICATIO\n+0018acb0: 4e3c 2f64 6976 3e3c 6469 7620 636c 6173 N
      soap_s\n+0018acd0: 736c 5f66 6c61 6773 2066 6c61 6720 7661 sl_flags flag va\n+0018ace0: 6c75 6520 746f 2064 6973 6162 6c65 2061 lue to disable a\n+0018acf0: 7574 6865 6e74 6963 6174 696f 6e20 6f66 uthentication of\n+0018ad00: 2074 6865 2070 6565 723c 2f64 6976 3e3c the peer
      <\n+0018ad10: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n+0018ad20: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n+0018ad30: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n+0018ad40: 3538 3430 3c2f 6469 763e 3c2f 6469 763e 5840
      \n+0018ad50: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

      This \n+0018ad70: 616c 736f 2061 7373 756d 6573 2074 6861 also assumes tha\n+0018ad80: 7420 7468 6520 7365 7276 6572 2064 6f65 t the server doe\n+0018ad90: 7320 6e6f 7420 7265 7175 6972 6520 636c s not require cl\n+0018ada0: 6965 6e74 7320 746f 2061 7574 6865 6e74 ients to authent\n+0018adb0: 6963 6174 6520 2874 6865 206b 6579 6669 icate (the keyfi\n+0018adc0: 6c65 2069 7320 6162 7365 6e74 292e 3c2f le is absent)..

      Make sure \n+0018ade0: 796f 7520 6861 7665 2073 6967 6e61 6c20 you have signal \n+0018adf0: 6861 6e64 6c65 7273 2073 6574 2069 6e20 handlers set in \n+0018ae00: 796f 7572 2061 7070 6c69 6361 7469 6f6e your application\n+0018ae10: 2074 6f20 6361 7463 6820 6272 6f6b 656e to catch broken\n+0018ae20: 2063 6f6e 6e65 6374 696f 6e73 2028 3c63 connections (SIGPIPE):

      .
      <\n+0018ae60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0018ae70: 3e73 6967 6e61 6c28 5349 4750 4950 452c >signal(SIGPIPE,\n+0018ae80: 2073 6967 7069 7065 5f68 616e 646c 6529 sigpipe_handle)\n+0018ae90: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
      .
      <\n+0018aeb0: 703e 7768 6572 652c 2066 6f72 2065 7861 p>where, for exa\n+0018aec0: 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 2063 mple:

      .
      \n+0018aee0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      void\n+0018af10: 3c2f 7370 616e 3e20 7369 6770 6970 655f sigpipe_\n+0018af20: 6861 6e64 6c65 283c 7370 616e 2063 6c61 handle(int x) {\n+0018af50: 207d 3c2f 6469 763e 0a3c 2f64 6976 3e3c }
      .
      <\n+0018af60: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+0018af70: 3c64 6c20 636c 6173 733d 2273 6563 7469
      \n+0018af90: 5761 726e 696e 673c 2f64 743e 3c64 643e Warning
      \n+0018afa0: 4974 2069 7320 696d 706f 7274 616e 7420 It is important \n+0018afb0: 7468 6174 2074 6865 203c 636f 6465 3e23 that the #\n+0018afc0: 5749 5448 5f4f 5045 4e53 534c 3c2f 636f WITH_OPENSSL macro is con\n+0018afe0: 7369 7374 656e 746c 7920 6465 6669 6e65 sistently define\n+0018aff0: 6420 746f 2063 6f6d 7069 6c65 2074 6865 d to compile the\n+0018b000: 2073 6f75 7263 6573 2c20 7375 6368 2061 sources, such a\n+0018b010: 7320 3c65 6d3e 3c63 6f64 653e 6773 6f61 s gsoa\n+0018b020: 702f 7374 6473 6f61 7032 2e63 7070 3c2f p/stdsoap2.cpp, \n+0018b040: 3c63 6f64 653e 736f 6170 432e 6370 703c soapC.cpp<\n+0018b050: 2f63 6f64 653e 3c2f 656d 3e2c 203c 656d /code>, soapClien\n+0018b070: 742e 6370 703c 2f63 6f64 653e 3c2f 656d t.cpp, soa\n+0018b090: 7053 6572 7665 722e 6370 703c 2f63 6f64 pServer.cpp, and all\n+0018b0b0: 2061 7070 6c69 6361 7469 6f6e 2073 6f75 application sou\n+0018b0c0: 7263 6573 2074 6861 7420 696e 636c 7564 rces that includ\n+0018b0d0: 6520 3c65 6d3e 3c63 6f64 653e 6773 6f61 e gsoa\n+0018b0e0: 702f 7374 6473 6f61 7032 2e68 3c2f 636f p/stdsoap2.h or \n+0018b100: 3c63 6f64 653e 736f 6170 482e 683c 2f63 soapH.h. If th\n+0018b120: 6520 6d61 6372 6f73 2061 7265 206e 6f74 e macros are not\n+0018b130: 2063 6f6e 7369 7374 656e 746c 7920 7573 consistently us\n+0018b140: 6564 2c20 7468 6520 6170 706c 6963 6174 ed, the applicat\n+0018b150: 696f 6e20 7769 6c6c 2063 7261 7368 2064 ion will crash d\n+0018b160: 7565 2074 6f20 6120 6d69 736d 6174 6368 ue to a mismatch\n+0018b170: 6573 2069 6e20 7468 6520 6465 636c 6172 es in the declar\n+0018b180: 6174 696f 6e20 616e 6420 6163 6365 7373 ation and access\n+0018b190: 206f 6620 7468 6520 3c63 6f64 653e 3c61 of the soap contex\n+0018b200: 742e 2041 6c74 6572 6e61 7469 7665 6c79 t. Alternatively\n+0018b210: 2c20 7573 6520 6c69 6272 6172 7920 3c62 , use library -lgsoapss\n+0018b230: 6c3c 2f63 6f64 653e 3c2f 623e 206f 7220 l or \n+0018b240: 3c62 3e3c 636f 6465 3e2d 6c67 736f 6170 -lgsoap\n+0018b250: 7373 6c2b 2b3c 2f63 6f64 653e 3c2f 623e ssl++\n+0018b260: 2061 6e64 2063 6f6d 7069 6c65 2065 7665 and compile eve\n+0018b270: 7279 7468 696e 6720 656c 7365 2077 6974 rything else wit\n+0018b280: 6820 3c63 6f64 653e 2357 4954 485f 4f50 h #WITH_OP\n+0018b290: 454e 5353 4c3c 2f63 6f64 653e 2e3c 2f64 ENSSL..
      .Concurre\n+0018b2b0: 6e74 2063 6c69 656e 7420 6361 6c6c 7320 nt client calls \n+0018b2c0: 7769 7468 2074 6872 6561 6473 2073 686f with threads sho\n+0018b2d0: 756c 6420 7573 6520 7365 7061 7261 7465 uld use separate\n+0018b2e0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap contexts In a\n+0018b350: 6464 6974 696f 6e2c 2074 6865 2074 6872 ddition, the thr\n+0018b360: 6561 6420 696e 6974 6961 6c69 7a61 7469 ead initializati\n+0018b370: 6f6e 2063 6f64 6520 6469 7363 7573 7365 on code discusse\n+0018b380: 6420 696e 2053 6563 7469 6f6e 203c 6120 d in Section Secur\n+0018b3c0: 6520 5765 6220 7365 7276 6963 6573 2077 e Web services w\n+0018b3d0: 6974 6820 4854 5450 533c 2f61 3e20 6d75 ith HTTPS mu\n+0018b3e0: 7374 2062 6520 7573 6564 2074 6f20 7072 st be used to pr\n+0018b3f0: 6f70 6572 6c79 2073 6574 7570 204f 7065 operly setup Ope\n+0018b400: 6e53 534c 2069 6e20 6120 6d75 6c74 692d nSSL in a multi-\n+0018b410: 7468 7265 6164 6564 2063 6c69 656e 7420 threaded client \n+0018b420: 6170 706c 6963 6174 696f 6e2e 3c2f 6464 application.
      .

      See al\n+0018b440: 736f 2041 5049 2064 6f63 756d 656e 7461 so API documenta\n+0018b450: 7469 6f6e 204d 6f64 756c 6520 3c61 2063 tion Module SSL/TLS \n+0018b490: 636f 6e74 6578 7420 616e 6420 6675 6e63 context and func\n+0018b4a0: 7469 6f6e 733c 2f61 3e20 666f 7220 6d6f tions for mo\n+0018b4b0: 7265 2064 6574 6169 6c73 206f 6e20 7468 re details on th\n+0018b4c0: 6520 5353 4c2f 544c 5320 6675 6e63 7469 e SSL/TLS functi\n+0018b4d0: 6f6e 732e 3c2f 703e 0a3c 703e 596f 7520 ons.

      .

      You \n+0018b4e0: 6361 6e20 616c 736f 2075 7365 2074 6865 can also use the\n+0018b4f0: 2057 696e 496e 6574 2069 6e74 6572 6661 WinInet interfa\n+0018b500: 6365 2074 6f20 6573 7461 626c 6973 6820 ce to establish \n+0018b510: 7365 6375 7265 2048 5454 5053 2063 6f6e secure HTTPS con\n+0018b520: 6e65 6374 696f 6e73 206f 6e20 5769 6e64 nections on Wind\n+0018b530: 6f77 7320 6d61 6368 696e 6573 2c20 6176 ows machines, av\n+0018b540: 6169 6c61 626c 6520 696e 2074 6865 203c ailable in the <\n+0018b550: 656d 3e3c 636f 6465 3e67 736f 6170 2f6d em>gsoap/m\n+0018b560: 6f64 5f67 736f 6170 3c2f 636f 6465 3e3c od_gsoap<\n+0018b570: 2f65 6d3e 2064 6972 6563 746f 7279 206f /em> directory o\n+0018b580: 6620 7468 6520 6753 4f41 5020 736f 7572 f the gSOAP sour\n+0018b590: 6365 2063 6f64 6520 7061 636b 6167 652c ce code package,\n+0018b5a0: 2073 6565 2061 6c73 6f20 5365 6374 696f see also Sectio\n+0018b5b0: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n \n+0018b5e0: 5468 6520 5769 6e49 6e65 7420 706c 7567 The WinInet plug\n+0018b5f0: 696e 3c2f 613e 2e20 4f72 2079 6f75 2063 in. Or you c\n+0018b600: 616e 2075 7365 2074 6865 2043 5552 4c20 an use the CURL \n+0018b610: 706c 7567 696e 2074 6f20 7573 6520 4355 plugin to use CU\n+0018b620: 524c 2074 6f20 6573 7461 626c 6973 6820 RL to establish \n+0018b630: 7365 6375 7265 2048 5454 5053 2063 6f6e secure HTTPS con\n+0018b640: 6e65 6374 696f 6e73 2c20 7365 6520 5365 nections, see Se\n+0018b650: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction The CURL plugin\n+0018b690: 3c2f 613e 2e3c 2f70 3e0a 3c70 3ef0 9f94 .

      .

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

      .\n+0018b6d0: 3c68 323e 3c61 2063 6c61 7373 3d22 616e

      .SSL a\n+0018b710: 7574 6865 6e74 6963 6174 696f 6e20 6361 uthentication ca\n+0018b720: 6c6c 6261 636b 733c 2f68 323e 0a3c 703e llbacks

      .

      \n+0018b730: 5468 6520 3c63 6f64 653e 6673 736c 6175 The fsslau\n+0018b740: 7468 3c2f 636f 6465 3e20 6361 6c6c 6261 th callba\n+0018b750: 636b 2066 756e 6374 696f 6e20 636f 6e74 ck function cont\n+0018b760: 726f 6c73 204f 7065 6e53 534c 2f47 4e55 rols OpenSSL/GNU\n+0018b770: 544c 5320 6175 7468 656e 7469 6361 7469 TLS authenticati\n+0018b780: 6f6e 2069 6e69 7469 616c 697a 6174 696f on initializatio\n+0018b790: 6e3a 3c2f 703e 0a3c 756c 3e0a 3c6c 693e n:

      ..

      The\n+0018bc40: 203c 636f 6465 3e66 7373 6c76 6572 6966 fsslverif\n+0018bc50: 793c 2f63 6f64 653e 2063 616c 6c62 6163 y callbac\n+0018bc60: 6b20 6675 6e63 7469 6f6e 2063 6f6e 7472 k function contr\n+0018bc70: 6f6c 7320 4f70 656e 5353 4c20 7065 6572 ols OpenSSL peer\n+0018bc80: 2063 6572 7469 6669 6361 7465 2076 6572 certificate ver\n+0018bc90: 6966 6963 6174 696f 6e2c 2076 6961 2069 ification, via i\n+0018bca0: 6e74 6572 6e61 6c6c 7920 696e 766f 6b69 nternally invoki\n+0018bcb0: 6e67 203c 636f 6465 3e53 534c 5f43 5458 ng SSL_CTX\n+0018bcc0: 5f73 6574 5f76 6572 6966 793c 2f63 6f64 _set_verify:

      .
        .int (soap\n+0018bcf0: 3a3a 6673 7376 6572 6966 7929 2869 6e74 ::fssverify)(int\n+0018bd00: 206f 6b2c 2058 3530 395f 5354 4f52 455f ok, X509_STORE_\n+0018bd10: 4354 5820 2a73 746f 7265 3c2f 636f 6465 CTX *store This callback \n+0018bd30: 6973 2063 616c 6c65 6420 6279 2074 6865 is called by the\n+0018bd40: 2065 6e67 696e 6520 746f 206d 616e 6167 engine to manag\n+0018bd50: 6520 7468 6520 7665 7269 6669 6361 7469 e the verificati\n+0018bd60: 6f6e 206f 6620 7468 6520 6365 7274 6966 on of the certif\n+0018bd70: 6963 6174 6520 7072 6f76 6964 6564 2062 icate provided b\n+0018bd80: 7920 6120 7065 6572 2c20 7375 6368 2061 y a peer, such a\n+0018bd90: 7320 7468 6520 6365 7274 6966 6963 6174 s the certificat\n+0018bda0: 6520 7072 6f76 6964 6564 2062 7920 6120 e provided by a \n+0018bdb0: 7365 7276 6572 2063 6f6e 6e65 6374 6564 server connected\n+0018bdc0: 206f 7665 7220 4854 5450 5320 6f72 2074 over HTTPS or t\n+0018bdd0: 6f20 7665 7269 6679 2074 6865 2063 6572 o verify the cer\n+0018bde0: 7469 6669 6361 7465 2069 6e63 6c75 6465 tificate include\n+0018bdf0: 6420 7769 7468 2061 2057 532d 5365 6375 d with a WS-Secu\n+0018be00: 7269 7479 206d 6573 7361 6765 2e20 546f rity message. To\n+0018be10: 2072 6571 7569 7265 2063 6572 7469 6669 require certifi\n+0018be20: 6361 7465 2076 6572 6966 6963 6174 696f cate verificatio\n+0018be30: 6e20 6f66 2061 2073 6572 7665 7220 636f n of a server co\n+0018be40: 6e6e 6563 7465 6420 7669 6120 4854 5450 nnected via HTTP\n+0018be50: 532c 2075 7365 203c 636f 6465 3e3c 6120 S, use \n+0018bee0: 736f 6170 5f73 736c 5f63 6c69 656e 745f soap_ssl_client_\n+0018bef0: 636f 6e74 6578 743c 2f61 3e3c 2f63 6f64 context with #S\n+0018bf10: 4f41 505f 5353 4c5f 5245 5155 4952 455f OAP_SSL_REQUIRE_\n+0018bf20: 5345 5256 4552 5f41 5554 4845 4e54 4943 SERVER_AUTHENTIC\n+0018bf30: 4154 494f 4e3c 2f63 6f64 653e 2e20 546f ATION. To\n+0018bf40: 2072 6571 7569 7265 2063 6572 7469 6669 require certifi\n+0018bf50: 6361 7465 2076 6572 6966 6963 6174 696f cate verificatio\n+0018bf60: 6e20 6f66 2061 2063 6c69 656e 7420 636f n of a client co\n+0018bf70: 6e6e 6563 7465 6420 746f 2061 2073 6572 nnected to a ser\n+0018bf80: 7665 722c 2075 7365 203c 636f 6465 3e3c ver, use <\n+0018bf90: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0018bfa0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0018bfb0: 5f73 736c 2e68 746d 6c23 6761 3334 3932 _ssl.html#ga3492\n+0018bfc0: 3436 3563 6464 3861 6137 3166 6537 3436 465cdd8aa71fe746\n+0018bfd0: 3139 3964 3338 3432 6361 6337 2220 7469 199d3842cac7\" ti\n+0018bfe0: 746c 653d 2249 6e69 7469 616c 697a 6520 tle=\"Initialize \n+0018bff0: 7468 6520 7365 7276 6572 2d73 6964 6520 the server-side \n+0018c000: 5353 4c2f 544c 5320 636f 6e74 6578 742e SSL/TLS context.\n+0018c010: 223e 736f 6170 5f73 736c 5f73 6572 7665 \">soap_ssl_serve\n+0018c020: 725f 636f 6e74 6578 743c 2f61 3e3c 2f63 r_context with \n+0018c040: 2353 4f41 505f 5353 4c5f 5245 5155 4952 #SOAP_SSL_REQUIR\n+0018c050: 455f 434c 4945 4e54 5f41 5554 4845 4e54 E_CLIENT_AUTHENT\n+0018c060: 4943 4154 494f 4e3c 2f63 6f64 653e 2e20 ICATION. \n+0018c070: 5468 6520 3c63 6f64 653e 6f6b 3c2f 636f The ok parameter of\n+0018c090: 2074 6869 7320 6361 6c6c 6261 636b 2069 this callback i\n+0018c0a0: 6e64 6963 6174 6573 2077 6865 7468 6572 ndicates whether\n+0018c0b0: 2074 6865 2076 6572 6966 6963 6174 696f the verificatio\n+0018c0c0: 6e20 6f66 2074 6865 2063 6572 7469 6669 n of the certifi\n+0018c0d0: 6361 7465 2069 6e20 7175 6573 7469 6f6e cate in question\n+0018c0e0: 2070 6173 7365 6420 283c 636f 6465 3e6f passed (o\n+0018c0f0: 6b3c 2f63 6f64 653e 203d 3d20 3129 206f k == 1) o\n+0018c100: 7220 6661 696c 6564 2028 3c63 6f64 653e r failed (\n+0018c110: 6f6b 3c2f 636f 6465 3e20 3d3d 2030 2920 ok == 0) \n+0018c120: 6173 2064 6574 6572 6d69 6e65 6420 6279 as determined by\n+0018c130: 2074 6865 204f 7065 6e53 534c 206c 6962 the OpenSSL lib\n+0018c140: 7261 7279 2062 6173 6564 206f 6e20 7468 rary based on th\n+0018c150: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap_\n+0018c1e0: 7373 6c5f 636c 6965 6e74 5f63 6f6e 7465 ssl_client_conte\n+0018c1f0: 7874 3c2f 613e 3c2f 636f 6465 3e20 6f72 xt or\n+0018c200: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_s\n+0018c290: 736c 5f73 6572 7665 725f 636f 6e74 6578 sl_server_contex\n+0018c2a0: 743c 2f61 3e3c 2f63 6f64 653e 2063 6f6e t con\n+0018c2b0: 6669 6775 7261 7469 6f6e 2e20 4966 2074 figuration. If t\n+0018c2c0: 6865 2063 616c 6c62 6163 6b20 7265 7475 he callback retu\n+0018c2d0: 726e 7320 3120 7468 656e 2074 6865 2068 rns 1 then the h\n+0018c2e0: 616e 6473 6861 6b65 2069 7320 636f 6e74 andshake is cont\n+0018c2f0: 696e 7565 6420 616e 6420 7468 6520 636f inued and the co\n+0018c300: 6e6e 6563 7469 6f6e 206d 6179 6265 2065 nnection maybe e\n+0018c310: 7374 6162 6c69 7368 6564 2e20 546f 2072 stablished. To r\n+0018c320: 6574 7572 6e20 3120 7768 656e 203c 636f eturn 1 when ok == \n+0018c340: 3020 7265 7175 6972 6573 2072 6573 6574 0 requires reset\n+0018c350: 7469 6e67 2074 6865 2065 7272 6f72 2073 ting the error s\n+0018c360: 7461 7465 2077 6974 6820 3c63 6f64 653e tate with \n+0018c370: 5835 3039 5f53 544f 5245 5f43 5458 5f73 X509_STORE_CTX_s\n+0018c380: 6574 5f65 7272 6f72 2873 746f 7265 2c20 et_error(store, \n+0018c390: 5835 3039 5f56 5f4f 4b29 3c2f 636f 6465 X509_V_OK). If the callba\n+0018c3b0: 636b 2072 6574 7572 6e73 2030 2074 6865 ck returns 0 the\n+0018c3c0: 6e20 7468 6520 6861 6e64 7368 616b 6520 n the handshake \n+0018c3d0: 6973 2069 6d6d 6564 6961 7465 6c79 2074 is immediately t\n+0018c3e0: 6572 6d69 6e61 7465 6420 7769 7468 2022 erminated with \"\n+0018c3f0: 7665 7269 6669 6361 7469 6f6e 2066 6169 verification fai\n+0018c400: 6c65 6422 2061 6e64 2061 2076 6572 6966 led\" and a verif\n+0018c410: 6963 6174 696f 6e20 6661 696c 7572 6520 ication failure \n+0018c420: 616c 6572 7420 6973 2073 656e 7420 746f alert is sent to\n+0018c430: 2074 6865 2070 6565 722e 2054 6865 2062 the peer. The b\n+0018c440: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function\n+0018c450: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to s\n+0018c520: 6f61 703a 3a66 7373 6c76 6572 6966 793c oap::fsslverify<\n+0018c530: 2f61 3e3c 2f63 6f64 653e 2069 7320 3c63 /a> is ssl_verify_c\n+0018c550: 616c 6c62 6163 6b3c 2f63 6f64 653e 206f allback o\n+0018c560: 7220 7768 656e 203c 636f 6465 3e23 534f r when #SO\n+0018c570: 4150 5f53 534c 5f41 4c4c 4f57 5f45 5850 AP_SSL_ALLOW_EXP\n+0018c580: 4952 4544 5f43 4552 5449 4649 4341 5445 IRED_CERTIFICATE\n+0018c590: 3c2f 636f 6465 3e20 6973 2075 7365 6420 is used \n+0018c5a0: 3c63 6f64 653e 7373 6c5f 7665 7269 6679 ssl_verify\n+0018c5b0: 5f63 616c 6c62 6163 6b5f 616c 6c6f 775f _callback_allow_\n+0018c5c0: 6578 7069 7265 645f 6365 7274 6966 6963 expired_certific\n+0018c5d0: 6174 653c 2f63 6f64 653e 2e3c 2f6c 693e ate.\n+0018c5e0: 0a3c 2f75 6c3e 0a3c 703e f09f 949d 203c .
      .

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

      .\n+0018c640: 0a53 534c 2063 6572 7469 6669 6361 7465 .SSL certificate\n+0018c650: 7320 616e 6420 6b65 7920 6669 6c65 733c s and key files<\n+0018c660: 2f68 323e 0a3c 703e 5468 6520 6753 4f41 /h2>.

      The gSOA\n+0018c670: 5020 7061 636b 6167 6520 696e 636c 7564 P package includ\n+0018c680: 6573 2061 203c 656d 3e3c 636f 6465 3e63 es a c\n+0018c690: 6163 6572 7473 2e70 656d 3c2f 636f 6465 acerts.pem file with\n+0018c6b0: 2074 6865 2063 6572 7469 6669 6361 7465 the certificate\n+0018c6c0: 7320 6f66 2061 6c6c 2063 6572 7469 6669 s of all certifi\n+0018c6d0: 6361 7465 2061 7574 686f 7269 7469 6573 cate authorities\n+0018c6e0: 2e20 596f 7520 6361 6e20 7573 6520 7468 . You can use th\n+0018c6f0: 6973 2066 696c 6520 746f 2076 6572 6966 is file to verif\n+0018c700: 7920 7468 6520 6175 7468 656e 7469 6361 y the authentica\n+0018c710: 7469 6f6e 206f 6620 7365 7276 6572 7320 tion of servers \n+0018c720: 7468 6174 2070 726f 7669 6465 2063 6572 that provide cer\n+0018c730: 7469 6669 6361 7465 7320 6973 7375 6564 tificates issued\n+0018c740: 2062 7920 7468 6573 6520 4341 732e 204a by these CAs. J\n+0018c750: 7573 7420 7365 7420 7468 6520 3c63 6f64 ust set the cafile \n+0018c770: 7061 7261 6d65 7465 7220 746f 2074 6865 parameter to the\n+0018c780: 206c 6f63 6174 696f 6e20 6f66 2074 6869 location of thi\n+0018c790: 7320 6669 6c65 206f 6e20 796f 7572 2066 s file on your f\n+0018c7a0: 696c 6520 7379 7374 656d 2e20 5468 6572 ile system. Ther\n+0018c7b0: 6566 6f72 652c 2077 6865 6e20 796f 7520 efore, when you \n+0018c7c0: 6f62 7461 696e 2061 2063 6572 7469 6669 obtain a certifi\n+0018c7d0: 6361 7465 2073 6967 6e65 6420 6279 2061 cate signed by a\n+0018c7e0: 2074 7275 7374 6564 2043 4120 796f 7520 trusted CA you \n+0018c7f0: 6361 6e20 7369 6d70 6c79 2075 7365 2074 can simply use t\n+0018c800: 6865 203c 656d 3e3c 636f 6465 3e63 6163 he cac\n+0018c810: 6572 7473 2e70 656d 3c2f 636f 6465 3e3c erts.pem<\n+0018c820: 2f65 6d3e 2066 696c 6520 746f 2064 6576 /em> file to dev\n+0018c830: 656c 6f70 2063 6c69 656e 7420 6170 706c elop client appl\n+0018c840: 6963 6174 696f 6e73 2074 6861 7420 6361 ications that ca\n+0018c850: 6e20 7665 7269 6679 2074 6865 2061 7574 n verify the aut\n+0018c860: 6865 6e74 6963 6974 7920 6f66 2079 6f75 henticity of you\n+0018c870: 7220 7365 7276 6572 2e3c 2f70 3e0a 3c70 r server.

      .Alternatively, \n+0018c890: 796f 7520 6361 6e20 7573 6520 7468 6520 you can use the \n+0018c8a0: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n+0018c8b0: 706c 7567 696e 2f63 6163 6572 7473 2e68 plugin/cacerts.h\n+0018c8c0: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 6e64 and\n+0018c8d0: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n+0018c8e0: 2f70 6c75 6769 6e2f 6361 6365 7274 732e /plugin/cacerts.\n+0018c8f0: 633c 2f63 6f64 653e 3c2f 656d 3e20 636f c co\n+0018c900: 6465 2074 6f20 656d 6265 6420 4341 2063 de to embed CA c\n+0018c910: 6572 7469 6669 6361 7465 7320 696e 2079 ertificates in y\n+0018c920: 6f75 7220 636c 6965 6e74 2063 6f64 652e our client code.\n+0018c930: 3c2f 703e 0a3c 703e 466f 7220 7379 7374

      .

      For syst\n+0018c940: 656d 7320 6261 7365 6420 6f6e 204d 6963 ems based on Mic\n+0018c950: 726f 736f 6674 2077 696e 646f 7773 2c20 rosoft windows, \n+0018c960: 7468 6520 5769 6e49 6e65 7420 6d6f 6475 the WinInet modu\n+0018c970: 6c65 2063 616e 2062 6520 7573 6564 2069 le can be used i\n+0018c980: 6e73 7465 6164 2c20 7365 6520 7468 6520 nstead, see the \n+0018c990: 3c63 6f64 653e 5245 4144 4d45 2e74 7874 README.txt\n+0018c9a0: 3c2f 636f 6465 3e20 6c6f 6361 7465 6420 located \n+0018c9b0: 696e 2074 6865 2067 534f 4150 2073 6f75 in the gSOAP sou\n+0018c9c0: 7263 6520 636f 6465 2070 6163 6b61 6765 rce code package\n+0018c9d0: 2075 6e64 6572 203c 636f 6465 3e6d 6f64 under mod\n+0018c9e0: 5f67 736f 6170 2f67 736f 6170 5f77 696e _gsoap/gsoap_win\n+0018c9f0: 2f77 696e 696e 6574 3c2f 636f 6465 3e2c /wininet,\n+0018ca00: 2073 6565 2074 6865 2067 534f 4150 203c see the gSOAP <\n+0018ca10: 6120 6872 6566 3d22 2e2e 2f2e 2e2f 7769 a href=\"../../wi\n+0018ca20: 6e69 6e65 742f 6874 6d6c 2f69 6e64 6578 ninet/html/index\n+0018ca30: 2e68 746d 6c22 3e57 696e 496e 6574 2070 .html\">WinInet p\n+0018ca40: 6c75 6769 6e3c 2f61 3e20 646f 6375 6d65 lugin docume\n+0018ca50: 6e74 6174 696f 6e2e 3c2f 703e 0a3c 703e ntation.

      .

      \n+0018ca60: 5468 6520 6f74 6865 7220 3c65 6d3e 3c63 The other .pem<\n+0018ca80: 2f65 6d3e 2066 696c 6573 2069 6e20 7468 /em> files in th\n+0018ca90: 6520 6753 4f41 5020 7061 636b 6167 6520 e gSOAP package \n+0018caa0: 6172 6520 6578 616d 706c 6573 206f 6620 are examples of \n+0018cab0: 7365 6c66 2d73 6967 6e65 6420 6365 7274 self-signed cert\n+0018cac0: 6966 6963 6174 6573 2066 6f72 2074 6573 ificates for tes\n+0018cad0: 7469 6e67 2070 7572 706f 7365 7320 283c ting purposes (<\n+0018cae0: 656d 3e3c 636f 6465 3e63 6163 6572 742e em>cacert.\n+0018caf0: 7065 6d3c 2f63 6f64 653e 3c2f 656d 3e2c pem,\n+0018cb00: 203c 656d 3e3c 636f 6465 3e63 6c69 656e clien\n+0018cb10: 742e 7065 6d3c 2f63 6f64 653e 3c2f 656d t.pem, ser\n+0018cb30: 7665 722e 7065 6d3c 2f63 6f64 653e 3c2f ver.pem). The client.pem and <\n+0018cb70: 656d 3e3c 636f 6465 3e73 6572 7665 722e em>server.\n+0018cb80: 7065 6d3c 2f63 6f64 653e 3c2f 656d 3e20 pem \n+0018cb90: 636f 6e74 6169 6e20 7468 6520 7072 6976 contain the priv\n+0018cba0: 6174 6520 6b65 7920 616e 6420 6365 7274 ate key and cert\n+0018cbb0: 6966 6963 6174 6520 6f66 2074 6865 2063 ificate of the c\n+0018cbc0: 6c69 656e 7420 6f72 2073 6572 7665 722c lient or server,\n+0018cbd0: 2072 6573 7065 6374 6976 656c 792e 2054 respectively. T\n+0018cbe0: 6865 206b 6579 6669 6c65 7320 283c 656d he keyfiles (client.pe\n+0018cc00: 6d3c 2f63 6f64 653e 3c2f 656d 3e20 616e m an\n+0018cc10: 6420 3c65 6d3e 3c63 6f64 653e 7365 7276 d serv\n+0018cc20: 6572 2e70 656d 3c2f 636f 6465 3e3c 2f65 er.pem) are created \n+0018cc40: 6279 2063 6f6e 6361 7465 6e61 7469 6e67 by concatenating\n+0018cc50: 2074 6865 2070 7269 7661 7465 206b 6579 the private key\n+0018cc60: 2050 454d 2077 6974 6820 7468 6520 6365 PEM with the ce\n+0018cc70: 7274 6966 6963 6174 6520 5045 4d2e 2054 rtificate PEM. T\n+0018cc80: 6865 206b 6579 6669 6c65 2073 686f 756c he keyfile shoul\n+0018cc90: 6420 6e6f 7420 6265 2073 6861 7265 6420 d not be shared \n+0018cca0: 7769 7468 2061 6e79 2070 6172 7479 2e20 with any party. \n+0018ccb0: 5769 7468 204f 7065 6e53 534c 2c20 796f With OpenSSL, yo\n+0018ccc0: 7520 6361 6e20 656e 6372 7970 7420 7468 u can encrypt th\n+0018ccd0: 6520 6b65 7966 696c 6573 2077 6974 6820 e keyfiles with \n+0018cce0: 6120 7061 7373 776f 7264 2074 6f20 6f66 a password to of\n+0018ccf0: 6665 7220 736f 6d65 2070 726f 7465 6374 fer some protect\n+0018cd00: 696f 6e20 616e 6420 7468 6520 7061 7373 ion and the pass\n+0018cd10: 776f 7264 2069 7320 7573 6564 2069 6e20 word is used in \n+0018cd20: 7468 6520 636c 6965 6e74 2f73 6572 7665 the client/serve\n+0018cd30: 7220 636f 6465 2074 6f20 7265 6164 2074 r code to read t\n+0018cd40: 6865 206b 6579 6669 6c65 2e20 474e 5554 he keyfile. GNUT\n+0018cd50: 4c53 2064 6f65 7320 6e6f 7420 7375 7070 LS does not supp\n+0018cd60: 6f72 7420 7468 6973 2066 6561 7475 7265 ort this feature\n+0018cd70: 2061 6e64 2063 616e 6e6f 7420 656e 6372 and cannot encr\n+0018cd80: 7970 7420 6f72 2064 6563 7279 7074 2061 ypt or decrypt a\n+0018cd90: 206b 6579 6669 6c65 2e3c 2f70 3e0a 3c70 keyfile.

      .You can also cr\n+0018cdb0: 6561 7465 2079 6f75 7220 6f77 6e20 7365 eate your own se\n+0018cdc0: 6c66 2d73 6967 6e65 6420 6365 7274 6966 lf-signed certif\n+0018cdd0: 6963 6174 6573 2e20 5468 6572 6520 6973 icates. There is\n+0018cde0: 206d 6f72 6520 7468 616e 206f 6e65 2077 more than one w\n+0018cdf0: 6179 2074 6f20 6765 6e65 7261 7465 2074 ay to generate t\n+0018ce00: 6865 206e 6563 6573 7361 7279 2066 696c he necessary fil\n+0018ce10: 6573 2066 6f72 2063 6c69 656e 7473 2061 es for clients a\n+0018ce20: 6e64 2073 6572 7665 7273 2e20 5365 6520 nd servers. See \n+0018ce30: 3c61 2068 7265 663d 2268 7474 703a 2f2f http://www.open\n+0018ce60: 7373 6c2e 6f72 673c 2f61 3e20 666f 7220 ssl.org for \n+0018ce70: 696e 666f 726d 6174 696f 6e20 6f6e 204f information on O\n+0018ce80: 7065 6e53 534c 2061 6e64 203c 6120 6872 penSSL and http://si\n+0018cec0: 616c 2e6f 7267 2f68 6f77 746f 2f6f 7065 al.org/howto/ope\n+0018ced0: 6e73 736c 2f63 612f 3c2f 613e 206f 6e20 nssl/ca/ on \n+0018cee0: 686f 7720 746f 2073 6574 7570 2061 6e64 how to setup and\n+0018cef0: 206d 616e 6167 6520 6120 6c6f 6361 6c20 manage a local \n+0018cf00: 4341 2061 6e64 203c 6120 6872 6566 3d22 CA and http:\n+0018cf40: 2f2f 7369 616c 2e6f 7267 2f68 6f77 746f //sial.org/howto\n+0018cf50: 2f6f 7065 6e73 736c 2f73 656c 662d 7369 /openssl/self-si\n+0018cf60: 676e 6564 3c2f 613e 206f 6e20 686f 7720 gned on how \n+0018cf70: 746f 2073 6574 7570 2073 656c 662d 7369 to setup self-si\n+0018cf80: 676e 6564 2074 6573 7420 6365 7274 6966 gned test certif\n+0018cf90: 6963 6174 6573 2e3c 2f70 3e0a 3c70 3e49 icates.

      .

      I\n+0018cfa0: 7420 6973 2070 6f73 7369 626c 6520 746f t is possible to\n+0018cfb0: 2063 6f6e 7665 7274 2049 4953 2d67 656e convert IIS-gen\n+0018cfc0: 6572 6174 6564 2063 6572 7469 6669 6361 erated certifica\n+0018cfd0: 7465 7320 746f 2050 454d 2066 6f72 6d61 tes to PEM forma\n+0018cfe0: 7420 7769 7468 2074 6865 206f 7065 6e73 t with the opens\n+0018cff0: 736c 206c 6962 7261 7279 2061 6e64 206f sl library and o\n+0018d000: 7065 6e73 736c 2063 6f6d 6d61 6e64 2d6c penssl command-l\n+0018d010: 696e 6520 746f 6f6c 3a20 3c2f 703e 3c70 ine tool:

      openssl x509\n+0018d040: 202d 696e 206d 7963 6572 742e 6365 7220 -in mycert.cer \n+0018d050: 2d69 6e66 6f72 6d20 4445 5220 2d6f 7574 -inform DER -out\n+0018d060: 206d 7963 6572 742e 7065 6d20 2d6f 7574 mycert.pem -out\n+0018d070: 666f 726d 2050 454d 0a3c 2f70 7265 3e3c form PEM.<\n+0018d080: 703e 2054 6869 7320 636f 6e76 6572 7473 p> This converts\n+0018d090: 2074 6865 2043 5254 2d66 6f72 6d61 7474 the CRT-formatt\n+0018d0a0: 6564 206d 7963 6572 742e 6365 7220 746f ed mycert.cer to\n+0018d0b0: 2050 454d 2d66 6f72 6d61 7474 6564 206d PEM-formatted m\n+0018d0c0: 7963 6572 742e 7065 6d2e 3c2f 703e 0a3c ycert.pem.

      .<\n+0018d0d0: 703e 4865 7265 2069 7320 7468 6520 7369 p>Here is the si\n+0018d0e0: 6d70 6c65 7374 2077 6179 2074 6f20 7365 mplest way to se\n+0018d0f0: 7475 7020 7365 6c66 2d73 6967 6e65 6420 tup self-signed \n+0018d100: 6365 7274 6966 6963 6174 6573 2e20 4669 certificates. Fi\n+0018d110: 7273 7420 796f 7520 6e65 6564 2074 6f20 rst you need to \n+0018d120: 6372 6561 7465 2061 2070 7269 7661 7465 create a private\n+0018d130: 2043 6572 7469 6669 6361 7465 2041 7574 Certificate Aut\n+0018d140: 686f 7269 7479 2028 4341 292e 2054 6865 hority (CA). The\n+0018d150: 2043 4120 6973 2075 7365 6420 696e 2053 CA is used in S\n+0018d160: 534c 2074 6f20 7665 7269 6679 2074 6865 SL to verify the\n+0018d170: 2061 7574 6865 6e74 6963 6974 7920 6f66 authenticity of\n+0018d180: 2061 2067 6976 656e 2063 6572 7469 6669 a given certifi\n+0018d190: 6361 7465 2e20 5468 6520 4341 2061 6374 cate. The CA act\n+0018d1a0: 7320 6173 2061 2074 7275 7374 6564 2074 s as a trusted t\n+0018d1b0: 6869 7264 2070 6172 7479 2077 686f 2068 hird party who h\n+0018d1c0: 6173 2061 7574 6865 6e74 6963 6174 6564 as authenticated\n+0018d1d0: 2074 6865 2075 7365 7220 6f66 2074 6865 the user of the\n+0018d1e0: 2073 6967 6e65 6420 6365 7274 6966 6963 signed certific\n+0018d1f0: 6174 6520 6173 2062 6569 6e67 2077 686f ate as being who\n+0018d200: 2074 6865 7920 7361 792e 2054 6865 2063 they say. The c\n+0018d210: 6572 7469 6669 6361 7465 2069 7320 7369 ertificate is si\n+0018d220: 676e 6564 2062 7920 7468 6520 4341 2c20 gned by the CA, \n+0018d230: 616e 6420 6966 2074 6865 2063 6c69 656e and if the clien\n+0018d240: 7420 7472 7573 7473 2074 6865 2043 412c t trusts the CA,\n+0018d250: 2069 7420 7769 6c6c 2074 7275 7374 2079 it will trust y\n+0018d260: 6f75 7220 6365 7274 6966 6963 6174 652e our certificate.\n+0018d270: 2046 6f72 2075 7365 2077 6974 6869 6e20 For use within \n+0018d280: 796f 7572 206f 7267 616e 697a 6174 696f your organizatio\n+0018d290: 6e2c 2061 2070 7269 7661 7465 2043 4120 n, a private CA \n+0018d2a0: 7769 6c6c 2070 726f 6261 626c 7920 7365 will probably se\n+0018d2b0: 7276 6520 796f 7572 206e 6565 6473 2e20 rve your needs. \n+0018d2c0: 486f 7765 7665 722c 2069 6620 796f 7520 However, if you \n+0018d2d0: 696e 7465 6e64 2075 7365 2079 6f75 7220 intend use your \n+0018d2e0: 6365 7274 6966 6963 6174 6573 2066 6f72 certificates for\n+0018d2f0: 2061 2070 7562 6c69 6320 7365 7276 6963 a public servic\n+0018d300: 652c 2079 6f75 2073 686f 756c 6420 7072 e, you should pr\n+0018d310: 6f62 6162 6c79 206f 6274 6169 6e20 6120 obably obtain a \n+0018d320: 6365 7274 6966 6963 6174 6520 6672 6f6d certificate from\n+0018d330: 2061 206b 6e6f 776e 2043 412e 2049 6e20 a known CA. In \n+0018d340: 6164 6469 7469 6f6e 2074 6f20 6964 656e addition to iden\n+0018d350: 7469 6669 6361 7469 6f6e 2c20 796f 7572 tification, your\n+0018d360: 2063 6572 7469 6669 6361 7465 2069 7320 certificate is \n+0018d370: 616c 736f 2075 7365 6420 666f 7220 656e also used for en\n+0018d380: 6372 7970 7469 6f6e 2e3c 2f70 3e0a 3c70 cryption.

      .Creating certif\n+0018d3a0: 6963 6174 6573 2073 686f 756c 6420 6265 icates should be\n+0018d3b0: 2064 6f6e 6520 7468 726f 7567 6820 6120 done through a \n+0018d3c0: 4341 2074 6f20 6f62 7461 696e 2073 6967 CA to obtain sig\n+0018d3d0: 6e65 6420 6365 7274 6966 6963 6174 6573 ned certificates\n+0018d3e0: 2e20 4275 7420 796f 7520 6361 6e20 6372 . But you can cr\n+0018d3f0: 6561 7465 2079 6f75 7220 6f77 6e20 6365 eate your own ce\n+0018d400: 7274 6966 6963 6174 6573 2066 6f72 2074 rtificates for t\n+0018d410: 6573 7469 6e67 2070 7572 706f 7365 7320 esting purposes \n+0018d420: 6173 2066 6f6c 6c6f 7773 2e3c 2f70 3e0a as follows.

      .\n+0018d430: 3c75 6c3e 0a3c 6c69 3e47 6f20 746f 2074
        .
      • Go to t\n+0018d440: 6865 204f 7065 6e53 534c 2062 696e 2064 he OpenSSL bin d\n+0018d450: 6972 6563 746f 7279 2028 3c63 6f64 653e irectory (\n+0018d460: 2f75 7372 2f6c 6f63 616c 2f73 736c 3c2f /usr/local/ssl by default\n+0018d480: 2061 6e64 203c 636f 6465 3e2f 5379 7374 and /Syst\n+0018d490: 656d 2f4c 6962 7261 7279 2f4f 7065 6e53 em/Library/OpenS\n+0018d4a0: 534c 3c2f 636f 6465 3e20 6f6e 204d 6163 SL on Mac\n+0018d4b0: 204f 5320 5829 3c2f 6c69 3e0a 3c6c 693e OS X)
      • .
      • \n+0018d4c0: 5468 6572 6520 7368 6f75 6c64 2062 6520 There should be \n+0018d4d0: 6120 6669 6c65 2063 616c 6c65 6420 6f70 a file called op\n+0018d4e0: 656e 7373 6c2e 636e 663c 2f6c 693e 0a3c enssl.cnf
      • .<\n+0018d4f0: 6c69 3e43 7265 6174 6520 6120 6e65 7720 li>Create a new \n+0018d500: 6469 7265 6374 6f72 7920 696e 2079 6f75 directory in you\n+0018d510: 7220 686f 6d65 2061 6363 6f75 6e74 2c20 r home account, \n+0018d520: 652e 672e 2024 484f 4d45 2f43 412c 2061 e.g. $HOME/CA, a\n+0018d530: 6e64 2063 6f70 7920 7468 6520 6f70 656e nd copy the open\n+0018d540: 7373 6c2e 636e 6620 6669 6c65 2074 6f20 ssl.cnf file to \n+0018d550: 7468 6973 2064 6972 6563 746f 7279 3c2f this directory.
      • Modify o\n+0018d570: 7065 6e73 736c 2e63 6e66 2062 7920 6368 penssl.cnf by ch\n+0018d580: 616e 6769 6e67 2074 6865 2027 6469 7227 anging the 'dir'\n+0018d590: 2076 616c 7565 2074 6f20 484f 4d45 2f43 value to HOME/C\n+0018d5a0: 413c 2f6c 693e 0a3c 6c69 3e43 6f70 7920 A
      • .
      • Copy \n+0018d5b0: 7468 6520 5245 4144 4d45 2e74 7874 2c20 the README.txt, \n+0018d5c0: 726f 6f74 2e73 682c 2061 6e64 2063 6572 root.sh, and cer\n+0018d5d0: 742e 7368 2073 6372 6970 7473 2066 726f t.sh scripts fro\n+0018d5e0: 6d20 7468 6520 6753 4f41 5020 736f 7572 m the gSOAP sour\n+0018d5f0: 6365 2063 6f64 6520 7061 636b 6167 6520 ce code package \n+0018d600: 6c6f 6361 7465 6420 696e 2074 6865 203c located in the <\n+0018d610: 656d 3e3c 636f 6465 3e67 736f 6170 2f73 em>gsoap/s\n+0018d620: 616d 706c 6573 2f73 736c 3c2f 636f 6465 amples/ssl directory\n+0018d640: 2074 6f20 484f 4d45 2f43 413c 2f6c 693e to HOME/CA
      • \n+0018d650: 0a3c 6c69 3e46 6f6c 6c6f 7720 7468 6520 .
      • Follow the \n+0018d660: 5245 4144 4d45 2e74 7874 2069 6e73 7472 README.txt instr\n+0018d670: 7563 7469 6f6e 733c 2f6c 693e 0a3c 2f75 uctions
      • ..

        You now ha\n+0018d690: 7665 2061 2073 656c 662d 7369 676e 6564 ve a self-signed\n+0018d6a0: 2043 4120 726f 6f74 2063 6572 7469 6669 CA root certifi\n+0018d6b0: 6361 7465 2063 6163 6572 742e 7065 6d20 cate cacert.pem \n+0018d6c0: 616e 6420 6120 7365 7276 6572 2e70 656d and a server.pem\n+0018d6d0: 2028 6f72 2063 6c69 656e 742e 7065 6d29 (or client.pem)\n+0018d6e0: 2063 6572 7469 6669 6361 7465 2069 6e20 certificate in \n+0018d6f0: 5045 4d20 666f 726d 6174 2e20 5468 6520 PEM format. The \n+0018d700: 6361 6365 7274 2e70 656d 2063 6572 7469 cacert.pem certi\n+0018d710: 6669 6361 7465 2069 7320 7573 6564 2069 ficate is used i\n+0018d720: 6e20 7468 6520 3c63 6f64 653e 6361 6669 n the cafi\n+0018d730: 6c65 3c2f 636f 6465 3e20 7061 7261 6d65 le parame\n+0018d740: 7465 7220 6f66 2074 6865 203c 636f 6465 ter of the soap_ssl_cli\n+0018d7e0: 656e 745f 636f 6e74 6578 743c 2f61 3e3c ent_context<\n+0018d7f0: 2f63 6f64 653e 2028 6f72 203c 636f 6465 /code> (or soap_ssl_ser\n+0018d890: 7665 725f 636f 6e74 6578 743c 2f61 3e3c ver_context<\n+0018d8a0: 2f63 6f64 653e 2920 6174 2074 6865 2063 /code>) at the c\n+0018d8b0: 6c69 656e 7420 286f 7220 7365 7276 6572 lient (or server\n+0018d8c0: 2920 7369 6465 2074 6f20 7665 7269 6679 ) side to verify\n+0018d8d0: 2074 6865 2061 7574 6865 6e74 6963 6974 the authenticit\n+0018d8e0: 7920 6f66 2074 6865 2070 6565 722e 2059 y of the peer. Y\n+0018d8f0: 6f75 2063 616e 2061 6c73 6f20 7072 6f76 ou can also prov\n+0018d900: 6964 6520 6120 6361 7061 7468 2070 6172 ide a capath par\n+0018d910: 616d 6574 6572 2074 6f20 7468 6573 6520 ameter to these \n+0018d920: 7472 7573 7465 6420 6365 7274 6966 6963 trusted certific\n+0018d930: 6174 6573 2e20 5468 6520 7365 7276 6572 ates. The server\n+0018d940: 2e70 656d 2028 6f72 2063 6c69 656e 742e .pem (or client.\n+0018d950: 7065 6d29 206d 7573 7420 6265 2070 726f pem) must be pro\n+0018d960: 7669 6465 6420 7769 7468 2074 6865 203c vided with the <\n+0018d970: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_ssl\n+0018da00: 5f73 6572 7665 725f 636f 6e74 6578 743c _server_context<\n+0018da10: 2f61 3e3c 2f63 6f64 653e 2061 7420 7468 /a> at th\n+0018da20: 6520 7365 7276 6572 2073 6964 6520 286f e server side (o\n+0018da30: 7220 3c63 6f64 653e 3c61 2063 6c61 7373 r soap_\n+0018dac0: 7373 6c5f 636c 6965 6e74 5f63 6f6e 7465 ssl_client_conte\n+0018dad0: 7874 3c2f 613e 3c2f 636f 6465 3e20 6174 xt at\n+0018dae0: 2074 6865 2063 6c69 656e 7420 7369 6465 the client side\n+0018daf0: 2920 746f 6765 7468 6572 2077 6974 6820 ) together with \n+0018db00: 7468 6520 7061 7373 776f 7264 2079 6f75 the password you\n+0018db10: 2065 6e74 6572 6564 2077 6865 6e20 6765 entered when ge\n+0018db20: 6e65 7261 7469 6e67 2074 6865 2063 6572 nerating the cer\n+0018db30: 7469 6669 6361 7465 2075 7369 6e67 2063 tificate using c\n+0018db40: 6572 742e 7368 2074 6f20 6163 6365 7373 ert.sh to access\n+0018db50: 2074 6865 2066 696c 652e 2054 6865 7365 the file. These\n+0018db60: 2063 6572 7469 6669 6361 7465 7320 6d75 certificates mu\n+0018db70: 7374 2062 6520 7072 6573 656e 7420 746f st be present to\n+0018db80: 2067 7261 6e74 2061 7574 6865 6e74 6963 grant authentic\n+0018db90: 6174 696f 6e20 7265 7175 6573 7473 2062 ation requests b\n+0018dba0: 7920 7065 6572 732e 2049 6e20 6164 6469 y peers. In addi\n+0018dbb0: 7469 6f6e 2c20 7468 6520 7365 7276 6572 tion, the server\n+0018dbc0: 2e70 656d 2028 616e 6420 636c 6965 6e74 .pem (and client\n+0018dbd0: 2e70 656d 2920 696e 636c 7564 6520 7468 .pem) include th\n+0018dbe0: 6520 686f 7374 206e 616d 6520 6f66 2074 e host name of t\n+0018dbf0: 6865 206d 6163 6869 6e65 206f 6e20 7768 he machine on wh\n+0018dc00: 6963 6820 7468 6520 6170 706c 6963 6174 ich the applicat\n+0018dc10: 696f 6e20 7275 6e73 2028 652e 672e 206c ion runs (e.g. l\n+0018dc20: 6f63 616c 686f 7374 292c 2073 6f20 796f ocalhost), so yo\n+0018dc30: 7520 6e65 6564 2074 6f20 6765 6e65 7261 u need to genera\n+0018dc40: 7465 206e 6577 2063 6572 7469 6669 6361 te new certifica\n+0018dc50: 7465 7320 7768 656e 206d 6967 7261 7469 tes when migrati\n+0018dc60: 6e67 2061 2073 6572 7665 7220 286f 7220 ng a server (or \n+0018dc70: 636c 6965 6e74 292e 3c2f 703e 0a3c 703e client).

        .

        \n+0018dc80: 4669 6e61 6c6c 792c 2079 6f75 206e 6565 Finally, you nee\n+0018dc90: 6420 746f 2067 656e 6572 6174 6520 4469 d to generate Di\n+0018dca0: 6666 6965 2d48 656c 6d61 6e6e 2028 4448 ffie-Helmann (DH\n+0018dcb0: 2920 7061 7261 6d65 7465 7273 2066 6f72 ) parameters for\n+0018dcc0: 2074 6865 2073 6572 7665 7220 6966 2079 the server if y\n+0018dcd0: 6f75 2077 6973 6820 746f 2075 7365 2044 ou wish to use D\n+0018dce0: 4820 696e 7374 6561 6420 6f66 2052 5341 H instead of RSA\n+0018dcf0: 2e20 5468 6572 6520 6172 6520 7477 6f20 . There are two \n+0018dd00: 6f70 7469 6f6e 733a 3c2f 703e 0a3c 756c options:

        ..
      • Set the dhfile parameter to t\n+0018dd40: 6865 206e 756d 6572 6963 2044 4820 7072 he numeric DH pr\n+0018dd50: 696d 6520 6c65 6e67 7468 2069 6e20 6269 ime length in bi\n+0018dd60: 7473 2072 6571 7569 7265 6420 2866 6f72 ts required (for\n+0018dd70: 2065 7861 6d70 6c65 2022 3130 3234 2229 example \"1024\")\n+0018dd80: 2074 6f20 6c65 7420 7468 6520 656e 6769 to let the engi\n+0018dd90: 6e65 2067 656e 6572 6174 6520 4448 2070 ne generate DH p\n+0018dda0: 6172 616d 6574 6572 7320 6174 2069 6e69 arameters at ini\n+0018ddb0: 7469 616c 697a 6174 696f 6e2e 2054 6869 tialization. Thi\n+0018ddc0: 7320 6361 6e20 6265 2074 696d 6520 636f s can be time co\n+0018ddd0: 6e73 756d 696e 672e 3c2f 6c69 3e0a 3c6c nsuming.
      • .Provide a file\n+0018ddf0: 206e 616d 6520 666f 7220 7468 6520 3c63 name for the dhfile parameter of <\n+0018de20: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_ssl\n+0018deb0: 5f73 6572 7665 725f 636f 6e74 6578 743c _server_context<\n+0018dec0: 2f61 3e3c 2f63 6f64 653e 2e20 5468 6520 /a>
        . The \n+0018ded0: 6669 6c65 2073 686f 756c 6420 6265 2067 file should be g\n+0018dee0: 656e 6572 6174 6564 2062 6566 6f72 6568 enerated beforeh\n+0018def0: 616e 642e 2054 6f20 646f 2073 6f20 7769 and. To do so wi\n+0018df00: 7468 2074 6865 204f 7065 6e53 534c 2063 th the OpenSSL c\n+0018df10: 6f6d 6d61 6e64 206c 696e 6520 746f 6f6c ommand line tool\n+0018df20: 2c20 7573 653a 203c 7072 6520 636c 6173 , use:
         op\n+0018df40: 656e 7373 6c20 6468 7061 7261 6d20 2d6f  enssl dhparam -o\n+0018df50: 7574 666f 726d 2050 454d 202d 6f75 7420  utform PEM -out \n+0018df60: 6468 2e70 656d 2035 3132 0a3c 2f70 7265  dh.pem 512. File dh512.pem is the ou\n+0018dfa0: 7470 7574 2066 696c 6520 616e 6420 3531  tput file and 51\n+0018dfb0: 3220 6973 2074 6865 206e 756d 6265 7220  2 is the number \n+0018dfc0: 6f66 2062 6974 7320 7573 6564 2e3c 2f6c  of bits used..
      .

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

      .<\n+0018e010: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>\n+0018e030: 3c2f 613e 0a53 534c 2068 6172 6477 6172 .SSL hardwar\n+0018e040: 6520 6163 6365 6c65 7261 7469 6f6e 3c2f e acceleration.

      You can s\n+0018e060: 7065 6369 6679 2061 2068 6172 6477 6172 pecify a hardwar\n+0018e070: 6520 656e 6769 6e65 2074 6f20 656e 6162 e engine to enab\n+0018e080: 6c65 2068 6172 6477 6172 6520 7375 7070 le hardware supp\n+0018e090: 6f72 7420 666f 7220 6372 7970 746f 6772 ort for cryptogr\n+0018e0a0: 6170 6869 6320 6163 6365 6c65 7261 7469 aphic accelerati\n+0018e0b0: 6f6e 2e20 5468 6973 2063 616e 2062 6520 on. This can be \n+0018e0c0: 646f 6e65 206f 6e63 6520 696e 2061 2073 done once in a s\n+0018e0d0: 6572 7665 7220 6f72 2063 6c69 656e 7420 erver or client \n+0018e0e0: 7769 7468 2074 6865 2066 6f6c 6c6f 7769 with the followi\n+0018e0f0: 6e67 2073 7461 7465 6d65 6e74 733a 3c2f ng statements:.

      static <\n+0018e150: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0018e160: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n+0018e190: 3c2f 7370 616e 3e20 2a65 6e67 696e 6520 *engine \n+0018e1a0: 3d20 3c73 7061 6e20 636c 6173 733d 2273 = &q\n+0018e1c0: 756f 743b 6373 7769 6674 2671 756f 743b uot;cswift"\n+0018e1d0: 3c2f 7370 616e 3e3b 203c 7370 616e 2063 ; /\n+0018e1f0: 2a20 656e 6769 6e65 206e 616d 6520 2a2f * engine name */\n+0018e200: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
      .<\n+0018e210: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0018e220: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int main() .
      {
      .\n+0018e280: 2020 454e 4749 4e45 202a 653b 203c 2f64 ENGINE *e; .
      if (!(e\n+0018e2d0: 203d 2045 4e47 494e 455f 6279 5f69 6428 = ENGINE_by_id(\n+0018e2e0: 656e 6769 6e65 2929 2920 3c2f 6469 763e engine)))
      \n+0018e2f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      fprintf(s\n+0018e310: 7464 6572 722c 203c 7370 616e 2063 6c61 tderr, "Error f\n+0018e340: 696e 6469 6e67 2065 6e67 696e 6520 2573 inding engine %s\n+0018e350: 5c6e 2671 756f 743b 3c2f 7370 616e 3e2c \\n",\n+0018e360: 2065 6e67 696e 6529 3b20 3c2f 6469 763e engine);
      \n+0018e370: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      e\n+0018e3a0: 6c73 653c 2f73 7061 6e3e 203c 7370 616e lse if (\n+0018e3d0: 2145 4e47 494e 455f 7365 745f 6465 6661 !ENGINE_set_defa\n+0018e3e0: 756c 7428 652c 2045 4e47 494e 455f 4d45 ult(e, ENGINE_ME\n+0018e3f0: 5448 4f44 5f41 4c4c 2929 203c 2f64 6976 THOD_ALL)) .
      fprintf(\n+0018e420: 7374 6465 7272 2c20 3c73 7061 6e20 636c stderr, "Error \n+0018e450: 7573 696e 6720 656e 6769 6e65 2025 735c using engine %s\\\n+0018e460: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", \n+0018e470: 656e 6769 6e65 293b 203c 2f64 6976 3e0a engine);
      .\n+0018e480: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      ... //\n+0018e4b0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+0018e4d0: 7d3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 }
      .
      <\n+0018e4f0: 703e 5468 6520 666f 6c6c 6f77 696e 6720 p>The following \n+0018e500: 7461 626c 6520 6c69 7374 7320 7468 6520 table lists the \n+0018e510: 6e61 6d65 7320 6f66 2074 6865 2068 6172 names of the har\n+0018e520: 6477 6172 6520 616e 6420 736f 6674 7761 dware and softwa\n+0018e530: 7265 2065 6e67 696e 6573 3a3c 2f70 3e0a re engines:

      .\n+0018e540: 3c74 6162 6c65 2063 6c61 7373 3d22 6d61 ..e\n+0018e5a0: 6e67 696e 6520 2020 3c2f 7468 3e3c 7468 ngine r\n+0018e5d0: 6573 756c 7420 2020 203c 2f74 683e 3c2f esult ....\n+0018e6f0: 3c63 6f64 653e 6f70 656e 6273 645f 6465 openbsd_de\n+0018e700: 765f 6372 7970 746f 3c2f 636f 6465 3e20 v_crypto \n+0018e710: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 ..\n+0018e7d0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..<\n+0018e880: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0018e890: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0018e8a0: 3e6e 4369 7068 6572 2043 4849 4c20 6163 >nCipher CHIL ac\n+0018e8b0: 6365 6c65 7261 7469 6f6e 2068 6172 6477 celeration hardw\n+0018e8c0: 6172 6520 2020 203c 2f74 643e 3c2f 7472 are ..\n+0018e930: 3c74 6420 636c 6173 733d 226d 6172 6b64 ....<\n+0018ea50: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class=\"markdo\n+0018ea60: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone\"\n+0018ea70: 3e3c 636f 6465 3e75 6273 6563 3c2f 636f >ubsec .\n+0018eae0: 3c74 7220 636c 6173 733d 226d 6172 6b64 .\n+0018eb80: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ...
      ope\n+0018e630: 6e73 736c 3c2f 636f 6465 3e20 2020 3c2f nssl The default\n+0018e670: 2073 6f66 7477 6172 6520 656e 6769 6e65 software engine\n+0018e680: 2066 6f72 2063 7279 7074 6f67 7261 7068 for cryptograph\n+0018e690: 6963 206f 7065 7261 7469 6f6e 7320 2020 ic operations \n+0018e6a0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
      OpenBSD\n+0018e740: 2073 7570 706f 7274 7320 6b65 726e 656c supports kernel\n+0018e750: 206c 6576 656c 2063 7279 7074 6f67 7261 level cryptogra\n+0018e760: 7068 7920 2020 203c 2f74 643e 3c2f 7472 phy
      cswif\n+0018e7c0: 743c 2f63 6f64 653e 2020 203c 2f74 643e t CryptoSwift ac\n+0018e800: 6365 6c65 7261 7469 6f6e 2068 6172 6477 celeration hardw\n+0018e810: 6172 6520 2020 203c 2f74 643e 3c2f 7472 are
      chil\n+0018e870: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
      atall\n+0018e920: 613c 2f63 6f64 653e 2020 203c 2f74 643e a Compaq Atalla \n+0018e960: 6163 6365 6c65 7261 7469 6f6e 2068 6172 acceleration har\n+0018e970: 6477 6172 6520 2020 203c 2f74 643e 3c2f dware
      nu\n+0018e9d0: 726f 6e3c 2f63 6f64 653e 2020 203c 2f74 ron Nuron accele\n+0018ea10: 7261 7469 6f6e 2068 6172 6477 6172 6520 ration hardware \n+0018ea20: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
      Bro\n+0018eab0: 6164 636f 6d20 7542 5365 6320 6163 6365 adcom uBSec acce\n+0018eac0: 6c65 7261 7469 6f6e 2068 6172 6477 6172 leration hardwar\n+0018ead0: 6520 2020 203c 2f74 643e 3c2f 7472 3e0a e
      aep Ae\n+0018eb60: 7020 6163 6365 6c65 7261 7469 6f6e 2068 p acceleration h\n+0018eb70: 6172 6477 6172 6520 2020 203c 2f74 643e ardware
      s\n+0018ebd0: 7572 6577 6172 653c 2f63 6f64 653e 2020 ureware \n+0018ebe0: 203c 2f74 643e 3c74 6420 636c 6173 733d SureWare\n+0018ec10: 2061 6363 656c 6572 6174 696f 6e20 6861 acceleration ha\n+0018ec20: 7264 7761 7265 2020 203c 2f74 643e 3c2f rdware
      .

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

      .SSL on\n+0018eca0: 2057 696e 646f 7773 3c2f 6832 3e0a 3c70 Windows

      .Set the full pa\n+0018ecc0: 7468 2074 6f20 3c65 6d3e 3c63 6f64 653e th to \n+0018ecd0: 6c69 6273 736c 2e6c 6962 3c2f 636f 6465 libssl.lib and <\n+0018ecf0: 636f 6465 3e6c 6962 6372 7970 746f 2e6c code>libcrypto.l\n+0018ed00: 6962 3c2f 636f 6465 3e3c 2f65 6d3e 2075 ib u\n+0018ed10: 6e64 6572 2074 6865 204d 5356 432b 2b20 nder the MSVC++ \n+0018ed20: 2250 726f 6a65 6374 7322 206d 656e 752c \"Projects\" menu,\n+0018ed30: 2074 6865 6e20 6368 6f6f 7365 2022 4c69 then choose \"Li\n+0018ed40: 6e6b 223a 2022 4f62 6a65 6374 2f4d 6f64 nk\": \"Object/Mod\n+0018ed50: 756c 6573 222e 2050 6c65 6173 6520 6d61 ules\". Please ma\n+0018ed60: 6b65 2073 7572 6520 3c65 6d3e 3c63 6f64 ke sure libssl32.dll and <\n+0018ed90: 656d 3e3c 636f 6465 3e6c 6962 6561 7933 em>libeay3\n+0018eda0: 322e 646c 6c3c 2f63 6f64 653e 3c2f 656d 2.dll can be loaded \n+0018edc0: 6279 2079 6f75 7220 6170 706c 6963 6174 by your applicat\n+0018edd0: 696f 6e73 2c20 7468 7573 2074 6865 7920 ions, thus they \n+0018ede0: 6d75 7374 2062 6520 696e 7374 616c 6c65 must be installe\n+0018edf0: 6420 7072 6f70 6572 6c79 206f 6e20 7468 d properly on th\n+0018ee00: 6520 7461 7267 6574 206d 6163 6869 6e65 e target machine\n+0018ee10: 2e3c 2f70 3e0a 3c70 3e49 6620 796f 7527 .

      .

      If you'\n+0018ee20: 7265 2075 7369 6e67 2063 6f6d 7069 6c61 re using compila\n+0018ee30: 7469 6f6e 2073 6574 7469 6e67 7320 7375 tion settings su\n+0018ee40: 6368 2061 7320 3c63 6f64 653e 2f4d 5464 ch as /MTd\n+0018ee50: 3c2f 636f 6465 3e20 7468 656e 206c 696e then lin\n+0018ee60: 6b20 746f 2074 6865 2063 6f72 7265 6374 k to the correct\n+0018ee70: 203c 656d 3e3c 636f 6465 3e6c 6962 6561 libea\n+0018ee80: 7933 324d 5464 2e6c 6962 3c2f 636f 6465 y32MTd.lib and <\n+0018eea0: 636f 6465 3e73 736c 6561 7933 324d 5464 code>ssleay32MTd\n+0018eeb0: 2e6c 6962 3c2f 636f 6465 3e3c 2f65 6d3e .lib\n+0018eec0: 206c 6962 7261 7269 6573 2e3c 2f70 3e0a libraries.

      .\n+0018eed0: 3c70 3e41 6c74 6572 6e61 7469 7665 6c79

      Alternatively\n+0018eee0: 2c20 796f 7520 6361 6e20 7573 6520 7468 , you can use th\n+0018eef0: 6520 5769 6e49 6e65 7420 696e 7465 7266 e WinInet interf\n+0018ef00: 6163 6520 666f 7220 7365 6375 7265 2063 ace for secure c\n+0018ef10: 6f6e 6e65 6374 696f 6e73 2c20 6176 6169 onnections, avai\n+0018ef20: 6c61 626c 6520 696e 2074 6865 203c 656d lable in the gsoap/mod\n+0018ef40: 5f67 736f 6170 3c2f 636f 6465 3e3c 2f65 _gsoap directory of \n+0018ef60: 7468 6520 6753 4f41 5020 7061 636b 6167 the gSOAP packag\n+0018ef70: 652c 2073 6565 2061 6c73 6f20 5365 6374 e, see also Sect\n+0018ef80: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion The WinInet pl\n+0018efc0: 7567 696e 3c2f 613e 2e20 4f72 2079 6f75 ugin. Or you\n+0018efd0: 2063 616e 2075 7365 2074 6865 2043 5552 can use the CUR\n+0018efe0: 4c20 706c 7567 696e 2074 6f20 7573 6520 L plugin to use \n+0018eff0: 4355 524c 2066 6f72 2073 6563 7572 6520 CURL for secure \n+0018f000: 636f 6e6e 6563 7469 6f6e 732c 2073 6565 connections, see\n+0018f010: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section The CURL plu\n+0018f050: 6769 6e3c 2f61 3e2e 3c2f 703e 0a3c 703e gin.

      .

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

      .Z\n+0018f0c0: 6c69 6220 636f 6d70 7265 7373 696f 6e3c lib compression<\n+0018f0d0: 2f68 323e 0a3c 703e 546f 2065 6e61 626c /h2>.

      To enabl\n+0018f0e0: 6520 6465 666c 6174 6520 616e 6420 677a e deflate and gz\n+0018f0f0: 6970 2063 6f6d 7072 6573 7369 6f6e 2077 ip compression w\n+0018f100: 6974 6820 5a6c 6962 2c20 696e 7374 616c ith Zlib, instal\n+0018f110: 6c20 5a6c 6962 2066 726f 6d20 3c61 2068 l Zlib from http:/\n+0018f140: 2f77 7777 2e7a 6c69 622e 6f72 673c 2f61 /www.zlib.org if not already\n+0018f160: 2069 6e73 7461 6c6c 6564 206f 6e20 796f installed on yo\n+0018f170: 7572 2073 7973 7465 6d2e 2043 6f6d 7069 ur system. Compi\n+0018f180: 6c65 203c 656d 3e3c 636f 6465 3e67 736f le gso\n+0018f190: 6170 2f73 7464 736f 6170 322e 6370 703c ap/stdsoap2.cpp<\n+0018f1a0: 2f63 6f64 653e 3c2f 656d 3e20 286f 7220 /code> (or \n+0018f1b0: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n+0018f1c0: 7374 6473 6f61 7032 2e63 3c2f 636f 6465 stdsoap2.c) and all \n+0018f1e0: 796f 7572 2073 6f75 7263 6573 2074 6861 your sources tha\n+0018f1f0: 7420 696e 636c 7564 6520 3c65 6d3e 3c63 t include gsoap/stdsoa\n+0018f210: 7032 2e68 3c2f 636f 6465 3e3c 2f65 6d3e p2.h\n+0018f220: 206f 7220 3c65 6d3e 3c63 6f64 653e 736f or so\n+0018f230: 6170 482e 683c 2f63 6f64 653e 3c2f 656d apH.h with compile-t\n+0018f250: 696d 6520 666c 6167 203c 636f 6465 3e23 ime flag #\n+0018f260: 5749 5448 5f47 5a49 503c 2f63 6f64 653e WITH_GZIP\n+0018f270: 2061 6e64 206c 696e 6b20 796f 7572 2063 and link your c\n+0018f280: 6f64 6520 7769 7468 2074 6865 205a 6c69 ode with the Zli\n+0018f290: 6220 6c69 6272 6172 792c 2065 2e67 2e20 b library, e.g. \n+0018f2a0: 3c62 3e3c 636f 6465 3e2d 6c7a 3c2f 636f -lz on Unix/\n+0018f2c0: 4c69 6e75 7820 706c 6174 666f 726d 732e Linux platforms.\n+0018f2d0: 3c2f 703e 0a3c 703e 5468 6520 677a 6970

      .

      The gzip\n+0018f2e0: 2063 6f6d 7072 6573 7369 6f6e 2069 7320 compression is \n+0018f2f0: 6f72 7468 6f67 6f6e 616c 2074 6f20 616c orthogonal to al\n+0018f300: 6c20 7472 616e 7370 6f72 7420 656e 636f l transport enco\n+0018f310: 6469 6e67 7320 7375 6368 2061 7320 4854 dings such as HT\n+0018f320: 5450 2c20 5353 4c2c 2044 494d 452c 2061 TP, SSL, DIME, a\n+0018f330: 6e64 2063 616e 2062 6520 7573 6564 2077 nd can be used w\n+0018f340: 6974 6820 6f74 6865 7220 7472 616e 7370 ith other transp\n+0018f350: 6f72 7420 6c61 7965 7273 2e20 596f 7520 ort layers. You \n+0018f360: 6361 6e20 6576 656e 2073 6176 6520 616e can even save an\n+0018f370: 6420 6c6f 6164 2063 6f6d 7072 6573 7365 d load compresse\n+0018f380: 6420 584d 4c20 6461 7461 2074 6f2f 6672 d XML data to/fr\n+0018f390: 6f6d 2066 696c 6573 2e3c 2f70 3e0a 3c70 om files.

      .Two compression\n+0018f3b0: 2066 6f72 6d61 7473 2061 7265 2073 7570 formats are sup\n+0018f3c0: 706f 7274 6564 2062 7920 7468 6520 656e ported by the en\n+0018f3d0: 6769 6e65 3a20 6465 666c 6174 6520 616e gine: deflate an\n+0018f3e0: 6420 677a 6970 2e20 5468 6520 677a 6970 d gzip. The gzip\n+0018f3f0: 2066 6f72 6d61 7420 6973 2075 7365 6420 format is used \n+0018f400: 6279 2064 6566 6175 6c74 2e20 5468 6520 by default. The \n+0018f410: 677a 6970 2066 6f72 6d61 7420 6861 7320 gzip format has \n+0018f420: 7365 7665 7261 6c20 6265 6e65 6669 7473 several benefits\n+0018f430: 206f 7665 7220 6465 666c 6174 652e 2046 over deflate. F\n+0018f440: 6972 7374 6c79 2c20 7468 6520 656e 6769 irstly, the engi\n+0018f450: 6e65 2061 7574 6f6d 6174 6963 616c 6c79 ne automatically\n+0018f460: 2064 6574 6563 7473 2067 7a69 7020 636f detects gzip co\n+0018f470: 6d70 7265 7373 6564 2069 6e62 6f75 6e64 mpressed inbound\n+0018f480: 206d 6573 7361 6765 732c 2065 7665 6e20 messages, even \n+0018f490: 7769 7468 6f75 7420 4854 5450 2068 6561 without HTTP hea\n+0018f4a0: 6465 7273 2c20 6279 2063 6865 636b 696e ders, by checkin\n+0018f4b0: 6720 666f 7220 7468 6520 7072 6573 656e g for the presen\n+0018f4c0: 6365 206f 6620 6120 677a 6970 2068 6561 ce of a gzip hea\n+0018f4d0: 6465 7220 696e 2074 6865 206d 6573 7361 der in the messa\n+0018f4e0: 6765 2063 6f6e 7465 6e74 2e20 5365 636f ge content. Seco\n+0018f4f0: 6e64 6c79 2c20 677a 6970 2069 6e63 6c75 ndly, gzip inclu\n+0018f500: 6465 7320 6120 4352 4333 3220 6368 6563 des a CRC32 chec\n+0018f510: 6b73 756d 2074 6f20 656e 7375 7265 206d ksum to ensure m\n+0018f520: 6573 7361 6765 7320 6861 7665 2062 6565 essages have bee\n+0018f530: 6e20 636f 7272 6563 746c 7920 7265 6365 n correctly rece\n+0018f540: 6976 6564 2e20 5468 6972 646c 792c 2067 ived. Thirdly, g\n+0018f550: 7a69 7020 636f 6d70 7265 7373 6564 2063 zip compressed c\n+0018f560: 6f6e 7465 6e74 2063 616e 2062 6520 6465 ontent can be de\n+0018f570: 636f 6d70 7265 7373 6564 2077 6974 6820 compressed with \n+0018f580: 6f74 6865 7220 636f 6d70 7265 7373 696f other compressio\n+0018f590: 6e20 736f 6674 7761 7265 2c20 736f 2079 n software, so y\n+0018f5a0: 6f75 2063 616e 2064 6563 6f6d 7072 6573 ou can decompres\n+0018f5b0: 7320 584d 4c20 6461 7461 2073 6176 6564 s XML data saved\n+0018f5c0: 2062 7920 6120 6753 4f41 5020 6170 706c by a gSOAP appl\n+0018f5d0: 6963 6174 696f 6e20 696e 2067 7a69 7020 ication in gzip \n+0018f5e0: 666f 726d 6174 2e3c 2f70 3e0a 3c70 3e47 format.

      .

      G\n+0018f5f0: 7a69 7020 636f 6d70 7265 7373 696f 6e20 zip compression \n+0018f600: 6973 2065 6e61 626c 6564 2062 7920 636f is enabled by co\n+0018f610: 6d70 696c 696e 6720 7468 6520 736f 7572 mpiling the sour\n+0018f620: 6365 7320 7769 7468 2063 6f6d 7069 6c65 ces with compile\n+0018f630: 2d74 696d 6520 666c 6167 203c 636f 6465 -time flag #WITH_GZIP. To transmit \n+0018f660: 677a 6970 2063 6f6d 7072 6573 7365 6420 gzip compressed \n+0018f670: 534f 4150 2f58 4d4c 2064 6174 612c 2073 SOAP/XML data, s\n+0018f680: 6574 2074 6865 206f 7574 7075 7420 6d6f et the output mo\n+0018f690: 6465 2066 6c61 6773 2074 6f20 3c63 6f64 de flags to #SOAP_ENC_ZLIB\n+0018f6b0: 3c2f 636f 6465 3e2e 2046 6f72 2065 7861 . For exa\n+0018f6c0: 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 2063 mple:

      .
      \n+0018f6e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      soap_init\n+0018f750: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap); .
      soap_s\n+0018f800: 6574 5f6f 6d6f 6465 3c2f 613e 2826 616d et_omode(&am\n+0018f810: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, SOAP_ENC_Z\n+0018f8a0: 4c49 423c 2f61 3e29 3b20 3c73 7061 6e20 LIB); \n+0018f8c0: 2f2f 2065 6e61 626c 6520 5a6c 6962 2623 // enable Zlib&#\n+0018f8d0: 3339 3b73 2067 7a69 7020 3c2f 7370 616e 39;s gzip
      .
      if (s\n+0018f920: 6f61 705f 6361 6c6c 5f6e 735f 5f6d 794d oap_call_ns__myM\n+0018f930: 6574 686f 6428 2661 6d70 3b3c 6120 636c ethod(&soap, ...)\n+0018f970: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
      .
      ...\n+0018f990: 203c 7370 616e 2063 6c61 7373 3d22 636f // error<\n+0018f9b0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      .<\n+0018f9d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+0018f9e0: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else
      .
      .\n+0018fa10: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // succ\n+0018fa30: 6573 733c 2f73 7061 6e3e 3c2f 6469 763e ess
      \n+0018fa40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      soap_clr\n+0018fab0: 5f6f 6d6f 6465 3c2f 613e 2826 616d 703b _omode(&\n+0018fac0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+0018faf0: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_ENC_ZLI\n+0018fb50: 423c 2f61 3e29 3b20 3c73 7061 6e20 636c B); //\n+0018fb70: 2064 6973 6162 6c65 205a 6c69 6226 2333 disable Zlib\n+0018fb80: 393b 7320 677a 6970 203c 2f73 7061 6e3e 9;s gzip \n+0018fb90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      SOAP_ENC_ZLI\n+0018fc50: 423c 2f61 3e3c 2f64 6976 3e3c 6469 7620 B
      #\n+0018fc70: 6465 6669 6e65 2053 4f41 505f 454e 435f define SOAP_ENC_\n+0018fc80: 5a4c 4942 3c2f 6469 763e 3c64 6976 2063 ZLIB
      soa\n+0018fca0: 705f 6d6f 6465 2045 4e43 206f 7574 7075 p_mode ENC outpu\n+0018fcb0: 7420 666c 6167 2076 616c 7565 2074 6f20 t flag value to \n+0018fcc0: 636f 6d70 7265 7373 206d 6573 7361 6765 compress message\n+0018fcd0: 7320 7365 6e74 2c20 7265 7175 6972 6573 s sent, requires\n+0018fce0: 207a 6c69 6220 656e 6162 6c65 6420 7769 zlib enabled wi\n+0018fcf0: 7468 2063 6f6d 7069 6c65 2d74 696d 6520 th compile-time \n+0018fd00: 666c 2e2e 2e3c 2f64 6976 3e3c 6469 7620 fl...
      Definition:\n+0018fd30: 2073 7464 736f 6170 322e 683a 3137 3838 stdsoap2.h:1788\n+0018fd40: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
      .

      This will\n+0018fd70: 2073 656e 6420 6120 636f 6d70 7265 7373 send a compress\n+0018fd80: 6564 2053 4f41 502f 584d 4c20 7265 7175 ed SOAP/XML requ\n+0018fd90: 6573 7420 746f 2061 2073 6572 7669 6365 est to a service\n+0018fda0: 2c20 7072 6f76 6964 6564 2074 6861 7420 , provided that \n+0018fdb0: 5a6c 6962 2069 7320 696e 7374 616c 6c65 Zlib is installe\n+0018fdc0: 6420 616e 6420 6c69 6e6b 6564 2077 6974 d and linked wit\n+0018fdd0: 6820 7468 6520 6170 706c 6963 6174 696f h the applicatio\n+0018fde0: 6e20 616e 6420 7468 6520 636f 6d70 696c n and the compil\n+0018fdf0: 652d 7469 6d65 2066 6c61 6720 3c63 6f64 e-time flag #WITH_GZIP option was u\n+0018fe20: 7365 6420 746f 2063 6f6d 7069 6c65 2074 sed to compile t\n+0018fe30: 6865 2073 6f75 7263 6573 2e20 5265 6365 he sources. Rece\n+0018fe40: 6976 696e 6720 636f 6d70 7265 7373 6564 iving compressed\n+0018fe50: 2053 4f41 502f 584d 4c20 6f76 6572 2048 SOAP/XML over H\n+0018fe60: 5454 5020 6569 7468 6572 2069 6e20 677a TTP either in gz\n+0018fe70: 6970 206f 7220 6465 666c 6174 6520 666f ip or deflate fo\n+0018fe80: 726d 6174 7320 6973 2061 7574 6f6d 6174 rmats is automat\n+0018fe90: 6963 2e20 5468 6520 3c63 6f64 653e 2353 ic. The #S\n+0018fea0: 4f41 505f 454e 435f 5a4c 4942 3c2f 636f OAP_ENC_ZLIB flag does no\n+0018fec0: 7420 6861 7665 2074 6f20 6265 2073 6574 t have to be set\n+0018fed0: 2061 7420 7468 6520 7365 7276 6572 2073 at the server s\n+0018fee0: 6964 6520 746f 2061 6363 6570 7420 636f ide to accept co\n+0018fef0: 6d70 7265 7373 6564 206d 6573 7361 6765 mpressed message\n+0018ff00: 732e 2052 6561 6469 6e67 2061 6e64 2072 s. Reading and r\n+0018ff10: 6563 6569 7669 6e67 2067 7a69 7020 636f eceiving gzip co\n+0018ff20: 6d70 7265 7373 6564 2053 4f41 502f 584d mpressed SOAP/XM\n+0018ff30: 4c20 7769 7468 6f75 7420 4854 5450 2068 L without HTTP h\n+0018ff40: 6561 6465 7273 2028 652e 672e 2077 6974 eaders (e.g. wit\n+0018ff50: 6820 6f74 6865 7220 7472 616e 7370 6f72 h other transpor\n+0018ff60: 7420 7072 6f74 6f63 6f6c 7329 2069 7320 t protocols) is \n+0018ff70: 616c 736f 2061 7574 6f6d 6174 6963 2e3c also automatic.<\n+0018ff80: 2f70 3e0a 3c70 3e54 6f20 636f 6e74 726f /p>.

      To contro\n+0018ff90: 6c20 7468 6520 6c65 7665 6c20 6f66 2063 l the level of c\n+0018ffa0: 6f6d 7072 6573 7369 6f6e 2066 6f72 206f ompression for o\n+0018ffb0: 7574 626f 756e 6420 6d65 7373 6167 6573 utbound messages\n+0018ffc0: 2c20 796f 7520 6361 6e20 7365 7420 7468 , you can set th\n+0018ffd0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap\n+00190090: 3a3a 7a5f 6c65 7665 6c3c 2f61 3e3c 2f63 ::z_level to a value \n+001900b0: 6265 7477 6565 6e20 3120 616e 6420 392c between 1 and 9,\n+001900c0: 2077 6865 7265 2031 2069 7320 7468 6520 where 1 is the \n+001900d0: 6265 7374 2073 7065 6564 2061 6e64 2039 best speed and 9\n+001900e0: 2069 7320 7468 6520 6265 7374 2063 6f6d is the best com\n+001900f0: 7072 6573 7369 6f6e 2028 6465 6661 756c pression (defaul\n+00190100: 7420 6973 2036 292e 2046 6f72 2065 7861 t is 6). For exa\n+00190110: 6d70 6c65 3c2f 703e 0a3c 6469 7620 636c mple

      .
      <\n+00190130: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00190140: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_init<\n+001901a0: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n+001901d0: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); .
      soap_se\n+00190250: 745f 6f6d 6f64 653c 2f61 3e28 2661 6d70 t_omode(&\n+00190260: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap\n+00190290: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , SOAP_ENC_ZL\n+001902f0: 4942 3c2f 613e 293b 203c 2f64 6976 3e0a IB);
      .\n+00190300: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      soap.z_lev\n+00190390: 656c 3c2f 613e 203d 2039 3b20 3c73 7061 el = 9; // best compre\n+001903c0: 7373 696f 6e20 3c2f 7370 616e 3e3c 2f64 ssion .
      soa\n+00190470: 703a 3a7a 5f6c 6576 656c 3c2f 613e 3c2f p::z_level
      unsigned\n+001904a0: 2073 686f 7274 207a 5f6c 6576 656c 3c2f short z_level
      User-defi\n+001904d0: 6e61 626c 6520 636f 6d70 7265 7373 696f nable compressio\n+001904e0: 6e20 6c65 7665 6c20 666f 7220 677a 6970 n level for gzip\n+001904f0: 2063 6f6d 7072 6573 7369 6f6e 2028 303d compression (0=\n+00190500: 6e6f 6e65 2c20 313d 6661 7374 2074 6f20 none, 1=fast to \n+00190510: 393d 6265 7374 2920 6465 6661 756c 7420 9=best) default \n+00190520: 6c65 7665 6c20 6973 2036 2e3c 2f64 6976 level is 6.
      Definitio\n+00190550: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2.\n+00190560: 683a 3337 3034 3c2f 6469 763e 3c2f 6469 h:3704
      .

      To \n+00190590: 7665 7269 6679 2061 6e64 206d 6f6e 6974 verify and monit\n+001905a0: 6f72 2063 6f6d 7072 6573 7369 6f6e 2072 or compression r\n+001905b0: 6174 6573 2c20 796f 7520 6361 6e20 7573 ates, you can us\n+001905c0: 6520 7468 6520 7661 6c75 6573 203c 636f e the values \n+00190680: 736f 6170 3a3a 7a5f 7261 7469 6f5f 696e soap::z_ratio_in\n+00190690: 3c2f 613e 3c2f 636f 6465 3e20 616e 6420 and \n+001906a0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 s\n+00190750: 6f61 703a 3a7a 5f72 6174 696f 5f6f 7574 oap::z_ratio_out\n+00190760: 3c2f 613e 3c2f 636f 6465 3e2e 2054 6865 . The\n+00190770: 7365 2074 776f 2066 6c6f 6174 2076 616c se two float val\n+00190780: 7565 7320 6c69 6520 6265 7477 6565 6e20 ues lie between \n+00190790: 302e 3020 616e 6420 312e 3020 616e 6420 0.0 and 1.0 and \n+001907a0: 6578 7072 6573 7320 7468 6520 7261 7469 express the rati\n+001907b0: 6f20 6f66 2074 6865 2063 6f6d 7072 6573 o of the compres\n+001907c0: 7365 6420 6d65 7373 6167 6520 6c65 6e67 sed message leng\n+001907d0: 7468 206f 7665 7220 756e 636f 6d70 7265 th over uncompre\n+001907e0: 7373 6564 206d 6573 7361 6765 206c 656e ssed message len\n+001907f0: 6774 682e 3c2f 703e 0a3c 6469 7620 636c gth.

      .
      <\n+00190810: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00190820: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >if (soap_call_\n+00190850: 6e73 5f5f 6d79 4d65 7468 6f64 2826 616d ns__myMethod(&am\n+00190860: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, ...))
      .<\n+001908a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001908b0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
      .
      ...\n+001908d0: 203c 7370 616e 2063 6c61 7373 3d22 636f // error<\n+001908f0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      .}\n+00190910: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      ..
      ... <\n+00190b20: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+00190b30: 656e 7422 3e2f 2f20 7375 6363 6573 733c ent\">// success<\n+00190b40: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      .}\n+00190b60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      \n+00190bb0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
      fl\n+00190c30: 6f61 7420 7a5f 7261 7469 6f5f 696e 3c2f oat z_ratio_in
      The compr\n+00190c60: 6573 7369 6f6e 2072 6174 696f 203d 2063 ession ratio = c\n+00190c70: 6f6d 7072 6573 7365 642e 7369 7a65 2f75 ompressed.size/u\n+00190c80: 6e63 6f6d 7072 6573 7365 642e 7369 7a65 ncompressed.size\n+00190c90: 206f 6620 7468 6520 636f 6d70 7265 7373 of the compress\n+00190ca0: 6564 206d 6573 7361 6765 2072 6563 6569 ed message recei\n+00190cb0: 7665 642e 3c2f 6469 763e 3c64 6976 2063 ved.
      \n+00190cd0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: \n+00190ce0: 7374 6473 6f61 7032 2e68 3a33 3730 393c stdsoap2.h:3709<\n+00190cf0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
      .\n+00190db0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
      float z_rati\n+00190dd0: 6f5f 6f75 743c 2f64 6976 3e3c 6469 7620 o_out
      Th\n+00190df0: 6520 636f 6d70 7265 7373 696f 6e20 7261 e compression ra\n+00190e00: 7469 6f20 3d20 636f 6d70 7265 7373 6564 tio = compressed\n+00190e10: 2e73 697a 652f 756e 636f 6d70 7265 7373 .size/uncompress\n+00190e20: 6564 2e73 697a 6520 6f66 2074 6865 2063 ed.size of the c\n+00190e30: 6f6d 7072 6573 7365 6420 6d65 7373 6167 ompressed messag\n+00190e40: 6520 7365 6e74 2e3c 2f64 6976 3e3c 6469 e sent.
      \n+00190e60: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:37\n+00190e80: 3134 3c2f 6469 763e 3c2f 6469 763e 0a3c 14
      .<\n+00190e90: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

      Note: l\n+00190eb0: 6f77 6572 2072 6174 696f 7320 6d65 616e ower ratios mean\n+00190ec0: 2068 6967 6865 7220 636f 6d70 7265 7373 higher compress\n+00190ed0: 696f 6e20 7261 7465 732e 3c2f 703e 0a3c ion rates.

      .<\n+00190ee0: 703e 436f 6d70 7265 7373 6564 2074 7261 p>Compressed tra\n+00190ef0: 6e73 6665 7273 2072 6571 7569 7265 2062 nsfers require b\n+00190f00: 7566 6665 7269 6e67 2074 6865 2065 6e74 uffering the ent\n+00190f10: 6972 6520 6f75 7470 7574 206d 6573 7361 ire output messa\n+00190f20: 6765 2074 6f20 6465 7465 726d 696e 6520 ge to determine \n+00190f30: 4854 5450 206d 6573 7361 6765 206c 656e HTTP message len\n+00190f40: 6774 682e 2054 6869 7320 6d65 616e 7320 gth. This means \n+00190f50: 7468 6174 2074 6865 203c 636f 6465 3e23 that the #\n+00190f60: 534f 4150 5f49 4f5f 5354 4f52 453c 2f63 SOAP_IO_STORE flag is aut\n+00190f80: 6f6d 6174 6963 616c 6c79 2073 6574 2077 omatically set w\n+00190f90: 6865 6e20 7468 6520 3c63 6f64 653e 2353 hen the #S\n+00190fa0: 4f41 505f 454e 435f 5a4c 4942 3c2f 636f OAP_ENC_ZLIB flag is set \n+00190fc0: 746f 2073 656e 6420 636f 6d70 7265 7373 to send compress\n+00190fd0: 6564 206d 6573 7361 6765 732e 2054 6865 ed messages. The\n+00190fe0: 2075 7365 206f 6620 4854 5450 2063 6875 use of HTTP chu\n+00190ff0: 6e6b 696e 6720 7369 676e 6966 6963 616e nking significan\n+00191000: 746c 7920 7265 6475 6365 7320 6d65 6d6f tly reduces memo\n+00191010: 7279 2075 7361 6765 2061 6e64 206d 6179 ry usage and may\n+00191020: 2073 7065 6564 2075 7020 7468 6520 7472 speed up the tr\n+00191030: 616e 736d 6973 7369 6f6e 206f 6620 636f ansmission of co\n+00191040: 6d70 7265 7373 6564 2053 4f41 502f 584d mpressed SOAP/XM\n+00191050: 4c20 6d65 7373 6167 6573 2e20 5468 6973 L messages. This\n+00191060: 2069 7320 6163 636f 6d70 6c69 7368 6564 is accomplished\n+00191070: 2062 7920 7365 7474 696e 6720 7468 6520 by setting the \n+00191080: 3c63 6f64 653e 2353 4f41 505f 494f 5f43 #SOAP_IO_C\n+00191090: 4855 4e4b 3c2f 636f 6465 3e20 666c 6167 HUNK flag\n+001910a0: 2077 6974 6820 3c63 6f64 653e 2353 4f41 with #SOA\n+001910b0: 505f 454e 435f 5a4c 4942 3c2f 636f 6465 P_ENC_ZLIB for the output\n+001910d0: 206d 6f64 652e 2048 6f77 6576 6572 2c20 mode. However, \n+001910e0: 736f 6d65 2057 6562 2073 6572 7665 7273 some Web servers\n+001910f0: 2064 6f20 6e6f 7420 6163 6365 7074 2048 do not accept H\n+00191100: 5454 5020 6368 756e 6b65 6420 7265 7175 TTP chunked requ\n+00191110: 6573 7420 6d65 7373 6167 6573 2028 6576 est messages (ev\n+00191120: 656e 2077 6865 6e20 7468 6579 2072 6574 en when they ret\n+00191130: 7572 6e20 4854 5450 2063 6875 6e6b 6564 urn HTTP chunked\n+00191140: 206d 6573 7361 6765 7321 292e 2053 7461 messages!). Sta\n+00191150: 6e64 2d61 6c6f 6e65 2067 534f 4150 2073 nd-alone gSOAP s\n+00191160: 6572 7669 6365 7320 616c 7761 7973 2061 ervices always a\n+00191170: 6363 6570 7420 6368 756e 6b65 6420 7265 ccept chunked re\n+00191180: 7175 6573 7420 6d65 7373 6167 6573 2e3c quest messages.<\n+00191190: 2f70 3e0a 3c70 3e54 6f20 7265 7374 7269 /p>.

      To restri\n+001911a0: 6374 2074 6865 2063 6f6d 7072 6573 7369 ct the compressi\n+001911b0: 6f6e 2074 6f20 7468 6520 6465 666c 6174 on to the deflat\n+001911c0: 6520 666f 726d 6174 206f 6e6c 792c 2063 e format only, c\n+001911d0: 6f6d 7069 6c65 2074 6865 2073 6f75 7263 ompile the sourc\n+001911e0: 6573 2077 6974 6820 7468 6520 636f 6d70 es with the comp\n+001911f0: 696c 652d 7469 6d65 2066 6c61 6720 3c63 ile-time flag #WITH_ZLIB. This limi\n+00191220: 7473 2063 6f6d 7072 6573 7369 6f6e 2061 ts compression a\n+00191230: 6e64 2064 6563 6f6d 7072 6573 7369 6f6e nd decompression\n+00191240: 2074 6f20 7468 6520 6465 666c 6174 6520 to the deflate \n+00191250: 666f 726d 6174 2e20 4f6e 6c79 2070 6c61 format. Only pla\n+00191260: 696e 2061 6e64 2064 6566 6c61 7465 6420 in and deflated \n+00191270: 6d65 7373 6167 6573 2063 616e 2062 6520 messages can be \n+00191280: 6578 6368 616e 6765 642c 2067 7a69 7020 exchanged, gzip \n+00191290: 6973 206e 6f74 2073 7570 706f 7274 6564 is not supported\n+001912a0: 2077 6974 6820 7468 6973 206f 7074 696f with this optio\n+001912b0: 6e2e 2052 6563 6569 7669 6e67 2067 7a69 n. Receiving gzi\n+001912c0: 7020 636f 6d70 7265 7373 6564 2063 6f6e p compressed con\n+001912d0: 7465 6e74 2069 7320 6175 746f 6d61 7469 tent is automati\n+001912e0: 632c 2065 7665 6e20 696e 2074 6865 2061 c, even in the a\n+001912f0: 6273 656e 6365 206f 6620 4854 5450 2068 bsence of HTTP h\n+00191300: 6561 6465 7273 2e20 5265 6365 6976 696e eaders. Receivin\n+00191310: 6720 6465 666c 6174 6520 636f 6d70 7265 g deflate compre\n+00191320: 7373 6564 2063 6f6e 7465 6e74 2069 7320 ssed content is \n+00191330: 6e6f 7420 6175 746f 6d61 7469 6320 696e not automatic in\n+00191340: 2074 6865 2061 6273 656e 6365 206f 6620 the absence of \n+00191350: 4854 5450 2068 6561 6465 7273 2061 6e64 HTTP headers and\n+00191360: 2072 6571 7569 7265 7320 7468 6520 666c requires the fl\n+00191370: 6167 203c 636f 6465 3e23 534f 4150 5f45 ag #SOAP_E\n+00191380: 4e43 5f5a 4c49 423c 2f63 6f64 653e 2074 NC_ZLIB t\n+00191390: 6f20 6265 2073 6574 2066 6f72 2074 6865 o be set for the\n+001913a0: 2069 6e70 7574 206d 6f64 6520 746f 2064 input mode to d\n+001913b0: 6563 6f6d 7072 6573 7320 6465 666c 6174 ecompress deflat\n+001913c0: 6564 2064 6174 612e 3c2f 703e 0a3c 646c ed data.

      .
      War\n+001913f0: 6e69 6e67 3c2f 6474 3e3c 6464 3e49 7420 ning
      It \n+00191400: 6973 2069 6d70 6f72 7461 6e74 2074 6861 is important tha\n+00191410: 7420 7468 6520 3c63 6f64 653e 2357 4954 t the #WIT\n+00191420: 485f 475a 4950 3c2f 636f 6465 3e20 616e H_GZIP an\n+00191430: 6420 3c63 6f64 653e 2357 4954 485f 5a4c d #WITH_ZL\n+00191440: 4942 3c2f 636f 6465 3e20 6d61 6372 6f73 IB macros\n+00191450: 206d 7573 7420 6265 2063 6f6e 7369 7374 must be consist\n+00191460: 656e 746c 7920 6465 6669 6e65 6420 746f ently defined to\n+00191470: 2063 6f6d 7069 6c65 2074 6865 2073 6f75 compile the sou\n+00191480: 7263 6573 2c20 7375 6368 2061 7320 3c65 rces, such as gsoap/st\n+001914a0: 6473 6f61 7032 2e63 7070 3c2f 636f 6465 dsoap2.cpp, soapC.cpp, soapClient.cp\n+001914f0: 703c 2f63 6f64 653e 3c2f 656d 3e2c 203c p, <\n+00191500: 656d 3e3c 636f 6465 3e73 6f61 7053 6572 em>soapSer\n+00191510: 7665 722e 6370 703c 2f63 6f64 653e 3c2f ver.cpp, and all app\n+00191530: 6c69 6361 7469 6f6e 2073 6f75 7263 6573 lication sources\n+00191540: 2074 6861 7420 696e 636c 7564 6520 3c65 that include gsoap/st\n+00191560: 6473 6f61 7032 2e68 3c2f 636f 6465 3e3c dsoap2.h<\n+00191570: 2f65 6d3e 206f 7220 3c65 6d3e 3c63 6f64 /em> or soapH.h\n+00191590: 3c2f 656d 3e2e 2049 6620 7468 6520 6d61 . If the ma\n+001915a0: 6372 6f73 2061 7265 206e 6f74 2063 6f6e cros are not con\n+001915b0: 7369 7374 656e 746c 7920 7573 6564 2c20 sistently used, \n+001915c0: 7468 6520 6170 706c 6963 6174 696f 6e20 the application \n+001915d0: 7769 6c6c 2063 7261 7368 2064 7565 2074 will crash due t\n+001915e0: 6f20 6120 6d69 736d 6174 6368 6573 2069 o a mismatches i\n+001915f0: 6e20 7468 6520 6465 636c 6172 6174 696f n the declaratio\n+00191600: 6e20 616e 6420 6163 6365 7373 206f 6620 n and access of \n+00191610: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap context..

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

      .<\n+001916c0: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.Clie\n+001916f0: 6e74 2d73 6964 6520 636f 6f6b 6965 2073 nt-side cookie s\n+00191700: 7570 706f 7274 3c2f 6832 3e0a 3c70 3e43 upport

      .

      C\n+00191710: 6c69 656e 742d 7369 6465 2063 6f6f 6b69 lient-side cooki\n+00191720: 6520 7375 7070 6f72 7420 6973 206f 7074 e support is opt\n+00191730: 696f 6e61 6c2e 2054 6f20 656e 6162 6c65 ional. To enable\n+00191740: 2063 6f6f 6b69 6520 7375 7070 6f72 742c cookie support,\n+00191750: 2063 6f6d 7069 6c65 2061 6c6c 2073 6f75 compile all sou\n+00191760: 7263 6573 2077 6974 6820 7468 6520 636f rces with the co\n+00191770: 6d70 696c 652d 7469 6d65 2066 6c61 6720 mpile-time flag \n+00191780: 3c63 6f64 653e 2357 4954 485f 434f 4f4b #WITH_COOK\n+00191790: 4945 533c 2f63 6f64 653e 2c20 666f 7220 IES, for \n+001917a0: 6578 616d 706c 653a 203c 2f70 3e3c 7072 example:

      c++ -DWITH_C\n+001917d0: 4f4f 4b49 4553 202d 6f20 6d79 636c 6965 OOKIES -o myclie\n+001917e0: 6e74 2073 7464 736f 6170 322e 6370 7020 nt stdsoap2.cpp \n+001917f0: 736f 6170 432e 6370 7020 736f 6170 436c soapC.cpp soapCl\n+00191800: 6965 6e74 2e63 7070 0a3c 2f70 7265 3e3c ient.cpp.<\n+00191810: 703e 206f 7220 6164 6420 7468 6520 666f p> or add the fo\n+00191820: 6c6c 6f77 696e 6720 6c69 6e65 2074 6f20 llowing line to \n+00191830: 3c65 6d3e 3c63 6f64 653e 7374 6473 6f61 stdsoa\n+00191840: 702e 683c 2f63 6f64 653e 3c2f 656d 3e3a p.h:\n+00191850: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

      .
      #define \n+001918a0: 5749 5448 5f43 4f4f 4b49 4553 3c2f 7370 WITH_COOKIES
      .
      \n+001918c0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

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

      .

      .Connecting\n+00197850: 2063 6c69 656e 7473 2074 6872 6f75 6768 clients through\n+00197860: 2070 726f 7879 2073 6572 7665 7273 3c2f proxy servers.

      When a cl\n+00197880: 6965 6e74 206e 6565 6473 2074 6f20 636f ient needs to co\n+00197890: 6e6e 6563 7420 746f 2061 2057 6562 2053 nnect to a Web S\n+001978a0: 6572 7669 6365 2074 6872 6f75 6768 2061 ervice through a\n+001978b0: 2070 726f 7879 2073 6572 7665 722c 2073 proxy server, s\n+001978c0: 6574 2074 6865 203c 636f 6465 3e3c 6120 et the soap::pr\n+00197980: 6f78 795f 686f 7374 3c2f 613e 3c2f 636f oxy_host string and <\n+001979a0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa\n+00197a60: 703a 3a70 726f 7879 5f70 6f72 743c 2f61 p::proxy_port integer\n+00197a80: 2061 7474 7269 6275 7465 7320 6f66 2074 attributes of t\n+00197a90: 6865 2063 7572 7265 6e74 203c 636f 6465 he current soa\n+00197af0: 703c 2f61 3e3c 2f63 6f64 653e 2063 6f6e p con\n+00197b00: 7465 7874 2074 6f20 7468 6520 7072 6f78 text to the prox\n+00197b10: 7927 7320 686f 7374 206e 616d 6520 616e y's host name an\n+00197b20: 6420 706f 7274 2c20 7265 7370 6563 7469 d port, respecti\n+00197b30: 7665 6c79 2e20 466f 7220 6578 616d 706c vely. For exampl\n+00197b40: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

      .
      <\n+00197b70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+00197b80: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap soap;
      .
      soap_init(\n+00197c70: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap\n+00197ca0: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
      .\n+00197cc0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap.\n+00197cf0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 proxy_h\n+00197d40: 6f73 743c 2f61 3e20 3d20 3c73 7061 6e20 ost = "prox\n+00197d70: 7968 6f73 746e 616d 6526 7175 6f74 3b3c yhostname"<\n+00197d80: 2f73 7061 6e3e 3b20 3c2f 6469 763e 0a3c /span>;

      .<\n+00197d90: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00197da0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n+00197dd0: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .proxy_\n+00197e20: 706f 7274 3c2f 613e 203d 2038 3038 303b port = 8080;\n+00197e30: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      if (s\n+00197e70: 6f61 705f 6361 6c6c 5f6e 735f 5f77 6562 oap_call_ns__web\n+00197e80: 6d65 7468 6f64 2826 616d 703b 3c61 2063 method(&soap, "h\n+00197ee0: 7474 703a 2f2f 686f 7374 3a70 6f72 742f ttp://host:port/\n+00197ef0: 7061 7468 2671 756f 743b 3c2f 7370 616e path", &\n+00197f20: 7175 6f74 3b61 6374 696f 6e26 7175 6f74 quot;action"\n+00197f30: 3b3c 2f73 7061 6e3e 2c20 2e2e 2e29 2920 ;, ...)) \n+00197f40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      ..
      else\n+00198040: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      ... \n+00198060: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // success\n+00198080: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c2f
      .

      The cont\n+001980b0: 6578 7420 6174 7472 6962 7574 6573 203c ext attributes <\n+001980c0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>\n+00198170: 736f 6170 3a3a 7072 6f78 795f 686f 7374 soap::proxy_host\n+00198180: 3c2f 613e 3c2f 636f 6465 3e20 616e 6420 and \n+00198190: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so\n+00198250: 6170 3a3a 7072 6f78 795f 706f 7274 3c2f ap::proxy_port keep t\n+00198270: 6865 6972 2076 616c 7565 7320 7468 726f heir values thro\n+00198280: 7567 6820 6120 7365 7175 656e 6365 206f ugh a sequence o\n+00198290: 6620 7365 7276 6963 6520 6f70 6572 6174 f service operat\n+001982a0: 696f 6e20 6361 6c6c 732c 2073 6f20 7468 ion calls, so th\n+001982b0: 6579 206f 6e6c 7920 6e65 6564 2074 6f20 ey only need to \n+001982c0: 6265 2073 6574 206f 6e63 652e 3c2f 703e be set once.

      \n+001982d0: 0a3c 703e 5768 656e 2058 2d46 6f72 7761 .

      When X-Forwa\n+001982e0: 7264 6564 2d46 6f72 2068 6561 6465 7273 rded-For headers\n+001982f0: 2061 7265 2072 6574 7572 6e65 6420 6279 are returned by\n+00198300: 2074 6865 2070 726f 7879 2c20 7468 6520 the proxy, the \n+00198310: 6865 6164 6572 2063 616e 2062 6520 6163 header can be ac\n+00198320: 6365 7373 6564 2069 6e20 7468 6520 3c63 cessed in the soap:\n+001983c0: 3a70 726f 7879 5f66 726f 6d3c 2f61 3e3c :proxy_from<\n+001983d0: 2f63 6f64 653e 2073 7472 696e 672e 3c2f /code> string..

      See also S\n+001983f0: 6563 7469 6f6e 7320 3c61 2063 6c61 7373 ections HTTP\n+00198430: 2070 726f 7879 2062 6173 6963 2061 7574 proxy basic aut\n+00198440: 6865 6e74 6963 6174 696f 6e3c 2f61 3e20 hentication \n+00198450: 616e 6420 3c61 2063 6c61 7373 3d22 656c and HTTP\n+00198490: 2070 726f 7879 204e 544c 4d20 6175 7468 proxy NTLM auth\n+001984a0: 656e 7469 6361 7469 6f6e 3c2f 613e 2e3c entication.<\n+001984b0: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

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

      .

      .Bind\n+00198520: 2062 6566 6f72 6520 636f 6e6e 6563 7420 before connect \n+00198530: 616e 6420 7365 7474 696e 6720 7468 6520 and setting the \n+00198540: 636c 6965 6e74 2069 6e74 6572 6661 6365 client interface\n+00198550: 2061 6464 7265 7373 3c2f 6832 3e0a 3c70 address

      .To bind the cli\n+00198570: 656e 7420 746f 2061 2070 6f72 7420 6265 ent to a port be\n+00198580: 666f 7265 2063 6f6e 6e65 6374 2c20 7365 fore connect, se\n+00198590: 7420 7468 6520 3c63 6f64 653e 3c61 2063 t the soap::client_\n+00198650: 706f 7274 3c2f 613e 3c2f 636f 6465 3e20 port \n+00198660: 746f 2061 206e 6f6e 2d6e 6567 6174 6976 to a non-negativ\n+00198670: 6520 706f 7274 206e 756d 6265 723a 3c2f e port number:.
      struct <\n+001986d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001986e0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001986f0: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+00198700: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+00198730: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new<\n+00198790: 2f61 3e28 293b 203c 2f64 6976 3e0a 3c64 /a>();
      .\n+001987b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+001987e0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >cli\n+00198830: 656e 745f 706f 7274 3c2f 613e 203d 202e ent_port = .\n+00198840: 2e2e 3b20 3c73 7061 6e20 636c 6173 733d ..; // non\n+00198860: 2d6e 6567 6174 6976 6520 706f 7274 206e -negative port n\n+00198870: 756d 6265 7220 3c2f 7370 616e 3e3c 2f64 umber ..\n+001989a0: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // e\n+001989c0: 7272 6f72 3c2f 7370 616e 3e3c 2f64 6976 rror.
      el\n+00198a00: 7365 3c2f 7370 616e 3e20 3c2f 6469 763e se
      \n+00198a10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      ... /\n+00198a40: 2f20 7375 6363 6573 733c 2f73 7061 6e3e / success\n+00198a50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      \n+00198aa0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
      i\n+00198b20: 6e74 2063 6c69 656e 745f 706f 7274 3c2f nt client_port
      User-defi\n+00198b50: 6e61 626c 6520 636c 6965 6e74 2070 6f72 nable client por\n+00198b60: 7420 746f 2062 696e 6420 746f 2062 6566 t to bind to bef\n+00198b70: 6f72 6520 636f 6e6e 6563 7469 6e67 2074 ore connecting t\n+00198b80: 6f20 6120 7365 7276 6572 2c20 7768 656e o a server, when\n+00198b90: 206e 6f6e 2d6e 6567 6174 6976 652e 3c2f non-negative.
      Defini\n+00198bc0: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa\n+00198bd0: 7032 2e68 3a33 3639 303c 2f64 6976 3e3c p2.h:3690
      <\n+00198be0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

      \n+00198c00: 5468 6973 2070 6f72 7420 6e75 6d62 6572 This port number\n+00198c10: 2069 7320 7573 6564 206f 6e6c 7920 6f6e is used only on\n+00198c20: 6365 2061 6e64 2072 6573 6574 2074 6f20 ce and reset to \n+00198c30: 2d31 2028 6469 7361 626c 6564 292e 2053 -1 (disabled). S\n+00198c40: 6574 2069 7420 6167 6169 6e20 666f 7220 et it again for \n+00198c50: 7468 6520 6e65 7874 2063 616c 6c2e 3c2f the next call..

      To set a c\n+00198c70: 6c69 656e 7420 696e 7465 7266 6163 6520 lient interface \n+00198c80: 6164 6472 6573 7320 666f 7220 7468 6520 address for the \n+00198c90: 636f 6e6e 6563 7469 6f6e 2074 6861 7420 connection that \n+00198ca0: 6973 2061 6e20 4950 2061 6464 7265 7373 is an IP address\n+00198cb0: 206f 6620 7468 6520 636c 6965 6e74 3a3c of the client:<\n+00198cc0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

      struct \n+00198d10: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+00198d40: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+00198d70: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_new\n+00198dd0: 3c2f 613e 2829 3b20 3c2f 6469 763e 0a3c ();
      .<\n+00198de0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+00198df0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap\n+00198e20: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->cl\n+00198e70: 6965 6e74 5f69 6e74 6572 6661 6365 3c2f ient_interface = "..."\n+00198eb0: 3c2f 7370 616e 3e3b 203c 7370 616e 2063 ; /\n+00198ed0: 2f20 4950 2061 6464 7265 7373 203c 2f73 / IP address
      .
      if\n+00198f20: 2028 736f 6170 5f63 616c 6c5f 6e73 5f5f (soap_call_ns__\n+00198f30: 7765 626d 6574 686f 6428 3c61 2063 6c61 webmethod(soap, "htt\n+00198f90: 703a 2f2f 686f 7374 3a70 6f72 742f 7061 p://host:port/pa\n+00198fa0: 7468 2671 756f 743b 3c2f 7370 616e 3e2c th",\n+00198fb0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu\n+00198fd0: 6f74 3b61 6374 696f 6e26 7175 6f74 3b3c ot;action"<\n+00198fe0: 2f73 7061 6e3e 2c20 2e2e 2e29 2920 3c2f /span>, ...)) .
      ... // error
      .
      else\n+00199070: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      ... \n+00199090: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // success\n+001990b0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .User-definable \n+001991d0: 636c 6965 6e74 2069 6e74 6572 6661 6365 client interface\n+001991e0: 2061 6464 7265 7373 2074 6f20 6f76 6572 address to over\n+001991f0: 7269 6465 2077 6865 6e20 636f 6e6e 6563 ride when connec\n+00199200: 7469 6e67 2074 6f20 6120 7365 7276 6572 ting to a server\n+00199210: 2c20 7768 656e 206e 6f6e 2d4e 554c 4c20 , when non-NULL \n+00199220: 2857 696e 646f 2e2e 2e3c 2f64 6976 3e3c (Windo...
      <\n+00199230: 6469 7620 636c 6173 733d 2274 7464 6566 div class=\"ttdef\n+00199240: 223e 3c62 3e44 6566 696e 6974 696f 6e3a \">Definition:\n+00199250: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h:\n+00199260: 3336 3939 3c2f 6469 763e 3c2f 6469 763e 3699
      \n+00199270: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

      This \n+00199290: 636c 6965 6e74 2069 6e74 6572 6661 6365 client interface\n+001992a0: 2061 6464 7265 7373 2073 7472 696e 6720 address string \n+001992b0: 6973 2075 7365 6420 6f6e 6c79 206f 6e63 is used only onc\n+001992c0: 6520 616e 6420 7265 7365 7420 746f 204e e and reset to N\n+001992d0: 554c 4c20 2864 6973 6162 6c65 6429 2e20 ULL (disabled). \n+001992e0: 5365 7420 6974 2061 6761 696e 2066 6f72 Set it again for\n+001992f0: 2074 6865 206e 6578 7420 6361 6c6c 2e20 the next call. \n+00199300: 5468 6973 2066 6561 7475 7265 2069 7320 This feature is \n+00199310: 6e6f 7420 6176 6169 6c61 626c 6520 7768 not available wh\n+00199320: 656e 2063 6f6d 7069 6c69 6e67 2074 6865 en compiling the\n+00199330: 2063 6f64 6520 6f6e 2077 696e 646f 7773 code on windows\n+00199340: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

      .

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

      .

      \n+00199380: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 <\n+001993a0: 2f61 3e0a 4661 7374 4347 493c 2f68 323e /a>.FastCGI

      \n+001993b0: 0a3c 703e 546f 2065 6e61 626c 6520 4661 .

      To enable Fa\n+001993c0: 7374 4347 4920 7375 7070 6f72 742c 2069 stCGI support, i\n+001993d0: 6e73 7461 6c6c 2046 6173 7443 4749 2061 nstall FastCGI a\n+001993e0: 6e64 2063 6f6d 7069 6c65 2061 6c6c 2073 nd compile all s\n+001993f0: 6f61 7063 7070 322d 6765 6e65 7261 7465 oapcpp2-generate\n+00199400: 6420 736f 7572 6365 2063 6f64 6520 6669 d source code fi\n+00199410: 6c65 7320 616e 6420 796f 7572 2061 7070 les and your app\n+00199420: 6c69 6361 7469 6f6e 2073 6f75 7263 6573 lication sources\n+00199430: 2077 6974 6820 7468 6520 636f 6d70 696c with the compil\n+00199440: 652d 7469 6d65 2066 6c61 6720 3c63 6f64 e-time flag #WITH_FASTCGI<\n+00199460: 2f63 6f64 653e 206f 7220 6164 643a 3c2f /code> or add:.

      #define WI\n+001994c0: 5448 5f46 4153 5443 4749 3c2f 7370 616e TH_FASTCGI
      .
      <\n+001994f0: 703e 746f 203c 656d 3e3c 636f 6465 3e67 p>to g\n+00199500: 736f 6170 2f73 7464 736f 6170 322e 683c soap/stdsoap2.h<\n+00199510: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and \n+00199520: 7265 636f 6d70 696c 6520 7468 6520 7072 recompile the pr\n+00199530: 6f6a 6563 7420 636f 6465 2e3c 2f70 3e0a oject code.

      .\n+00199540: 3c64 6c20 636c 6173 733d 2273 6563 7469
      \n+00199560: 5761 726e 696e 673c 2f64 743e 3c64 643e Warning
      \n+00199570: 446f 206e 6f74 206c 696e 6b20 6167 6169 Do not link agai\n+00199580: 6e73 7420 7468 6520 3c65 6d3e 3c63 6f64 nst the gsoap/libgsoap\n+001995a0: 2a3c 2f63 6f64 653e 3c2f 656d 3e20 6c69 * li\n+001995b0: 6272 6172 6965 7320 6173 2074 6865 7365 braries as these\n+001995c0: 2061 7265 206e 6f74 2073 7569 7461 626c are not suitabl\n+001995d0: 6520 666f 7220 4661 7374 4347 492e 2043 e for FastCGI. C\n+001995e0: 6f6d 7069 6c65 203c 656d 3e3c 636f 6465 ompile gsoap/stdsoap2.\n+00199600: 633c 2f63 6f64 653e 3c2f 656d 3e20 286f c (o\n+00199610: 7220 3c65 6d3e 3c63 6f64 653e 6773 6f61 r gsoa\n+00199620: 702f 7374 6473 6f61 7032 2e63 7070 3c2f p/stdsoap2.cpp) inst\n+00199640: 6561 642e 3c2f 6464 3e3c 2f64 6c3e 0a3c ead.
      .<\n+00199650: 703e f09f 949d 203c 6120 6872 6566 3d22 p>....
      Back to table\n+00199670: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents\n+00199680: 3c2f 703e 0a3c 6832 3e3c 6120 636c 6173

      .

      .How to\n+001996b0: 206d 696e 696d 697a 6520 6170 706c 6963 minimize applic\n+001996c0: 6174 696f 6e20 6d65 6d6f 7279 2066 6f6f ation memory foo\n+001996d0: 7470 7269 6e74 3c2f 6832 3e0a 3c70 3e54 tprint

      .

      T\n+001996e0: 6f20 636f 6d70 696c 6520 6753 4f41 5020 o compile gSOAP \n+001996f0: 6170 706c 6963 6174 696f 6e73 2069 6e74 applications int\n+00199700: 656e 6465 6420 666f 7220 736d 616c 6c20 ended for small \n+00199710: 6d65 6d6f 7279 2064 6576 6963 6573 2c20 memory devices, \n+00199720: 796f 7520 6d61 7920 7761 6e74 2074 6f20 you may want to \n+00199730: 7265 6d6f 7665 2061 6c6c 206e 6f6e 2d65 remove all non-e\n+00199740: 7373 656e 7469 616c 2066 6561 7475 7265 ssential feature\n+00199750: 7320 7468 6174 2063 6f6e 7375 6d65 2070 s that consume p\n+00199760: 7265 6369 6f75 7320 636f 6465 2061 6e64 recious code and\n+00199770: 2064 6174 6120 7370 6163 652e 2054 6f20 data space. To \n+00199780: 646f 2074 6869 732c 2063 6f6d 7069 6c65 do this, compile\n+00199790: 2074 6865 2073 6f75 7263 6520 636f 6465 the source code\n+001997a0: 2066 696c 6573 2077 6974 6820 7468 6520 files with the \n+001997b0: 636f 6d70 696c 652d 7469 6d65 2066 6c61 compile-time fla\n+001997c0: 6720 3c63 6f64 653e 2357 4954 485f 4c45 g #WITH_LE\n+001997d0: 414e 3c2f 636f 6465 3e20 2869 2e65 2e20 AN (i.e. \n+001997e0: 3c63 6f64 653e 2364 6566 696e 6520 5749 #define WI\n+001997f0: 5448 5f4c 4541 4e3c 2f63 6f64 653e 2920 TH_LEAN) \n+00199800: 746f 2072 656d 6f76 6520 6d61 6e79 206e to remove many n\n+00199810: 6f6e 2d65 7373 656e 7469 616c 2066 6561 on-essential fea\n+00199820: 7475 7265 732e 2054 6865 2066 6561 7475 tures. The featu\n+00199830: 7265 7320 7468 6174 2077 696c 6c20 6265 res that will be\n+00199840: 2064 6973 6162 6c65 6420 6172 653a 3c2f disabled are:.

      .

      Use th\n+0019a190: 6520 636f 6d70 696c 652d 7469 6d65 2066 e compile-time f\n+0019a1a0: 6c61 6720 3c63 6f64 653e 2357 4954 485f lag #WITH_\n+0019a1b0: 4c45 414e 4552 3c2f 636f 6465 3e20 746f LEANER to\n+0019a1c0: 206d 616b 6520 7468 6520 6578 6563 7574 make the execut\n+0019a1d0: 6162 6c65 2065 7665 6e20 736d 616c 6c65 able even smalle\n+0019a1e0: 7220 6279 2072 656d 6f76 696e 6720 4449 r by removing DI\n+0019a1f0: 4d45 2061 6e64 204d 494d 4520 6174 7461 ME and MIME atta\n+0019a200: 6368 6d65 6e74 2068 616e 646c 696e 672c chment handling,\n+0019a210: 203c 636f 6465 3e23 4c4f 4e47 3634 3c2f #LONG64 (64 bit) s\n+0019a230: 6572 6961 6c69 7a61 7469 6f6e 2c20 3c63 erialization, wchar_t* serializatio\n+0019a260: 6e2c 2061 6e64 2073 7570 706f 7274 2066 n, and support f\n+0019a270: 6f72 2058 4d4c 2044 4f4d 206f 7065 7261 or XML DOM opera\n+0019a280: 7469 6f6e 732e 204e 6f74 6520 7468 6174 tions. Note that\n+0019a290: 2044 494d 452f 4d49 4d45 2061 7474 6163 DIME/MIME attac\n+0019a2a0: 686d 656e 7473 2061 7265 206e 6f74 2065 hments are not e\n+0019a2b0: 7373 656e 7469 616c 2074 6f20 6163 6869 ssential to achi\n+0019a2c0: 6576 6520 534f 4150 2f58 4d4c 2069 6e74 eve SOAP/XML int\n+0019a2d0: 6572 6f70 6572 6162 696c 6974 792e 2044 eroperability. D\n+0019a2e0: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments \n+0019a2f0: 6172 6520 6120 636f 6e76 656e 6965 6e74 are a convenient\n+0019a300: 2077 6179 2074 6f20 6578 6368 616e 6765 way to exchange\n+0019a310: 206e 6f6e 2d74 6578 742d 6261 7365 6420 non-text-based \n+0019a320: 2869 2e65 2e20 6269 6e61 7279 2920 636f (i.e. binary) co\n+0019a330: 6e74 656e 742c 2062 7574 2061 7265 206e ntent, but are n\n+0019a340: 6f74 2072 6571 7569 7265 6420 666f 7220 ot required for \n+0019a350: 6261 7369 6320 534f 4150 2f58 4d4c 2069 basic SOAP/XML i\n+0019a360: 6e74 6572 6f70 6572 6162 696c 6974 792e nteroperability.\n+0019a370: 2041 7474 6163 686d 656e 7420 7265 7175 Attachment requ\n+0019a380: 6972 656d 656e 7473 2061 7265 2070 7265 irements are pre\n+0019a390: 6469 6374 6162 6c65 2e20 5468 6174 2069 dictable. That i\n+0019a3a0: 732c 2061 7070 6c69 6361 7469 6f6e 7320 s, applications \n+0019a3b0: 776f 6e27 7420 7375 6464 656e 6c79 2064 won't suddenly d\n+0019a3c0: 6563 6964 6520 746f 2075 7365 2044 494d ecide to use DIM\n+0019a3d0: 4520 6f72 204d 494d 4520 696e 7374 6561 E or MIME instea\n+0019a3e0: 6420 6f66 2058 4d4c 2074 6f20 6578 6368 d of XML to exch\n+0019a3f0: 616e 6765 2063 6f6e 7465 6e74 2e3c 2f70 ange content..

      It is safe \n+0019a410: 746f 2074 7279 2074 6f20 636f 6d70 696c to try to compil\n+0019a420: 6520 796f 7572 2061 7070 6c69 6361 7469 e your applicati\n+0019a430: 6f6e 2077 6974 6820 7468 6520 636f 6d70 on with the comp\n+0019a440: 696c 652d 7469 6d65 2066 6c61 6720 3c63 ile-time flag #WITH_LEAN, provided \n+0019a470: 7468 6174 2079 6f75 7220 6170 706c 6963 that your applic\n+0019a480: 6174 696f 6e20 646f 6573 206e 6f74 2072 ation does not r\n+0019a490: 656c 7920 6f6e 2049 2f4f 2074 696d 656f ely on I/O timeo\n+0019a4a0: 7574 732e 2057 6865 6e20 6e6f 206c 696e uts. When no lin\n+0019a4b0: 6b61 6765 2065 7272 6f72 206f 6363 7572 kage error occur\n+0019a4c0: 7320 696e 2074 6865 2063 6f6d 7069 6c61 s in the compila\n+0019a4d0: 7469 6f6e 2070 726f 6365 7373 2c20 6974 tion process, it\n+0019a4e0: 2069 7320 7361 6665 2074 6f20 6173 7375 is safe to assu\n+0019a4f0: 6d65 2074 6861 7420 796f 7572 2061 7070 me that your app\n+0019a500: 6c69 6361 7469 6f6e 2077 696c 6c20 7275 lication will ru\n+0019a510: 6e20 6a75 7374 2066 696e 652e 3c2f 703e n just fine.

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

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

      .

      .How \n+0019a580: 746f 2072 656d 6f76 6520 7468 6520 4253 to remove the BS\n+0019a590: 4420 736f 636b 6574 206c 6962 7261 7279 D socket library\n+0019a5a0: 2072 6571 7569 7265 6d65 6e74 3c2f 6832 requirement.

      The gsoap/stdsoap\n+0019a5d0: 322e 633c 2f63 6f64 653e 3c2f 656d 3e20 2.c \n+0019a5e0: 616e 6420 3c65 6d3e 3c63 6f64 653e 6773 and gs\n+0019a5f0: 6f61 702f 7374 6473 6f61 7032 2e63 7070 oap/stdsoap2.cpp\n+0019a600: 3c2f 636f 6465 3e3c 2f65 6d3e 206c 6962 lib\n+0019a610: 7261 7269 6573 2073 686f 756c 6420 6265 raries should be\n+0019a620: 206c 696e 6b65 6420 7769 7468 2061 2042 linked with a B\n+0019a630: 5344 2073 6f63 6b65 7420 6c69 6272 6172 SD socket librar\n+0019a640: 7920 696e 2074 6865 2070 726f 6a65 6374 y in the project\n+0019a650: 2062 7569 6c64 2e20 546f 2072 656d 6f76 build. To remov\n+0019a660: 6520 7468 6520 6e65 6564 2074 6f20 6c69 e the need to li\n+0019a670: 6e6b 2061 2073 6f63 6b65 7420 6c69 6272 nk a socket libr\n+0019a680: 6172 792c 2079 6f75 2063 616e 2063 6f6d ary, you can com\n+0019a690: 7069 6c65 203c 656d 3e3c 636f 6465 3e67 pile g\n+0019a6a0: 736f 6170 2f73 7464 736f 6170 322e 633c soap/stdsoap2.c<\n+0019a6b0: 2f63 6f64 653e 3c2f 656d 3e20 2866 6f72 /code> (for\n+0019a6c0: 2043 2920 616e 6420 3c65 6d3e 3c63 6f64 C) and gsoap/stdsoap2\n+0019a6e0: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp\n+0019a6f0: 2028 666f 7220 432b 2b29 2077 6974 6820 (for C++) with \n+0019a700: 7468 6520 7468 6520 636f 6d70 696c 652d the the compile-\n+0019a710: 7469 6d65 2066 6c61 6720 3c63 6f64 653e time flag \n+0019a720: 2357 4954 485f 4e4f 494f 3c2f 636f 6465 #WITH_NOIO macro set (i.e\n+0019a740: 2e20 3c63 6f64 653e 2364 6566 696e 6520 . #define \n+0019a750: 5749 5448 5f4e 4f49 4f3c 2f63 6f64 653e WITH_NOIO\n+0019a760: 292e 2054 6869 7320 7265 6d6f 7665 7320 ). This removes \n+0019a770: 7468 6520 6465 7065 6e64 656e 6379 206f the dependency o\n+0019a780: 6e20 7468 6520 4253 4420 736f 636b 6574 n the BSD socket\n+0019a790: 2041 5049 2c20 494f 2073 7472 6561 6d73 API, IO streams\n+0019a7a0: 2c20 3c63 6f64 653e 4649 4c45 3c2f 636f , FILE type, and errno\n+0019a7d0: 2e3c 2f70 3e0a 3c70 3e59 6f75 2073 686f .

      .

      You sho\n+0019a7e0: 756c 6420 6465 6669 6e65 2063 616c 6c62 uld define callb\n+0019a7f0: 6163 6b73 2074 6f20 7265 706c 6163 6520 acks to replace \n+0019a800: 7468 6520 6d69 7373 696e 6720 736f 636b the missing sock\n+0019a810: 6574 2073 7461 636b 2e20 546f 2064 6f20 et stack. To do \n+0019a820: 736f 2c20 6164 6420 746f 2079 6f75 7220 so, add to your \n+0019a830: 636f 6465 2074 6865 2066 6f6c 6c6f 7769 code the followi\n+0019a840: 6e67 2064 6566 696e 6974 696f 6e73 3a3c ng definitions:<\n+0019a850: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

      struct \n+0019a8a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+0019a8d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap;\n+0019a900: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      s\n+0019a970: 6f61 705f 696e 6974 3c2f 613e 2826 616d oap_init(&am\n+0019a980: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
      .
      /* fsend is u\n+0019a9f0: 7365 6420 746f 2074 7261 6e73 6d69 7420 sed to transmit \n+0019aa00: 6461 7461 2069 6e20 626c 6f63 6b73 202a data in blocks *\n+0019aa10: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
      .\n+0019aa20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      soap.fsend = my_send; .
      /* \n+0019ab00: 6672 6563 7620 6973 2075 7365 6420 746f frecv is used to\n+0019ab10: 2072 6563 6569 7665 2064 6174 6120 696e receive data in\n+0019ab20: 2062 6c6f 636b 7320 2a2f 3c2f 7370 616e blocks */
      .
      soap.frecv = my\n+0019abe0: 5f72 6563 763b 203c 2f64 6976 3e0a 3c64 _recv;
      .\n+0019ac00: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* fopen i\n+0019ac20: 7320 7573 6564 2074 6f20 636f 6e6e 6563 s used to connec\n+0019ac30: 7420 2a2f 3c2f 7370 616e 3e20 3c2f 6469 t */ ..<\n+0019ad00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+0019ad10: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >/* fclose\n+0019ad30: 2069 7320 7573 6564 2074 6f20 6469 7363 is used to disc\n+0019ad40: 6f6e 6e65 6374 202a 2f3c 2f73 7061 6e3e onnect */\n+0019ad50: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      soap.fclose = my\n+0019ae00: 5f74 6370 5f64 6973 636f 6e6e 6563 743b _tcp_disconnect;\n+0019ae10: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      \n+0019ae40: 2f2a 2066 636c 6f73 6573 6f63 6b65 7420 /* fclosesocket \n+0019ae50: 6973 2075 7365 6420 6f6e 6c79 2074 6f20 is used only to \n+0019ae60: 636c 6f73 6520 7468 6520 6d61 7374 6572 close the master\n+0019ae70: 2073 6f63 6b65 7420 696e 2061 2073 6572 socket in a ser\n+0019ae80: 7665 7220 7570 6f6e 2073 6f61 705f 646f ver upon soap_do\n+0019ae90: 6e65 2829 202a 2f3c 2f73 7061 6e3e 203c ne() */ <\n+0019aea0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      s\n+0019aee0: 6f61 703c 2f61 3e2e 3c61 2063 6c61 7373 oap.f\n+0019af40: 636c 6f73 6573 6f63 6b65 743c 2f61 3e20 closesocket \n+0019af50: 3d20 6d79 5f74 6370 5f63 6c6f 7365 736f = my_tcp_closeso\n+0019af60: 636b 6574 3b20 3c2f 6469 763e 0a3c 6469 cket;
      .<\n+0019af80: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+0019af90: 656e 7422 3e2f 2a20 6673 6875 7464 6f77 ent\">/* fshutdow\n+0019afa0: 6e73 6f63 6b65 7420 6973 2075 7365 6420 nsocket is used \n+0019afb0: 6166 7465 7220 636f 6d70 6c65 7469 6e67 after completing\n+0019afc0: 2061 2073 656e 6420 6f70 6572 6174 696f a send operatio\n+0019afd0: 6e20 746f 2073 656e 6420 5443 5020 4649 n to send TCP FI\n+0019afe0: 4e20 2a2f 3c2f 7370 616e 3e20 3c2f 6469 N */ .
      soap\n+0019b030: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .fshu\n+0019b090: 7464 6f77 6e73 6f63 6b65 743c 2f61 3e20 tdownsocket \n+0019b0a0: 3d20 6d79 5f74 6370 5f73 6875 7464 6f77 = my_tcp_shutdow\n+0019b0b0: 6e73 6f63 6b65 743b 203c 2f64 6976 3e0a nsocket;
      .\n+0019b0c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      /* setti\n+0019b0f0: 6e67 2066 706f 6c6c 2069 7320 6f70 7469 ng fpoll is opti\n+0019b100: 6f6e 616c 2c20 6c65 6176 6520 6974 204e onal, leave it N\n+0019b110: 554c 4c20 746f 206f 6d69 7420 706f 6c6c ULL to omit poll\n+0019b120: 696e 6720 7468 6520 7365 7276 6572 202a ing the server *\n+0019b130: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
      .\n+0019b140: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      soap.fpoll = my_poll; .
      /* \n+0019b220: 6661 6363 6570 7420 6973 2075 7365 6420 faccept is used \n+0019b230: 6f6e 6c79 2062 7920 6120 7365 7276 6572 only by a server\n+0019b240: 2061 7070 6c69 6361 7469 6f6e 202a 2f3c application */<\n+0019b250: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
      .\n+0019b270: 3c61 2063 6c61 7373 3d22 636f 6465 2220
      soap.\n+0019b2a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 faccept = my_accept;<\n+0019b310: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.\n+0019b3e0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
      int(* fpoll)\n+0019b400: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so\n+0019b410: 6170 293c 2f64 6976 3e3c 6469 7620 636c ap)
      Call\n+0019b430: 6261 636b 2074 6861 7420 626c 6f63 6b73 back that blocks\n+0019b440: 2075 6e74 696c 2061 6374 6976 6974 7920 until activity \n+0019b450: 6973 2064 6574 6563 7465 6420 6f6e 2074 is detected on t\n+0019b460: 6865 2073 6f61 703a 3a73 6f63 6b65 7420 he soap::socket \n+0019b470: 6f72 2073 6f61 703a 3a6d 6173 7465 7220 or soap::master \n+0019b480: 736f 636b 6574 2c2e 2e2e 3c2f 6469 763e socket,...
      \n+0019b490: 3c64 6976 2063 6c61 7373 3d22 7474 6465
      Definition\n+0019b4b0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h\n+0019b4c0: 3a34 3539 343c 2f64 6976 3e3c 2f64 6976 :4594
      .
      soap::fcl\n+0019b590: 6f73 6573 6f63 6b65 743c 2f61 3e3c 2f64 osesocket
      int(* fcl\n+0019b5c0: 6f73 6573 6f63 6b65 7429 2873 7472 7563 osesocket)(struc\n+0019b5d0: 7420 736f 6170 202a 736f 6170 2c20 534f t soap *soap, SO\n+0019b5e0: 4150 5f53 4f43 4b45 5420 736f 636b 293c AP_SOCKET sock)<\n+0019b5f0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
      Callback\n+0019b610: 2074 6861 7420 636c 6f73 6573 2061 2067 that closes a g\n+0019b620: 6976 656e 2073 6f63 6b65 742e 3c2f 6469 iven socket.
      Definiti\n+0019b650: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+0019b660: 2e68 3a34 3537 303c 2f64 6976 3e3c 2f64 .h:4570
      .
      <\n+0019b6e0: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n+0019b6f0: 726f 7570 5f5f 6361 6c6c 6261 636b 732e roup__callbacks.\n+0019b700: 6874 6d6c 2367 6135 3165 3039 6464 6637 html#ga51e09ddf7\n+0019b710: 3639 6132 6464 6364 3837 3466 6236 6536 69a2ddcd874fb6e6\n+0019b720: 6662 3532 3839 6422 3e73 6f61 703a 3a66 fb5289d\">soap::f\n+0019b730: 7368 7574 646f 776e 736f 636b 6574 3c2f shutdownsocket
      int(\n+0019b760: 2a20 6673 6875 7464 6f77 6e73 6f63 6b65 * fshutdownsocke\n+0019b770: 7429 2873 7472 7563 7420 736f 6170 202a t)(struct soap *\n+0019b780: 736f 6170 2c20 534f 4150 5f53 4f43 4b45 soap, SOAP_SOCKE\n+0019b790: 5420 736f 636b 2c20 696e 7420 686f 7729 T sock, int how)\n+0019b7a0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
      Callbac\n+0019b7c0: 6b20 7468 6174 2073 6875 7473 2064 6f77 k that shuts dow\n+0019b7d0: 6e20 6120 6769 7665 6e20 736f 636b 6574 n a given socket\n+0019b7e0: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
      Def\n+0019b800: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std\n+0019b810: 736f 6170 322e 683a 3435 3833 3c2f 6469 soap2.h:4583
      .
      \n+0019b880: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
      so\n+0019b8e0: 6170 3a3a 6661 6363 6570 743c 2f61 3e3c ap::faccept<\n+0019b8f0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
      SOAP_SO\n+0019b910: 434b 4554 282a 2066 6163 6365 7074 2928 CKET(* faccept)(\n+0019b920: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa\n+0019b930: 702c 2053 4f41 505f 534f 434b 4554 2073 p, SOAP_SOCKET s\n+0019b940: 6f63 6b2c 2073 7472 7563 7420 736f 636b ock, struct sock\n+0019b950: 6164 6472 202a 6164 6472 2c20 696e 7420 addr *addr, int \n+0019b960: 2a6c 656e 293c 2f64 6976 3e3c 6469 7620 *len)
      Ca\n+0019b980: 6c6c 6261 636b 2074 6861 7420 7761 6974 llback that wait\n+0019b990: 7320 666f 7220 616e 6420 6163 6365 7074 s for and accept\n+0019b9a0: 7320 6120 736f 636b 6574 2063 6f6e 6e65 s a socket conne\n+0019b9b0: 6374 696f 6e20 7265 7175 6573 7465 6420 ction requested \n+0019b9c0: 6279 2061 2063 6c69 656e 742e 3c2f 6469 by a client.
      Definiti\n+0019b9f0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2\n+0019ba00: 2e68 3a34 3530 393c 2f64 6976 3e3c 2f64 .h:4509
      .

      Th\n+0019ba30: 6573 6520 6675 6e63 7469 6f6e 7320 7368 ese functions sh\n+0019ba40: 6f75 6c64 2070 726f 7669 6465 2061 206d ould provide a m\n+0019ba50: 696e 696d 616c 2069 6e70 7574 2f6f 7574 inimal input/out\n+0019ba60: 7075 7420 7374 6163 6b20 283c 636f 6465 put stack (soap::\n+0019bb10: 6672 6563 763c 2f61 3e3c 2f63 6f64 653e frecv\n+0019bb20: 2061 6e64 203c 636f 6465 3e3c 6120 636c and soap::fsend\n+0019bbc0: 3c2f 613e 3c2f 636f 6465 3e29 2074 6f20 ) to \n+0019bbd0: 7265 6164 2f77 7269 7465 2058 4d4c 2061 read/write XML a\n+0019bbe0: 6e64 2073 6f63 6b65 742d 6c69 6b65 2073 nd socket-like s\n+0019bbf0: 7461 636b 2028 7468 6520 6f74 6865 7220 tack (the other \n+0019bc00: 6675 6e63 7469 6f6e 7329 2077 6865 6e20 functions) when \n+0019bc10: 6465 7665 6c6f 7069 6e67 2063 6c69 656e developing clien\n+0019bc20: 7420 616e 6420 7365 7276 6572 2061 7070 t and server app\n+0019bc30: 6c69 6361 7469 6f6e 732e 3c2f 703e 0a3c lications.

      .<\n+0019bc40: 703e 5365 6520 5365 6374 696f 6e20 3c61 p>See Section Function \n+0019bc80: 6361 6c6c 6261 636b 7320 666f 7220 6375 callbacks for cu\n+0019bc90: 7374 6f6d 697a 6564 2049 2f4f 2061 6e64 stomized I/O and\n+0019bca0: 2048 5454 5020 6861 6e64 6c69 6e67 3c2f HTTP handling for more deta\n+0019bcc0: 696c 7320 6f6e 2074 6865 2075 7365 206f ils on the use o\n+0019bcd0: 6620 7468 6573 6520 6361 6c6c 6261 636b f these callback\n+0019bce0: 732e 2041 6c6c 2063 616c 6c62 6163 6b20 s. All callback \n+0019bcf0: 6675 6e63 7469 6f6e 2070 6f69 6e74 6572 function pointer\n+0019bd00: 7320 7368 6f75 6c64 2062 6520 6e6f 6e2d s should be non-\n+0019bd10: 4e55 4c4c 2c20 6578 6365 7074 203c 636f NULL, except s\n+0019bde0: 6f61 703a 3a66 706f 6c6c 3c2f 613e 3c2f oap::fpoll.

      .

      Yo\n+0019be00: 7520 6361 6e6e 6f74 2075 7365 203c 636f u cannot use soap_pr\n+0019bea0: 696e 745f 6661 756c 743c 2f61 3e3c 2f63 int_fault and <\n+0019bec0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+0019bed0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+0019bee0: 5f66 6175 6c74 2e68 746d 6c23 6761 6137 _fault.html#gaa7\n+0019bef0: 3038 3232 3933 3865 3066 3131 3664 3164 0822938e0f116d1d\n+0019bf00: 3030 3230 6166 6636 3663 6337 3935 2220 0020aff66cc795\" \n+0019bf10: 7469 746c 653d 2250 7269 6e74 2074 6865 title=\"Print the\n+0019bf20: 206c 6f63 6174 696f 6e20 696e 2074 6865 location in the\n+0019bf30: 206d 6573 7361 6765 2077 6865 7265 2061 message where a\n+0019bf40: 6e64 2077 6865 6e20 7468 6520 6572 726f nd when the erro\n+0019bf50: 7220 6f63 6375 7272 6564 2e22 3e73 6f61 r occurred.\">soa\n+0019bf60: 705f 7072 696e 745f 6661 756c 745f 6c6f p_print_fault_lo\n+0019bf70: 6361 7469 6f6e 3c2f 613e 3c2f 636f 6465 cation to print error\n+0019bf90: 2064 6961 676e 6f73 7469 6373 2e20 496e diagnostics. In\n+0019bfa0: 7374 6561 642c 2074 6865 2076 616c 7565 stead, the value\n+0019bfb0: 206f 6620 3c63 6f64 653e 3c61 2063 6c61 of \n+0019c060: 736f 6170 3a3a 6572 726f 723c 2f61 3e3c soap::error<\n+0019c070: 2f63 6f64 653e 2c20 7768 6963 6820 636f /code>, which co\n+0019c080: 6e74 6169 6e73 2074 6865 2067 534f 4150 ntains the gSOAP\n+0019c090: 2065 7272 6f72 2063 6f64 652c 2063 616e error code, can\n+0019c0a0: 2062 6520 7573 6564 2074 6f20 6465 7465 be used to dete\n+0019c0b0: 726d 696e 6520 7468 6520 6361 7573 6520 rmine the cause \n+0019c0c0: 6f66 2061 2066 6175 6c74 2e3c 2f70 3e0a of a fault.

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

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

      .

      .Ho\n+0019c130: 7720 746f 2063 6f6d 6269 6e65 206d 756c w to combine mul\n+0019c140: 7469 706c 6520 636c 6965 6e74 2061 6e64 tiple client and\n+0019c150: 2073 6572 7665 7220 696d 706c 656d 656e server implemen\n+0019c160: 7461 7469 6f6e 7320 696e 746f 206f 6e65 tations into one\n+0019c170: 2065 7865 6375 7461 626c 653c 2f68 323e executable

      \n+0019c180: 0a3c 703e 5468 6520 7773 646c 3268 2074 .

      The wsdl2h t\n+0019c190: 6f6f 6c20 6361 6e20 6265 2075 7365 6420 ool can be used \n+0019c1a0: 746f 2069 6d70 6f72 7420 6d75 6c74 6970 to import multip\n+0019c1b0: 6c65 2057 5344 4c73 2061 6e64 2073 6368 le WSDLs and sch\n+0019c1c0: 656d 6173 2061 7420 6f6e 6365 2e20 5468 emas at once. Th\n+0019c1d0: 6520 7365 7276 6963 6520 6465 6669 6e69 e service defini\n+0019c1e0: 7469 6f6e 7320 6172 6520 636f 6d62 696e tions are combin\n+0019c1f0: 6564 2069 6e20 6f6e 6520 6865 6164 6572 ed in one header\n+0019c200: 2066 696c 6520 746f 2062 6520 7061 7273 file to be pars\n+0019c210: 6564 2062 7920 736f 6170 6370 7032 2e20 ed by soapcpp2. \n+0019c220: 4974 2069 7320 696d 706f 7274 616e 7420 It is important \n+0019c230: 746f 2061 7373 6967 6e20 6e61 6d65 7370 to assign namesp\n+0019c240: 6163 6520 7072 6566 6978 6573 2074 6f20 ace prefixes to \n+0019c250: 6e61 6d65 7370 6163 6520 5552 4973 2075 namespace URIs u\n+0019c260: 7369 6e67 2074 6865 203c 656d 3e3c 636f sing the typemap.dat file.\n+0019c290: 204f 7468 6572 7769 7365 2c20 7773 646c Otherwise, wsdl\n+0019c2a0: 3268 2077 696c 6c20 6173 7369 676e 206e 2h will assign n\n+0019c2b0: 616d 6573 7061 6365 2070 7265 6669 7865 amespace prefixe\n+0019c2c0: 7320 3c63 6f64 653e 6e73 313c 2f63 6f64 s ns1, ns2, and so on \n+0019c2f0: 746f 2074 6865 2073 6572 7669 6365 206f to the service o\n+0019c300: 7065 7261 7469 6f6e 7320 616e 6420 7363 perations and sc\n+0019c310: 6865 6d61 2074 7970 6573 2e20 5468 7573 hema types. Thus\n+0019c320: 2c20 616e 7920 6368 616e 6765 2074 6f20 , any change to \n+0019c330: 6120 5753 444c 206f 7220 7363 6865 6d61 a WSDL or schema\n+0019c340: 206d 6179 2072 6573 756c 7420 696e 2061 may result in a\n+0019c350: 206e 6577 2070 7265 6669 7820 6173 7369 new prefix assi\n+0019c360: 676e 6d65 6e74 2e20 466f 7220 6d6f 7265 gnment. For more\n+0019c370: 2064 6574 6169 6c73 2c20 706c 6561 7365 details, please\n+0019c380: 2073 6565 2053 6563 7469 6f6e 203c 6120 see Section Customizing\n+0019c3c0: 2058 4d4c 2064 6174 6120 6269 6e64 696e XML data bindin\n+0019c3d0: 6773 2077 6974 6820 7468 6520 7479 7065 gs with the type\n+0019c3e0: 6d61 702e 6461 7420 6669 6c65 3c2f 613e map.dat file\n+0019c3f0: 202e 3c2f 703e 0a3c 703e 416e 6f74 6865 .

      .

      Anothe\n+0019c400: 7220 6170 7072 6f61 6368 2074 6f20 636f r approach to co\n+0019c410: 6d62 696e 6520 6d75 6c74 6970 6c65 2063 mbine multiple c\n+0019c420: 6c69 656e 7420 616e 6420 7365 7276 6963 lient and servic\n+0019c430: 6520 6170 706c 6963 6174 696f 6e73 2069 e applications i\n+0019c440: 6e74 6f20 6f6e 6520 6578 6563 7574 6162 nto one executab\n+0019c450: 6c65 2069 7320 6279 2075 7369 6e67 2043 le is by using C\n+0019c460: 2b2b 206e 616d 6573 7061 6365 7320 746f ++ namespaces to\n+0019c470: 2073 7472 7563 7475 7261 6c6c 7920 7365 structurally se\n+0019c480: 7061 7261 7465 2074 6865 2064 6566 696e parate the defin\n+0019c490: 6974 696f 6e73 2e20 5468 6973 2069 7320 itions. This is \n+0019c4a0: 6175 746f 6d61 7465 6420 7769 7468 203c automated with <\n+0019c4b0: 6120 6872 6566 3d22 2377 7364 6c32 682d a href=\"#wsdl2h-\n+0019c4c0: 7122 3e3c 623e 3c63 6f64 653e 7773 646c q\">wsdl\n+0019c4d0: 3268 202d 7120 6e61 6d65 3c2f 636f 6465 2h -q name option \n+0019c4f0: 3c63 6f64 653e 2d71 206e 616d 653c 2f63 -q name. Or\n+0019c510: 2062 7920 6372 6561 7469 6e67 206c 6962 by creating lib\n+0019c520: 7261 7269 6573 2069 6e20 4320 666f 7220 raries in C for \n+0019c530: 7468 6520 636c 6965 6e74 2f73 6572 7665 the client/serve\n+0019c540: 7220 6f62 6a65 6374 7320 6173 2065 7870 r objects as exp\n+0019c550: 6c61 696e 6564 2069 6e20 7375 6273 6571 lained in subseq\n+0019c560: 7565 6e74 2073 6563 7469 6f6e 733c 2f70 uent sections.

      Both approa\n+0019c580: 6368 6573 2061 7265 2064 656d 6f6e 7374 ches are demonst\n+0019c590: 7261 7465 6420 6279 2065 7861 6d70 6c65 rated by example\n+0019c5a0: 7320 696e 2074 6865 2067 534f 4150 2073 s in the gSOAP s\n+0019c5b0: 6f75 7263 6520 636f 6465 2070 6163 6b61 ource code packa\n+0019c5c0: 6765 2c20 7468 6520 3c65 6d3e 3c63 6f64 ge, the gsoap/samples/\n+0019c5e0: 6c69 6e6b 3c2f 636f 6465 3e3c 2f65 6d3e link\n+0019c5f0: 2028 4320 6f6e 6c79 2920 616e 6420 3c65 (C only) and gsoap/sa\n+0019c610: 6d70 6c65 732f 6c69 6e6b 2b2b 3c2f 636f mples/link++ (C++ wi\n+0019c630: 7468 2043 2b2b 206e 616d 6573 7061 6365 th C++ namespace\n+0019c640: 7329 2065 7861 6d70 6c65 732e 3c2f 703e s) examples.

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

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

      .

      \n+0019c6b0: 3c2f 613e 0a48 6f77 2074 6f20 6275 696c .How to buil\n+0019c6c0: 6420 6120 636c 6965 6e74 206f 7220 7365 d a client or se\n+0019c6d0: 7276 6572 2069 6e20 6120 432b 2b20 636f rver in a C++ co\n+0019c6e0: 6465 206e 616d 6573 7061 6365 3c2f 6832 de namespace.

      You can use\n+0019c700: 2061 2043 2b2b 2063 6f64 6520 6e61 6d65 a C++ code name\n+0019c710: 7370 6163 6520 6f66 2079 6f75 7220 6368 space of your ch\n+0019c720: 6f69 6365 2069 6e20 796f 7572 2069 6e74 oice in your int\n+0019c730: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi\n+0019c740: 6c65 2074 6f20 6275 696c 6420 6120 636c le to build a cl\n+0019c750: 6965 6e74 206f 7220 7365 7276 6572 2069 ient or server i\n+0019c760: 6e20 7468 6174 2043 2b2b 206e 616d 6573 n that C++ names\n+0019c770: 7061 6365 2e20 496e 2074 6869 7320 7761 pace. In this wa\n+0019c780: 792c 2079 6f75 2063 616e 2063 7265 6174 y, you can creat\n+0019c790: 6520 6d75 6c74 6970 6c65 2063 6c69 656e e multiple clien\n+0019c7a0: 7473 2061 6e64 2073 6572 7665 7273 2074 ts and servers t\n+0019c7b0: 6861 7420 6361 6e20 6265 2063 6f6d 6269 hat can be combi\n+0019c7c0: 6e65 6420 616e 6420 6c69 6e6b 6564 2074 ned and linked t\n+0019c7d0: 6f67 6574 6865 7220 7769 7468 6f75 7420 ogether without \n+0019c7e0: 636f 6e66 6c69 6374 732c 2077 6869 6368 conflicts, which\n+0019c7f0: 2069 7320 6578 706c 6169 6e65 6420 696e is explained in\n+0019c800: 206d 6f72 6520 6465 7461 696c 2069 6e20 more detail in \n+0019c810: 7468 6520 6e65 7874 2073 6563 7469 6f6e the next section\n+0019c820: 2028 7768 6963 6820 616c 736f 2073 686f (which also sho\n+0019c830: 7773 2061 6e20 6578 616d 706c 6520 636f ws an example co\n+0019c840: 6d62 696e 696e 6720 7477 6f20 636c 6965 mbining two clie\n+0019c850: 6e74 206c 6962 7261 7269 6573 2064 6566 nt libraries def\n+0019c860: 696e 6564 2069 6e20 7477 6f20 432b 2b20 ined in two C++ \n+0019c870: 636f 6465 206e 616d 6573 7061 6365 7329 code namespaces)\n+0019c880: 2e3c 2f70 3e0a 3c70 3e55 7365 203c 6120 .

      .

      Use wsdl2h\n+0019c8b0: 202d 7120 6e61 6d65 3c2f 636f 6465 3e3c -q name<\n+0019c8c0: 2f62 3e20 6f70 7469 6f6e 203c 623e 3c63 /b> option -q name to ge\n+0019c8f0: 6e65 7261 7465 2064 6566 696e 6974 696f nerate definitio\n+0019c900: 6e73 2069 6e20 7468 6520 432b 2b20 3c63 ns in the C++ name \n+0019c920: 6e61 6d65 7370 6163 652e 2054 6869 7320 namespace. This \n+0019c930: 6f70 7469 6f6e 2063 616e 2061 6c73 6f20 option can also \n+0019c940: 6265 2075 7365 6420 696e 2063 6f6d 6269 be used in combi\n+0019c950: 6e61 7469 6f6e 2077 6974 6820 432b 2b20 nation with C++ \n+0019c960: 7072 6f78 7920 616e 6420 7365 7276 6572 proxy and server\n+0019c970: 206f 626a 6563 7420 6765 6e65 7261 7469 object generati\n+0019c980: 6f6e 2c20 7573 696e 6720 3c62 3e3c 636f on, using soapcpp2 -j option\n+0019c9b0: 203c 623e 3c63 6f64 653e 2d6a 3c2f 636f -j or optio\n+0019c9d0: 6e20 3c62 3e3c 636f 6465 3e2d 693c 2f63 n -i).

      .<\n+0019c9f0: 703e 4174 206d 6f73 7420 6f6e 6520 6e61 p>At most one na\n+0019ca00: 6d65 7370 6163 6520 6361 6e20 6265 2064 mespace can be d\n+0019ca10: 6566 696e 6564 2066 6f72 2074 6865 2065 efined for the e\n+0019ca20: 6e74 6972 6520 696e 7465 7266 6163 6520 ntire interface \n+0019ca30: 6865 6164 6572 2066 696c 6520 666f 7220 header file for \n+0019ca40: 736f 6170 6370 7032 2e20 5468 6520 432b soapcpp2. The C+\n+0019ca50: 2b20 6e61 6d65 7370 6163 6520 6d75 7374 + namespace must\n+0019ca60: 2063 6f6d 706c 6574 656c 7920 656e 6361 completely enca\n+0019ca70: 7073 756c 6174 6520 7468 6520 656e 7469 psulate the enti\n+0019ca80: 7265 2063 6f6e 7465 6e74 7320 6f66 2074 re contents of t\n+0019ca90: 6865 2068 6561 6465 7220 6669 6c65 3a3c he header file:<\n+0019caa0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
      namespace NamespaceName\n+0019cb00: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
      .
      ...\n+0019cb20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 interface\n+0019cb40: 203c 2f73 7061 6e3e 6865 6164 6572 2066 header f\n+0019cb50: 696c 6520 636f 6e74 656e 7473 202e 2e2e ile contents ...\n+0019cb60: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      }.

      When\n+0019cba0: 2063 6f6d 7069 6c69 6e67 2074 6869 7320 compiling this \n+0019cbb0: 696e 7465 7266 6163 6520 6865 6164 6572 interface header\n+0019cbc0: 2066 696c 6520 7769 7468 2074 6865 2073 file with the s\n+0019cbd0: 6f61 7063 7070 3220 746f 6f6c 2c20 616c oapcpp2 tool, al\n+0019cbe0: 6c20 7479 7065 2064 6566 696e 6974 696f l type definitio\n+0019cbf0: 6e73 2c20 7468 6520 7365 7269 616c 697a ns, the serializ\n+0019cc00: 6572 7320 666f 7220 7468 6573 6520 7479 ers for these ty\n+0019cc10: 7065 732c 2061 6e64 2074 6865 2073 7475 pes, and the stu\n+0019cc20: 6220 616e 6420 736b 656c 6574 6f6e 2066 b and skeleton f\n+0019cc30: 756e 6374 696f 6e73 2077 696c 6c20 6265 unctions will be\n+0019cc40: 2070 6c61 6365 6420 696e 2074 6869 7320 placed in this \n+0019cc50: 6e61 6d65 7370 6163 652e 2054 6865 2058 namespace. The X\n+0019cc60: 4d4c 206e 616d 6573 7061 6365 206d 6170 ML namespace map\n+0019cc70: 7069 6e67 2074 6162 6c65 2028 7361 7665 ping table (save\n+0019cc80: 6420 696e 2061 203c 656d 3e3c 636f 6465 d in a .nsmap file) will n\n+0019ccb0: 6f74 2062 6520 706c 6163 6564 2069 6e20 ot be placed in \n+0019ccc0: 7468 6520 636f 6465 206e 616d 6573 7061 the code namespa\n+0019ccd0: 6365 2074 6f20 616c 6c6f 7720 6974 2074 ce to allow it t\n+0019cce0: 6f20 6265 206c 696e 6b65 6420 6173 2061 o be linked as a\n+0019ccf0: 2067 6c6f 6261 6c20 6f62 6a65 6374 2e20 global object. \n+0019cd00: 596f 7520 6361 6e20 7573 6520 3c62 3e3c You can use <\n+0019cd10: 636f 6465 3e73 6f61 7063 7070 3220 2d6e code>soapcpp2 -n\n+0019cd20: 3c2f 636f 6465 3e3c 2f62 3e20 6f70 7469 opti\n+0019cd30: 6f6e 203c 623e 3c63 6f64 653e 2d6e 3c2f on -n to cre\n+0019cd50: 6174 6520 6c6f 6361 6c20 584d 4c20 6e61 ate local XML na\n+0019cd60: 6d65 7370 6163 6520 7461 626c 6573 2c20 mespace tables, \n+0019cd70: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section soap\n+0019cdb0: 6370 7032 206f 7074 696f 6e73 3c2f 613e cpp2 options\n+0019cdc0: 2028 6275 7420 7265 6d65 6d62 6572 2074 (but remember t\n+0019cdd0: 6861 7420 796f 7520 6578 706c 6963 6974 hat you explicit\n+0019cde0: 6c79 206e 6565 6420 746f 2069 6e69 7469 ly need to initi\n+0019cdf0: 616c 697a 6520 7468 6520 6e61 6d65 7370 alize the namesp\n+0019ce00: 6163 6573 2074 6f20 706f 696e 7420 746f aces to point to\n+0019ce10: 2061 2074 6162 6c65 2061 7420 7275 6e20 a table at run \n+0019ce20: 7469 6d65 2075 7369 6e67 203c 636f 6465 time using soap_set_namesp\n+0019cf00: 6163 6573 3c2f 613e 3c2f 636f 6465 3e29 aces)\n+0019cf10: 2e20 5468 6520 6765 6e65 7261 7465 6420 . The generated \n+0019cf20: 6669 6c65 7320 6172 6520 7072 6566 6978 files are prefix\n+0019cf30: 6564 2077 6974 6820 7468 6520 636f 6465 ed with the code\n+0019cf40: 206e 616d 6573 7061 6365 206e 616d 6520 namespace name \n+0019cf50: 696e 7374 6561 6420 6f66 2074 6865 2075 instead of the u\n+0019cf60: 7375 616c 203c 656d 3e3c 636f 6465 3e73 sual s\n+0019cf70: 6f61 703c 2f63 6f64 653e 3c2f 656d 3e20 oap \n+0019cf80: 6669 6c65 206e 616d 6520 7072 6566 6978 file name prefix\n+0019cf90: 2074 6f20 656e 6162 6c65 206d 756c 7469 to enable multi\n+0019cfa0: 706c 6520 636c 6965 6e74 2f73 6572 7665 ple client/serve\n+0019cfb0: 7220 636f 6465 7320 746f 2062 6520 6275 r codes to be bu\n+0019cfc0: 696c 6420 696e 2074 6865 2073 616d 6520 ild in the same \n+0019cfd0: 7072 6f6a 6563 7420 6469 7265 6374 6f72 project director\n+0019cfe0: 792e 3c2f 703e 0a3c 703e 4265 6361 7573 y.

      .

      Becaus\n+0019cff0: 6520 7468 6520 534f 4150 2048 6561 6465 e the SOAP Heade\n+0019d000: 7220 616e 6420 4661 756c 7420 7365 7269 r and Fault seri\n+0019d010: 616c 697a 6572 7320 7769 6c6c 2061 6c73 alizers will als\n+0019d020: 6f20 6265 2070 6c61 6365 6420 696e 2074 o be placed in t\n+0019d030: 6865 206e 616d 6573 7061 6365 2c20 7468 he namespace, th\n+0019d040: 6579 2063 616e 6e6f 7420 6265 2063 616c ey cannot be cal\n+0019d050: 6c65 6420 6672 6f6d 2074 6865 203c 656d led from the gsoap/std\n+0019d070: 736f 6170 322e 6370 703c 2f63 6f64 653e soap2.cpp\n+0019d080: 3c2f 656d 3e20 7275 6e20 7469 6d65 206c run time l\n+0019d090: 6962 7261 7279 2063 6f64 6520 616e 6420 ibrary code and \n+0019d0a0: 6172 6520 7468 6572 6566 6f72 6520 7265 are therefore re\n+0019d0b0: 6e64 6572 6564 2075 6e75 7361 626c 652e ndered unusable.\n+0019d0c0: 2054 6865 7265 666f 7265 2c20 7468 6573 Therefore, thes\n+0019d0d0: 6520 7365 7269 616c 697a 6572 7320 6172 e serializers ar\n+0019d0e0: 6520 6e6f 7420 636f 6d70 696c 6564 2061 e not compiled a\n+0019d0f0: 7420 616c 6c20 2865 6e66 6f72 6365 6420 t all (enforced \n+0019d100: 7769 7468 203c 636f 6465 3e23 6465 6669 with #defi\n+0019d110: 6e65 2057 4954 485f 4e4f 474c 4f42 414c ne WITH_NOGLOBAL\n+0019d120: 3c2f 636f 6465 3e29 2e20 546f 2061 6464 ). To add\n+0019d130: 2053 4f41 5020 4865 6164 6572 2061 6e64 SOAP Header and\n+0019d140: 2046 6175 6c74 2073 6572 6961 6c69 7a65 Fault serialize\n+0019d150: 7273 2c20 796f 7520 6d75 7374 2063 6f6d rs, you must com\n+0019d160: 7069 6c65 2074 6865 6d20 7365 7061 7261 pile them separa\n+0019d170: 7465 6c79 2061 7320 666f 6c6c 6f77 732e tely as follows.\n+0019d180: 2046 6972 7374 2c20 6372 6561 7465 2061 First, create a\n+0019d190: 206e 6577 2068 6561 6465 7220 6669 6c65 new header file\n+0019d1a0: 203c 656d 3e3c 636f 6465 3e65 6e76 2e68 env.h\n+0019d1b0: 3c2f 636f 6465 3e3c 2f65 6d3e 2077 6974 wit\n+0019d1c0: 6820 7468 6520 534f 4150 2048 6561 6465 h the SOAP Heade\n+0019d1d0: 7220 3c63 6f64 653e 3c61 2063 6c61 7373 r SOAP_ENV__Hea\n+0019d240: 6465 723c 2f61 3e3c 2f63 6f64 653e 2061 der a\n+0019d250: 6e64 2053 4f41 5020 4661 756c 7420 3c63 nd SOAP Fault SOA\n+0019d2c0: 505f 454e 565f 5f46 6175 6c74 3c2f 613e P_ENV__Fault\n+0019d2d0: 3c2f 636f 6465 3e20 7374 7275 6374 7572 structur\n+0019d2e0: 6573 2c20 696e 636c 7564 696e 6720 3c63 es, including SOAP_ENV__D\n+0019d360: 6574 6169 6c3c 2f61 3e3c 2f63 6f64 653e etail\n+0019d370: 2069 6620 7468 6973 2073 7472 7563 7475 if this structu\n+0019d380: 7265 2063 6f6e 7461 696e 7320 6d65 6d62 re contains memb\n+0019d390: 6572 7320 7468 6174 2061 7265 2073 6572 ers that are ser\n+0019d3a0: 6961 6c69 7a65 6420 6173 2066 6175 6c74 ialized as fault\n+0019d3b0: 2064 6574 6169 6c73 2e20 596f 7520 6361 details. You ca\n+0019d3c0: 6e20 6c65 6176 6520 7468 6973 2068 6561 n leave this hea\n+0019d3d0: 6465 7220 6669 6c65 2065 6d70 7479 2069 der file empty i\n+0019d3e0: 6620 796f 7520 7761 6e74 2074 6f20 7573 f you want to us\n+0019d3f0: 6520 7468 6520 6465 6661 756c 7420 534f e the default SO\n+0019d400: 4150 2048 6561 6465 7220 616e 6420 4661 AP Header and Fa\n+0019d410: 756c 742e 2048 6f77 6576 6572 2c20 6966 ult. However, if\n+0019d420: 2053 4f41 5020 4865 6164 6572 7320 6172 SOAP Headers ar\n+0019d430: 6520 7265 7175 6972 6564 2074 6865 6e20 e required then \n+0019d440: 796f 7520 6361 6e6e 6f74 206c 6561 7665 you cannot leave\n+0019d450: 2074 6865 203c 636f 6465 3e3c 6120 636c the SOAP_ENV__\n+0019d4c0: 4865 6164 6572 3c2f 613e 3c2f 636f 6465 Header structure empt\n+0019d4e0: 792e 2046 6f72 2065 7861 6d70 6c65 2c20 y. For example, \n+0019d4f0: 7468 6520 5753 2d41 6464 7265 7373 696e the WS-Addressin\n+0019d500: 6720 616e 6420 5753 2d53 6563 7572 6974 g and WS-Securit\n+0019d510: 7920 706c 7567 696e 7320 7265 7175 6972 y plugins requir\n+0019d520: 6520 534f 4150 2048 6561 6465 7273 2077 e SOAP Headers w\n+0019d530: 6869 6368 2063 616e 2062 6520 696d 706f hich can be impo\n+0019d540: 7274 6564 2062 7920 6164 6469 6e67 203c rted by adding <\n+0019d550: 636f 6465 3e23 696d 706f 7274 2022 7773 code>#import \"ws\n+0019d560: 6135 2e68 223c 2f63 6f64 653e 2061 6e64 a5.h\" and\n+0019d570: 203c 636f 6465 3e23 696d 706f 7274 2022 #import \"\n+0019d580: 7773 7365 2e68 223c 2f63 6f64 653e 2c20 wsse.h\", \n+0019d590: 7265 7370 6563 7469 7665 6c79 2074 6f20 respectively to \n+0019d5a0: 3c65 6d3e 3c63 6f64 653e 656e 762e 683c env.h<\n+0019d5b0: 2f63 6f64 653e 3c2f 656d 3e2e 2054 6865 /code>. The\n+0019d5c0: 6e20 636f 6d70 696c 6520 7468 6973 2068 n compile this h\n+0019d5d0: 6561 6465 7220 6669 6c65 2077 6974 683a eader file with:\n+0019d5e0: 203c 2f70 3e3c 7072 6520 636c 6173 733d

       soap\n+0019d600: 6370 7032 202d 7065 6e76 2065 6e76 2e68  cpp2 -penv env.h\n+0019d610: 0a3c 2f70 7265 3e3c 703e 2054 6865 2067  .

      The g\n+0019d620: 656e 6572 6174 6564 203c 656d 3e3c 636f enerated envC.cpp file hol\n+0019d650: 6473 2074 6865 2053 4f41 5020 4865 6164 ds the SOAP Head\n+0019d660: 6572 2061 6e64 2046 6175 6c74 2073 6572 er and Fault ser\n+0019d670: 6961 6c69 7a65 7273 2061 6e64 2079 6f75 ializers and you\n+0019d680: 2063 616e 206c 696e 6b20 7468 6973 2066 can link this f\n+0019d690: 696c 6520 7769 7468 2079 6f75 7220 636c ile with your cl\n+0019d6a0: 6965 6e74 2061 6e64 2073 6572 7665 7220 ient and server \n+0019d6b0: 6170 706c 6963 6174 696f 6e73 2e3c 2f70 applications..

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

      .

      .H\n+0019d720: 6f77 2074 6f20 6372 6561 7465 2063 6c69 ow to create cli\n+0019d730: 656e 742f 7365 7276 6572 206c 6962 7261 ent/server libra\n+0019d740: 7269 6573 3c2f 6832 3e0a 3c70 3e54 6865 ries

      .

      The\n+0019d750: 2073 6f61 7063 7070 3220 746f 6f6c 2070 soapcpp2 tool p\n+0019d760: 726f 6475 6365 7320 3c65 6d3e 3c63 6f64 roduces soapClientLib.\n+0019d780: 6370 703c 2f63 6f64 653e 3c2f 656d 3e20 cpp \n+0019d790: 616e 6420 3c65 6d3e 3c63 6f64 653e 736f and so\n+0019d7a0: 6170 5365 7276 6572 4c69 622e 6370 703c apServerLib.cpp<\n+0019d7b0: 2f63 6f64 653e 3c2f 656d 3e20 736f 7572 /code> sour\n+0019d7c0: 6365 2063 6f64 6520 6669 6c65 7320 7468 ce code files th\n+0019d7d0: 6174 2061 7265 2073 7065 6369 6669 6361 at are specifica\n+0019d7e0: 6c6c 7920 696e 7465 6e64 6564 2066 6f72 lly intended for\n+0019d7f0: 2062 7569 6c64 696e 6720 7374 6174 6963 building static\n+0019d800: 206f 7220 6479 6e61 6d69 6320 636c 6965 or dynamic clie\n+0019d810: 6e74 2061 6e64 2073 6572 7665 7220 6c69 nt and server li\n+0019d820: 6272 6172 6965 7320 696e 2043 206f 7220 braries in C or \n+0019d830: 432b 2b2e 2054 6865 7365 2066 696c 6573 C++. These files\n+0019d840: 2065 7870 6f72 7420 7468 6520 7374 7562 export the stub\n+0019d850: 2061 6e64 2073 6b65 6c65 746f 6e20 6675 and skeleton fu\n+0019d860: 6e63 7469 6f6e 732c 2062 7574 206b 6565 nctions, but kee\n+0019d870: 7020 616c 6c20 7365 7269 616c 697a 6174 p all serializat\n+0019d880: 696f 6e20 636f 6465 2073 7461 7469 632c ion code static,\n+0019d890: 2074 6875 7320 6869 6464 656e 2074 6f20 thus hidden to \n+0019d8a0: 6176 6f69 6420 6c69 6e6b 2073 796d 626f avoid link symbo\n+0019d8b0: 6c20 636f 6e66 6c69 6374 7320 7768 656e l conflicts when\n+0019d8c0: 2063 6f6d 6269 6e69 6e67 206d 756c 7469 combining multi\n+0019d8d0: 706c 6520 636c 6965 6e74 7320 616e 6420 ple clients and \n+0019d8e0: 7365 7276 6963 6573 2069 6e74 6f20 6f6e services into on\n+0019d8f0: 6520 6578 6563 7574 6162 6c65 2e20 4e6f e executable. No\n+0019d900: 7465 2074 6861 7420 6974 2069 7320 6661 te that it is fa\n+0019d910: 7220 7369 6d70 6c65 7220 746f 2075 7365 r simpler to use\n+0019d920: 2074 6865 2077 7364 6c32 6820 746f 6f6c the wsdl2h tool\n+0019d930: 206f 6e20 6d75 6c74 6970 6c65 2057 5344 on multiple WSD\n+0019d940: 4c20 6669 6c65 7320 746f 2067 656e 6572 L files to gener\n+0019d950: 6174 6520 6120 6865 6164 6572 2066 696c ate a header fil\n+0019d960: 6520 7468 6174 2063 6f6d 6269 6e65 7320 e that combines \n+0019d970: 616c 6c20 7365 7276 6963 6520 6465 6669 all service defi\n+0019d980: 6e69 7469 6f6e 732e 2048 6f77 6576 6572 nitions. However\n+0019d990: 2c20 7468 6520 6170 7072 6f61 6368 2070 , the approach p\n+0019d9a0: 7265 7365 6e74 6564 2069 6e20 7468 6973 resented in this\n+0019d9b0: 2073 6563 7469 6f6e 2069 7320 7573 6566 section is usef\n+0019d9c0: 756c 2077 6865 6e20 6372 6561 7469 6e67 ul when creating\n+0019d9d0: 2028 6479 6e61 6d69 6329 206c 6962 7261 (dynamic) libra\n+0019d9e0: 7269 6573 2066 6f72 2063 6c69 656e 7420 ries for client \n+0019d9f0: 616e 6420 7365 7276 6572 206f 626a 6563 and server objec\n+0019da00: 7473 2c20 7375 6368 2061 7320 444c 4c73 ts, such as DLLs\n+0019da10: 2061 7320 6465 7363 7269 6265 6420 696e as described in\n+0019da20: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section How\n+0019da50: 2074 6f20 6372 6561 7465 2044 4c4c 733c to create DLLs<\n+0019da60: 2f61 3e20 2e3c 2f70 3e0a 3c64 6c20 636c /a> .

      .
      Note
      \n+0019da90: 3c64 643e 4f6e 6520 6d61 6a6f 7220 6469
      One major di\n+0019daa0: 7361 6476 616e 7461 6765 206f 6620 7468 sadvantage of th\n+0019dab0: 6520 6170 7072 6f61 6368 2070 7265 7365 e approach prese\n+0019dac0: 6e74 6564 2068 6572 6520 6973 2074 6861 nted here is tha\n+0019dad0: 7420 7468 6520 7365 7269 616c 697a 6572 t the serializer\n+0019dae0: 2066 756e 6374 696f 6e73 2061 7265 206e functions are n\n+0019daf0: 6f20 6c6f 6e67 6572 2061 6363 6573 7369 o longer accessi\n+0019db00: 626c 6520 696e 2074 6865 2075 7365 7227 ble in the user'\n+0019db10: 7320 736f 7572 6365 2063 6f64 652c 2062 s source code, b\n+0019db20: 6563 6175 7365 2073 6572 6961 6c69 7a65 ecause serialize\n+0019db30: 7273 2077 696c 6c20 6265 2063 6f6e 7665 rs will be conve\n+0019db40: 7274 6564 2074 6f20 7374 6174 6963 2066 rted to static f\n+0019db50: 756e 6374 696f 6e73 2028 746f 2062 6520 unctions (to be \n+0019db60: 7573 6564 2062 7920 7468 6520 6765 6e65 used by the gene\n+0019db70: 7261 7465 6420 7374 7562 2061 6e64 2073 rated stub and s\n+0019db80: 6b65 6c65 746f 6e20 6675 6e63 7469 6f6e keleton function\n+0019db90: 7320 6f6e 6c79 292e 2046 6f72 2065 7861 s only). For exa\n+0019dba0: 6d70 6c65 2c20 6675 6e63 7469 6f6e 7320 mple, functions \n+0019dbb0: 7375 6368 2061 7320 3c63 6f64 653e 736f such as so\n+0019dbc0: 6170 5f6e 6577 5f54 3c2f 636f 6465 3e2c ap_new_T,\n+0019dbd0: 203c 636f 6465 3e73 6f61 705f 6465 6661 soap_defa\n+0019dbe0: 756c 745f 543c 2f63 6f64 653e 2c20 3c63 ult_T, soap_write_T\n+0019dc00: 3c2f 636f 6465 3e2c 203c 636f 6465 3e73 , s\n+0019dc10: 6f61 705f 7265 6164 5f54 3c2f 636f 6465 oap_read_T, soap_pu\n+0019dc30: 745f 543c 2f63 6f64 653e 2c20 616e 6420 t_T, and \n+0019dc40: 3c63 6f64 653e 736f 6170 5f67 6574 5f54 soap_get_T\n+0019dc50: 3c2f 636f 6465 3e20 6361 6e6e 6f74 2062 cannot b\n+0019dc60: 6520 7573 6564 2061 6e79 206c 6f6e 6765 e used any longe\n+0019dc70: 722e 3c2f 6464 3e3c 2f64 6c3e 0a3c 703e r.
      .

      \n+0019dc80: 5573 696e 6720 432b 2b20 6e61 6d65 7370 Using C++ namesp\n+0019dc90: 6163 6573 2069 7320 6120 6265 7474 6572 aces is a better\n+0019dca0: 2061 6c74 6572 6e61 7469 7665 2077 6865 alternative whe\n+0019dcb0: 6e20 6275 696c 6469 6e67 2061 7070 6c69 n building appli\n+0019dcc0: 6361 7469 6f6e 7320 696e 2043 2b2b 2074 cations in C++ t\n+0019dcd0: 6861 7420 636f 6d62 696e 6520 6d75 6c74 hat combine mult\n+0019dce0: 6970 6c65 2063 6c69 656e 7473 2061 6e64 iple clients and\n+0019dcf0: 2073 6572 7669 6365 732e 2054 6f20 6275 services. To bu\n+0019dd00: 696c 6420 6d75 6c74 6970 6c65 206c 6962 ild multiple lib\n+0019dd10: 7261 7269 6573 2c20 796f 7520 6361 6e20 raries, you can \n+0019dd20: 6465 6669 6e65 2061 2043 2b2b 206e 616d define a C++ nam\n+0019dd30: 6573 7061 6365 2069 6e20 796f 7572 2068 espace in your h\n+0019dd40: 6561 6465 7220 6669 6c65 2077 6974 6820 eader file with \n+0019dd50: 3c62 3e3c 636f 6465 3e73 6f61 7063 7070 soapcpp\n+0019dd60: 3220 2d71 6e61 6d65 3c2f 636f 6465 3e3c 2 -qname<\n+0019dd70: 2f62 3e20 6f70 7469 6f6e 203c 623e 3c63 /b> option -qname, see Secti\n+0019dda0: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on How to build a \n+0019dde0: 636c 6965 6e74 206f 7220 7365 7276 6572 client or server\n+0019ddf0: 2069 6e20 6120 432b 2b20 636f 6465 206e in a C++ code n\n+0019de00: 616d 6573 7061 6365 3c2f 613e 2066 6f72 amespace for\n+0019de10: 2064 6574 6169 6c73 2e3c 2f70 3e0a 3c70 details.

      .For C, you can \n+0019de30: 7573 6520 3c62 3e3c 636f 6465 3e73 6f61 use soa\n+0019de40: 7063 7070 3220 2d63 202d 7020 6e61 6d65 pcpp2 -c -p name\n+0019de50: 3c2f 636f 6465 3e3c 2f62 3e20 6f70 7469 opti\n+0019de60: 6f6e 203c 623e 3c63 6f64 653e 2d70 206e on -p n\n+0019de70: 616d 653c 2f63 6f64 653e 3c2f 623e 2074 ame t\n+0019de80: 6f20 7265 6e61 6d65 2074 6865 2067 656e o rename the gen\n+0019de90: 6572 6174 6564 203c 656d 3e3c 636f 6465 erated soapClientLib.c\n+0019deb0: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 6e64
      and\n+0019dec0: 203c 656d 3e3c 636f 6465 3e73 6f61 7053 soapS\n+0019ded0: 6572 7665 724c 6962 2e63 3c2f 636f 6465 erverLib.c (and asso\n+0019def0: 6369 6174 6564 2920 6669 6c65 732e 2054 ciated) files. T\n+0019df00: 6865 203c 623e 3c63 6f64 653e 2d70 206e he -p n\n+0019df10: 616d 653c 2f63 6f64 653e 3c2f 623e 206f ame o\n+0019df20: 7074 696f 6e20 7370 6563 6966 6965 7320 ption specifies \n+0019df30: 7468 6520 6669 6c65 203c 656d 3e3c 636f the file name prefix to re\n+0019df60: 706c 6163 6520 7468 6520 3c65 6d3e 3c63 place the soap<\n+0019df80: 2f65 6d3e 2066 696c 6520 6e61 6d65 2070 /em> file name p\n+0019df90: 7265 6669 782e 3c2f 703e 0a3c 703e 5468 refix.

      .

      Th\n+0019dfa0: 6520 656e 6769 6e65 2064 6f65 7320 6e6f e engine does no\n+0019dfb0: 7420 6465 6669 6e65 2053 4f41 5020 4865 t define SOAP He\n+0019dfc0: 6164 6572 2061 6e64 2046 6175 6c74 2073 ader and Fault s\n+0019dfd0: 6572 6961 6c69 7a65 7273 2074 6861 7420 erializers that \n+0019dfe0: 7468 6520 656e 6769 6e65 206e 6565 6473 the engine needs\n+0019dff0: 2e20 5765 2074 6865 7265 666f 7265 2061 . We therefore a\n+0019e000: 6464 2053 4f41 5020 4865 6164 6572 2061 dd SOAP Header a\n+0019e010: 6e64 2046 6175 6c74 2073 6572 6961 6c69 nd Fault seriali\n+0019e020: 7a65 7273 2c20 7768 6963 6820 6172 6520 zers, which are \n+0019e030: 636f 6d70 696c 6564 2073 6570 6172 6174 compiled separat\n+0019e040: 656c 7920 6173 2066 6f6c 6c6f 7773 2e20 ely as follows. \n+0019e050: 4669 7273 742c 2063 7265 6174 6520 6120 First, create a \n+0019e060: 6e65 7720 6865 6164 6572 2066 696c 6520 new header file \n+0019e070: 3c65 6d3e 3c63 6f64 653e 656e 762e 683c env.h<\n+0019e080: 2f63 6f64 653e 3c2f 656d 3e20 7769 7468 /code> with\n+0019e090: 2074 6865 2053 4f41 5020 4865 6164 6572 the SOAP Header\n+0019e0a0: 203c 636f 6465 3e3c 6120 636c 6173 733d SOAP_ENV__Head\n+0019e110: 6572 3c2f 613e 3c2f 636f 6465 3e20 616e er an\n+0019e120: 6420 534f 4150 2046 6175 6c74 203c 636f d SOAP Fault SOAP\n+0019e190: 5f45 4e56 5f5f 4661 756c 743c 2f61 3e3c _ENV__Fault<\n+0019e1a0: 2f63 6f64 653e 2073 7472 7563 7475 7265 /code> structure\n+0019e1b0: 732c 2069 6e63 6c75 6469 6e67 203c 636f s, including SOAP_ENV__De\n+0019e230: 7461 696c 3c2f 613e 3c2f 636f 6465 3e20 tail \n+0019e240: 6966 2074 6869 7320 7374 7275 6374 7572 if this structur\n+0019e250: 6520 636f 6e74 6169 6e73 206d 656d 6265 e contains membe\n+0019e260: 7273 2074 6861 7420 6172 6520 7365 7269 rs that are seri\n+0019e270: 616c 697a 6564 2061 7320 6661 756c 7420 alized as fault \n+0019e280: 6465 7461 696c 732e 2059 6f75 2063 616e details. You can\n+0019e290: 206c 6561 7665 2074 6869 7320 6865 6164 leave this head\n+0019e2a0: 6572 2066 696c 6520 656d 7074 7920 6966 er file empty if\n+0019e2b0: 2079 6f75 2077 616e 7420 746f 2075 7365 you want to use\n+0019e2c0: 2074 6865 2064 6566 6175 6c74 2053 4f41 the default SOA\n+0019e2d0: 5020 4865 6164 6572 2061 6e64 2046 6175 P Header and Fau\n+0019e2e0: 6c74 2e20 486f 7765 7665 722c 2069 6620 lt. However, if \n+0019e2f0: 534f 4150 2048 6561 6465 7273 2061 7265 SOAP Headers are\n+0019e300: 2072 6571 7569 7265 6420 7468 656e 2079 required then y\n+0019e310: 6f75 2063 616e 6e6f 7420 6c65 6176 6520 ou cannot leave \n+0019e320: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the SOAP_ENV__H\n+0019e390: 6561 6465 723c 2f61 3e3c 2f63 6f64 653e eader\n+0019e3a0: 2073 7472 7563 7475 7265 2065 6d70 7479 structure empty\n+0019e3b0: 2e20 466f 7220 6578 616d 706c 652c 2074 . For example, t\n+0019e3c0: 6865 2057 532d 4164 6472 6573 7369 6e67 he WS-Addressing\n+0019e3d0: 2061 6e64 2057 532d 5365 6375 7269 7479 and WS-Security\n+0019e3e0: 2070 6c75 6769 6e73 2072 6571 7569 7265 plugins require\n+0019e3f0: 2053 4f41 5020 4865 6164 6572 7320 7768 SOAP Headers wh\n+0019e400: 6963 6820 6361 6e20 6265 2069 6d70 6f72 ich can be impor\n+0019e410: 7465 6420 6279 2061 6464 696e 6720 3c63 ted by adding #import \"wsa\n+0019e430: 352e 6822 3c2f 636f 6465 3e20 616e 6420 5.h\" and \n+0019e440: 3c63 6f64 653e 2369 6d70 6f72 7420 2277 #import \"w\n+0019e450: 7373 652e 6822 3c2f 636f 6465 3e2c 2072 sse.h\", r\n+0019e460: 6573 7065 6374 6976 656c 7920 746f 203c espectively to <\n+0019e470: 656d 3e3c 636f 6465 3e65 6e76 2e68 3c2f em>env.h. Then\n+0019e490: 2063 6f6d 7069 6c65 2074 6869 7320 6865 compile this he\n+0019e4a0: 6164 6572 2066 696c 6520 7769 7468 3a20 ader file with: \n+0019e4b0: 3c2f 703e 3c70 7265 2063 6c61 7373 3d22

       soapc\n+0019e4d0: 7070 3220 2d70 656e 7620 656e 762e 680a  pp2 -penv env.h.\n+0019e4e0: 3c2f 7072 653e 3c70 3e20 5468 6520 6765  

      The ge\n+0019e4f0: 6e65 7261 7465 6420 3c65 6d3e 3c63 6f64 nerated envC.cpp file hold\n+0019e520: 7320 7468 6520 534f 4150 2048 6561 6465 s the SOAP Heade\n+0019e530: 7220 616e 6420 4661 756c 7420 7365 7269 r and Fault seri\n+0019e540: 616c 697a 6572 7320 616e 6420 796f 7520 alizers and you \n+0019e550: 6361 6e20 6372 6561 7465 2061 2028 6479 can create a (dy\n+0019e560: 6e61 6d69 6329 206c 6962 7261 7279 2066 namic) library f\n+0019e570: 6f72 2069 7420 746f 206c 696e 6b20 6974 or it to link it\n+0019e580: 2077 6974 6820 796f 7572 2063 6c69 656e with your clien\n+0019e590: 7420 616e 6420 7365 7276 6572 2061 7070 t and server app\n+0019e5a0: 6c69 6361 7469 6f6e 732e 3c2f 703e 0a3c lications.

      .<\n+0019e5b0: 703e 596f 7520 7368 6f75 6c64 2074 6865 p>You should the\n+0019e5c0: 6e20 636f 6d70 696c 6520 7468 6520 3c65 n compile the gsoap/st\n+0019e5e0: 6473 6f61 7032 2e63 7070 3c2f 636f 6465 dsoap2.cpp
      library w\n+0019e600: 6974 6820 7468 6520 636f 6d70 696c 652d ith the compile-\n+0019e610: 7469 6d65 203c 636f 6465 3e23 5749 5448 time #WITH\n+0019e620: 5f4e 4f4e 414d 4553 5041 4345 533c 2f63 _NONAMESPACES flag:

      <\n+0019e640: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n+0019e650: 656e 7422 3e20 632b 2b20 2d44 5749 5448 ent\"> c++ -DWITH\n+0019e660: 5f4e 4f4e 414d 4553 5041 4345 5320 2d63 _NONAMESPACES -c\n+0019e670: 2073 7464 736f 6170 322e 6370 700a 3c2f stdsoap2.cpp.

      This omi\n+0019e690: 7473 2074 6865 2072 6566 6572 656e 6365 ts the reference\n+0019e6a0: 2074 6f20 7468 6520 676c 6f62 616c 206e to the global n\n+0019e6b0: 616d 6573 7061 6365 7320 7461 626c 652c amespaces table,\n+0019e6c0: 2077 6869 6368 2069 7320 6e6f 7768 6572 which is nowher\n+0019e6d0: 6520 746f 2062 6520 6465 6669 6e65 6420 e to be defined \n+0019e6e0: 7369 6e63 6520 7765 2077 696c 6c20 7573 since we will us\n+0019e6f0: 6520 584d 4c20 6e61 6d65 7370 6163 6573 e XML namespaces\n+0019e700: 2066 6f72 2065 6163 6820 636c 6965 6e74 for each client\n+0019e710: 2f73 6572 7669 6365 2073 6570 6172 6174 /service separat\n+0019e720: 656c 792e 2054 6865 7265 666f 7265 2c20 ely. Therefore, \n+0019e730: 796f 7520 6d75 7374 2065 7870 6c69 6369 you must explici\n+0019e740: 746c 7920 7365 7420 7468 6520 6e61 6d65 tly set the name\n+0019e750: 7370 6163 6573 2076 616c 7565 206f 6620 spaces value of \n+0019e760: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap context in\n+0019e7d0: 2079 6f75 7220 636f 6465 2065 7665 7279 your code every\n+0019e7e0: 2074 696d 6520 6166 7465 7220 696e 6974 time after init\n+0019e7f0: 6961 6c69 7a61 7469 6f6e 206f 6620 7468 ialization of th\n+0019e800: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap context with\n+0019e870: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap_\n+0019e940: 7365 745f 6e61 6d65 7370 6163 6573 2873 set_namespaces(s\n+0019e950: 7472 7563 7420 736f 6170 2a2c 2063 6f6e truct soap*, con\n+0019e960: 7374 2073 7472 7563 7420 4e61 6d65 7370 st struct Namesp\n+0019e970: 6163 652a 293c 2f61 3e3c 2f63 6f64 653e ace*)\n+0019e980: 2066 756e 6374 696f 6e2e 3c2f 703e 0a3c function.

      .<\n+0019e990: 703e 466f 7220 6578 616d 706c 652c 2073 p>For example, s\n+0019e9a0: 7570 706f 7365 2077 6520 6861 7665 2074 uppose we have t\n+0019e9b0: 776f 2063 6c69 656e 7473 2064 6566 696e wo clients defin\n+0019e9c0: 6564 2069 6e20 6865 6164 6572 2066 696c ed in header fil\n+0019e9d0: 6573 203c 656d 3e3c 636f 6465 3e63 6c69 es cli\n+0019e9e0: 656e 7431 2e68 3c2f 636f 6465 3e3c 2f65 ent1.h and client2.h. We first\n+0019ea20: 2067 656e 6572 6174 6520 7468 6520 3c65 generate the envH.h file \n+0019ea50: 666f 7220 7468 6520 534f 4150 2048 6561 for the SOAP Hea\n+0019ea60: 6465 7220 616e 6420 4661 756c 7420 6465 der and Fault de\n+0019ea70: 6669 6e69 7469 6f6e 733a 203c 2f70 3e3c finitions:

      <\n+0019ea80: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n+0019ea90: 656e 7422 3e20 736f 6170 6370 7032 202d ent\"> soapcpp2 -\n+0019eaa0: 6320 2d70 656e 7620 656e 762e 680a 3c2f c -penv env.h.

      Then we \n+0019eac0: 6765 6e65 7261 7465 2074 6865 2063 6f64 generate the cod\n+0019ead0: 6520 666f 7220 636c 6965 6e74 3120 616e e for client1 an\n+0019eae0: 6420 636c 6965 6e74 323a 203c 2f70 3e3c d client2:

      <\n+0019eaf0: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n+0019eb00: 656e 7422 3e20 736f 6170 6370 7032 202d ent\"> soapcpp2 -\n+0019eb10: 6320 2d6e 202d 706d 7943 6c69 656e 7431 c -n -pmyClient1\n+0019eb20: 2063 6c69 656e 7431 2e68 0a20 736f 6170 client1.h. soap\n+0019eb30: 6370 7032 202d 6320 2d6e 202d 706d 7943 cpp2 -c -n -pmyC\n+0019eb40: 6c69 656e 7432 2063 6c69 656e 7432 2e68 lient2 client2.h\n+0019eb50: 0a3c 2f70 7265 3e3c 703e 2054 6869 7320 .

      This \n+0019eb60: 6765 6e65 7261 7465 7320 3c65 6d3e 3c63 generates myClient1Cli\n+0019eb80: 656e 744c 6962 2e63 3c2f 636f 6465 3e3c entLib.c<\n+0019eb90: 2f65 6d3e 2061 6e64 203c 656d 3e3c 636f /em> and myClient2Clie\n+0019ebb0: 6e74 4c69 622e 633c 2f63 6f64 653e 3c2f ntLib.c (among sever\n+0019ebd0: 616c 206f 7468 6572 2066 696c 6573 292e al other files).\n+0019ebe0: 2054 6865 7365 2074 776f 2066 696c 6573 These two files\n+0019ebf0: 2073 686f 756c 6420 6265 2063 6f6d 7069 should be compi\n+0019ec00: 6c65 6420 616e 6420 6c69 6e6b 6564 2077 led and linked w\n+0019ec10: 6974 6820 796f 7572 2061 7070 6c69 6361 ith your applica\n+0019ec20: 7469 6f6e 2e20 5468 6520 736f 7572 6365 tion. The source\n+0019ec30: 2063 6f64 6520 6f66 2079 6f75 7220 6170 code of your ap\n+0019ec40: 706c 6963 6174 696f 6e20 7368 6f75 6c64 plication should\n+0019ec50: 2069 6e63 6c75 6465 2074 6865 2067 656e include the gen\n+0019ec60: 6572 6174 6564 203c 656d 3e3c 636f 6465 erated envH.h, m\n+0019ec90: 7943 6c69 656e 7431 482e 683c 2f63 6f64 yClient1H.h, myClient2.h files\n+0019ecd0: 2061 6e64 203c 656d 3e3c 636f 6465 3e6d and m\n+0019ece0: 7943 6c69 656e 7431 2e6e 736d 6170 3c2f yClient1.nsmap, \n+0019ed00: 3c63 6f64 653e 6d79 436c 6965 6e74 322e myClient2.\n+0019ed10: 6e73 6d61 703c 2f63 6f64 653e 3c2f 656d nsmap files:

      .
      \n+0019ed70: 2369 6e63 6c75 6465 2026 7175 6f74 3b6d #include "m\n+0019ed80: 7943 6c69 656e 7431 482e 6826 7175 6f74 yClient1H.h"\n+0019ed90: 3b3c 2f73 7061 6e3e 203c 7370 616e 2063 ; /\n+0019edb0: 2f20 696e 636c 7564 6520 636c 6965 6e74 / include client\n+0019edc0: 2031 2073 7475 6273 203c 2f73 7061 6e3e 1 stubs \n+0019edd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      #include &qu\n+0019ee10: 6f74 3b6d 7943 6c69 656e 7432 482e 6826 ot;myClient2H.h&\n+0019ee20: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; // include cl\n+0019ee50: 6965 6e74 2032 2073 7475 6273 203c 2f73 ient 2 stubs
      .
      #include\n+0019eea0: 2026 7175 6f74 3b65 6e76 482e 6826 7175 "envH.h&qu\n+0019eeb0: 6f74 3b3c 2f73 7061 6e3e 203c 2f64 6976 ot; .
      ... //\n+0019eef0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+0019ef10: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl\n+0019ef30: 7564 6520 2671 756f 743b 6d79 436c 6965 ude "myClie\n+0019ef40: 6e74 3148 2e6e 736d 6170 2671 756f 743b nt1H.nsmap"\n+0019ef50: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c //\n+0019ef70: 2069 6e63 6c75 6465 2063 6c69 656e 7420 include client \n+0019ef80: 3120 6e73 6d61 7020 3c2f 7370 616e 3e3c 1 nsmap <\n+0019ef90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      #include &quo\n+0019efd0: 743b 6d79 436c 6965 6e74 3248 2e6e 736d t;myClient2H.nsm\n+0019efe0: 6170 2671 756f 743b 3c2f 7370 616e 3e20 ap" \n+0019eff0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // include\n+0019f010: 2063 6c69 656e 7420 3220 6e73 6d61 7020 client 2 nsmap \n+0019f020: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+0019f040: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      \n+0019f070: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap *<\n+0019f0b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0019f0c0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0019f0d0: 6874 6d6c 223e 736f 6170 3c2f 613e 203d html\">soap =\n+0019f0e0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_new();
      .soap_set_na\n+0019f1c0: 6d65 7370 6163 6573 3c2f 613e 283c 6120 mespaces(soap, my\n+0019f200: 436c 6965 6e74 315f 6e61 6d65 7370 6163 Client1_namespac\n+0019f210: 6573 293b 203c 2f64 6976 3e0a 3c64 6976 es);
      ...\n+0019f230: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // make \n+0019f250: 436c 6965 6e74 2031 2069 6e76 6f63 6174 Client 1 invocat\n+0019f260: 696f 6e73 3c2f 7370 616e 3e3c 2f64 6976 ions.
      ... //\n+0019f2a0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+0019f2c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_set_\n+0019f320: 6e61 6d65 7370 6163 6573 3c2f 613e 283c namespaces(<\n+0019f330: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+0019f340: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+0019f350: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+0019f360: 6d79 436c 6965 6e74 325f 6e61 6d65 7370 myClient2_namesp\n+0019f370: 6163 6573 293b 203c 2f64 6976 3e0a 3c64 aces);

      .\n+0019f390: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // mak\n+0019f3b0: 6520 436c 6965 6e74 2032 2069 6e76 6f63 e Client 2 invoc\n+0019f3c0: 6174 696f 6e73 3c2f 7370 616e 3e3c 2f64 ations.

      It\n+0019f3f0: 2069 7320 696d 706f 7274 616e 7420 746f is important to\n+0019f400: 2075 7365 203c 623e 3c63 6f64 653e 736f use so\n+0019f410: 6170 6370 7032 202d 6e3c 2f63 6f64 653e apcpp2 -n\n+0019f420: 3c2f 623e 206f 7074 696f 6e20 3c62 3e3c option <\n+0019f430: 636f 6465 3e2d 6e3c 2f63 6f64 653e 3c2f code>-n, see Section \n+0019f450: 3c61 2063 6c61 7373 3d22 656c 2220 6872 \n+0019f480: 736f 6170 6370 7032 206f 7074 696f 6e73 soapcpp2 options\n+0019f490: 3c2f 613e 2c20 746f 2072 656e 616d 6520 , to rename \n+0019f4a0: 7468 6520 6e61 6d65 7370 6163 6520 7461 the namespace ta\n+0019f4b0: 626c 6573 2073 6f20 7765 2063 616e 2069 bles so we can i\n+0019f4c0: 6e63 6c75 6465 2074 6865 6d20 616c 6c20 nclude them all \n+0019f4d0: 7769 7468 6f75 7420 7275 6e6e 696e 6720 without running \n+0019f4e0: 696e 746f 2072 6564 6566 696e 6974 696f into redefinitio\n+0019f4f0: 6e73 2e3c 2f70 3e0a 3c64 6c20 636c 6173 ns.

      .
      Note
      Link conflicts\n+0019f530: 206d 6179 2073 7469 6c6c 206f 6363 7572 may still occur\n+0019f540: 2069 6e20 7468 6520 756e 6c69 6b65 6c79 in the unlikely\n+0019f550: 2073 6974 7561 7469 6f6e 2074 6861 7420 situation that \n+0019f560: 6964 656e 7469 6361 6c20 7365 7276 6963 identical servic\n+0019f570: 6520 6f70 6572 6174 696f 6e20 6e61 6d65 e operation name\n+0019f580: 7320 6172 6520 6465 6669 6e65 6420 696e s are defined in\n+0019f590: 2074 776f 206f 7220 6d6f 7265 2073 7475 two or more stu\n+0019f5a0: 6220 6f72 2073 6b65 6c65 746f 6e20 6675 b or skeleton fu\n+0019f5b0: 6e63 7469 6f6e 7320 7768 656e 2074 6865 nctions when the\n+0019f5c0: 7365 206d 6574 686f 6473 2073 6861 7265 se methods share\n+0019f5d0: 2074 6865 2073 616d 6520 584d 4c20 6e61 the same XML na\n+0019f5e0: 6d65 7370 6163 6520 7072 6566 6978 2e3c mespace prefix.<\n+0019f5f0: 2f64 643e 3c2f 646c 3e0a 3c70 3ef0 9f94 /dd>
      .

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

      .\n+0019f630: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

      .C++ ex\n+0019f660: 616d 706c 6573 3c2f 6833 3e0a 3c70 3e41 amples

      .

      A\n+0019f670: 7320 616e 2065 7861 6d70 6c65 2077 6520 s an example we \n+0019f680: 7769 6c6c 2062 7569 6c64 2061 2044 656c will build a Del\n+0019f690: 6179 6564 2053 746f 636b 2051 756f 7465 ayed Stock Quote\n+0019f6a0: 2063 6c69 656e 7420 6c69 6272 6172 7920 client library \n+0019f6b0: 616e 6420 6120 4375 7272 656e 6379 2045 and a Currency E\n+0019f6c0: 7863 6861 6e67 6520 5261 7465 2063 6c69 xchange Rate cli\n+0019f6d0: 656e 7420 6c69 6272 6172 792e 3c2f 703e ent library.

      \n+0019f6e0: 0a3c 703e 4669 7273 742c 2077 6520 6372 .

      First, we cr\n+0019f6f0: 6561 7465 2061 6e20 656d 7074 7920 6865 eate an empty he\n+0019f700: 6164 6572 2066 696c 6520 3c65 6d3e 3c63 ader file env.h\n+0019f720: 3c2f 656d 3e2c 2077 6869 6368 206d 6179 , which may\n+0019f730: 2062 6520 656d 7074 7920 6f72 2073 686f be empty or sho\n+0019f740: 756c 6420 636f 6e74 6169 6e20 534f 4150 uld contain SOAP\n+0019f750: 2048 6561 6465 7220 616e 6420 4661 756c Header and Faul\n+0019f760: 7420 6465 6669 6e69 7469 6f6e 7320 6173 t definitions as\n+0019f770: 2065 7870 6c61 696e 6564 2069 6e20 5365 explained in Se\n+0019f780: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction How\n+0019f7b0: 2074 6f20 6372 6561 7465 2063 6c69 656e to create clien\n+0019f7c0: 742f 7365 7276 6572 206c 6962 7261 7269 t/server librari\n+0019f7d0: 6573 3c2f 613e 2c20 616e 6420 636f 6d70 es, and comp\n+0019f7e0: 696c 6520 6974 2061 7320 666f 6c6c 6f77 ile it as follow\n+0019f7f0: 733a 203c 2f70 3e3c 7072 6520 636c 6173 s:

       so\n+0019f810: 6170 6370 7032 202d 7065 6e76 2065 6e76  apcpp2 -penv env\n+0019f820: 2e68 0a20 632b 2b20 2d63 2065 6e76 432e  .h. c++ -c envC.\n+0019f830: 6370 700a 3c2f 7072 653e 3c70 3e20 5765  cpp.

      We\n+0019f840: 2061 6c73 6f20 636f 6d70 696c 6520 3c65 also compile gsoap/st\n+0019f860: 6473 6f61 7032 2e63 7070 3c2f 636f 6465 dsoap2.cpp without n\n+0019f880: 616d 6573 7061 6365 733a 203c 2f70 3e3c amespaces:

      <\n+0019f890: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n+0019f8a0: 656e 7422 3e20 632b 2b20 2d63 202d 4457 ent\"> c++ -c -DW\n+0019f8b0: 4954 485f 4e4f 4e41 4d45 5350 4143 4553 ITH_NONAMESPACES\n+0019f8c0: 2073 7464 736f 6170 322e 6370 700a 3c2f stdsoap2.cpp.

      If you d\n+0019f8e0: 6f20 6e6f 7420 7573 6520 3c63 6f64 653e o not use \n+0019f8f0: 2357 4954 485f 4e4f 4e41 4d45 5350 4143 #WITH_NONAMESPAC\n+0019f900: 4553 3c2f 636f 6465 3e20 7468 656e 2079 ES then y\n+0019f910: 6f75 2077 696c 6c20 6765 7420 616e 2075 ou will get an u\n+0019f920: 6e72 6573 6f6c 7665 6420 6c69 6e6b 2065 nresolved link e\n+0019f930: 7272 6f72 2066 6f72 2074 6865 2067 6c6f rror for the glo\n+0019f940: 6261 6c20 3c63 6f64 653e 6e61 6d65 7370 bal namesp\n+0019f950: 6163 6573 3c2f 636f 6465 3e20 7461 626c aces tabl\n+0019f960: 652e 2059 6f75 2063 616e 2064 6566 696e e. You can defin\n+0019f970: 6520 6120 6475 6d6d 7920 7461 626c 6520 e a dummy table \n+0019f980: 746f 2061 766f 6964 2068 6176 696e 6720 to avoid having \n+0019f990: 746f 2072 6563 6f6d 7069 6c65 203c 656d to recompile gsoap/std\n+0019f9b0: 736f 6170 322e 6370 703c 2f63 6f64 653e soap2.cpp\n+0019f9c0: 3c2f 656d 3e2e 3c2f 703e 0a3c 703e 5365 .

      .

      Se\n+0019f9d0: 636f 6e64 2c20 7765 2063 7265 6174 6520 cond, we create \n+0019f9e0: 7468 6520 4465 6c61 7965 6420 5374 6f63 the Delayed Stoc\n+0019f9f0: 6b20 5175 6f74 6520 6865 6164 6572 2066 k Quote header f\n+0019fa00: 696c 6520 7370 6563 6966 6963 6174 696f ile specificatio\n+0019fa10: 6e2c 2077 6869 6368 206d 6179 2062 6520 n, which may be \n+0019fa20: 6f62 7461 696e 6564 2075 7369 6e67 2074 obtained using t\n+0019fa30: 6865 2057 5344 4c20 696d 706f 7274 6572 he WSDL importer\n+0019fa40: 2e20 4966 2079 6f75 2077 616e 7420 746f . If you want to\n+0019fa50: 2075 7365 2043 2b2b 206e 616d 6573 7061 use C++ namespa\n+0019fa60: 6365 7320 7468 656e 2079 6f75 206e 6565 ces then you nee\n+0019fa70: 6420 746f 206d 616e 7561 6c6c 7920 6164 d to manually ad\n+0019fa80: 6420 7468 6520 3c63 6f64 653e 6e61 6d65 d the name\n+0019fa90: 7370 6163 653c 2f63 6f64 653e 2064 6563 space dec\n+0019faa0: 6c61 7261 7469 6f6e 2074 6f20 7468 6520 laration to the \n+0019fab0: 6765 6e65 7261 7465 6420 6865 6164 6572 generated header\n+0019fac0: 2066 696c 653a 3c2f 703e 0a3c 6469 7620 file:

      .
      namespa\n+0019fb10: 6365 203c 2f73 7061 6e3e 7175 6f74 6520 ce quote \n+0019fb20: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
      .
      .
      //gsoa\n+0019fb70: 7020 6e73 2073 6572 7669 6365 206e 616d p ns service nam\n+0019fb80: 653a 2053 6572 7669 6365 203c 2f73 7061 e: Service
      .
      //gsoap ns serv\n+0019fbd0: 6963 6520 7374 796c 653a 2072 7063 203c ice style: rpc <\n+0019fbe0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      .<\n+0019fc00: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+0019fc10: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n+0019fc20: 7365 7276 6963 6520 656e 636f 6469 6e67 service encoding\n+0019fc30: 3a20 656e 636f 6465 6420 3c2f 7370 616e : encoded
      .
      \n+0019fc70: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n+0019fc80: 6365 206c 6f63 6174 696f 6e3a 2068 7474 ce location: htt\n+0019fc90: 703a 2f2f 7365 7276 6963 6573 2e78 6d65 p://services.xme\n+0019fca0: 7468 6f64 732e 6e65 742f 736f 6170 203c thods.net/soap <\n+0019fcb0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      .<\n+0019fcd0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+0019fce0: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n+0019fcf0: 7363 6865 6d61 206e 616d 6573 7061 6365 schema namespace\n+0019fd00: 3a20 7572 6e3a 786d 6574 686f 6473 2d64 : urn:xmethods-d\n+0019fd10: 656c 6179 6564 2d71 756f 7465 7320 3c2f elayed-quotes
      .//gsoap ns s\n+0019fd60: 6572 7669 6365 206d 6574 686f 642d 6163 ervice method-ac\n+0019fd70: 7469 6f6e 3a20 6765 7451 756f 7465 2026 tion: getQuote &\n+0019fd80: 7175 6f74 3b26 7175 6f74 3b20 3c2f 7370 quot;"
      .
      int\n+0019fdd0: 206e 735f 5f67 6574 5175 6f74 6528 3c73 ns__getQuote(char *symbol, float &Result)\n+0019fe40: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
      .
      .
      } // \n+0019fe90: 6e61 6d65 7370 6163 6520 7175 6f74 653c namespace quote<\n+0019fea0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 2f64 /span>
      .

      We then c\n+0019fed0: 6f6d 7069 6c65 2069 7420 6173 2061 206c ompile it as a l\n+0019fee0: 6962 7261 7279 2061 6e64 2077 6520 7573 ibrary and we us\n+0019fef0: 6520 6f70 7469 6f6e 203c 623e 3c63 6f64 e option -n \n+0019ff10: 746f 2070 7265 6669 7820 7468 6520 6765 to prefix the ge\n+0019ff20: 6e65 7261 7465 6420 6669 6c65 7320 616e nerated files an\n+0019ff30: 6420 746f 2072 656e 616d 6520 7468 6520 d to rename the \n+0019ff40: 6e61 6d65 7370 6163 6520 7461 626c 6520 namespace table \n+0019ff50: 746f 2061 766f 6964 206c 696e 6b20 636f to avoid link co\n+0019ff60: 6e66 6c69 6374 7320 6c61 7465 723a 203c nflicts later: <\n+0019ff70: 2f70 3e3c 7072 6520 636c 6173 733d 2266 /p>

       soapcp\n+0019ff90: 7032 202d 6e20 7175 6f74 652e 680a 2063  p2 -n quote.h. c\n+0019ffa0: 2b2b 202d 6320 7175 6f74 6543 6c69 656e  ++ -c quoteClien\n+0019ffb0: 744c 6962 2e63 7070 0a3c 2f70 7265 3e3c  tLib.cpp.
      <\n+0019ffc0: 703e 2049 6620 796f 7520 646f 6e27 7420 p> If you don't \n+0019ffd0: 7761 6e74 2074 6f20 7573 6520 6120 432b want to use a C+\n+0019ffe0: 2b20 636f 6465 206e 616d 6573 7061 6365 + code namespace\n+0019fff0: 2c20 796f 7520 7368 6f75 6c64 2063 6f6d , you should com\n+001a0000: 7069 6c65 203c 656d 3e3c 636f 6465 3e71 pile q\n+001a0010: 756f 7465 2e68 3c2f 636f 6465 3e3c 2f65 uote.h \"as is\" with \n+001a0030: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option \n+001a0040: 2d70 7175 6f74 653c 2f63 6f64 653e 3c2f -pquote:

       s\n+001a0070: 6f61 7063 7070 3220 2d6e 202d 7071 756f  oapcpp2 -n -pquo\n+001a0080: 7465 2071 756f 7465 2e68 0a20 632b 2b20  te quote.h. c++ \n+001a0090: 2d63 2071 756f 7465 436c 6965 6e74 4c69  -c quoteClientLi\n+001a00a0: 622e 6370 700a 3c2f 7072 653e 3c70 3e20  b.cpp.

      \n+001a00b0: 5468 6972 642c 2077 6520 6372 6561 7465 Third, we create\n+001a00c0: 2074 6865 2043 7572 7265 6e63 7920 4578 the Currency Ex\n+001a00d0: 6368 616e 6765 2052 6174 6520 6865 6164 change Rate head\n+001a00e0: 6572 2066 696c 6520 7370 6563 6966 6963 er file specific\n+001a00f0: 6174 696f 6e3a 3c2f 703e 0a3c 6469 7620 ation:

      .
      namespa\n+001a0140: 6365 203c 2f73 7061 6e3e 7261 7465 207b ce rate {\n+001a0150: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      \n+001a0170: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      //gsoap\n+001a01a0: 206e 7320 7365 7276 6963 6520 6e61 6d65 ns service name\n+001a01b0: 3a20 5365 7276 6963 6520 3c2f 7370 616e : Service
      .
      \n+001a01f0: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n+001a0200: 6365 2073 7479 6c65 3a20 7270 6320 3c2f ce style: rpc
      .//gsoap ns s\n+001a0250: 6572 7669 6365 2065 6e63 6f64 696e 673a ervice encoding:\n+001a0260: 2065 6e63 6f64 6564 203c 2f73 7061 6e3e encoded \n+001a0270: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      /\n+001a02a0: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic\n+001a02b0: 6520 6c6f 6361 7469 6f6e 3a20 6874 7470 e location: http\n+001a02c0: 3a2f 2f73 6572 7669 6365 732e 786d 6574 ://services.xmet\n+001a02d0: 686f 6473 2e6e 6574 2f73 6f61 7020 3c2f hods.net/soap
      .//gsoap ns s\n+001a0320: 6368 656d 6120 6e61 6d65 7370 6163 653a chema namespace:\n+001a0330: 2075 726e 3a78 6d65 7468 6f64 732d 4375 urn:xmethods-Cu\n+001a0340: 7272 656e 6379 4578 6368 616e 6765 203c rrencyExchange <\n+001a0350: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      .<\n+001a0370: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001a0380: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent\">//gsoap ns \n+001a0390: 7365 7276 6963 6520 6d65 7468 6f64 2d61 service method-a\n+001a03a0: 6374 696f 6e3a 2067 6574 5261 7465 2026 ction: getRate &\n+001a03b0: 7175 6f74 3b26 7175 6f74 3b20 3c2f 7370 quot;"
      .
      int\n+001a0400: 206e 735f 5f67 6574 5261 7465 283c 7370 ns__getRate(char *country1, char *country2, <\n+001a0470: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a0480: 6f72 6474 7970 6522 3e66 6c6f 6174 3c2f ordtype\">float &Resul\n+001a04a0: 7429 3b20 3c2f 6469 763e 0a3c 6469 7620 t);
      .
      .
      } /\n+001a04f0: 2f20 6e61 6d65 7370 6163 6520 7261 7465 / namespace rate\n+001a0500: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c2f
      .

      Similar \n+001a0530: 746f 2074 6865 2051 756f 7465 2065 7861 to the Quote exa\n+001a0540: 6d70 6c65 2061 626f 7665 2c20 7765 2067 mple above, we g\n+001a0550: 656e 6572 6174 6520 736f 7572 6365 2063 enerate source c\n+001a0560: 6f64 6520 7573 696e 6720 6f70 7469 6f6e ode using option\n+001a0570: 203c 623e 3c63 6f64 653e 2d6e 3c2f 636f -n to prefi\n+001a0590: 7820 7468 6520 6765 6e65 7261 7465 6420 x the generated \n+001a05a0: 6669 6c65 7320 616e 6420 746f 2072 656e files and to ren\n+001a05b0: 616d 6520 7468 6520 6e61 6d65 7370 6163 ame the namespac\n+001a05c0: 6520 7461 626c 6520 746f 2061 766f 6964 e table to avoid\n+001a05d0: 206c 696e 6b20 636f 6e66 6c69 6374 733a link conflicts:\n+001a05e0: 203c 2f70 3e3c 7072 6520 636c 6173 733d

       soap\n+001a0600: 6370 7032 202d 6e20 7261 7465 2e68 0a3c  cpp2 -n rate.h.<\n+001a0610: 2f70 7265 3e3c 703e 2046 6f75 7274 682c  /pre>

      Fourth,\n+001a0620: 2077 6520 7573 6520 7468 6520 6765 6e65 we use the gene\n+001a0630: 7261 7465 6420 736f 7572 6365 2063 6f64 rated source cod\n+001a0640: 6520 6c69 6272 6172 6965 7320 7769 7468 e libraries with\n+001a0650: 2074 6865 206d 6169 6e20 7072 6f67 7261 the main progra\n+001a0660: 6d2e 3c2f 703e 0a3c 6469 7620 636c 6173 m.

      .
      <\n+001a0690: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n+001a06a0: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n+001a06b0: 6465 2026 7175 6f74 3b71 756f 7465 482e de "quoteH.\n+001a06c0: 682e 6826 7175 6f74 3b3c 2f73 7061 6e3e h.h"\n+001a06d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      #include &qu\n+001a0710: 6f74 3b72 6174 6548 2e68 2e68 2671 756f ot;rateH.h.h&quo\n+001a0720: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
      .\n+001a0730: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      #in\n+001a0760: 636c 7564 6520 2671 756f 743b 7175 6f74 clude "quot\n+001a0770: 652e 6e73 6d61 7026 7175 6f74 3b3c 2f73 e.nsmap"
      .
      #include\n+001a07c0: 2026 7175 6f74 3b72 6174 652e 6e73 6d61 "rate.nsma\n+001a07d0: 7026 7175 6f74 3b3c 2f73 7061 6e3e 3c2f p".
      .<\n+001a0800: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a0810: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int main(int \n+001a0860: 6172 6763 2c20 3c73 7061 6e20 636c 6173 argc, \n+001a0880: 6368 6172 3c2f 7370 616e 3e20 2a61 7267 char *arg\n+001a0890: 765b 5d29 203c 2f64 6976 3e0a 3c64 6976 v[])
      .{<\n+001a08b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      if (a\n+001a08f0: 7267 6320 266c 743b 3d20 3129 203c 2f64 rgc <= 1) .
      {
      .\n+001a0920: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      std::cerr \n+001a0940: 266c 743b 266c 743b 203c 7370 616e 2063 << "Usage\n+001a0970: 3a20 6d61 696e 2074 6963 6b65 7220 5b63 : main ticker [c\n+001a0980: 7572 7265 6e63 795d 2671 756f 743b 3c2f urrency]" << s\n+001a09a0: 7464 3a3a 656e 646c 203c 2f64 6976 3e0a td::endl
      .\n+001a09b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      exit(EXIT_\n+001a09d0: 4641 494c 5552 4529 3b20 3c2f 6469 763e FAILURE);
      \n+001a09e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      }
      .\n+001a0a10: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n+001a0a30: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n+001a0a60: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+001a0a90: 6170 3c2f 613e 203d 203c 6120 636c 6173 ap = so\n+001a0af0: 6170 5f6e 6577 3c2f 613e 2829 3b3c 2f64 ap_new();.
      float q\n+001a0b40: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
      .
      soap_set_nam\n+001a0bc0: 6573 7061 6365 733c 2f61 3e28 3c61 2063 espaces(soap, quo\n+001a0c00: 7465 5f6e 616d 6573 7061 6365 7329 3b20 te_namespaces); \n+001a0c10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      if (\n+001a0c50: 736f 6170 5f63 616c 6c5f 6e73 5f5f 6765 soap_call_ns__ge\n+001a0c60: 7451 756f 7465 283c 6120 636c 6173 733d tQuote(so\n+001a0c90: 6170 3c2f 613e 2c20 4e55 4c4c 2c20 4e55 ap, NULL, NU\n+001a0ca0: 4c4c 2c20 6172 6776 5b31 5d2c 2071 2929 LL, argv[1], q))\n+001a0cb0: 203c 7370 616e 2063 6c61 7373 3d22 636f // get qu\n+001a0cd0: 6f74 6520 3c2f 7370 616e 3e3c 2f64 6976 ote .
      {
      .\n+001a0d10: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap_prin\n+001a0d70: 745f 6661 756c 743c 2f61 3e28 3c61 2063 t_fault(soap, std\n+001a0db0: 6572 7229 3b20 3c2f 6469 763e 0a3c 6469 err);
      . \n+001a0dd0: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
      .
      else
      .
      {<\n+001a0e30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      if \n+001a0e70: 2861 7267 6320 2667 743b 2032 2920 3c2f (argc > 2) .. \n+001a0fd0: 2020 2020 203c 7370 616e 2063 6c61 7373 i\n+001a0ff0: 663c 2f73 7061 6e3e 2028 736f 6170 5f63 f (soap_c\n+001a1000: 616c 6c5f 6e73 5f5f 6765 7452 6174 6528 all_ns__getRate(\n+001a1010: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001a1040: 204e 554c 4c2c 204e 554c 4c2c 203c 7370 NULL, NULL, "u\n+001a1070: 7326 7175 6f74 3b3c 2f73 7061 6e3e 2c20 s", \n+001a1080: 6172 6776 5b32 5d2c 2072 2929 203c 7370 argv[2], r)) // get rate i\n+001a10b0: 6e20 5553 2064 6f6c 6c61 7273 203c 2f73 n US dollars
      .
      \n+001a10e0: 2020 2020 203c 6120 636c 6173 733d 2263 soap_pri\n+001a1140: 6e74 5f66 6175 6c74 3c2f 613e 283c 6120 nt_fault(soap, st\n+001a1180: 6465 7272 293b 203c 2f64 6976 3e0a 3c64 derr);
      .\n+001a11a0: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n+001a11c0: 656c 7365 3c2f 7370 616e 3e20 3c2f 6469 else .
      q *\n+001a11f0: 3d20 723b 203c 7370 616e 2063 6c61 7373 = r; // co\n+001a1210: 6e76 6572 7420 7468 6520 7175 6f74 6520 nvert the quote \n+001a1220: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+001a1240: 2020 2020 7d20 3c2f 6469 763e 0a3c 6469 }
      . \n+001a1260: 2020 2073 7464 3a3a 636f 7574 2026 6c74 std::cout <\n+001a1270: 3b26 6c74 3b20 6172 6776 5b31 5d20 266c ;< argv[1] &l\n+001a1280: 743b 266c 743b 203c 7370 616e 2063 6c61 t;< ": "\n+001a12b0: 3b3c 2f73 7061 6e3e 2026 6c74 3b26 6c74 ; <<\n+001a12c0: 3b20 7120 266c 743b 266c 743b 2073 7464 ; q << std\n+001a12d0: 3a3a 656e 646c 3b20 3c2f 6469 763e 0a3c ::endl;
      .<\n+001a12e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a12f0: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
      . \n+001a1310: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_destro\n+001a1370: 793c 2f61 3e28 3c61 2063 6c61 7373 3d22 y(soa\n+001a13a0: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
      .\n+001a13c0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_end<\n+001a1420: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+001a1450: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
      . \n+001a1470: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_free(soap);
      .
      <\n+001a1520: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a1530: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+001a1540: 2f73 7061 6e3e 2030 3b20 3c2f 6469 763e /span> 0;
      \n+001a1550: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      }
      .

      \n+001a1dd0: 5765 2067 656e 6572 6174 6520 636f 6465 We generate code\n+001a1de0: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

       soa\n+001a1e00: 7063 7070 3220 2d6a 202d 6e20 6361 6c63  pcpp2 -j -n calc\n+001a1e10: 2e68 0a3c 2f70 7265 3e3c 703e 2048 6572  .h.

      Her\n+001a1e20: 6520 7765 2075 7365 6420 6f70 7469 6f6e e we used option\n+001a1e30: 203c 623e 3c63 6f64 653e 2d6a 3c2f 636f -j to gener\n+001a1e50: 6174 6520 6120 432b 2b20 7365 7276 6963 ate a C++ servic\n+001a1e60: 6520 636c 6173 7320 3c65 6d3e 3c63 6f64 e class calcCalcServic\n+001a1e80: 652e 683c 2f63 6f64 653e 3c2f 656d 3e20 e.h \n+001a1e90: 616e 6420 3c65 6d3e 3c63 6f64 653e 6361 and ca\n+001a1ea0: 6c63 4361 6c63 5365 7276 6963 652e 6370 lcCalcService.cp\n+001a1eb0: 703c 2f63 6f64 653e 3c2f 656d 3e2e 2054 p. T\n+001a1ec0: 6865 2065 6666 6563 7420 6f66 2074 6865 he effect of the\n+001a1ed0: 203c 623e 3c63 6f64 653e 2d6e 3c2f 636f -n option i\n+001a1ef0: 7320 7468 6174 2069 7420 6372 6561 7465 s that it create\n+001a1f00: 7320 6c6f 6361 6c20 6e61 6d65 7370 6163 s local namespac\n+001a1f10: 6520 7461 626c 6573 2061 6e64 2075 7365 e tables and use\n+001a1f20: 7320 3c65 6d3e 3c63 6f64 653e 6361 6c63 s calc\n+001a1f30: 3c2f 636f 6465 3e3c 2f65 6d3e 2074 6f20 to \n+001a1f40: 7072 6566 6978 2074 6865 2067 656e 6572 prefix the gener\n+001a1f50: 6174 6564 2066 696c 6573 2e3c 2f70 3e0a ated files.

      .\n+001a1f60: 3c64 6976 2063 6c61 7373 3d22 6672 6167
      #include &quo\n+001a1fb0: 743b 6361 6c63 4361 6c63 5365 7276 6963 t;calcCalcServic\n+001a1fc0: 652e 6826 7175 6f74 3b3c 2f73 7061 6e3e e.h"\n+001a1fd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      #include &qu\n+001a2010: 6f74 3b63 616c 632e 6e73 6d61 7026 7175 ot;calc.nsmap&qu\n+001a2020: 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 763e ot;
      \n+001a2030: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      .
      int main()
      .<\n+001a2090: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a20a0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
      .
      cal\n+001a20c0: 633a 3a43 616c 6320 6361 6c63 3b20 3c2f c::Calc calc; .
      ... //.
      calc.serv\n+001a2130: 6528 293b 203c 7370 616e 2063 6c61 7373 e(); // ca\n+001a2150: 6c6c 7320 7265 7175 6573 7420 6469 7370 lls request disp\n+001a2160: 6174 6368 6572 2074 6f20 696e 766f 6b65 atcher to invoke\n+001a2170: 206f 6e65 206f 6620 7468 6520 6675 6e63 one of the func\n+001a2180: 7469 6f6e 7320 6265 6c6f 7720 3c2f 7370 tions below
      .
      ..\n+001a21b0: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . //
      .
      }.
      .int calc::Calc::a\n+001a2250: 6464 283c 7370 616e 2063 6c61 7373 3d22 dd(dou\n+001a2270: 626c 653c 2f73 7061 6e3e 2061 2c20 3c73 ble a, double b, double\n+001a22d0: 2026 616d 703b 7265 7375 6c74 293c 2f64 &result).
      {
      .\n+001a2310: 2020 7265 7375 6c74 203d 2061 202b 2062 result = a + b\n+001a2320: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
      .
      ..
      .
      \n+001a2620: 696e 743c 2f73 7061 6e3e 2063 616c 633a int calc:\n+001a2630: 3a43 616c 633a 3a6d 756c 283c 7370 616e :Calc::mul(double a, \n+001a2680: 646f 7562 6c65 3c2f 7370 616e 3e20 622c double b,\n+001a2690: 203c 7370 616e 2063 6c61 7373 3d22 6b65 doubl\n+001a26b0: 653c 2f73 7061 6e3e 2026 616d 703b 7265 e &re\n+001a26c0: 7375 6c74 293c 2f64 6976 3e0a 3c64 6976 sult)
      .{<\n+001a26e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      result\n+001a2700: 203d 2061 202a 2062 3b3c 2f64 6976 3e0a = a * b;
      .\n+001a2710: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      re\n+001a2740: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn \n+001a27a0: 534f 4150 5f4f 4b3c 2f61 3e3b 3c2f 6469 SOAP_OK;.
      }
      .\n+001a27e0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      int c\n+001a2820: 616c 633a 3a43 616c 633a 3a64 6976 283c alc::Calc::div(<\n+001a2830: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a2840: 6f72 6474 7970 6522 3e64 6f75 626c 653c ordtype\">double<\n+001a2850: 2f73 7061 6e3e 2061 2c20 3c73 7061 6e20 /span> a, double b, d\n+001a28a0: 6f75 626c 653c 2f73 7061 6e3e 2026 616d ouble &am\n+001a28b0: 703b 7265 7375 6c74 293c 2f64 6976 3e0a p;result)
      .\n+001a28c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      {
      .
      re\n+001a28f0: 7375 6c74 203d 2061 202f 2062 3b3c 2f64 sult = a / b;.
      return \n+001a2940: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_OK;\n+001a29a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      } .

      The \n+001a29e0: 6578 616d 706c 6520 6162 6f76 6520 7365 example above se\n+001a29f0: 7276 6573 2072 6571 7565 7374 7320 6f76 rves requests ov\n+001a2a00: 6572 2073 7464 696e 2f6f 7574 2e20 5573 er stdin/out. Us\n+001a2a10: 6520 7468 6520 6269 6e64 2061 6e64 2061 e the bind and a\n+001a2a20: 6363 6570 7420 6361 6c6c 7320 746f 2063 ccept calls to c\n+001a2a30: 7265 6174 6520 6120 7374 616e 642d 616c reate a stand-al\n+001a2a40: 6f6e 6520 7365 7276 6572 2074 6f20 7365 one server to se\n+001a2a50: 7276 6963 6520 696e 626f 756e 6420 7265 rvice inbound re\n+001a2a60: 7175 6573 7473 206f 7665 7220 736f 636b quests over sock\n+001a2a70: 6574 732c 2073 6565 2053 6563 7469 6f6e ets, see Section\n+001a2a80: 203c 6120 636c 6173 733d 2265 6c22 2068 How\n+001a2ab0: 2074 6f20 6372 6561 7465 2061 2073 7461 to create a sta\n+001a2ac0: 6e64 2d61 6c6f 6e65 2073 6572 7665 723c nd-alone server<\n+001a2ad0: 2f61 3e20 2e3c 2f70 3e0a 3c70 3ef0 9f94 /a> .

      .

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

      .\n+001a2b10: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

      .C exam\n+001a2b40: 706c 6573 3c2f 6833 3e0a 3c70 3e54 6869 ples

      .

      Thi\n+001a2b50: 7320 6973 2074 6865 2073 616d 6520 6578 s is the same ex\n+001a2b60: 616d 706c 6520 6173 2061 626f 7665 2c20 ample as above, \n+001a2b70: 6275 7420 7468 6520 636c 6965 6e74 7320 but the clients \n+001a2b80: 6172 6520 6275 696c 6420 696e 2043 2e3c are build in C.<\n+001a2b90: 2f70 3e0a 3c70 3e57 6520 6372 6561 7465 /p>.

      We create\n+001a2ba0: 2061 203c 656d 3e3c 636f 6465 3e65 6e76 a env\n+001a2bb0: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2074 .h t\n+001a2bc0: 6861 7420 636f 6e74 6169 6e73 2074 6865 hat contains the\n+001a2bd0: 206a 6f69 6e74 2053 4f41 5020 4865 6164 joint SOAP Head\n+001a2be0: 6572 2061 6e64 2053 4f41 5020 4661 756c er and SOAP Faul\n+001a2bf0: 7420 6465 6669 6e69 7469 6f6e 732e 2059 t definitions. Y\n+001a2c00: 6f75 206d 6179 2068 6176 6520 746f 2063 ou may have to c\n+001a2c10: 6f70 792d 7061 7374 6520 7468 6573 6520 opy-paste these \n+001a2c20: 6672 6f6d 2074 6865 206f 7468 6572 2068 from the other h\n+001a2c30: 6561 6465 7220 6669 6c65 732e 2054 6865 eader files. The\n+001a2c40: 6e2c 2063 6f6d 7069 6c65 2069 7420 6173 n, compile it as\n+001a2c50: 2066 6f6c 6c6f 7773 3a20 3c2f 703e 3c70 follows:

      soapcpp2 -c\n+001a2c80: 202d 7065 6e76 2065 6e76 2e68 0a20 6363 -penv env.h. cc\n+001a2c90: 202d 6320 656e 7643 2e63 0a3c 2f70 7265 -c envC.c.

      We also com\n+001a2cb0: 7069 6c65 203c 656d 3e3c 636f 6465 3e67 pile g\n+001a2cc0: 736f 6170 2f73 7464 736f 6170 322e 633c soap/stdsoap2.c<\n+001a2cd0: 2f63 6f64 653e 3c2f 656d 3e20 7769 7468 /code> with\n+001a2ce0: 6f75 7420 6e61 6d65 7370 6163 6573 3a20 out namespaces: \n+001a2cf0: 3c2f 703e 3c70 7265 2063 6c61 7373 3d22

       cc -c\n+001a2d10: 202d 4457 4954 485f 4e4f 4e41 4d45 5350   -DWITH_NONAMESP\n+001a2d20: 4143 4553 2073 7464 736f 6170 322e 630a  ACES stdsoap2.c.\n+001a2d30: 3c2f 7072 653e 3c70 3e20 5365 636f 6e64  

      Second\n+001a2d40: 2c20 7765 2063 7265 6174 6520 7468 6520 , we create the \n+001a2d50: 4465 6c61 7965 6420 5374 6f63 6b20 5175 Delayed Stock Qu\n+001a2d60: 6f74 6520 6865 6164 6572 2066 696c 6520 ote header file \n+001a2d70: 7370 6563 6966 6963 6174 696f 6e2c 2077 specification, w\n+001a2d80: 6869 6368 206d 6179 2062 6520 6f62 7461 hich may be obta\n+001a2d90: 696e 6564 2075 7369 6e67 2074 6865 2057 ined using the W\n+001a2da0: 5344 4c20 696d 706f 7274 6572 2e3c 2f70 SDL importer..

      \n+001a2df0: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi\n+001a2e00: 6365 206e 616d 653a 2053 6572 7669 6365 ce name: Service\n+001a2e10: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
      .<\n+001a2e20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a2e30: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n\n+001a2e50: 7320 7365 7276 6963 6520 7374 796c 653a s service style:\n+001a2e60: 2072 7063 203c 2f73 7061 6e3e 3c2f 6469 rpc .
      //gso\n+001a2ea0: 6170 206e 7320 7365 7276 6963 6520 656e ap ns service en\n+001a2eb0: 636f 6469 6e67 3a20 656e 636f 6465 6420 coding: encoded \n+001a2ec0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+001a2ee0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns\n+001a2f00: 2073 6572 7669 6365 206c 6f63 6174 696f service locatio\n+001a2f10: 6e3a 2068 7474 703a 2f2f 7365 7276 6963 n: http://servic\n+001a2f20: 6573 2e78 6d65 7468 6f64 732e 6e65 742f es.xmethods.net/\n+001a2f30: 736f 6170 203c 2f73 7061 6e3e 3c2f 6469 soap .
      //gso\n+001a2f70: 6170 206e 7320 7363 6865 6d61 206e 616d ap ns schema nam\n+001a2f80: 6573 7061 6365 3a20 7572 6e3a 786d 6574 espace: urn:xmet\n+001a2f90: 686f 6473 2d64 656c 6179 6564 2d71 756f hods-delayed-quo\n+001a2fa0: 7465 7320 3c2f 7370 616e 3e3c 2f64 6976 tes .
      //gsoa\n+001a2fe0: 7020 6e73 2073 6572 7669 6365 206d 6574 p ns service met\n+001a2ff0: 686f 642d 6163 7469 6f6e 3a20 6765 7451 hod-action: getQ\n+001a3000: 756f 7465 2026 7175 6f74 3b26 7175 6f74 uote ""\n+001a3010: 3b20 3c2f 7370 616e 3e3c 2f64 6976 3e0a ;
      .\n+001a3020: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      int<\n+001a3050: 2f73 7061 6e3e 206e 735f 5f67 6574 5175 /span> ns__getQu\n+001a3060: 6f74 6528 3c73 7061 6e20 636c 6173 733d ote(ch\n+001a3080: 6172 3c2f 7370 616e 3e20 2a73 796d 626f ar *symbo\n+001a3090: 6c2c 203c 7370 616e 2063 6c61 7373 3d22 l, flo\n+001a30b0: 6174 3c2f 7370 616e 3e20 2a52 6573 756c at *Resul\n+001a30c0: 7429 3b3c 2f64 6976 3e0a 3c2f 6469 763e t);
      .
      \n+001a30d0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

      We\n+001a35b0: 2063 6f6d 7069 6c65 2069 7420 6173 2061 compile it as a\n+001a35c0: 206c 6962 7261 7279 2061 6e64 2077 6520 library and we \n+001a35d0: 7573 6520 6f70 7469 6f6e 7320 3c62 3e3c use options <\n+001a35e0: 636f 6465 3e2d 6e3c 2f63 6f64 653e 3c2f code>-n and \n+001a3600: 2d70 7261 7465 3c2f 636f 6465 3e3c 2f62 -prate to prefix the \n+001a3620: 6765 6e65 7261 7465 6420 6669 6c65 7320 generated files \n+001a3630: 616e 6420 746f 2072 656e 616d 6520 7468 and to rename th\n+001a3640: 6520 6e61 6d65 7370 6163 6520 7461 626c e namespace tabl\n+001a3650: 6520 746f 2061 766f 6964 206c 696e 6b20 e to avoid link \n+001a3660: 636f 6e66 6c69 6374 733a 203c 2f70 3e3c conflicts:

      <\n+001a3670: 7072 6520 636c 6173 733d 2266 7261 676d pre class=\"fragm\n+001a3680: 656e 7422 3e20 736f 6170 6370 7032 202d ent\"> soapcpp2 -\n+001a3690: 6320 2d6e 202d 7072 6174 6520 7261 7465 c -n -prate rate\n+001a36a0: 2e68 0a20 6363 202d 6320 7261 7465 436c .h. cc -c rateCl\n+001a36b0: 6965 6e74 4c69 622e 630a 3c2f 7072 653e ientLib.c.\n+001a36c0: 3c70 3e20 5468 6520 6d61 696e 2070 726f

      The main pro\n+001a36d0: 6772 616d 2069 733a 3c2f 703e 0a3c 6469 gram is:

      .
      \n+001a3720: 2369 6e63 6c75 6465 2026 7175 6f74 3b71 #include "q\n+001a3730: 756f 7465 482e 6826 7175 6f74 3b3c 2f73 uoteH.h"
      .
      #include\n+001a3780: 2026 7175 6f74 3b72 6174 6548 2e68 2671 "rateH.h&q\n+001a3790: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;.
      #\n+001a37d0: 696e 636c 7564 6520 2671 756f 743b 7175 include "qu\n+001a37e0: 6f74 652e 6e73 6d61 7026 7175 6f74 3b3c ote.nsmap"<\n+001a37f0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      .<\n+001a3810: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class=\"prep\n+001a3820: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor\">#inclu\n+001a3830: 6465 2026 7175 6f74 3b72 6174 652e 6e73 de "rate.ns\n+001a3840: 6d61 7026 7175 6f74 3b3c 2f73 7061 6e3e map"\n+001a3850: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      \n+001a3870: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      int\n+001a38a0: 3c2f 7370 616e 3e20 6d61 696e 283c 7370 main(int argc, char *a\n+001a3900: 7267 765b 5d29 203c 2f64 6976 3e0a 3c64 rgv[])
      .\n+001a3920: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
      .
      if \n+001a3960: 2861 7267 6320 266c 743b 3d20 3129 203c (argc <= 1) <\n+001a3970: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      {.
      fprintf(\n+001a39b0: 7374 6465 7272 2c20 3c73 7061 6e20 636c stderr, "Usage:\n+001a39e0: 206d 6169 6e20 7469 636b 6572 205b 6375 main ticker [cu\n+001a39f0: 7272 656e 6379 5d5c 6e26 7175 6f74 3b3c rrency]\\n"<\n+001a3a00: 2f73 7061 6e3e 293b 203c 2f64 6976 3e0a /span>);
      .\n+001a3a10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      exit(EXIT_\n+001a3a30: 4641 494c 5552 4529 3b20 3c2f 6469 763e FAILURE);
      \n+001a3a40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      }
      .\n+001a3a70: 2020 3c73 7061 6e20 636c 6173 733d 226b struct <\n+001a3a90: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa\n+001a3ac0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so\n+001a3af0: 6170 3c2f 613e 203d 203c 6120 636c 6173 ap = so\n+001a3b50: 6170 5f6e 6577 3c2f 613e 2829 3b20 3c2f ap_new(); .
      float \n+001a3ba0: 713b 203c 2f64 6976 3e0a 3c64 6976 2063 q;
      .
      soap_set_na\n+001a3c20: 6d65 7370 6163 6573 3c2f 613e 283c 6120 mespaces(soap, qu\n+001a3c60: 6f74 655f 6e61 6d65 7370 6163 6573 293b ote_namespaces);\n+001a3c70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      if \n+001a3cb0: 2873 6f61 705f 6361 6c6c 5f6e 735f 5f67 (soap_call_ns__g\n+001a3cc0: 6574 5175 6f74 6528 3c61 2063 6c61 7373 etQuote(s\n+001a3cf0: 6f61 703c 2f61 3e2c 204e 554c 4c2c 204e oap, NULL, N\n+001a3d00: 554c 4c2c 2061 7267 765b 315d 2c20 2661 ULL, argv[1], &a\n+001a3d10: 6d70 3b71 2929 203c 7370 616e 2063 6c61 mp;q)) // \n+001a3d30: 6765 7420 7175 6f74 6520 3c2f 7370 616e get quote
      .
      soap_print_faul\n+001a3dc0: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soa\n+001a3df0: 703c 2f61 3e2c 2073 7464 6572 7229 3b20 p, stderr); \n+001a3e00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      else\n+001a3e40: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      {.
      if (a\n+001a3ea0: 7267 6320 2667 743b 2032 2920 3c2f 6469 rgc > 2) .
      {
      \n+001a3ed0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      \n+001a3f40: 736f 6170 5f73 6574 5f6e 616d 6573 7061 soap_set_namespa\n+001a3f50: 6365 733c 2f61 3e28 3c61 2063 6c61 7373 ces(s\n+001a3f80: 6f61 703c 2f61 3e2c 2072 6174 655f 6e61 oap, rate_na\n+001a3f90: 6d65 7370 6163 6573 293b 203c 2f64 6976 mespaces); .
      float\n+001a3fe0: 2072 3b20 3c2f 6469 763e 0a3c 6469 7620 r;
      .
      \n+001a4000: 2020 203c 7370 616e 2063 6c61 7373 3d22 if<\n+001a4020: 2f73 7061 6e3e 2028 736f 6170 5f63 616c /span> (soap_cal\n+001a4030: 6c5f 6e73 5f5f 6765 7452 6174 6528 3c61 l_ns__getRate(soap, N\n+001a4070: 554c 4c2c 204e 554c 4c2c 203c 7370 616e ULL, NULL, "us&\n+001a40a0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 6172 quot;, ar\n+001a40b0: 6776 5b32 5d2c 2026 616d 703b 7229 2920 gv[2], &r)) \n+001a40c0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // get rat\n+001a40e0: 6520 696e 2055 5320 646f 6c6c 6172 7320 e in US dollars \n+001a40f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+001a4110: 2020 2020 2020 2020 3c61 2063 6c61 7373 soap_\n+001a4170: 7072 696e 745f 6661 756c 743c 2f61 3e28 print_fault(\n+001a4180: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001a41b0: 2073 7464 6572 7229 3b20 3c2f 6469 763e stderr);
      \n+001a41c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      else <\n+001a4200: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      \n+001a4220: 7120 2a3d 2072 3b20 3c73 7061 6e20 636c q *= r; //\n+001a4240: 2063 6f6e 7665 7274 2074 6865 2071 756f convert the quo\n+001a4250: 7465 203c 2f73 7061 6e3e 3c2f 6469 763e te
      \n+001a4260: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      }
      .\n+001a4280: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      printf("%\n+001a42c0: 733a 2025 6620 5c6e 2671 756f 743b 3c2f s: %f \\n", argv[1], \n+001a42e0: 7129 3b20 3c2f 6469 763e 0a3c 6469 7620 q);
      .
      }\n+001a4300: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      ..
      soap_end(\n+001a4430: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+001a4460: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
      .
      soap_free(<\n+001a44e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a44f0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001a4500: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+001a4510: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      return 0;
      .}\n+001a4570: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
      .
      Compile and lin\n+001a45a0: 6b20 7468 6973 2061 7070 6c69 6361 7469 k this applicati\n+001a45b0: 6f6e 2077 6974 6820 3c65 6d3e 3c63 6f64 on with stdsoap2.o, envC.o, quoteClientLib\n+001a4610: 2e6f 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 .o
      , \n+001a4620: 616e 6420 3c65 6d3e 3c63 6f64 653e 7261 and ra\n+001a4630: 7465 436c 6965 6e74 4c69 622e 6f3c 2f63 teClientLib.o.

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

      .

      .H\n+001a46b0: 6f77 2074 6f20 6368 6169 6e20 4320 7365 ow to chain C se\n+001a46c0: 7276 6963 6573 2074 6f20 6163 6365 7074 rvices to accept\n+001a46d0: 206d 6573 7361 6765 7320 6f6e 2074 6865 messages on the\n+001a46e0: 2073 616d 6520 706f 7274 3c2f 6833 3e0a same port

      .\n+001a46f0: 3c70 3e57 6865 6e20 636f 6d62 696e 696e

      When combinin\n+001a4700: 6720 6d75 6c74 6970 6c65 2073 6572 7669 g multiple servi\n+001a4710: 6365 7320 696e 746f 206f 6e65 2061 7070 ces into one app\n+001a4720: 6c69 6361 7469 6f6e 2c20 796f 7520 6361 lication, you ca\n+001a4730: 6e20 7275 6e20 7773 646c 3268 206f 6e20 n run wsdl2h on \n+001a4740: 6d75 6c74 6970 6c65 2057 5344 4c73 2074 multiple WSDLs t\n+001a4750: 6f20 6765 6e65 7261 7465 2074 6865 2073 o generate the s\n+001a4760: 696e 676c 6520 616c 6c2d 696e 636c 7573 ingle all-inclus\n+001a4770: 6976 6520 7365 7276 6963 6520 6465 6669 ive service defi\n+001a4780: 6e69 7469 6f6e 7320 696e 7465 7266 6163 nitions interfac\n+001a4790: 6520 6865 6164 6572 2066 696c 6520 666f e header file fo\n+001a47a0: 7220 736f 6170 6370 7032 2e20 5468 6973 r soapcpp2. This\n+001a47b0: 2068 6561 6465 7220 6669 6c65 2069 7320 header file is \n+001a47c0: 7468 656e 2070 726f 6365 7373 6564 2077 then processed w\n+001a47d0: 6974 6820 736f 6170 6370 7032 2074 6f20 ith soapcpp2 to \n+001a47e0: 6765 6e65 7261 7465 2073 6b65 6c65 746f generate skeleto\n+001a47f0: 6e20 6675 6e63 7469 6f6e 7320 696e 2043 n functions in C\n+001a4800: 2e3c 2f70 3e0a 3c70 3e57 6861 7420 6966 .

      .

      What if\n+001a4810: 2077 6520 6765 6e65 7261 7465 206d 756c we generate mul\n+001a4820: 7469 706c 6520 7365 7276 6963 6573 2c20 tiple services, \n+001a4830: 6561 6368 2066 726f 6d20 6120 5753 444c each from a WSDL\n+001a4840: 2073 6570 6172 6174 656c 792c 2061 6e64 separately, and\n+001a4850: 2077 616e 7420 746f 2064 6570 6c6f 7920 want to deploy \n+001a4860: 7468 656d 206f 6e20 7468 6520 7361 6d65 them on the same\n+001a4870: 2070 6f72 743f 2054 6869 7320 7265 7175 port? This requ\n+001a4880: 6972 6573 206c 6973 7465 6e69 6e67 2074 ires listening t\n+001a4890: 6f20 7468 6520 7361 6d65 2070 6f72 7420 o the same port \n+001a48a0: 616e 6420 7468 656e 2063 6861 696e 696e and then chainin\n+001a48b0: 6720 7468 6520 7365 7276 6963 6520 6469 g the service di\n+001a48c0: 7370 6174 6368 6573 2073 6f20 7468 6174 spatches so that\n+001a48d0: 2065 6163 6820 7365 7276 6963 6520 6361 each service ca\n+001a48e0: 6e20 7365 7276 6520 6120 7265 7175 6573 n serve a reques\n+001a48f0: 742e 3c2f 703e 0a3c 703e 4669 7273 7420 t.

      .

      First \n+001a4900: 7765 2063 7265 6174 6520 6120 3c65 6d3e we create a \n+001a4910: 3c63 6f64 653e 656e 762e 683c 2f63 6f64 env.h that con\n+001a4930: 7461 696e 7320 7468 6520 6a6f 696e 7420 tains the joint \n+001a4940: 534f 4150 2048 6561 6465 7220 616e 6420 SOAP Header and \n+001a4950: 534f 4150 2046 6175 6c74 2064 6566 696e SOAP Fault defin\n+001a4960: 6974 696f 6e73 2c20 666f 7220 6578 616d itions, for exam\n+001a4970: 706c 6520 6279 2063 6f70 792d 7061 7374 ple by copy-past\n+001a4980: 696e 6720 7468 6573 6520 6672 6f6d 2074 ing these from t\n+001a4990: 6865 206f 7468 6572 2068 6561 6465 7220 he other header \n+001a49a0: 6669 6c65 7320 6765 6e65 7261 7465 6420 files generated \n+001a49b0: 6279 2077 7364 6c32 682e 204f 7220 7468 by wsdl2h. Or th\n+001a49c0: 6973 2066 696c 6520 6973 2065 6d70 7479 is file is empty\n+001a49d0: 2069 6620 6e6f 2073 7065 6369 616c 697a if no specializ\n+001a49e0: 6564 2053 4f41 5020 4865 6164 6572 7320 ed SOAP Headers \n+001a49f0: 616e 6420 4661 756c 7473 2061 7265 2075 and Faults are u\n+001a4a00: 7365 642e 2057 6520 636f 6d70 696c 6520 sed. We compile \n+001a4a10: 6974 2061 7320 666f 6c6c 6f77 733a 203c it as follows: <\n+001a4a20: 2f70 3e3c 7072 6520 636c 6173 733d 2266 /p>

       soapcp\n+001a4a40: 7032 202d 6320 2d70 656e 7620 656e 762e  p2 -c -penv env.\n+001a4a50: 680a 2063 6320 2d63 2065 6e76 432e 630a  h. cc -c envC.c.\n+001a4a60: 3c2f 7072 653e 3c70 3e20 5765 2061 6c73  

      We als\n+001a4a70: 6f20 636f 6d70 696c 6520 3c65 6d3e 3c63 o compile gsoap/stdsoa\n+001a4a90: 7032 2e63 3c2f 636f 6465 3e3c 2f65 6d3e p2.c\n+001a4aa0: 2077 6974 686f 7574 206e 616d 6573 7061 without namespa\n+001a4ab0: 6365 733a 203c 2f70 3e3c 7072 6520 636c ces:

       \n+001a4ad0: 6363 202d 6320 2d44 5749 5448 5f4e 4f4e  cc -c -DWITH_NON\n+001a4ae0: 414d 4553 5041 4345 5320 7374 6473 6f61  AMESPACES stdsoa\n+001a4af0: 7032 2e63 0a3c 2f70 7265 3e3c 703e 2053  p2.c.

      S\n+001a4b00: 6179 2066 6f72 2065 7861 6d70 6c65 2074 ay for example t\n+001a4b10: 6861 7420 7765 2068 6176 6520 6120 7365 hat we have a se\n+001a4b20: 7276 6963 6520 6465 6669 6e69 7469 6f6e rvice definition\n+001a4b30: 2069 6e20 3c65 6d3e 3c63 6f64 653e 7175 in qu\n+001a4b40: 6f74 652e 683c 2f63 6f64 653e 3c2f 656d ote.h. We compile it\n+001a4b60: 2061 7320 6120 6c69 6272 6172 7920 616e as a library an\n+001a4b70: 6420 7765 2075 7365 206f 7074 696f 6e73 d we use options\n+001a4b80: 203c 623e 3c63 6f64 653e 2d6e 3c2f 636f -n and <\n+001a4ba0: 636f 6465 3e2d 7071 756f 7465 3c2f 636f code>-pquote to prefi\n+001a4bc0: 7820 7468 6520 6765 6e65 7261 7465 6420 x the generated \n+001a4bd0: 6669 6c65 7320 616e 6420 746f 2072 656e files and to ren\n+001a4be0: 616d 6520 7468 6520 6e61 6d65 7370 6163 ame the namespac\n+001a4bf0: 6520 7461 626c 6520 746f 2061 766f 6964 e table to avoid\n+001a4c00: 206c 696e 6b20 636f 6e66 6c69 6374 733a link conflicts:\n+001a4c10: 203c 2f70 3e3c 7072 6520 636c 6173 733d

       soap\n+001a4c30: 6370 7032 202d 6320 2d6e 202d 7071 756f  cpp2 -c -n -pquo\n+001a4c40: 7465 2071 756f 7465 2e68 0a20 6363 202d  te quote.h. cc -\n+001a4c50: 6320 7175 6f74 6543 6c69 656e 744c 6962  c quoteClientLib\n+001a4c60: 2e63 0a3c 2f70 7265 3e3c 703e 2057 6520  .c.

      We \n+001a4c70: 646f 2074 6865 2073 616d 6520 666f 7220 do the same for \n+001a4c80: 6120 7365 7276 6963 6520 6465 6669 6e69 a service defini\n+001a4c90: 7469 6f6e 2069 6e20 3c65 6d3e 3c63 6f64 tion in rate.h<\n+001a4cb0: 2f65 6d3e 3a20 3c2f 703e 3c70 7265 2063 /em>:

      \n+001a4cd0: 2073 6f61 7063 7070 3220 2d63 202d 6e20   soapcpp2 -c -n \n+001a4ce0: 2d70 7261 7465 2072 6174 652e 680a 2063  -prate rate.h. c\n+001a4cf0: 6320 2d63 2072 6174 6543 6c69 656e 744c  c -c rateClientL\n+001a4d00: 6962 2e63 0a3c 2f70 7265 3e3c 703e 2054  ib.c.

      T\n+001a4d10: 6f20 7365 7276 6520 626f 7468 2074 6865 o serve both the\n+001a4d20: 2071 756f 7465 2061 6e64 2072 6174 6520 quote and rate \n+001a4d30: 7365 7276 6963 6573 206f 6e20 7468 6520 services on the \n+001a4d40: 7361 6d65 2070 6f72 742c 2077 6520 6368 same port, we ch\n+001a4d50: 6169 6e20 7468 6520 7365 7276 6963 6520 ain the service \n+001a4d60: 6469 7370 6174 6368 6572 7320 6173 2066 dispatchers as f\n+001a4d70: 6f6c 6c6f 7773 3a3c 2f70 3e0a 3c64 6976 ollows:

      .
      #\n+001a4dc0: 696e 636c 7564 6520 2671 756f 743b 7175 include "qu\n+001a4dd0: 6f74 6548 2e68 2671 756f 743b 3c2f 7370 oteH.h"
      .
      #include \n+001a4e20: 2671 756f 743b 7261 7465 482e 6826 7175 "rateH.h&qu\n+001a4e30: 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 763e ot;
      \n+001a4e40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      #i\n+001a4e70: 6e63 6c75 6465 2026 7175 6f74 3b71 756f nclude "quo\n+001a4e80: 7465 2e6e 736d 6170 2671 756f 743b 3c2f te.nsmap"
      .#includ\n+001a4ed0: 6520 2671 756f 743b 7261 7465 2e6e 736d e "rate.nsm\n+001a4ee0: 6170 2671 756f 743b 3c2f 7370 616e 3e3c ap"<\n+001a4ef0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      .\n+001a4f10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
      while (1)
      .\n+001a5210: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
      .
      \n+001a5230: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_vali\n+001a52b0: 645f 736f 636b 6574 3c2f 613e 283c 6120 d_socket(soa\n+001a5310: 705f 6163 6365 7074 3c2f 613e 283c 6120 p_accept(soap)))<\n+001a5350: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      {..<\n+001a5450: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a5460: 3e20 2020 2020 207b 3c2f 6469 763e 0a3c > {
      .<\n+001a5470: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a5480: 3e20 2020 2020 2020 203c 6120 636c 6173 > soap\n+001a54e0: 5f70 7269 6e74 5f66 6175 6c74 3c2f 613e _print_fault\n+001a54f0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001a5520: 2c20 7374 6465 7272 293b 203c 2f64 6976 , stderr); .
      continue;
      . \n+001a5590: 2020 2020 207d 3c2f 6469 763e 0a3c 6469 }
      . \n+001a55b0: 2020 2020 203c 6120 636c 6173 733d 2263 soap\n+001a5610: 5f73 6574 5f6e 616d 6573 7061 6365 733c _set_namespaces<\n+001a5620: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+001a5650: 2f61 3e2c 2071 756f 7465 5f6e 616d 6573 /a>, quote_names\n+001a5660: 7061 6365 7329 3b3c 2f64 6976 3e0a 3c64 paces);
      .\n+001a5680: 2020 2020 2020 3c73 7061 6e20 636c 6173 \n+001a56a0: 6966 3c2f 7370 616e 3e20 2871 756f 7465 if (quote\n+001a56b0: 5f73 6572 7665 5f72 6571 7565 7374 283c _serve_request(<\n+001a56c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a56d0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001a56e0: 6874 6d6c 223e 736f 6170 3c2f 613e 2920 html\">soap) \n+001a56f0: 3d3d 203c 6120 636c 6173 733d 2263 6f64 == SOAP_NO_M\n+001a5750: 4554 484f 443c 2f61 3e29 203c 2f64 6976 ETHOD) .
      {.
      soap_set_name\n+001a5800: 7370 6163 6573 3c2f 613e 283c 6120 636c spaces(soap, rate\n+001a5840: 5f6e 616d 6573 7061 6365 7329 3b3c 2f64 _namespaces);.
      if (rate_serve_re\n+001a58a0: 7175 6573 7428 3c61 2063 6c61 7373 3d22 quest(soa\n+001a58d0: 703c 2f61 3e29 293c 2f64 6976 3e0a 3c64 p))
      .\n+001a58f0: 2020 2020 2020 2020 2020 3c61 2063 6c61 soap_s\n+001a5950: 656e 645f 6661 756c 743c 2f61 3e28 3c61 end_fault(soap); \n+001a5990: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // send fa\n+001a59b0: 756c 7420 746f 2063 6c69 656e 7420 3c2f ult to client
      . \n+001a59e0: 2020 2020 7d20 3c2f 6469 763e 0a3c 6469 }
      . \n+001a5a00: 2020 2020 203c 7370 616e 2063 6c61 7373 e\n+001a5a20: 6c73 653c 2f73 7061 6e3e 203c 7370 616e lse if (\n+001a5a50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+001a5a80: 2667 743b 3c61 2063 6c61 7373 3d22 636f >err\n+001a5ad0: 6f72 3c2f 613e 2920 3c2f 6469 763e 0a3c or)
      .<\n+001a5ae0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a5af0: 3e20 2020 2020 207b 3c2f 6469 763e 0a3c > {
      .<\n+001a5b00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a5b10: 3e20 2020 2020 2020 203c 6120 636c 6173 > soap_se\n+001a5b70: 6e64 5f66 6175 6c74 3c2f 613e 283c 6120 nd_fault(soap); <\n+001a5bb0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001a5bc0: 656e 7422 3e2f 2f20 7365 6e64 2066 6175 ent\">// send fau\n+001a5bd0: 6c74 2074 6f20 636c 6965 6e74 203c 2f73 lt to client
      .
      \n+001a5c00: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
      .
      \n+001a5c20: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
      .
      <\n+001a5c40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a5c50: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow\">else i\n+001a5c80: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (soap->errnum) // acce\n+001a5d30: 7074 2066 6169 6c65 642c 2074 7279 2061 pt failed, try a\n+001a5d40: 6761 696e 2061 6674 6572 2031 2073 6563 gain after 1 sec\n+001a5d50: 6f6e 643c 2f73 7061 6e3e 3c2f 6469 763e ond
      \n+001a5d60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      {
      .<\n+001a5d80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a5d90: 3e20 2020 2020 203c 6120 636c 6173 733d > soap_p\n+001a5df0: 7269 6e74 5f66 6175 6c74 3c2f 613e 283c rint_fault(<\n+001a5e00: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a5e10: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001a5e20: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001a5e30: 7374 6465 7272 293b 203c 2f64 6976 3e0a stderr);
      .\n+001a5e40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      sleep(1)\n+001a5e60: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
      .
      } \n+001a5e80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      else
      .
      {\n+001a5ee0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      f\n+001a5f00: 7072 696e 7466 2873 7464 6572 722c 203c printf(stderr, <\n+001a5f10: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+001a5f20: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+001a5f30: 3b73 6572 7665 7220 7469 6d65 6420 6f75 ;server timed ou\n+001a5f40: 745c 6e26 7175 6f74 3b3c 2f73 7061 6e3e t\\n"\n+001a5f50: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
      .
      \n+001a5f70: 2020 3c73 7061 6e20 636c 6173 733d 226b brea\n+001a5f90: 6b3c 2f73 7061 6e3e 3b20 3c2f 6469 763e k;
      \n+001a5fa0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      }
      .<\n+001a5fc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a5fd0: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap_d\n+001a6030: 6573 7472 6f79 3c2f 613e 283c 6120 636c estroy(soap); .
      s\n+001a60e0: 6f61 705f 656e 643c 2f61 3e28 3c61 2063 oap_end(soap); .
      }
      \n+001a6140: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      }
      ..soap_end(\n+001a6280: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+001a62b0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
      .
      \n+001a6320: 736f 6170 5f66 7265 653c 2f61 3e28 3c61 soap_free(soap);<\n+001a6360: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

      \n+001a6380: 5468 6973 2063 6861 696e 696e 6720 6361 This chaining ca\n+001a6390: 6e20 6265 2061 7262 6974 7261 7269 6c79 n be arbitrarily\n+001a63a0: 2064 6565 702e 2057 6865 6e20 7468 6520 deep. When the \n+001a63b0: 7072 6576 696f 7573 2072 6571 7565 7374 previous request\n+001a63c0: 2066 6169 6c73 2077 6974 6820 6120 3c63 fails with a #SOAP_NO_MET\n+001a63e0: 484f 443c 2f63 6f64 653e 2074 6865 6e20 HOD then \n+001a63f0: 6e65 7874 2072 6571 7565 7374 2064 6973 next request dis\n+001a6400: 7061 7463 6865 7220 6361 6e20 6265 2074 patcher can be t\n+001a6410: 7269 6564 2e3c 2f70 3e0a 3c70 3e54 6865 ried.

      .

      The\n+001a6420: 2073 6572 7665 7220 7368 6f75 6c64 2061 server should a\n+001a6430: 6c73 6f20 6465 6669 6e65 2074 6865 2073 lso define the s\n+001a6440: 6572 7669 6365 206f 7065 7261 7469 6f6e ervice operation\n+001a6450: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

      .
      <\n+001a6480: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a6490: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int ns__getQuote\n+001a64b0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap\n+001a6500: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+001a6530: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, char *sy\n+001a6560: 6d62 6f6c 2c20 3c73 7061 6e20 636c 6173 mbol, \n+001a6580: 666c 6f61 743c 2f73 7061 6e3e 202a 5265 float *Re\n+001a6590: 7375 6c74 293b 203c 2f64 6976 3e0a 3c64 sult);
      .\n+001a65b0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
      .
      *Res\n+001a65d0: 756c 7420 3d20 2e2e 2e20 3b20 3c2f 6469 ult = ... ; .
      return <\n+001a6620: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a6630: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001a6640: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g\n+001a6650: 6133 6231 3061 3638 6633 3534 6633 3963 a3b10a68f354f39c\n+001a6660: 6262 3066 6530 6430 3433 6164 3463 3763 bb0fe0d043ad4c7c\n+001a6670: 3022 3e53 4f41 505f 4f4b 3c2f 613e 3b20 0\">SOAP_OK; \n+001a6680: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      ..<\n+001a6820: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a6830: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
      .
      *Re\n+001a6850: 7375 6c74 203d 202e 2e2e 203b 203c 2f64 sult = ... ; .
      return \n+001a68a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_OK;\n+001a6900: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      }.

      Howe\n+001a6940: 7665 722c 2074 6865 2077 6869 6c65 206c ver, the while l\n+001a6950: 6f6f 7020 6974 6572 6174 6573 2066 6f72 oop iterates for\n+001a6960: 2065 6163 6820 6e65 7720 636f 6e6e 6563 each new connec\n+001a6970: 7469 6f6e 2074 6861 7420 6973 2065 7374 tion that is est\n+001a6980: 6162 6c69 7368 6564 2077 6974 6820 3c63 ablished with soa\n+001a6a10: 705f 6163 6365 7074 3c2f 613e 3c2f 636f p_accept and does not\n+001a6a30: 2061 6c6c 6f77 2066 6f72 2048 5454 5020 allow for HTTP \n+001a6a40: 6b65 6570 2d61 6c69 7665 2063 6f6e 6e65 keep-alive conne\n+001a6a50: 6374 696f 6e73 2074 6f20 7065 7273 6973 ctions to persis\n+001a6a60: 742e 2046 6f72 206f 7572 2066 696e 616c t. For our final\n+001a6a70: 2069 6d70 726f 7665 6d65 6e74 2077 6520 improvement we \n+001a6a80: 7761 6e74 2074 6f20 7375 7070 6f72 7420 want to support \n+001a6a90: 4854 5450 206b 6565 702d 616c 6976 6520 HTTP keep-alive \n+001a6aa0: 636f 6e6e 6563 7469 6f6e 7320 7468 6174 connections that\n+001a6ab0: 2072 6571 7569 7265 206c 6f6f 7069 6e67 require looping\n+001a6ac0: 206f 7665 7220 7468 6520 7365 7276 6963 over the servic\n+001a6ad0: 6520 6469 7370 6174 6368 6573 2075 6e74 e dispatches unt\n+001a6ae0: 696c 2074 6865 2063 6f6e 6e65 6374 696f il the connectio\n+001a6af0: 6e20 636c 6f73 6573 206f 6e20 6569 7468 n closes on eith\n+001a6b00: 6572 2065 6e64 2c20 6166 7465 7220 7768 er end, after wh\n+001a6b10: 6963 6820 7765 2072 6573 756d 6520 7468 ich we resume th\n+001a6b20: 6520 6f75 7465 7220 6c6f 6f70 2e20 5468 e outer loop. Th\n+001a6b30: 6520 7265 7375 6c74 696e 6720 636f 6465 e resulting code\n+001a6b40: 2069 7320 7665 7279 2063 6c6f 7365 2074 is very close t\n+001a6b50: 6f20 7468 6520 736f 6170 6370 7032 2d67 o the soapcpp2-g\n+001a6b60: 656e 6572 6174 6564 203c 636f 6465 3e3c enerated <\n+001a6b70: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001a6b80: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+001a6b90: 5f69 6f2e 6874 6d6c 2367 6135 3164 6261 _io.html#ga51dba\n+001a6ba0: 3737 3036 6135 3035 3234 3062 6438 3933 7706a505240bd893\n+001a6bb0: 3563 3062 3238 6534 3139 6422 2074 6974 5c0b28e419d\" tit\n+001a6bc0: 6c65 3d22 5365 7276 6520 6120 7065 6e64 le=\"Serve a pend\n+001a6bd0: 696e 6720 7265 7175 6573 742e 223e 736f ing request.\">so\n+001a6be0: 6170 5f73 6572 7665 3c2f 613e 3c2f 636f ap_serve code and the\n+001a6c00: 203c 636f 6465 3e73 6572 7665 3c2f 636f serve service clas\n+001a6c20: 7320 6d65 7468 6f64 732c 2077 6974 6820 s methods, with \n+001a6c30: 7468 6520 6164 6469 7469 6f6e 206f 6620 the addition of \n+001a6c40: 7468 6520 6368 6169 6e20 6f66 2073 6572 the chain of ser\n+001a6c50: 7669 6365 2064 6973 7061 7463 6865 7320 vice dispatches \n+001a6c60: 696e 2074 6865 206c 6f6f 7020 626f 6479 in the loop body\n+001a6c70: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

      .
      #includ\n+001a6cc0: 6520 2671 756f 743b 7175 6f74 6548 2e68 e "quoteH.h\n+001a6cd0: 2671 756f 743b 3c2f 7370 616e 3e3c 2f64 ".
      #include "\n+001a6d20: 7261 7465 482e 6826 7175 6f74 3b3c 2f73 rateH.h"
      .
      #include\n+001a6d70: 2026 7175 6f74 3b71 756f 7465 2e6e 736d "quote.nsm\n+001a6d80: 6170 2671 756f 743b 3c2f 7370 616e 3e3c ap"<\n+001a6d90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      #include &quo\n+001a6dd0: 743b 7261 7465 2e6e 736d 6170 2671 756f t;rate.nsmap&quo\n+001a6de0: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
      .\n+001a6df0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      .
      struct \n+001a6e40: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+001a6e70: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+001a6ea0: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_new\n+001a6f00: 3c2f 613e 2829 3b20 3c2f 6469 763e 0a3c ();
      .<\n+001a6f10: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a6f20: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >if (soap_val\n+001a6fa0: 6964 5f73 6f63 6b65 743c 2f61 3e28 3c61 id_socket(so\n+001a7000: 6170 5f62 696e 643c 2f61 3e28 3c61 2063 ap_bind(soap, NUL\n+001a7040: 4c2c 2038 3038 302c 2031 3029 2929 203c L, 8080, 10))) <\n+001a7050: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001a7060: 656e 7422 3e2f 2f20 736d 616c 6c20 4241 ent\">// small BA\n+001a7070: 434b 4c4f 4720 666f 7220 6974 6572 6174 CKLOG for iterat\n+001a7080: 6976 6520 7365 7276 6572 733c 2f73 7061 ive servers
      .
      {.
      while (1\n+001a70f0: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
      .
      {.
      if (<\n+001a7150: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a7160: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001a7170: 705f 5f73 6f61 702e 6874 6d6c 2367 6161 p__soap.html#gaa\n+001a7180: 6165 3837 3437 6634 6364 6163 6565 3537 ae8747f4cdacee57\n+001a7190: 3538 3735 6333 6132 3438 3864 3939 6322 5875c3a2488d99c\"\n+001a71a0: 3e73 6f61 705f 7661 6c69 645f 736f 636b >soap_valid_sock\n+001a71b0: 6574 3c2f 613e 283c 6120 636c 6173 733d et(soap_acce\n+001a7210: 7074 3c2f 613e 283c 6120 636c 6173 733d pt(so\n+001a7240: 6170 3c2f 613e 2929 293c 2f64 6976 3e0a ap)))
      .\n+001a7250: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      {
      .\n+001a7280: 2020 2020 2020 3c61 2063 6c61 7373 3d22 soa\n+001a72b0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->keep_alive = soap<\n+001a7340: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->max_keep_alive<\n+001a73a0: 2f61 3e20 2b20 313b 203c 7370 616e 2063 /a> + 1; /\n+001a73c0: 2f20 6d61 7820 6b65 6570 2d61 6c69 7665 / max keep-alive\n+001a73d0: 2069 7465 7261 7469 6f6e 733c 2f73 7061 iterations
      .
      \n+001a7400: 203c 7370 616e 2063 6c61 7373 3d22 6b65 do
      .
      \n+001a7440: 2020 207b 3c2f 6469 763e 0a3c 6469 7620 {
      .
      \n+001a7460: 2020 2020 203c 7370 616e 2063 6c61 7373 i\n+001a7480: 663c 2f73 7061 6e3e 2028 283c 6120 636c f ((soap-><\n+001a74c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a74d0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001a74e0: 6874 6d6c 2361 3364 3933 6261 3936 3862 html#a3d93ba968b\n+001a74f0: 6235 3833 3733 6635 3838 3431 3737 6137 b58373f5884177a7\n+001a7500: 6563 3064 3833 223e 6b65 6570 5f61 6c69 ec0d83\">keep_ali\n+001a7510: 7665 3c2f 613e 2026 6774 3b20 3029 2026 ve > 0) &\n+001a7520: 616d 703b 2661 6d70 3b20 283c 6120 636c amp;& (soap-><\n+001a7560: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a7570: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001a7580: 6874 6d6c 2361 3164 3761 6361 3661 6331 html#a1d7aca6ac1\n+001a7590: 6436 3233 3032 3130 3263 3137 3530 3861 d62302102c17508a\n+001a75a0: 3862 3065 6330 223e 6d61 785f 6b65 6570 8b0ec0\">max_keep\n+001a75b0: 5f61 6c69 7665 3c2f 613e 2026 6774 3b20 _alive > \n+001a75c0: 3029 293c 2f64 6976 3e0a 3c64 6976 2063 0))
      .
      \n+001a75e0: 2020 2020 2020 3c61 2063 6c61 7373 3d22 soa\n+001a7610: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->keep_alive--;
      .
      \n+001a7690: 2020 2020 203c 7370 616e 2063 6c61 7373 i\n+001a76b0: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (soap_b\n+001a7710: 6567 696e 5f73 6572 7665 3c2f 613e 283c egin_serve(<\n+001a7720: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a7730: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001a7740: 6874 6d6c 223e 736f 6170 3c2f 613e 2929 html\">soap))\n+001a7750: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      \n+001a7770: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
      .
      \n+001a7790: 2020 2020 203c 7370 616e 2063 6c61 7373 i\n+001a77b0: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (soap->error\n+001a7840: 2026 6774 3b3d 203c 6120 636c 6173 733d >= SOAP_\n+001a78a0: 5354 4f50 3c2f 613e 2920 3c73 7061 6e20 STOP) \n+001a78c0: 2f2f 2069 6620 6120 706c 7567 696e 2068 // if a plugin h\n+001a78d0: 6173 2073 6572 7665 6420 7468 6520 7265 as served the re\n+001a78e0: 7175 6573 743c 2f73 7061 6e3e 3c2f 6469 quest.
      \n+001a7910: 203c 7370 616e 2063 6c61 7373 3d22 6b65 conti\n+001a7930: 6e75 653c 2f73 7061 6e3e 3b20 2020 2020 nue; \n+001a7940: 2020 2020 2020 2020 2020 2020 2020 3c73 // then cont\n+001a7970: 696e 7565 2077 6974 6820 7468 6520 6e65 inue with the ne\n+001a7980: 7874 2072 6571 7565 7374 3c2f 7370 616e xt request
      .
      \n+001a79b0: 2020 2020 3c73 7061 6e20 636c 6173 733d br\n+001a79d0: 6561 6b3c 2f73 7061 6e3e 3b20 2020 2020 eak; \n+001a79e0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+001a79f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 // an e\n+001a7a10: 7272 6f72 206f 6363 7572 7265 643c 2f73 rror occurred
      .
      \n+001a7a40: 2020 2020 207d 3c2f 6469 763e 0a3c 6469 }
      . \n+001a7a60: 2020 2020 2020 203c 6120 636c 6173 733d so\n+001a7ac0: 6170 5f73 6574 5f6e 616d 6573 7061 6365 ap_set_namespace\n+001a7ad0: 733c 2f61 3e28 3c61 2063 6c61 7373 3d22 s(soa\n+001a7b00: 703c 2f61 3e2c 2071 756f 7465 5f6e 616d p, quote_nam\n+001a7b10: 6573 7061 6365 7329 3b3c 2f64 6976 3e0a espaces);
      .\n+001a7b20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      if (q\n+001a7b60: 756f 7465 5f73 6572 7665 5f72 6571 7565 uote_serve_reque\n+001a7b70: 7374 283c 6120 636c 6173 733d 2263 6f64 st(soap) == SOAP_\n+001a7c00: 4e4f 5f4d 4554 484f 443c 2f61 3e29 203c NO_METHOD) <\n+001a7c10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      \n+001a7c30: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
      .. \n+001a7d20: 2020 2020 2020 2020 3c73 7061 6e20 636c if (rat\n+001a7d50: 655f 7365 7276 655f 7265 7175 6573 7428 e_serve_request(\n+001a7d60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+001a7d90: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
      .
      \n+001a7db0: 2020 2020 2020 3c61 2063 6c61 7373 3d22 soap_send_\n+001a7e10: 6661 756c 743c 2f61 3e28 3c61 2063 6c61 fault(soap); // send fault \n+001a7e70: 746f 2063 6c69 656e 7420 3c2f 7370 616e to client
      .
      \n+001a7ea0: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
      .
      \n+001a7ec0: 2020 2020 203c 7370 616e 2063 6c61 7373 e\n+001a7ee0: 6c73 653c 2f73 7061 6e3e 203c 7370 616e lse if (\n+001a7f10: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+001a7f40: 2667 743b 3c61 2063 6c61 7373 3d22 636f >err\n+001a7f90: 6f72 3c2f 613e 2920 3c2f 6469 763e 0a3c or)
      .<\n+001a7fa0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a7fb0: 3e20 2020 2020 2020 207b 3c2f 6469 763e > {
      \n+001a7fc0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      soa\n+001a8030: 705f 7365 6e64 5f66 6175 6c74 3c2f 613e p_send_fault\n+001a8040: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001a8070: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // send\n+001a8090: 2066 6175 6c74 2074 6f20 636c 6965 6e74 fault to client\n+001a80a0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
      .<\n+001a80b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a80c0: 3e20 2020 2020 2020 207d 3c2f 6469 763e > }
      \n+001a80d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      \n+001a8140: 736f 6170 5f64 6573 7472 6f79 3c2f 613e soap_destroy\n+001a8150: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001a8180: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
      ..<\n+001a8240: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a8250: 3e20 2020 2020 207d 203c 7370 616e 2063 > } while \n+001a8280: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001a82b0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->ke\n+001a8300: 6570 5f61 6c69 7665 3c2f 613e 293b 3c2f ep_alive);.
      }.
      else <\n+001a8370: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001a8380: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap<\n+001a83c0: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->errnum) // accept fai\n+001a8440: 6c65 642c 2074 7279 2061 6761 696e 2061 led, try again a\n+001a8450: 6674 6572 2031 2073 6563 6f6e 643c 2f73 fter 1 second
      .
      \n+001a8480: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
      .
      \n+001a84a0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f\n+001a8500: 6175 6c74 3c2f 613e 283c 6120 636c 6173 ault(\n+001a8530: 736f 6170 3c2f 613e 2c20 7374 6465 7272 soap, stderr\n+001a8540: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
      .
      \n+001a8560: 2020 736c 6565 7028 3129 3b3c 2f64 6976 sleep(1);.
      }
      \n+001a8590: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      else.
      {
      \n+001a85f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      fprintf\n+001a8610: 2873 7464 6572 722c 203c 7370 616e 2063 (stderr, "serve\n+001a8640: 7220 7469 6d65 6420 6f75 745c 6e26 7175 r timed out\\n&qu\n+001a8650: 6f74 3b3c 2f73 7061 6e3e 293b 203c 2f64 ot;); .
      break;
      .
      \n+001a86c0: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
      .
      <\n+001a86e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001a86f0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001a8700: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html#\n+001a8710: 6761 6637 6430 3137 3631 3631 6539 6465 gaf7d0176161e9de\n+001a8720: 6633 3639 3831 6532 3466 6161 3139 3133 f36981e24faa1913\n+001a8730: 6439 223e 736f 6170 5f64 6573 7472 6f79 d9\">soap_destroy\n+001a8740: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n+001a8770: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
      .\n+001a8790: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap_en\n+001a87f0: 643c 2f61 3e28 3c61 2063 6c61 7373 3d22 d(soa\n+001a8820: 703c 2f61 3e29 3b20 3c2f 6469 763e 0a3c p);
      .<\n+001a8830: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001a8840: 3e20 207d 3c2f 6469 763e 0a3c 6469 7620 > }
      .
      }.
      soap\n+001a88d0: 5f64 6573 7472 6f79 3c2f 613e 283c 6120 _destroy(soap); <\n+001a8910: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.

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

      .\n+001a8ae0: 0a48 6f77 2074 6f20 6372 6561 7465 2044 .How to create D\n+001a8af0: 4c4c 733c 2f68 323e 0a3c 703e f09f 949d LLs

      .

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

      .<\n+001a8b30: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.Creating \n+001a8b60: 7468 6520 6261 7365 2073 7464 736f 6170 the base stdsoap\n+001a8b70: 322e 646c 6c3c 2f68 333e 0a3c 703e 5468 2.dll.

      Th\n+001a8b80: 6520 656e 6769 6e65 2064 6f65 7320 6e6f e engine does no\n+001a8b90: 7420 6465 6669 6e65 2053 4f41 5020 4865 t define SOAP He\n+001a8ba0: 6164 6572 2061 6e64 2046 6175 6c74 2073 ader and Fault s\n+001a8bb0: 6572 6961 6c69 7a65 7273 2074 6861 7420 erializers that \n+001a8bc0: 7468 6520 656e 6769 6e65 206e 6565 6473 the engine needs\n+001a8bd0: 2077 6865 6e20 696e 7374 616c 6c65 6420 when installed \n+001a8be0: 6173 2061 206c 6962 7261 7279 2e20 5765 as a library. We\n+001a8bf0: 2074 6865 7265 666f 7265 2061 6464 2053 therefore add S\n+001a8c00: 4f41 5020 4865 6164 6572 2061 6e64 2046 OAP Header and F\n+001a8c10: 6175 6c74 2073 6572 6961 6c69 7a65 7273 ault serializers\n+001a8c20: 2c20 7768 6963 6820 6172 6520 636f 6d70 , which are comp\n+001a8c30: 696c 6564 2073 6570 6172 6174 656c 7920 iled separately \n+001a8c40: 6173 2066 6f6c 6c6f 7773 2e20 4669 7273 as follows. Firs\n+001a8c50: 742c 2063 7265 6174 6520 6120 6e65 7720 t, create a new \n+001a8c60: 6865 6164 6572 2066 696c 6520 3c65 6d3e header file \n+001a8c70: 3c63 6f64 653e 656e 762e 683c 2f63 6f64 env.h with the\n+001a8c90: 2053 4f41 5020 4865 6164 6572 203c 636f SOAP Header SO\n+001a8d00: 4150 5f45 4e56 5f5f 4865 6164 6572 3c2f AP_ENV__Header and SO\n+001a8d20: 4150 2046 6175 6c74 203c 636f 6465 3e3c AP Fault <\n+001a8d30: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001a8d40: 663d 2273 7472 7563 745f 735f 6f5f 615f f=\"struct_s_o_a_\n+001a8d50: 705f 5f5f 655f 6e5f 765f 5f5f 5f5f 6661 p___e_n_v_____fa\n+001a8d60: 756c 742e 6874 6d6c 2220 7469 746c 653d ult.html\" title=\n+001a8d70: 2253 4f41 5020 4661 756c 7420 7374 7275 \"SOAP Fault stru\n+001a8d80: 6374 7572 652e 223e 534f 4150 5f45 4e56 cture.\">SOAP_ENV\n+001a8d90: 5f5f 4661 756c 743c 2f61 3e3c 2f63 6f64 __Fault structures, i\n+001a8db0: 6e63 6c75 6469 6e67 203c 636f 6465 3e3c ncluding <\n+001a8dc0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001a8dd0: 663d 2273 7472 7563 745f 735f 6f5f 615f f=\"struct_s_o_a_\n+001a8de0: 705f 5f5f 655f 6e5f 765f 5f5f 5f5f 6465 p___e_n_v_____de\n+001a8df0: 7461 696c 2e68 746d 6c22 2074 6974 6c65 tail.html\" title\n+001a8e00: 3d22 534f 4150 2046 6175 6c74 2044 6574 =\"SOAP Fault Det\n+001a8e10: 6169 6c20 7374 7275 6374 7572 652e 223e ail structure.\">\n+001a8e20: 534f 4150 5f45 4e56 5f5f 4465 7461 696c SOAP_ENV__Detail\n+001a8e30: 3c2f 613e 3c2f 636f 6465 3e20 6966 2074 if t\n+001a8e40: 6869 7320 7374 7275 6374 7572 6520 636f his structure co\n+001a8e50: 6e74 6169 6e73 206d 656d 6265 7273 2074 ntains members t\n+001a8e60: 6861 7420 6172 6520 7365 7269 616c 697a hat are serializ\n+001a8e70: 6564 2061 7320 6661 756c 7420 6465 7461 ed as fault deta\n+001a8e80: 696c 732e 2059 6f75 2063 616e 206c 6561 ils. You can lea\n+001a8e90: 7665 2074 6869 7320 6865 6164 6572 2066 ve this header f\n+001a8ea0: 696c 6520 656d 7074 7920 6966 2079 6f75 ile empty if you\n+001a8eb0: 2077 616e 7420 746f 2075 7365 2074 6865 want to use the\n+001a8ec0: 2064 6566 6175 6c74 2053 4f41 5020 4865 default SOAP He\n+001a8ed0: 6164 6572 2061 6e64 2046 6175 6c74 2e20 ader and Fault. \n+001a8ee0: 486f 7765 7665 722c 2069 6620 534f 4150 However, if SOAP\n+001a8ef0: 2048 6561 6465 7273 2061 7265 2072 6571 Headers are req\n+001a8f00: 7569 7265 6420 7468 656e 2079 6f75 2063 uired then you c\n+001a8f10: 616e 6e6f 7420 6c65 6176 6520 7468 6520 annot leave the \n+001a8f20: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 SOAP_ENV__Heade\n+001a8f90: 723c 2f61 3e3c 2f63 6f64 653e 2073 7472 r str\n+001a8fa0: 7563 7475 7265 2065 6d70 7479 2e20 466f ucture empty. Fo\n+001a8fb0: 7220 6578 616d 706c 652c 2074 6865 2057 r example, the W\n+001a8fc0: 532d 4164 6472 6573 7369 6e67 2061 6e64 S-Addressing and\n+001a8fd0: 2057 532d 5365 6375 7269 7479 2070 6c75 WS-Security plu\n+001a8fe0: 6769 6e73 2072 6571 7569 7265 2053 4f41 gins require SOA\n+001a8ff0: 5020 4865 6164 6572 7320 7768 6963 6820 P Headers which \n+001a9000: 6361 6e20 6265 2069 6d70 6f72 7465 6420 can be imported \n+001a9010: 6279 2061 6464 696e 6720 3c63 6f64 653e by adding \n+001a9020: 2369 6d70 6f72 7420 2277 7361 352e 6822 #import \"wsa5.h\"\n+001a9030: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and #import \"wsse.\n+001a9050: 6822 3c2f 636f 6465 3e2c 2072 6573 7065 h\", respe\n+001a9060: 6374 6976 656c 7920 746f 203c 656d 3e3c ctively to <\n+001a9070: 636f 6465 3e65 6e76 2e68 3c2f 636f 6465 code>env.h. Then com\n+001a9090: 7069 6c65 2074 6869 7320 6865 6164 6572 pile this header\n+001a90a0: 2066 696c 6520 7769 7468 3a20 3c2f 703e file with:

      \n+001a90b0: 3c70 7265 2063 6c61 7373 3d22 6672 6167
       soapcpp2 \n+001a90d0: 2d70 656e 7620 656e 762e 680a 3c2f 7072  -penv env.h.

      The genera\n+001a90f0: 7465 6420 3c65 6d3e 3c63 6f64 653e 656e ted en\n+001a9100: 7643 2e63 7070 3c2f 636f 6465 3e3c 2f65 vC.cpp file holds th\n+001a9120: 6520 534f 4150 2048 6561 6465 7220 616e e SOAP Header an\n+001a9130: 6420 4661 756c 7420 7365 7269 616c 697a d Fault serializ\n+001a9140: 6572 732e 2057 6520 6361 6e20 6569 7468 ers. We can eith\n+001a9150: 6572 2063 7265 6174 6520 6120 7365 7061 er create a sepa\n+001a9160: 7261 7465 203c 656d 3e3c 636f 6465 3e65 rate e\n+001a9170: 6e76 432e 646c 6c3c 2f63 6f64 653e 3c2f nvC.dll DLL for this\n+001a9190: 2074 6861 7420 616c 6c20 636c 6965 6e74 that all client\n+001a91a0: 7320 616e 6420 7365 7276 6963 6520 6170 s and service ap\n+001a91b0: 706c 6963 6174 696f 6e73 2077 696c 6c20 plications will \n+001a91c0: 7573 652c 206f 7220 636f 6d62 696e 6520 use, or combine \n+001a91d0: 3c65 6d3e 3c63 6f64 653e 656e 7643 2e63 envC.c\n+001a91e0: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2077 pp w\n+001a91f0: 6974 6820 7468 6520 3c65 6d3e 3c63 6f64 ith the stdsoap2.dll we cr\n+001a9220: 6561 7465 2c20 7768 6963 6820 7765 2077 eate, which we w\n+001a9230: 696c 6c20 6578 706c 6169 6e20 6675 7274 ill explain furt\n+001a9240: 6865 722e 3c2f 703e 0a3c 703e 5468 6520 her.

      .

      The \n+001a9250: 6e65 7874 2073 7465 7020 6973 2074 6f20 next step is to \n+001a9260: 6372 6561 7465 203c 656d 3e3c 636f 6465 create stdsoap2.dll which \n+001a9290: 636f 6e73 6973 7473 206f 6620 7468 6520 consists of the \n+001a92a0: 6669 6c65 203c 656d 3e3c 636f 6465 3e67 file g\n+001a92b0: 736f 6170 2f73 7464 736f 6170 322e 6370 soap/stdsoap2.cp\n+001a92c0: 703c 2f63 6f64 653e 3c2f 656d 3e20 616e p an\n+001a92d0: 6420 3c65 6d3e 3c63 6f64 653e 656e 7643 d envC\n+001a92e0: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp\n+001a92f0: 2061 6e64 206f 7074 696f 6e61 6c6c 7920 and optionally \n+001a9300: 7468 6520 706c 7567 696e 7320 796f 7520 the plugins you \n+001a9310: 7761 6e74 2074 6f20 7573 6520 7375 6368 want to use such\n+001a9320: 2061 7320 3c65 6d3e 3c63 6f64 653e 7773 as ws\n+001a9330: 7365 6170 692e 6370 703c 2f63 6f64 653e seapi.cpp\n+001a9340: 3c2f 656d 3e20 2877 6520 6e65 6564 2074 (we need t\n+001a9350: 6f20 7265 6e61 6d65 2061 6c6c 203c 656d o rename all .c\n+001a9370: 3c2f 656d 3e20 6669 6c65 7320 746f 203c files to <\n+001a9380: 656d 3e3c 636f 6465 3e2e 6370 703c 2f63 em>.cpp files \n+001a93a0: 746f 2061 766f 6964 2069 7373 7565 7320 to avoid issues \n+001a93b0: 7769 7468 204d 5356 432b 2b29 2e20 5468 with MSVC++). Th\n+001a93c0: 6973 2044 4c4c 2063 6f6e 7461 696e 7320 is DLL contains \n+001a93d0: 616c 6c20 636f 6d6d 6f6e 2066 756e 6374 all common funct\n+001a93e0: 696f 6e73 206e 6565 6465 6420 666f 7220 ions needed for \n+001a93f0: 616c 6c20 6f74 6865 7220 636c 6965 6e74 all other client\n+001a9400: 7320 616e 6420 7365 7276 6572 7320 6261 s and servers ba\n+001a9410: 7365 6420 6f6e 2067 534f 4150 2e20 436f sed on gSOAP. Co\n+001a9420: 6d70 696c 6520 3c65 6d3e 3c63 6f64 653e mpile \n+001a9430: 656e 7643 2e63 7070 3c2f 636f 6465 3e3c envC.cpp<\n+001a9440: 2f65 6d3e 2061 6e64 203c 656d 3e3c 636f /em> and gsoap/stdsoap\n+001a9460: 322e 6370 703c 2f63 6f64 653e 3c2f 656d 2.cpp into stdsoap2.dll using \n+001a94a0: 7468 6520 636f 6d70 696c 6572 206f 7074 the compiler opt\n+001a94b0: 696f 6e20 3c63 6f64 653e 2f44 3c2f 636f ion /D #WITH_\n+001a94d0: 4e4f 4e41 4d45 5350 4143 4553 3c2f 636f NONAMESPACES and the MSVC\n+001a94f0: 2050 7265 2d50 726f 6365 7373 6f72 2064 Pre-Processor d\n+001a9500: 6566 696e 6974 696f 6e73 203c 636f 6465 efinitions SOAP_FMAC1=__de\n+001a9520: 636c 7370 6563 2864 6c6c 6578 706f 7274 clspec(dllexport\n+001a9530: 293c 2f63 6f64 653e 2c20 3c63 6f64 653e ), \n+001a9540: 534f 4150 5f46 4d41 4333 3d5f 5f64 6563 SOAP_FMAC3=__dec\n+001a9550: 6c73 7065 6328 646c 6c65 7870 6f72 7429 lspec(dllexport)\n+001a9560: 3c2f 636f 6465 3e2c 2061 6e64 2074 6865 , and the\n+001a9570: 203c 636f 6465 3e23 534f 4150 5f53 5444 #SOAP_STD\n+001a9580: 5f45 5850 4f52 5453 3c2f 636f 6465 3e20 _EXPORTS \n+001a9590: 6d61 6372 6f20 7365 7420 6173 2073 686f macro set as sho\n+001a95a0: 776e 2062 656c 6f77 2066 726f 6d20 7468 wn below from th\n+001a95b0: 6520 4d53 5643 2063 6f6d 6d61 6e64 2070 e MSVC command p\n+001a95c0: 726f 6d70 743a 203c 2f70 3e3c 7072 6520 rompt:

      C:> cl /c /I\n+001a95f0: 2e20 2f45 4873 6320 2f44 5749 5448 5f4e  . /EHsc /DWITH_N\n+001a9600: 4f4e 414d 4553 5041 4345 5320 2f44 534f  ONAMESPACES /DSO\n+001a9610: 4150 5f46 4d41 4331 3d5f 5f64 6563 6c73  AP_FMAC1=__decls\n+001a9620: 7065 6328 646c 6c65 7870 6f72 7429 202f  pec(dllexport) /\n+001a9630: 4453 4f41 505f 464d 4143 333d 5f5f 6465  DSOAP_FMAC3=__de\n+001a9640: 636c 7370 6563 2864 6c6c 6578 706f 7274  clspec(dllexport\n+001a9650: 2920 2f44 534f 4150 5f53 5444 5f45 5850  ) /DSOAP_STD_EXP\n+001a9660: 4f52 5453 2065 6e76 432e 6370 7020 7374  ORTS envC.cpp st\n+001a9670: 6473 6f61 7032 2e63 7070 0a43 3a26 6774  dsoap2.cpp.C:>\n+001a9680: 3b20 6c69 6e6b 202f 4c49 4250 4154 4820  ; link /LIBPATH \n+001a9690: 7773 325f 3332 2e6c 6962 202f 4f55 543a  ws2_32.lib /OUT:\n+001a96a0: 6d79 6773 6f61 702e 646c 6c20 2f44 4c4c  mygsoap.dll /DLL\n+001a96b0: 2065 6e76 432e 6f62 6a20 7374 6473 6f61   envC.obj stdsoa\n+001a96c0: 7032 2e6f 626a 0a3c 2f70 7265 3e3c 703e  p2.obj.

      \n+001a96d0: 204e 6f74 653a 2061 7320 6f66 2067 534f Note: as of gSO\n+001a96e0: 4150 2032 2e38 2e33 3020 616e 6420 6c61 AP 2.8.30 and la\n+001a96f0: 7465 722c 2074 6865 2044 4c4c 2065 7870 ter, the DLL exp\n+001a9700: 6f72 7420 6d61 6372 6f73 2073 686f 776e ort macros shown\n+001a9710: 2068 6572 6520 6172 6520 616c 6c20 7365 here are all se\n+001a9720: 7420 7769 7468 206f 6e65 2070 7265 2d70 t with one pre-p\n+001a9730: 726f 6365 7373 6f72 2064 6566 696e 6974 rocessor definit\n+001a9740: 696f 6e20 3c63 6f64 653e 2353 4f41 505f ion #SOAP_\n+001a9750: 5354 445f 4558 504f 5254 533c 2f63 6f64 STD_EXPORTS.

      .

      Alter\n+001a9770: 6e61 7469 7665 6c79 2c20 796f 7520 6361 natively, you ca\n+001a9780: 6e20 636f 6d70 696c 6520 7769 7468 203c n compile with <\n+001a9790: 636f 6465 3e2f 443c 2f63 6f64 653e 203c code>/D <\n+001a97a0: 636f 6465 3e23 5749 5448 5f53 4f41 5044 code>#WITH_SOAPD\n+001a97b0: 4546 535f 483c 2f63 6f64 653e 2061 6e64 EFS_H and\n+001a97c0: 2070 7574 2074 6865 206d 6163 726f 2064 put the macro d\n+001a97d0: 6566 696e 6974 696f 6e73 2069 6e20 3c65 efinitions in soapdefs\n+001a97f0: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2e20 .h. \n+001a9800: 5468 6973 2065 7870 6f72 7473 2061 6c6c This exports all\n+001a9810: 2066 756e 6374 696f 6e73 2077 6869 6368 functions which\n+001a9820: 2061 7265 2070 7265 6365 6465 6420 6279 are preceded by\n+001a9830: 2074 6865 206d 6163 726f 203c 636f 6465 the macro #SOAP_FMAC1 in the <\n+001a9860: 636f 6465 3e73 6f61 7063 7070 322e 6370 code>soapcpp2.cp\n+001a9870: 703c 2f63 6f64 653e 3c2f 656d 3e20 736f p so\n+001a9880: 7572 6365 2066 696c 6520 616e 6420 6d61 urce file and ma\n+001a9890: 6372 6f20 3c63 6f64 653e 2353 4f41 505f cro #SOAP_\n+001a98a0: 464d 4143 333c 2f63 6f64 653e 2069 6e20 FMAC3 in \n+001a98b0: 7468 6520 3c65 6d3e 3c63 6f64 653e 656e the en\n+001a98c0: 7643 2e63 7070 3c2f 636f 6465 3e3c 2f65 vC.cpp source file.<\n+001a98e0: 2f70 3e0a 3c70 3e46 696e 616c 6c79 2c20 /p>.

      Finally, \n+001a98f0: 6e6f 7465 2074 6861 7420 7468 6520 6753 note that the gS\n+001a9900: 4f41 5020 736f 7572 6365 2063 6f64 6520 OAP source code \n+001a9910: 7061 636b 6167 6520 636f 6e74 6169 6e73 package contains\n+001a9920: 2061 206c 6f74 206f 6620 3c65 6d3e 3c63 a lot of .c source code f\n+001a9950: 696c 6573 2e20 4d69 7869 6e67 2043 2077 iles. Mixing C w\n+001a9960: 6974 6820 432b 2b20 6669 6c65 7320 6973 ith C++ files is\n+001a9970: 206e 6f74 2072 6563 6f6d 6d65 6e64 6564 not recommended\n+001a9980: 2077 6974 6820 5669 7375 616c 2053 7475 with Visual Stu\n+001a9990: 6469 6f20 616e 6420 7769 6c6c 206c 6561 dio and will lea\n+001a99a0: 6420 746f 2072 756e 2d74 696d 6520 6572 d to run-time er\n+001a99b0: 726f 7273 2077 6865 6e20 6275 696c 6469 rors when buildi\n+001a99c0: 6e67 2044 4c4c 732e 2054 6865 7265 666f ng DLLs. Therefo\n+001a99d0: 7265 2c20 616c 7761 7973 2072 656e 616d re, always renam\n+001a99e0: 6520 3c65 6d3e 3c63 6f64 653e 2e63 3c2f e .c sourc\n+001a9a00: 6520 636f 6465 2066 696c 6573 2074 6f20 e code files to \n+001a9a10: 3c65 6d3e 3c63 6f64 653e 2e63 7070 3c2f .cpp sourc\n+001a9a30: 6520 636f 6465 2066 696c 6573 2077 6865 e code files whe\n+001a9a40: 6e20 6372 6561 7469 6e67 2044 4c4c 732e n creating DLLs.\n+001a9a50: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

      .

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

      .

      <\n+001a9a90: 6120 636c 6173 733d 2261 6e63 686f 7222 a class=\"anchor\"\n+001a9aa0: 2069 643d 2263 6c69 656e 7473 6572 7665 id=\"clientserve\n+001a9ab0: 7264 6c6c 223e 3c2f 613e 0a43 7265 6174 rdll\">.Creat\n+001a9ac0: 696e 6720 636c 6965 6e74 2061 6e64 2073 ing client and s\n+001a9ad0: 6572 7665 7220 444c 4c73 3c2f 6833 3e0a erver DLLs

      .\n+001a9ae0: 3c70 3e43 6f6d 7069 6c65 2074 6865 203c

      Compile the <\n+001a9af0: 656d 3e3c 636f 6465 3e73 6f61 7043 6c69 em>soapCli\n+001a9b00: 656e 744c 6962 2e63 7070 3c2f 636f 6465 entLib.cpp and <\n+001a9b20: 636f 6465 3e73 6f61 7053 6572 7665 724c code>soapServerL\n+001a9b30: 6962 2e63 7070 3c2f 636f 6465 3e3c 2f65 ib.cpp sources as DL\n+001a9b50: 4c73 2062 7920 7573 696e 6720 7468 6520 Ls by using the \n+001a9b60: 4d53 5643 2050 7265 2d50 726f 6365 7373 MSVC Pre-Process\n+001a9b70: 6f72 2064 6566 696e 6974 696f 6e73 203c or definitions <\n+001a9b80: 636f 6465 3e53 4f41 505f 464d 4143 353d code>SOAP_FMAC5=\n+001a9b90: 5f5f 6465 636c 7370 6563 2864 6c6c 6578 __declspec(dllex\n+001a9ba0: 706f 7274 293c 2f63 6f64 653e 2061 6e64 port) and\n+001a9bb0: 203c 636f 6465 3e53 4f41 505f 434d 4143 SOAP_CMAC\n+001a9bc0: 3d5f 5f64 6563 6c73 7065 6328 646c 6c65 =__declspec(dlle\n+001a9bd0: 7870 6f72 7429 3c2f 636f 6465 3e2c 2061 xport), a\n+001a9be0: 6e64 2062 7920 7573 696e 6720 7468 6520 nd by using the \n+001a9bf0: 432b 2b20 636f 6d70 696c 6572 206f 7074 C++ compiler opt\n+001a9c00: 696f 6e20 3c63 6f64 653e 2f44 3c2f 636f ion /D #WITH_\n+001a9c20: 4e4f 4e41 4d45 5350 4143 4553 3c2f 636f NONAMESPACES. All of thes\n+001a9c40: 6520 6d61 6372 6f73 2061 7265 2073 6574 e macros are set\n+001a9c50: 2061 7320 6120 7368 6f72 7468 616e 6420 as a shorthand \n+001a9c60: 7769 7468 206f 6e65 2070 7265 2d70 726f with one pre-pro\n+001a9c70: 6365 7373 6f72 2064 6566 696e 6974 696f cessor definitio\n+001a9c80: 6e20 3c63 6f64 653e 2353 4f41 505f 5354 n #SOAP_ST\n+001a9c90: 445f 4558 504f 5254 533c 2f63 6f64 653e D_EXPORTS\n+001a9ca0: 2028 7265 7175 6972 6573 2067 534f 4150 (requires gSOAP\n+001a9cb0: 2032 2e38 2e33 3020 6f72 206c 6174 6572 2.8.30 or later\n+001a9cc0: 292e 3c2f 703e 0a3c 703e 5468 6973 2044 ).

      .

      This D\n+001a9cd0: 4c4c 206c 696e 6b73 2074 6f20 3c65 6d3e LL links to \n+001a9ce0: 3c63 6f64 653e 7374 6473 6f61 7032 2e64 stdsoap2.d\n+001a9cf0: 6c6c 3c2f 636f 6465 3e3c 2f65 6d3e 2077 ll w\n+001a9d00: 6520 6372 6561 7465 6420 696e 2053 6563 e created in Sec\n+001a9d10: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion Cre\n+001a9d40: 6174 696e 6720 7468 6520 6261 7365 2073 ating the base s\n+001a9d50: 7464 736f 6170 322e 646c 6c3c 2f61 3e2e tdsoap2.dll.\n+001a9d60: 3c2f 703e 0a3c 703e 546f 2063 7265 6174

      .

      To creat\n+001a9d70: 6520 6d75 6c74 6970 6c65 2044 4c4c 7320 e multiple DLLs \n+001a9d80: 696e 2074 6865 2073 616d 6520 7072 6f6a in the same proj\n+001a9d90: 6563 7420 6469 7265 6374 6f72 792c 2079 ect directory, y\n+001a9da0: 6f75 2073 686f 756c 6420 7573 6520 3c62 ou should use soapcpp2 \n+001a9dc0: 2d70 206e 616d 653c 2f63 6f64 653e 3c2f -p name option -p name to rename \n+001a9e00: 7468 6520 6765 6e65 7261 7465 6420 3c65 the generated soapClie\n+001a9e20: 6e74 4c69 622e 6370 703c 2f63 6f64 653e ntLib.cpp\n+001a9e30: 3c2f 656d 3e20 616e 6420 3c65 6d3e 3c63 and soapServerLi\n+001a9e50: 622e 6370 703c 2f63 6f64 653e 3c2f 656d b.cpp (and associate\n+001a9e70: 6429 2066 696c 6573 2e20 5468 6520 3c62 d) files. The -p name option\n+001a9ea0: 2073 7065 6369 6669 6573 2061 203c 656d specifies a name prefix t\n+001a9ed0: 6f20 7265 706c 6163 6520 7468 6520 3c65 o replace the soap file na\n+001a9f00: 6d65 2070 7265 6669 782e 2041 6e6f 7468 me prefix. Anoth\n+001a9f10: 6572 2077 6179 2069 7320 746f 2075 7365 er way is to use\n+001a9f20: 2043 2b2b 206e 616d 6573 7061 6365 7320 C++ namespaces \n+001a9f30: 7769 7468 203c 623e 3c63 6f64 653e 736f with so\n+001a9f40: 6170 6370 7032 202d 7120 6e61 6d65 3c2f apcpp2 -q name option\n+001a9f60: 203c 623e 3c63 6f64 653e 2d71 206e 616d -q nam\n+001a9f70: 653c 2f63 6f64 653e 3c2f 623e 2c20 6966 e, if\n+001a9f80: 2074 6865 2069 6e74 6572 6661 6365 2068 the interface h\n+001a9f90: 6561 6465 7220 6669 6c65 2069 6e70 7574 eader file input\n+001a9fa0: 2074 6f20 736f 6170 6370 7032 2064 6f65 to soapcpp2 doe\n+001a9fb0: 7320 6e6f 7420 616c 7265 6164 7920 6465 s not already de\n+001a9fc0: 636c 6172 6520 6120 432b 2b20 6e61 6d65 clare a C++ name\n+001a9fd0: 7370 6163 652e 2041 2063 6c65 616e 2073 space. A clean s\n+001a9fe0: 6570 6172 6174 696f 6e20 6f66 206c 6962 eparation of lib\n+001a9ff0: 7261 7269 6573 2063 616e 2061 6c73 6f20 raries can also \n+001aa000: 6265 2061 6368 6965 7665 6420 7769 7468 be achieved with\n+001aa010: 2043 2b2b 206e 616d 6573 7061 6365 732c C++ namespaces,\n+001aa020: 2073 6565 2053 6563 7469 6f6e 203c 6120 see Section How t\n+001aa060: 6f20 6275 696c 6420 6120 636c 6965 6e74 o build a client\n+001aa070: 206f 7220 7365 7276 6572 2069 6e20 6120 or server in a \n+001aa080: 432b 2b20 636f 6465 206e 616d 6573 7061 C++ code namespa\n+001aa090: 6365 3c2f 613e 202e 3c2f 703e 0a3c 703e ce .

      .

      \n+001aa0a0: 556e 6c65 7373 2079 6f75 2075 7365 2074 Unless you use t\n+001aa0b0: 6865 2063 6c69 656e 7420 7072 6f78 7920 he client proxy \n+001aa0c0: 616e 6420 7365 7276 6572 206f 626a 6563 and server objec\n+001aa0d0: 7420 636c 6173 7365 7320 283c 656d 3e3c t classes (<\n+001aa0e0: 636f 6465 3e73 6f61 7058 595a 5072 6f78 code>soapXYZProx\n+001aa0f0: 792e 683c 2f63 6f64 653e 3c2f 656d 3e20 y.h \n+001aa100: 616e 6420 3c65 6d3e 3c63 6f64 653e 736f and so\n+001aa110: 6170 5859 5a53 6572 7669 6365 2e68 3c2f apXYZService.h), all\n+001aa130: 2063 6c69 656e 7420 616e 6420 7365 7276 client and serv\n+001aa140: 6572 2061 7070 6c69 6361 7469 6f6e 7320 er applications \n+001aa150: 6d75 7374 2065 7870 6c69 6369 746c 7920 must explicitly \n+001aa160: 7365 7420 7468 6520 6e61 6d65 7370 6163 set the namespac\n+001aa170: 6573 2076 616c 7565 206f 6620 7468 6520 es value of the \n+001aa180: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context with:<\n+001aa1f0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

      \n+001aa330: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

      The \n+001aae90: 3c65 6d3e 3c63 6f64 653e 6d6f 6475 6c65 module\n+001aaea0: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2064 .h d\n+001aaeb0: 6174 6120 6269 6e64 696e 6720 696e 7465 ata binding inte\n+001aaec0: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil\n+001aaed0: 6520 666f 7220 736f 6170 6370 7032 2064 e for soapcpp2 d\n+001aaee0: 6563 6c61 7265 7320 6d6f 6475 6c65 2d73 eclares module-s\n+001aaef0: 7065 6369 6669 6320 7365 7269 616c 697a pecific serializ\n+001aaf00: 6162 6c65 2074 7970 6573 203c 636f 6465 able types LONG64, \n+001aaf20: 3c63 6f64 653e 7873 645f 5f6c 6f6e 673c xsd__long<\n+001aaf30: 2f63 6f64 653e 2c20 3c63 6f64 653e 6368 /code>, ch\n+001aaf40: 6172 2a3c 2f63 6f64 653e 2c20 616e 6420 ar*, and \n+001aaf50: 6120 3c63 6f64 653e 7374 7275 6374 206e a struct n\n+001aaf60: 735f 5f53 3c2f 636f 6465 3e2e 2054 6865 s__S. The\n+001aaf70: 206d 6f64 756c 6520 6e61 6d65 2069 7320 module name is \n+001aaf80: 2274 6573 7422 2c20 736f 2074 6865 2073 \"test\", so the s\n+001aaf90: 6f61 7063 7070 3220 746f 6f6c 2070 726f oapcpp2 tool pro\n+001aafa0: 6475 6365 7320 6120 3c65 6d3e 3c63 6f64 duces a testC.cpp file wit\n+001aafd0: 6820 7468 6520 584d 4c20 7365 7269 616c h the XML serial\n+001aafe0: 697a 6572 7320 666f 7220 7468 6573 6520 izers for these \n+001aaff0: 7479 7065 732e 2054 6865 203c 656d 3e3c types. The <\n+001ab000: 636f 6465 3e74 6573 7443 2e63 7070 3c2f code>testC.cpp data \n+001ab020: 6269 6e64 696e 6720 696d 706c 656d 656e binding implemen\n+001ab030: 7461 7469 6f6e 2073 6f75 7263 6520 636f tation source co\n+001ab040: 6465 2063 616e 2062 6520 7365 7061 7261 de can be separa\n+001ab050: 7465 6c79 2063 6f6d 7069 6c65 6420 616e tely compiled an\n+001ab060: 6420 6c69 6e6b 6564 2077 6974 6820 616e d linked with an\n+001ab070: 2061 7070 6c69 6361 7469 6f6e 2e20 4966 application. If\n+001ab080: 2073 6572 7669 6365 206f 7065 7261 7469 service operati\n+001ab090: 6f6e 7320 6172 6520 6465 636c 6172 6564 ons are declared\n+001ab0a0: 2069 6e20 7468 6520 696e 7465 7266 6163 in the interfac\n+001ab0b0: 6520 6865 6164 6572 2066 696c 6520 6173 e header file as\n+001ab0c0: 2066 756e 6374 696f 6e20 7072 6f74 6f74 function protot\n+001ab0d0: 7970 6573 2c20 7765 2061 6c73 6f20 6765 ypes, we also ge\n+001ab0e0: 7420 3c65 6d3e 3c63 6f64 653e 7465 7374 t test\n+001ab0f0: 436c 6965 6e74 2e63 7070 3c2f 636f 6465 Client.cpp client st\n+001ab110: 7562 2066 756e 6374 696f 6e73 2061 6e64 ub functions and\n+001ab120: 203c 656d 3e3c 636f 6465 3e74 6573 7453 testS\n+001ab130: 6572 7665 722e 6370 703c 2f63 6f64 653e erver.cpp\n+001ab140: 3c2f 656d 3e20 7365 7276 6572 2073 6b65 server ske\n+001ab150: 6c65 746f 6e20 6675 6e63 7469 6f6e 732e leton functions.\n+001ab160: 3c2f 703e 0a3c 703e 5468 6572 6520 6172

      .

      There ar\n+001ab170: 6520 736f 6d65 206c 696d 6974 6174 696f e some limitatio\n+001ab180: 6e73 2066 6f72 206d 6f64 756c 6520 696d ns for module im\n+001ab190: 706f 7274 733a 3c2f 703e 0a3c 756c 3e0a ports:

      .
        .\n+001ab1a0: 3c6c 693e 4120 6d6f 6475 6c65 206d 7573
      • A module mus\n+001ab1b0: 7420 6265 2069 6d70 6f72 7465 6420 696e t be imported in\n+001ab1c0: 746f 2061 6e6f 7468 6572 2069 6e74 6572 to another inter\n+001ab1d0: 6661 6365 2068 6561 6465 7220 746f 2075 face header to u\n+001ab1e0: 7365 2074 6865 206d 6f64 756c 6527 7320 se the module's \n+001ab1f0: 7479 7065 2064 6566 696e 6974 696f 6e73 type definitions\n+001ab200: 2e3c 2f6c 693e 0a3c 6c69 3e57 6865 6e20 .
      • .
      • When \n+001ab210: 6d75 6c74 6970 6c65 206d 6f64 756c 6573 multiple modules\n+001ab220: 2061 7265 2069 6d70 6f72 7465 642c 2074 are imported, t\n+001ab230: 6865 2074 7970 6573 2074 6861 7420 7468 he types that th\n+001ab240: 6579 2064 6563 6c61 7265 206d 7573 7420 ey declare must \n+001ab250: 6265 2064 6563 6c61 7265 6420 696e 206f be declared in o\n+001ab260: 6e65 206d 6f64 756c 6520 6f6e 6c79 2074 ne module only t\n+001ab270: 6f20 6176 6f69 6420 6e61 6d65 2063 6c61 o avoid name cla\n+001ab280: 7368 6573 2061 6e64 206c 696e 6b20 6572 shes and link er\n+001ab290: 726f 7273 2e20 596f 7520 6361 6e6e 6f74 rors. You cannot\n+001ab2a0: 2063 7265 6174 6520 7477 6f20 6d6f 6475 create two modu\n+001ab2b0: 6c65 7320 7468 6174 2064 6563 6c61 7265 les that declare\n+001ab2c0: 206f 7220 7573 6520 7468 6520 7361 6d65 or use the same\n+001ab2d0: 2074 7970 6520 616e 6420 696d 706f 7274 type and import\n+001ab2e0: 2074 6865 7365 206d 6f64 756c 6573 2073 these modules s\n+001ab2f0: 6570 6172 6174 656c 7920 696e 746f 2061 eparately into a\n+001ab300: 6e6f 7468 6572 2068 6561 6465 7220 6669 nother header fi\n+001ab310: 6c65 2e20 5768 656e 2075 7369 6e67 206d le. When using m\n+001ab320: 6f64 756c 6573 2c20 636f 6e73 6964 6572 odules, consider\n+001ab330: 2063 7265 6174 696e 6720 6120 6d6f 6475 creating a modu\n+001ab340: 6c65 2068 6965 7261 7263 6879 2073 7563 le hierarchy suc\n+001ab350: 6820 7468 6174 2074 7970 6573 2061 7265 h that types are\n+001ab360: 2064 6563 6c61 7265 6420 6f6e 6c79 206f declared only o\n+001ab370: 6e63 6520 616e 6420 6279 206f 6e6c 7920 nce and by only \n+001ab380: 6f6e 6520 6d6f 6475 6c65 2077 6865 6e20 one module when \n+001ab390: 7468 6573 6520 6d6f 6475 6c65 7320 6d75 these modules mu\n+001ab3a0: 7374 2062 6520 6c69 6e6b 6564 2e3c 2f6c st be linked..
      .

      With\n+001ab3c0: 206d 6f64 756c 6573 2c20 7468 6520 736f modules, the so\n+001ab3d0: 7572 6365 2063 6f64 6520 7365 7269 616c urce code serial\n+001ab3e0: 697a 6572 7320 666f 7220 7468 6520 7479 izers for the ty\n+001ab3f0: 7065 7320 6465 6669 6e65 6420 696e 2074 pes defined in t\n+001ab400: 6865 206d 6f64 756c 6573 2061 7265 2067 he modules are g\n+001ab410: 656e 6572 6174 6564 2077 6974 6820 736f enerated with so\n+001ab420: 6170 6370 7032 2073 6570 6172 6174 656c apcpp2 separatel\n+001ab430: 792e 2046 6f72 2065 7861 6d70 6c65 2c20 y. For example, \n+001ab440: 6173 7375 6d65 2074 6861 7420 7765 2068 assume that we h\n+001ab450: 6176 6520 6120 6d6f 6475 6c65 203c 656d ave a module module.h<\n+001ab470: 2f63 6f64 653e 3c2f 656d 3e3a 3c2f 703e /code>:

      \n+001ab480: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
      /\n+001ab4c0: 2a20 436f 6e74 656e 7473 206f 6620 6669 * Contents of fi\n+001ab4d0: 6c65 2026 7175 6f74 3b6d 6f64 756c 652e le "module.\n+001ab4e0: 6826 7175 6f74 3b20 2a2f 3c2f 7370 616e h" */
      .
      #module &qu\n+001ab530: 6f74 3b74 6573 7426 7175 6f74 3b3c 2f73 ot;test"
      .
      .
      str\n+001ab590: 7563 7420 3c2f 7370 616e 3e6e 735f 5f53 uct ns__S\n+001ab5a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      {
      \n+001ab5c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      char *na\n+001ab600: 6d65 3b3c 2f64 6976 3e0a 3c64 6976 2063 me;
      .
      \n+001ab620: 3c73 7061 6e20 636c 6173 733d 226b 6579 int amount;.
      };
      .

      and a he\n+001ab690: 6164 6572 2066 696c 6520 3c65 6d3e 3c63 ader file example.h that u\n+001ab6c0: 7365 7320 6974 3a3c 2f70 3e0a 3c64 6976 ses it:

      .
      /* Con\n+001ab710: 7465 6e74 7320 6f66 2066 696c 6520 2671 tents of file &q\n+001ab720: 756f 743b 6578 616d 706c 652e 6826 7175 uot;example.h&qu\n+001ab730: 6f74 3b20 2a2f 3c2f 7370 616e 3e3c 2f64 ot; */.
      #import "m\n+001ab780: 6f64 756c 652e 6826 7175 6f74 3b3c 2f73 odule.h"
      .
      .
      int ns__\n+001ab7f0: 7765 626d 6574 686f 6428 3c73 7061 6e20 webmethod(\n+001ab810: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *code, \n+001ab860: 7374 7275 6374 3c2f 7370 616e 3e20 6e73 struct ns\n+001ab870: 5f5f 5320 2a72 6563 6f72 642c 203c 7370 __S *record, int *result); <\n+001ab8b0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

      \n+001ab8d0: 5468 6520 6d6f 6475 6c65 2069 7320 636f The module is co\n+001ab8e0: 6d70 696c 6564 2061 7320 666f 6c6c 6f77 mpiled as follow\n+001ab8f0: 733a 203c 2f70 3e3c 7072 6520 636c 6173 s:

      soa\n+001ab910: 7063 7070 3220 6d6f 6475 6c65 312e 680a  pcpp2 module1.h.\n+001ab920: 3c2f 7072 653e 3c70 3e20 5468 6973 2067  

      This g\n+001ab930: 656e 6572 6174 6573 2074 6865 2066 696c enerates the fil\n+001ab940: 6573 203c 656d 3e3c 636f 6465 3e74 6573 es tes\n+001ab950: 7453 7475 622e 683c 2f63 6f64 653e 3c2f tStub.h, t\n+001ab970: 6573 7448 2e68 3c2f 636f 6465 3e3c 2f65 estH.h, and testC.cpp with ser\n+001ab9b0: 6961 6c69 7a65 7273 2066 6f72 203c 636f ializers for struct ns__S<\n+001ab9d0: 2f63 6f64 653e 2062 7574 2061 6c73 6f20 /code> but also \n+001ab9e0: 666f 7220 3c63 6f64 653e 6368 6172 2a3c for char*<\n+001ab9f0: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and int.

      \n+001aba10: 0a3c 703e 5275 6e6e 696e 6720 736f 6170 .

      Running soap\n+001aba20: 6370 7032 206f 6e20 3c65 6d3e 3c63 6f64 cpp2 on example.h imports \n+001aba50: 7468 6520 6d6f 6475 6c65 2064 6566 696e the module defin\n+001aba60: 6974 696f 6e73 2c20 6275 7420 646f 6573 itions, but does\n+001aba70: 206e 6f74 2067 656e 6572 6174 6520 7365 not generate se\n+001aba80: 7269 616c 697a 6572 7320 666f 7220 3c63 rializers for struct ns__S\n+001abaa0: 3c2f 636f 6465 3e2c 203c 636f 6465 3e63 , c\n+001abab0: 6861 722a 3c2f 636f 6465 3e20 616e 6420 har* and \n+001abac0: 3c63 6f64 653e 696e 743c 2f63 6f64 653e int\n+001abad0: 2073 696e 6365 2074 6865 7365 2061 7265 since these are\n+001abae0: 2064 6566 696e 6564 2062 7920 3c65 6d3e defined by \n+001abaf0: 3c63 6f64 653e 6d6f 6475 6c65 2e68 3c2f module.h:

      \n+001abb10: 3c70 7265 2063 6c61 7373 3d22 6672 6167
      soapcpp2 -\n+001abb30: 434c 2065 7861 6d70 6c65 2e68 0a3c 2f70  CL example.h.

      An exampl\n+001abb50: 6520 636c 6965 6e74 2061 7070 6c69 6361 e client applica\n+001abb60: 7469 6f6e 2074 6861 7420 6361 6c6c 7320 tion that calls \n+001abb70: 7468 6520 636c 6965 6e74 2073 7475 6220 the client stub \n+001abb80: 6675 6e63 7469 6f6e 3a3c 2f70 3e0a 3c64 function:

      .
      #include "\n+001abbe0: 736f 6170 482e 6826 7175 6f74 3b3c 2f73 soapH.h"
      .
      #include\n+001abc30: 2026 7175 6f74 3b6e 732e 6e73 6d61 7026 "ns.nsmap&\n+001abc40: 7175 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 quot;.
      .<\n+001abc80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001abc90: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int main()
      \n+001abcb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      {
      .
      \n+001abdd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      struc\n+001abe00: 7420 3c2f 7370 616e 3e6e 735f 5f53 2073 t ns__S s\n+001abe10: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
      .
      soap\n+001abe30: 5f64 6566 6175 6c74 5f6e 735f 5f53 283c _default_ns__S(<\n+001abe40: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001abe50: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001abe60: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html\">soap, \n+001abe70: 2661 6d70 3b73 293b 3c2f 6469 763e 0a3c &s);
      .<\n+001abe80: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001abe90: 3e20 2073 2e6e 616d 6520 3d20 3c61 2063 > s.name = soap_strdup\n+001abf00: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001abf30: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n+001abf50: 756f 743b 6e61 6d65 2671 756f 743b 3c2f uot;name");
      .\n+001abf80: 2020 732e 616d 6f75 6e74 203d 2031 3234 s.amount = 124\n+001abf90: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
      .
      int\n+001abfd0: 206e 3b3c 2f64 6976 3e0a 3c64 6976 2063 n;
      .
      if (soap_call_ns_\n+001ac020: 5f77 6562 6d65 7468 6f64 283c 6120 636c _webmethod(soap, endp\n+001ac060: 6f69 6e74 2c20 4e55 4c4c 2c20 3c73 7061 oint, NULL, "co\n+001ac090: 6465 2671 756f 743b 3c2f 7370 616e 3e2c de",\n+001ac0a0: 2026 616d 703b 732c 2026 616d 703b 6e29 &s, &n)\n+001ac0b0: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
      .
      soap_print_faul\n+001ac130: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soa\n+001ac160: 703c 2f61 3e2c 2073 7464 6572 7229 3b3c p, stderr);<\n+001ac170: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      else<\n+001ac1b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      prin\n+001ac1d0: 7466 283c 7370 616e 2063 6c61 7373 3d22 tf(&\n+001ac1f0: 7175 6f74 3b4f 4b20 6e20 3d20 2564 5c6e quot;OK n = %d\\n\n+001ac200: 2671 756f 743b 3c2f 7370 616e 3e2c 206e ", n\n+001ac210: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
      ...
      soap_free(\n+001ac3f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+001ac420: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
      .
      }.

      We c\n+001ac460: 6f6d 7069 6c65 2074 6869 7320 6578 616d ompile this exam\n+001ac470: 706c 6520 6173 2066 6f6c 6c6f 7773 3a20 ple as follows: \n+001ac480: 3c2f 703e 3c70 7265 2063 6c61 7373 3d22

      c++ -o\n+001ac4a0: 2065 7861 6d70 6c65 2065 7861 6d70 6c65   example example\n+001ac4b0: 2e63 7070 2074 6573 7443 2e63 7070 2073  .cpp testC.cpp s\n+001ac4c0: 6f61 7043 2e63 7070 2073 6f61 7043 6c69  oapC.cpp soapCli\n+001ac4d0: 656e 742e 6370 7020 7374 6473 6f61 7032  ent.cpp stdsoap2\n+001ac4e0: 2e63 7070 0a3c 2f70 7265 3e3c 703e 204d  .cpp.

      M\n+001ac4f0: 6f64 756c 6573 206d 6179 2068 656c 7020 odules may help \n+001ac500: 746f 2064 6566 696e 6520 6120 6d6f 6475 to define a modu\n+001ac510: 6c61 7220 6869 6572 6172 6368 7920 6f66 lar hierarchy of\n+001ac520: 206c 6962 7261 7269 6573 2077 6974 6820 libraries with \n+001ac530: 7265 7573 6162 6c65 2073 6572 6961 6c69 reusable seriali\n+001ac540: 7a61 626c 6520 7479 7065 732e 3c2f 703e zable types.

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

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

      .

      .P\n+001ac5b0: 6c75 6769 6e73 2c20 6d6f 6475 6c65 732c lugins, modules,\n+001ac5c0: 2061 6e64 2065 7874 656e 7369 6f6e 733c and extensions<\n+001ac5d0: 2f68 323e 0a3c 703e 506c 7567 696e 7320 /h2>.

      Plugins \n+001ac5e0: 6f66 6665 7220 6120 636f 6e76 656e 6965 offer a convenie\n+001ac5f0: 6e74 2065 7874 656e 7369 6f6e 206d 6563 nt extension mec\n+001ac600: 6861 6e69 736d 2066 6f72 2074 6865 2067 hanism for the g\n+001ac610: 534f 4150 2074 6f6f 6c6b 6974 2062 7920 SOAP toolkit by \n+001ac620: 6578 7465 6e64 696e 6720 7468 6520 6361 extending the ca\n+001ac630: 7061 6269 6c69 7469 6573 206f 6620 6974 pabilities of it\n+001ac640: 7320 656e 6769 6e65 2e20 5768 656e 2074 s engine. When t\n+001ac650: 6865 2070 6c75 6769 6e20 7265 6769 7374 he plugin regist\n+001ac660: 6572 7320 7769 7468 2074 6865 2067 534f ers with the gSO\n+001ac670: 4150 2065 6e67 696e 652c 2069 7420 6861 AP engine, it ha\n+001ac680: 7320 6675 6c6c 2061 6363 6573 7320 746f s full access to\n+001ac690: 2074 6865 2072 756e 2d74 696d 6520 7365 the run-time se\n+001ac6a0: 7474 696e 6773 2061 6e64 2074 6865 2065 ttings and the e\n+001ac6b0: 6e67 696e 6527 7320 6675 6e63 7469 6f6e ngine's function\n+001ac6c0: 2063 616c 6c62 6163 6b73 2e20 5570 6f6e callbacks. Upon\n+001ac6d0: 2072 6567 6973 7472 792c 2074 6865 2070 registry, the p\n+001ac6e0: 6c75 6769 6e27 7320 6c6f 6361 6c20 6461 lugin's local da\n+001ac6f0: 7461 2069 7320 6173 736f 6369 6174 6564 ta is associated\n+001ac700: 2077 6974 6820 7468 6520 3c63 6f64 653e with the \n+001ac710: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap\n+001ac760: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont\n+001ac770: 6578 742e 2042 7920 6f76 6572 7269 6469 ext. By overridi\n+001ac780: 6e67 2074 6865 2063 616c 6c62 6163 6b73 ng the callbacks\n+001ac790: 2077 6974 6820 7468 6520 706c 7567 696e with the plugin\n+001ac7a0: 2773 2063 616c 6c62 6163 6b73 2c20 7468 's callbacks, th\n+001ac7b0: 6520 706c 7567 696e 2065 7874 656e 6473 e plugin extends\n+001ac7c0: 206f 7220 6d6f 6469 6669 6573 2074 6865 or modifies the\n+001ac7d0: 2065 6e67 696e 6527 7320 6361 7061 6269 engine's capabi\n+001ac7e0: 6c69 7469 6573 2e20 5468 6520 6c6f 6361 lities. The loca\n+001ac7f0: 6c20 706c 7567 696e 2064 6174 6120 6361 l plugin data ca\n+001ac800: 6e20 6265 2061 6363 6573 7365 6420 7468 n be accessed th\n+001ac810: 726f 7567 6820 6120 6c6f 6f6b 7570 2066 rough a lookup f\n+001ac820: 756e 6374 696f 6e2c 2075 7375 616c 6c79 unction, usually\n+001ac830: 2069 6e76 6f6b 6564 2077 6974 6869 6e20 invoked within \n+001ac840: 6120 6361 6c6c 6261 636b 2066 756e 6374 a callback funct\n+001ac850: 696f 6e20 746f 2061 6363 6573 7320 7468 ion to access th\n+001ac860: 6520 706c 7567 696e 2064 6174 612e 2054 e plugin data. T\n+001ac870: 6865 2072 6567 6973 7472 7920 616e 6420 he registry and \n+001ac880: 6c6f 6f6b 7570 2066 756e 6374 696f 6e73 lookup functions\n+001ac890: 2061 7265 3a3c 2f70 3e0a 3c64 6976 2063 are:

      .
      \n+001ac8b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
      <\n+001acb90: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n+001acba0: 726f 7570 5f5f 706c 7567 696e 2e68 746d roup__plugin.htm\n+001acbb0: 6c23 6761 3830 3061 3030 3563 6530 6630 l#ga800a005ce0f0\n+001acbc0: 3233 3634 3631 6431 6135 6462 6634 6265 236461d1a5dbf4be\n+001acbd0: 3261 3830 223e 736f 6170 5f72 6567 6973 2a80\">soap_regis\n+001acbe0: 7465 725f 706c 7567 696e 5f61 7267 3c2f ter_plugin_arg
      int \n+001acc10: 736f 6170 5f72 6567 6973 7465 725f 706c soap_register_pl\n+001acc20: 7567 696e 5f61 7267 2873 7472 7563 7420 ugin_arg(struct \n+001acc30: 736f 6170 202a 736f 6170 2c20 696e 7428 soap *soap, int(\n+001acc40: 2a66 6372 6561 7465 2928 7374 7275 6374 *fcreate)(struct\n+001acc50: 2073 6f61 7020 2a2c 2073 7472 7563 7420 soap *, struct \n+001acc60: 736f 6170 5f70 6c75 6769 6e20 2a2c 2076 soap_plugin *, v\n+001acc70: 6f69 6420 2a29 2c20 766f 6964 202a 6172 oid *), void *ar\n+001acc80: 6729 3c2f 6469 763e 3c64 6976 2063 6c61 g)
      Regis\n+001acca0: 7465 7220 6120 706c 7567 696e 2077 6974 ter a plugin wit\n+001accb0: 6820 616e 2061 7267 756d 656e 742e 3c2f h an argument.
      .

      The soap\n+001acec0: 5f63 6f70 793c 2f61 3e3c 2f63 6f64 653e _copy\n+001aced0: 2066 756e 6374 696f 6e20 7265 7475 726e function return\n+001acee0: 7320 6120 6e65 7720 6479 6e61 6d69 6361 s a new dynamica\n+001acef0: 6c6c 7920 616c 6c6f 6361 7465 6420 3c63 lly allocated \n+001acf50: 736f 6170 3c2f 613e 3c2f 636f 6465 3e20 soap \n+001acf60: 636f 6e74 6578 7420 7468 6174 2069 7320 context that is \n+001acf70: 6120 636f 7079 206f 6620 616e 6f74 6865 a copy of anothe\n+001acf80: 722c 2073 7563 6820 7468 6174 206e 6f20 r, such that no \n+001acf90: 6461 7461 2069 7320 7368 6172 6564 2062 data is shared b\n+001acfa0: 6574 7765 656e 2074 6865 2063 6f70 7920 etween the copy \n+001acfb0: 616e 6420 7468 6520 6f72 6967 696e 616c and the original\n+001acfc0: 2063 6f6e 7465 7874 2e20 5468 6520 3c63 context. The s\n+001ad080: 6f61 705f 636f 7079 3c2f 613e 3c2f 636f oap_copy function inv\n+001ad0a0: 6f6b 6573 2074 6865 2063 6f70 7920 6675 okes the copy fu\n+001ad0b0: 6e63 7469 6f6e 7320 6f66 2074 6865 2072 nctions of the r\n+001ad0c0: 6567 6973 7465 7265 6420 706c 7567 696e egistered plugin\n+001ad0d0: 7320 746f 2063 6f70 7920 7468 6520 706c s to copy the pl\n+001ad0e0: 7567 696e 7327 206c 6f63 616c 2064 6174 ugins' local dat\n+001ad0f0: 612e 2054 6865 203c 636f 6465 3e3c 6120 a. The soap_done and \n+001ad1e0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 \n+001ad280: 736f 6170 5f66 7265 653c 2f61 3e3c 2f63 soap_free functions d\n+001ad2a0: 652d 7265 6769 7374 6572 7320 616c 6c20 e-registers all \n+001ad2b0: 706c 7567 696e 2e3c 2f70 3e0a 3c70 3e54 plugin.

      .

      T\n+001ad2c0: 6865 2066 6f6c 6c6f 7720 6578 616d 706c he follow exampl\n+001ad2d0: 6520 6f76 6572 7269 6465 7320 7468 6520 e overrides the \n+001ad2e0: 7365 6e64 2061 6e64 2072 6563 6569 7665 send and receive\n+001ad2f0: 2063 616c 6c62 6163 6b73 2074 6f20 636f callbacks to co\n+001ad300: 7079 2061 6c6c 206d 6573 7361 6765 7320 py all messages \n+001ad310: 7468 6174 2061 7265 2073 656e 7420 616e that are sent an\n+001ad320: 6420 7265 6365 6976 6564 2074 6f20 7468 d received to th\n+001ad330: 6520 7465 726d 696e 616c 2028 7374 6465 e terminal (stde\n+001ad340: 7272 292e 3c2f 703e 0a3c 703e 4669 7273 rr).

      .

      Firs\n+001ad350: 742c 2077 6520 7772 6974 6520 6120 6865 t, we write a he\n+001ad360: 6164 6572 2066 696c 6520 3c65 6d3e 3c63 ader file plugin.h to defi\n+001ad390: 6e65 2074 6865 206c 6f63 616c 2070 6c75 ne the local plu\n+001ad3a0: 6769 6e20 6461 7461 2073 7472 7563 7475 gin data structu\n+001ad3b0: 7265 2873 2920 616e 6420 7765 2064 6566 re(s) and we def\n+001ad3c0: 696e 6520 6120 676c 6f62 616c 206e 616d ine a global nam\n+001ad3d0: 6520 746f 2069 6465 6e74 6966 7920 7468 e to identify th\n+001ad3e0: 6520 706c 7567 696e 3a3c 2f70 3e0a 3c64 e plugin:

      .
      #include "\n+001ad440: 3c61 2063 6c61 7373 3d22 636f 6465 2220 stdsoap2\n+001ad470: 2e68 3c2f 613e 2671 756f 743b 3c2f 7370 .h"
      .
      #define \n+001ad4c0: 504c 5547 494e 5f49 4420 2671 756f 743b PLUGIN_ID "\n+001ad4d0: 504c 5547 494e 2d31 2e30 2671 756f 743b PLUGIN-1.0"\n+001ad4e0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c //\n+001ad500: 2073 6f6d 6520 6e61 6d65 2074 6f20 6964 some name to id\n+001ad510: 656e 7469 6679 2070 6c75 6769 6e20 3c2f entify plugin
      . <\n+001ad540: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      st\n+001ad570: 7275 6374 203c 2f73 7061 6e3e 706c 7567 ruct plug\n+001ad580: 696e 5f64 6174 6120 3c73 7061 6e20 636c in_data //\n+001ad5a0: 206c 6f63 616c 2070 6c75 6769 6e20 6461 local plugin da\n+001ad5b0: 7461 203c 2f73 7061 6e3e 3c2f 6469 763e ta
      \n+001ad5c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      {
      .
      i\n+001ad5f0: 6e74 2028 2a66 7365 6e64 2928 3c73 7061 nt (*fsend)(struct \n+001ad620: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap*\n+001ad650: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const c\n+001ad690: 6861 723c 2f73 7061 6e3e 2a2c 2073 697a har*, siz\n+001ad6a0: 655f 7429 3b20 3c73 7061 6e20 636c 6173 e_t); // t\n+001ad6c0: 6f20 7361 7665 2061 6e64 2075 7365 2073 o save and use s\n+001ad6d0: 656e 6420 6361 6c6c 6261 636b 203c 2f73 end callback
      .
      s\n+001ad700: 697a 655f 7420 282a 3c61 2063 6c61 7373 ize_t (*f\n+001ad760: 7265 6376 3c2f 613e 2928 3c73 7061 6e20 recv)(\n+001ad780: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap*, \n+001ad7c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char*, size_t);\n+001ad7f0: 203c 7370 616e 2063 6c61 7373 3d22 636f // to sav\n+001ad810: 6520 616e 6420 7573 6520 7265 6376 2063 e and use recv c\n+001ad820: 616c 6c62 6163 6b20 3c2f 7370 616e 3e3c allback <\n+001ad830: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      }; .
      in\n+001ad880: 743c 2f73 7061 6e3e 2070 6c75 6769 6e28 t plugin(\n+001ad890: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap<\n+001ad8e0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap\n+001ad910: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , stru\n+001ad930: 6374 3c2f 7370 616e 3e20 736f 6170 5f70 ct soap_p\n+001ad940: 6c75 6769 6e20 2a70 6c75 6769 6e2c 203c lugin *plugin, <\n+001ad950: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001ad960: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void *arg);.
      stdsoap\n+001ad9e0: 322e 683c 2f61 3e3c 2f64 6976 3e3c 6469 2.h
      \n+001ada00: 5468 6973 2066 696c 6520 6465 6669 6e65 This file define\n+001ada10: 7320 7468 6520 636f 6d6d 6f6e 206d 6163 s the common mac\n+001ada20: 726f 732c 2074 7970 6573 2061 6e64 2066 ros, types and f\n+001ada30: 756e 6374 696f 6e73 206f 6620 7468 6520 unctions of the \n+001ada40: 6753 4f41 5020 4150 4920 6772 6f75 7065 gSOAP API groupe\n+001ada50: 6420 6279 206d 6f64 756c 6573 3c2f 6469 d by modules
      .
      <\n+001ada70: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+001ada80: 3c70 3e54 6865 6e2c 2077 6520 7772 6974

      Then, we writ\n+001ada90: 6520 7468 6520 706c 7567 696e 2072 6567 e the plugin reg\n+001adaa0: 6973 7472 7920 6675 6e63 7469 6f6e 2061 istry function a\n+001adab0: 6e64 2074 6865 2063 616c 6c62 6163 6b73 nd the callbacks\n+001adac0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

      .
      #includ\n+001adb10: 6520 2671 756f 743b 706c 7567 696e 2e68 e "plugin.h\n+001adb20: 2671 756f 743b 3c2f 7370 616e 3e20 3c2f " .
      .<\n+001adb50: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001adb60: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >static const\n+001adba0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char pl\n+001adbd0: 7567 696e 5f69 645b 5d20 3d20 504c 5547 ugin_id[] = PLUG\n+001adbe0: 494e 5f49 443b 203c 7370 616e 2063 6c61 IN_ID; // \n+001adc00: 7468 6520 706c 7567 696e 2069 6420 3c2f the plugin id
      .static int<\n+001adc70: 2f73 7061 6e3e 2070 6c75 6769 6e5f 696e /span> plugin_in\n+001adc80: 6974 283c 7370 616e 2063 6c61 7373 3d22 it(struct<\n+001adca0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n+001adcd0: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+001add00: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, s\n+001add20: 7472 7563 743c 2f73 7061 6e3e 2070 6c75 truct plu\n+001add30: 6769 6e5f 6461 7461 202a 6461 7461 293b gin_data *data);\n+001add40: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      ..
      static <\n+001adee0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001adef0: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype\">void plugin_dele\n+001adf10: 7465 283c 7370 616e 2063 6c61 7373 3d22 te(struct<\n+001adf30: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n+001adf60: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+001adf90: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, s\n+001adfb0: 7472 7563 743c 2f73 7061 6e3e 2073 6f61 truct soa\n+001adfc0: 705f 706c 7567 696e 202a 7029 3b20 3c2f p_plugin *p); .
      sta\n+001ae000: 7469 633c 2f73 7061 6e3e 203c 7370 616e tic int \n+001ae030: 706c 7567 696e 5f73 656e 6428 3c73 7061 plugin_send(struct \n+001ae060: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+001ae090: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+001ae0c0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const c\n+001ae100: 6861 723c 2f73 7061 6e3e 202a 3c61 2063 har *buf, size_t len); .
      stati\n+001ae1c0: 633c 2f73 7061 6e3e 203c 7370 616e 2063 c size_t\n+001ae1f0: 2070 6c75 6769 6e5f 7265 6376 283c 7370 plugin_recv(struct\n+001ae220: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+001ae250: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, cha\n+001ae2a0: 723c 2f73 7061 6e3e 202a 3c61 2063 6c61 r *buf, size_t len);
      \n+001ae330: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      .
      // the regist\n+001ae380: 7279 2066 756e 6374 696f 6e3a 203c 2f73 ry function:
      .
      int plugin(s\n+001ae3f0: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n+001ae460: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001ae470: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap_plugin *\n+001ae490: 702c 203c 7370 616e 2063 6c61 7373 3d22 p, voi\n+001ae4b0: 643c 2f73 7061 6e3e 202a 6172 6729 203c d *arg) <\n+001ae4c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      {
      .\n+001ae4e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      p->id = p\n+001ae500: 6c75 6769 6e5f 6964 3b20 3c2f 6469 763e lugin_id;
      \n+001ae510: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      p->data \n+001ae530: 3d20 283c 7370 616e 2063 6c61 7373 3d22 = (voi\n+001ae550: 643c 2f73 7061 6e3e 2a29 6d61 6c6c 6f63 d*)malloc\n+001ae560: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (sizeof(struc\n+001ae5a0: 743c 2f73 7061 6e3e 2070 6c75 6769 6e5f t plugin_\n+001ae5b0: 6461 7461 2929 3b20 3c2f 6469 763e 0a3c data));
      .<\n+001ae5c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001ae5d0: 3e20 2070 2d26 6774 3b66 636f 7079 203d > p->fcopy =\n+001ae5e0: 2070 6c75 6769 6e5f 636f 7079 3b20 3c73 plugin_copy; /* optional:\n+001ae610: 2077 6865 6e20 7365 7420 7468 6520 706c when set the pl\n+001ae620: 7567 696e 206d 7573 7420 636f 7079 2069 ugin must copy i\n+001ae630: 7473 206c 6f63 616c 2064 6174 6120 2a2f ts local data */\n+001ae640: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+001ae660: 2020 702d 2667 743b 6664 656c 6574 6520 p->fdelete \n+001ae670: 3d20 706c 7567 696e 5f64 656c 6574 653b = plugin_delete;\n+001ae680: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      if \n+001ae6c0: 2870 2d26 6774 3b64 6174 6129 203c 2f64 (p->data) .
      {
      .\n+001ae6f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      \n+001ae720: 6966 3c2f 7370 616e 3e20 2870 6c75 6769 if (plugi\n+001ae730: 6e5f 696e 6974 283c 6120 636c 6173 733d n_init(so\n+001ae760: 6170 3c2f 613e 2c20 283c 7370 616e 2063 ap, (s\n+001ae780: 7472 7563 743c 2f73 7061 6e3e 2070 6c75 truct plu\n+001ae790: 6769 6e5f 6461 7461 2a29 702d 2667 743b gin_data*)p->\n+001ae7a0: 6461 7461 2929 203c 2f64 6976 3e0a 3c64 data))
      .\n+001ae7c0: 2020 2020 7b3c 2f64 6976 3e0a 3c64 6976 {
      . \n+001ae7e0: 2020 2020 6672 6565 2870 2d26 6774 3b64 free(p->d\n+001ae7f0: 6174 6129 3b20 3c73 7061 6e20 636c 6173 ata); // e\n+001ae810: 7272 6f72 3a20 636f 756c 6420 6e6f 7420 rror: could not \n+001ae820: 696e 6974 203c 2f73 7061 6e3e 3c2f 6469 init ..
      }\n+001ae920: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      }.
      return \n+001ae980: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_OK;\n+001ae9e0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      } .
      .<\n+001aea30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001aea40: 6f72 6422 3e73 7461 7469 633c 2f73 7061 ord\">static int\n+001aea70: 3c2f 7370 616e 3e20 706c 7567 696e 5f69 plugin_i\n+001aea80: 6e69 7428 3c73 7061 6e20 636c 6173 733d nit(struct\n+001aeaa0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s\n+001aead0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *\n+001aeb00: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, \n+001aeb20: 7374 7275 6374 3c2f 7370 616e 3e20 706c struct pl\n+001aeb30: 7567 696e 5f64 6174 6120 2a64 6174 6129 ugin_data *data)\n+001aeb40: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      {.
      data->f\n+001aeb80: 7365 6e64 203d 203c 6120 636c 6173 733d send = so\n+001aebb0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->fsend; // save old r\n+001aec40: 6563 7620 6361 6c6c 6261 636b 203c 2f73 ecv callback
      .
      d\n+001aec70: 6174 612d 2667 743b 6672 6563 7620 3d20 ata->frecv = \n+001aec80: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+001aecb0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >frecv\n+001aed10: 3c2f 613e 3b20 3c73 7061 6e20 636c 6173 ; // s\n+001aed30: 6176 6520 6f6c 6420 7365 6e64 2063 616c ave old send cal\n+001aed40: 6c62 6163 6b20 3c2f 7370 616e 3e3c 2f64 lback .
      s\n+001aed90: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->fsend = p\n+001aee00: 6c75 6769 6e5f 7365 6e64 3b20 3c73 7061 lugin_send; // replace sen\n+001aee30: 6420 6361 6c6c 6261 636b 2077 6974 6820 d callback with \n+001aee40: 6e65 7720 3c2f 7370 616e 3e3c 2f64 6976 new .
      soa\n+001aee90: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->frecv = plu\n+001aef00: 6769 6e5f 7265 6376 3b20 3c73 7061 6e20 gin_recv; \n+001aef20: 2f2f 2072 6570 6c61 6365 2072 6563 7620 // replace recv \n+001aef30: 6361 6c6c 6261 636b 2077 6974 6820 6e65 callback with ne\n+001aef40: 7720 3c2f 7370 616e 3e3c 2f64 6976 3e0a w
      .\n+001aef50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      re\n+001aef80: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn \n+001aefe0: 534f 4150 5f4f 4b3c 2f61 3e3b 203c 2f64 SOAP_OK; .
      }
      .<\n+001af010: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001af020: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
      .
      // copy plugin \n+001af060: 6461 7461 2c20 6361 6c6c 6564 2062 7920 data, called by \n+001af070: 736f 6170 5f63 6f70 7928 293c 2f73 7061 soap_copy()
      .
      // This is impo\n+001af0c0: 7274 616e 743a 2077 6520 6e65 6564 2061 rtant: we need a\n+001af0d0: 2064 6565 7020 636f 7079 2074 6f20 6176 deep copy to av\n+001af0e0: 6f69 6420 6461 7461 2073 6861 7269 6e67 oid data sharing\n+001af0f0: 2062 7920 7477 6f20 636f 6e74 6578 7473 by two contexts\n+001af100: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
      .<\n+001af110: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001af120: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >static i\n+001af160: 6e74 3c2f 7370 616e 3e20 706c 7567 696e nt plugin\n+001af170: 5f63 6f70 7928 3c73 7061 6e20 636c 6173 _copy(stru\n+001af190: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, struct \n+001af220: 736f 6170 5f70 6c75 6769 6e20 2a64 7374 soap_plugin *dst\n+001af230: 2c20 3c73 7061 6e20 636c 6173 733d 226b , struct soap_plugi\n+001af260: 6e20 2a73 7263 2920 3c2f 6469 763e 0a3c n *src)
      .<\n+001af270: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001af280: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
      .
      if\n+001af2c0: 2028 2128 6473 742d 2667 743b 6461 7461 (!(dst->data\n+001af2d0: 203d 2028 3c73 7061 6e20 636c 6173 733d = (struct\n+001af2f0: 3c2f 7370 616e 3e20 706c 7567 696e 5f64 plugin_d\n+001af300: 6174 612a 296d 616c 6c6f 6328 3c73 7061 ata*)malloc(sizeof(\n+001af330: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct plugin_data)\n+001af360: 2929 2920 3c2f 6469 763e 0a3c 6469 7620 )))
      .
      \n+001af380: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur\n+001af3a0: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA\n+001af400: 505f 454f 4d3c 2f61 3e3b 203c 2f64 6976 P_EOM; .
      *dst->d\n+001af430: 6174 6120 3d20 2a73 7263 2d26 6774 3b64 ata = *src->d\n+001af440: 6174 613b 203c 2f64 6976 3e0a 3c64 6976 ata;
      . \n+001af460: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n+001af480: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP\n+001af4e0: 5f4f 4b3c 2f61 3e3b 203c 2f64 6976 3e0a _OK;
      .\n+001af4f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      }
      .
      .
      // \n+001af550: 706c 7567 696e 2064 656c 6574 696f 6e2c plugin deletion,\n+001af560: 2063 616c 6c65 6420 6279 2073 6f61 705f called by soap_\n+001af570: 646f 6e65 2829 203c 2f73 7061 6e3e 3c2f done() .
      sta\n+001af5b0: 7469 633c 2f73 7061 6e3e 203c 7370 616e tic void\n+001af5e0: 2070 6c75 6769 6e5f 6465 6c65 7465 283c plugin_delete(<\n+001af5f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001af600: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n+001af670: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, struc\n+001af690: 743c 2f73 7061 6e3e 2073 6f61 705f 706c t soap_pl\n+001af6a0: 7567 696e 202a 7029 203c 2f64 6976 3e0a ugin *p)
      .\n+001af6b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      {
      .
      fr\n+001af6e0: 6565 2870 2d26 6774 3b64 6174 6129 3b20 ee(p->data); \n+001af6f0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // free al\n+001af710: 6c6f 6361 7465 6420 706c 7567 696e 2064 located plugin d\n+001af720: 6174 6120 3c2f 7370 616e 3e3c 2f64 6976 ata .
      }
      . \n+001af760: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      /\n+001af790: 2f20 7468 6520 6e65 7720 7365 6e64 2063 / the new send c\n+001af7a0: 616c 6c62 6163 6b20 3c2f 7370 616e 3e3c allback <\n+001af7b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      st\n+001af7e0: 6174 6963 3c2f 7370 616e 3e20 3c73 7061 atic int\n+001af810: 2070 6c75 6769 6e5f 7365 6e64 283c 7370 plugin_send(struct\n+001af840: 203c 6120 636c 6173 733d 2263 6f64 6522 soap\n+001af870: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, const \n+001af8e0: 6368 6172 3c2f 7370 616e 3e20 2a3c 6120 char *buf, <\n+001af940: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001af950: 6f72 6474 7970 6522 3e73 697a 655f 743c ordtype\">size_t<\n+001af960: 2f73 7061 6e3e 206c 656e 2920 3c2f 6469 /span> len) .
      {
      . \n+001af9a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct plugin_data\n+001af9d0: 202a 6461 7461 203d 2028 3c73 7061 6e20 *data = (\n+001af9f0: 7374 7275 6374 203c 2f73 7061 6e3e 706c struct pl\n+001afa00: 7567 696e 5f64 6174 612a 2973 6f61 705f ugin_data*)soap_\n+001afa10: 6c6f 6f6b 7570 5f70 6c75 6769 6e28 3c61 lookup_plugin(soap, p\n+001afa50: 6c75 6769 6e5f 6964 293b 203c 7370 616e lugin_id); // fetch plugin\n+001afa80: 2623 3339 3b73 206c 6f63 616c 2064 6174 's local dat\n+001afa90: 6120 3c2f 7370 616e 3e3c 2f64 6976 3e0a a
      .\n+001afaa0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      fwrite(buf, \n+001afac0: 6c65 6e2c 2031 2c20 7374 6465 7272 293b len, 1, stderr);\n+001afad0: 203c 7370 616e 2063 6c61 7373 3d22 636f // write \n+001afaf0: 6d65 7373 6167 6520 746f 2073 7464 6572 message to stder\n+001afb00: 7220 3c2f 7370 616e 3e3c 2f64 6976 3e0a r
      .\n+001afb10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      re\n+001afb40: 7475 726e 3c2f 7370 616e 3e20 6461 7461 turn data\n+001afb50: 2d26 6774 3b66 7365 6e64 283c 6120 636c ->fsend(soap, buf,\n+001afb90: 206c 656e 293b 203c 7370 616e 2063 6c61 len); // \n+001afbb0: 7061 7373 2064 6174 6120 6f6e 2074 6f20 pass data on to \n+001afbc0: 6f6c 6420 7365 6e64 2063 616c 6c62 6163 old send callbac\n+001afbd0: 6b20 3c2f 7370 616e 3e3c 2f64 6976 3e0a k
      .\n+001afbe0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      }
      .
      .
      // \n+001afc40: 7468 6520 6e65 7720 7265 6365 6976 6520 the new receive \n+001afc50: 6361 6c6c 6261 636b 203c 2f73 7061 6e3e callback \n+001afc60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      s\n+001afc90: 7461 7469 633c 2f73 7061 6e3e 203c 7370 tatic size_t plugin_recv\n+001afcd0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap\n+001afd20: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa\n+001afd50: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, char *bu\n+001afd80: 662c 203c 7370 616e 2063 6c61 7373 3d22 f, siz\n+001afda0: 655f 743c 2f73 7061 6e3e 206c 656e 2920 e_t len) \n+001afdb0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      {
      \n+001afdd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      struc\n+001afe00: 7420 3c2f 7370 616e 3e70 6c75 6769 6e5f t plugin_\n+001afe10: 6461 7461 202a 6461 7461 203d 2028 3c73 data *data = (struct plugin_data*)s\n+001afe50: 6f61 705f 6c6f 6f6b 7570 5f70 6c75 6769 oap_lookup_plugi\n+001afe60: 6e28 3c61 2063 6c61 7373 3d22 636f 6465 n(soap, plugin_id); <\n+001afea0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001afeb0: 656e 7422 3e2f 2f20 6665 7463 6820 706c ent\">// fetch pl\n+001afec0: 7567 696e 2623 3339 3b73 206c 6f63 616c ugin's local\n+001afed0: 2064 6174 6120 3c2f 7370 616e 3e3c 2f64 data .
      size_t \n+001aff20: 7265 7320 3d20 6461 7461 2d26 6774 3b66 res = data->f\n+001aff30: 7265 6376 283c 6120 636c 6173 733d 2263 recv(soap\n+001aff60: 3c2f 613e 2c20 6275 662c 206c 656e 293b , buf, len);\n+001aff70: 203c 7370 616e 2063 6c61 7373 3d22 636f // get da\n+001aff90: 7461 2066 726f 6d20 6f6c 6420 7265 6376 ta from old recv\n+001affa0: 2063 616c 6c62 6163 6b20 3c2f 7370 616e callback
      .
      fwri\n+001affd0: 7465 2862 7566 2c20 7265 732c 2031 2c20 te(buf, res, 1, \n+001affe0: 7374 6465 7272 293b 203c 2f64 6976 3e0a stderr);
      .\n+001afff0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      re\n+001b0020: 7475 726e 3c2f 7370 616e 3e20 7265 733b turn res;\n+001b0030: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      }.
      SOAP_EOM
      #define S\n+001b0130: 4f41 505f 454f 4d3c 2f64 6976 3e3c 6469 OAP_EOM
      \n+001b0150: 4120 736f 6170 5f73 7461 7475 7320 6572 A soap_status er\n+001b0160: 726f 7220 636f 6465 3a20 6f75 7420 6f66 ror code: out of\n+001b0170: 206d 656d 6f72 792e 3c2f 6469 763e 3c64 memory.
      Definition:<\n+001b01a0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a32 /b> stdsoap2.h:2\n+001b01b0: 3337 313c 2f64 6976 3e3c 2f64 6976 3e0a 371
      .\n+001b01c0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

      It is \n+001b01e0: 7468 6520 7265 7370 6f6e 7369 6269 6c69 the responsibili\n+001b01f0: 7479 206f 6620 7468 6520 706c 7567 696e ty of the plugin\n+001b0200: 2074 6f20 6861 6e64 6c65 2072 6567 6973 to handle regis\n+001b0210: 7472 7920 2869 6e69 7429 2c20 636f 7079 try (init), copy\n+001b0220: 2c20 616e 6420 6465 6c65 7469 6f6e 206f , and deletion o\n+001b0230: 6620 7468 6520 706c 7567 696e 2064 6174 f the plugin dat\n+001b0240: 6120 616e 6420 7265 7365 7420 6361 6c6c a and reset call\n+001b0250: 6261 636b 732e 3c2f 703e 0a3c 703e 5468 backs.

      .

      Th\n+001b0260: 6520 3c63 6f64 653e 6664 656c 6574 653c e fdelete<\n+001b0270: 2f63 6f64 653e 2063 616c 6c62 6163 6b20 /code> callback \n+001b0280: 6f66 203c 636f 6465 3e73 7472 7563 7420 of struct \n+001b0290: 736f 6170 5f70 6c75 6769 6e3c 2f63 6f64 soap_plugin must be set t\n+001b02b0: 6f20 6465 2d72 6567 6973 7465 7220 7468 o de-register th\n+001b02c0: 6520 706c 7567 696e 2061 6e64 206c 6574 e plugin and let\n+001b02d0: 2069 7420 6465 6c65 7465 2069 7473 2072 it delete its r\n+001b02e0: 6573 6f75 7263 6573 2e3c 2f70 3e0a 3c70 esources.

      .A plugin is cop\n+001b0300: 6965 6420 616c 6f6e 6720 7769 7468 2069 ied along with i\n+001b0310: 7473 2063 6f72 7265 7370 6f6e 6469 6e67 ts corresponding\n+001b0320: 203c 636f 6465 3e3c 6120 636c 6173 733d soap context with \n+001b0390: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap_copy call. \n+001b0460: 5468 6973 2066 756e 6374 696f 6e20 636f This function co\n+001b0470: 7069 6573 2061 203c 636f 6465 3e3c 6120 pies a soap context\n+001b04e0: 2061 6e64 2074 6865 2063 6861 696e 206f and the chain o\n+001b04f0: 6620 706c 7567 696e 732e 2049 7420 6973 f plugins. It is\n+001b0500: 2075 7020 746f 2074 6865 2070 6c75 6769 up to the plugi\n+001b0510: 6e20 696d 706c 656d 656e 7461 7469 6f6e n implementation\n+001b0520: 2074 6f20 7368 6172 6520 7468 6520 706c to share the pl\n+001b0530: 7567 696e 2064 6174 6120 6f72 206e 6f74 ugin data or not\n+001b0540: 2061 7320 666f 6c6c 6f77 733a 3c2f 703e as follows:

      \n+001b0550: 0a3c 756c 3e0a 3c6c 693e 6966 2074 6865 .
      .

      T\n+001b0c50: 6865 2065 7861 6d70 6c65 2070 6c75 6769 he example plugi\n+001b0c60: 6e20 7368 6f75 6c64 2062 6520 7573 6564 n should be used\n+001b0c70: 2061 7320 666f 6c6c 6f77 733a 3c2f 703e as follows:

      \n+001b0c80: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
      s\n+001b0cc0: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap = \n+001b0d30: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_new();
      .soap_register_\n+001b0e10: 706c 7567 696e 3c2f 613e 283c 6120 636c plugin(soap, plug\n+001b0e50: 696e 293b 203c 2f64 6976 3e0a 3c2f 6469 in);
      .

      To pass a \n+001b0e80: 3c63 6f64 653e 766f 6964 2a3c 2f63 6f64 void* argument to t\n+001b0ea0: 6865 2070 6c75 6769 6e27 7320 7265 6769 he plugin's regi\n+001b0eb0: 7374 7279 2066 756e 6374 696f 6e20 7573 stry function us\n+001b0ec0: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

      .
      <\n+001b0ef0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001b0f00: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap *soap<\n+001b0f70: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_\n+001b0fd0: 6e65 773c 2f61 3e28 293b 203c 2f64 6976 new(); ..

      This d\n+001b1740: 6563 6c61 7265 7320 3c63 6f64 653e 7873 eclares xs\n+001b1750: 645f 5f61 6e79 5479 7065 3c2f 636f 6465 d__anyType and xsd_\n+001b1770: 5f61 6e79 4174 7472 6962 7574 653c 2f63 _anyAttribute types.

      .\n+001b1790: 3c70 3e41 2044 4f4d 2065 6c65 6d65 6e74

      A DOM element\n+001b17a0: 206e 6f64 6520 6973 2073 6572 6961 6c69 node is seriali\n+001b17b0: 7a65 6420 7769 7468 2074 6865 203c 636f zed with the xsd__anyType<\n+001b17d0: 2f63 6f64 653e 2073 6572 6961 6c69 7a61 /code> serializa\n+001b17e0: 626c 6520 7479 7065 2e20 5468 6520 756e ble type. The un\n+001b17f0: 6465 726c 7969 6e67 2069 6d70 6c65 6d65 derlying impleme\n+001b1800: 6e74 6174 696f 6e20 7479 7065 206f 6620 ntation type of \n+001b1810: 3c63 6f64 653e 7873 645f 5f61 6e79 5479 xsd__anyTy\n+001b1820: 7065 3c2f 636f 6465 3e20 6973 203c 636f pe is soap_dom_elem\n+001b1840: 656e 743c 2f63 6f64 653e 2e20 4f6e 6520 ent. One \n+001b1850: 6f72 206d 6f72 6520 444f 4d20 6174 7472 or more DOM attr\n+001b1860: 6962 7574 6520 6e6f 6465 7320 6172 6520 ibute nodes are \n+001b1870: 7365 7269 616c 697a 6564 2077 6974 6820 serialized with \n+001b1880: 7468 6520 3c63 6f64 653e 7873 645f 5f61 the xsd__a\n+001b1890: 6e79 4174 7472 6962 7574 653c 2f63 6f64 nyAttribute serializable \n+001b18b0: 7479 7065 2e20 5468 6520 756e 6465 726c type. The underl\n+001b18c0: 7969 6e67 2069 6d70 6c65 6d65 6e74 6174 ying implementat\n+001b18d0: 696f 6e20 7479 7065 206f 6620 3c63 6f64 ion type of xsd__anyAttrib\n+001b18f0: 7574 653c 2f63 6f64 653e 2069 7320 3c63 ute is soap_dom_att\n+001b1910: 7269 6275 7465 3c2f 636f 6465 3e2c 2077 ribute, w\n+001b1920: 6869 6368 2069 7320 6120 6c69 6e6b 6564 hich is a linked\n+001b1930: 206c 6973 742e 3c2f 703e 0a3c 6469 7620 list.

      .
      #i\n+001b1980: 6d70 6f72 7420 2671 756f 743b 646f 6d2e mport "dom.\n+001b1990: 6826 7175 6f74 3b3c 2f73 7061 6e3e 203c h" <\n+001b19a0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001b19b0: 656e 7422 3e2f 2f20 696d 706f 7274 7320 ent\">// imports \n+001b19c0: 7873 645f 5f61 6e79 5479 7065 2061 7320 xsd__anyType as \n+001b19d0: 6120 444f 4d20 6e6f 6465 3c2f 7370 616e a DOM node
      .
      .
      class \n+001b1a30: 3c2f 7370 616e 3e6e 735f 5f64 6174 6120 ns__data \n+001b1a40: 3a20 3c73 7061 6e20 636c 6173 733d 226b : public xsd__anyTy\n+001b1a70: 7065 3c2f 6469 763e 0a3c 6469 7620 636c pe
      .
      { public\n+001b1ab0: 3a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 :
      .
      xs\n+001b1ad0: 645f 5f61 6e79 5479 7065 2a20 666f 6f3b d__anyType* foo;\n+001b1ae0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+001b1af0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // Store &\n+001b1b10: 6c74 3b66 6f6f 2667 743b 2065 6c65 6d65 lt;foo> eleme\n+001b1b20: 6e74 2069 6e20 444f 4d20 736f 6170 5f64 nt in DOM soap_d\n+001b1b30: 6f6d 5f65 6c65 6d65 6e74 3c2f 7370 616e om_element
      .
      xs\n+001b1b60: 645f 5f61 6e79 5479 7065 205f 5f61 6e79 d__anyType __any\n+001b1b70: 3b20 2020 2020 2020 2020 2020 2020 2020 ; \n+001b1b80: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // Store a\n+001b1ba0: 6e79 2065 6c65 6d65 6e74 2063 6f6e 7465 ny element conte\n+001b1bb0: 6e74 2069 6e20 444f 4d20 736f 6170 5f64 nt in DOM soap_d\n+001b1bc0: 6f6d 5f65 6c65 6d65 6e74 3c2f 7370 616e om_element
      .
      @ xs\n+001b1bf0: 645f 5f61 6e79 4174 7472 6962 7574 6520 d__anyAttribute \n+001b1c00: 5f5f 616e 7941 7474 7269 6275 7465 3b20 __anyAttribute; \n+001b1c10: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // Store a\n+001b1c30: 6e79 4174 7472 6962 7574 6520 636f 6e74 nyAttribute cont\n+001b1c40: 656e 7420 696e 2044 4f4d 2073 6f61 705f ent in DOM soap_\n+001b1c50: 646f 6d5f 6174 7472 6962 7574 6520 6c69 dom_attribute li\n+001b1c60: 6e6b 6564 206e 6f64 6520 7374 7275 6374 nked node struct\n+001b1c70: 7572 653c 2f73 7061 6e3e 3c2f 6469 763e ure
      \n+001b1c80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      };
      .

      To manipul\n+001b1cc0: 6174 6520 7468 6520 444f 4d20 656c 656d ate the DOM elem\n+001b1cd0: 656e 7473 2061 6e64 2061 7474 7269 6275 ents and attribu\n+001b1ce0: 7465 7320 7765 2075 7365 2074 6865 2044 tes we use the D\n+001b1cf0: 4f4d 2041 5049 2066 756e 6374 696f 6e73 OM API functions\n+001b1d00: 2064 6f63 756d 656e 7465 6420 696e 2074 documented in t\n+001b1d10: 6865 2067 534f 4150 203c 6120 6872 6566 he gSOAP XML\n+001b1d40: 2044 4f4d 2041 5049 2064 6f63 756d 656e DOM API documen\n+001b1d50: 7461 7469 6f6e 3c2f 613e 2e3c 2f70 3e0a tation.

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

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

      .

      <\n+001b1dc0: 2f61 3e0a 5468 6520 6d65 7373 6167 6520 /a>.The message \n+001b1dd0: 6c6f 6767 696e 6720 706c 7567 696e 3c2f logging plugin.

      The messa\n+001b1df0: 6765 203c 636f 6465 3e3c 6120 636c 6173 ge logg\n+001b1e80: 696e 673c 2f61 3e3c 2f63 6f64 653e 2070 ing p\n+001b1e90: 6c75 6769 6e20 6361 6e20 6265 2075 7365 lugin can be use\n+001b1ea0: 6420 746f 2073 656c 6563 7469 7665 6c79 d to selectively\n+001b1eb0: 206c 6f67 2069 6e62 6f75 6e64 2061 6e64 log inbound and\n+001b1ec0: 206f 7574 626f 756e 6420 6d65 7373 6167 outbound messag\n+001b1ed0: 6573 2074 6f20 6120 6669 6c65 206f 7220 es to a file or \n+001b1ee0: 7374 7265 616d 2e20 4974 2061 6c73 6f20 stream. It also \n+001b1ef0: 6b65 6570 7320 6163 6365 7373 2073 7461 keeps access sta\n+001b1f00: 7469 7374 6963 7320 746f 206c 6f67 2074 tistics to log t\n+001b1f10: 6865 2074 6f74 616c 206e 756d 6265 7220 he total number \n+001b1f20: 6f66 2062 7974 6573 2073 656e 7420 616e of bytes sent an\n+001b1f30: 6420 7265 6365 6976 6564 2e3c 2f70 3e0a d received.

      .\n+001b1f40: 3c70 3e54 6f20 7573 6520 7468 6520 706c

      To use the pl\n+001b1f50: 7567 696e 2c20 636f 6d70 696c 6520 616e ugin, compile an\n+001b1f60: 6420 6c69 6e6b 2079 6f75 7220 6170 706c d link your appl\n+001b1f70: 6963 6174 696f 6e20 7769 7468 203c 656d ication with logging.c\n+001b1f90: 3c2f 636f 6465 3e3c 2f65 6d3e 206c 6f63 loc\n+001b1fa0: 6174 6564 2069 6e20 7468 6520 3c65 6d3e ated in the \n+001b1fb0: 3c63 6f64 653e 6773 6f61 702f 706c 7567 gsoap/plug\n+001b1fc0: 696e 3c2f 636f 6465 3e3c 2f65 6d3e 2064 in d\n+001b1fd0: 6972 6563 746f 7279 206f 6620 7468 6520 irectory of the \n+001b1fe0: 6753 4f41 5020 7061 636b 6167 652e 2054 gSOAP package. T\n+001b1ff0: 6f20 656e 6162 6c65 2074 6865 2070 6c75 o enable the plu\n+001b2000: 6769 6e20 696e 2079 6f75 7220 636f 6465 gin in your code\n+001b2010: 2c20 7265 6769 7374 6572 2074 6865 2070 , register the p\n+001b2020: 6c75 6769 6e20 616e 6420 7365 7420 7468 lugin and set th\n+001b2030: 6520 7374 7265 616d 7320 6173 2066 6f6c e streams as fol\n+001b2040: 6c6f 7773 3a3c 2f70 3e0a 3c64 6976 2063 lows:

      .
      \n+001b2060: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      #in\n+001b2090: 636c 7564 6520 2671 756f 743b 6c6f 6767 clude "logg\n+001b20a0: 696e 672e 6826 7175 6f74 3b3c 2f73 7061 ing.h"
      .
      .
      stru\n+001b2100: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap *soap = soap_new()\n+001b21d0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
      .
      size_t bytes_in; .
      s\n+001b2250: 697a 655f 743c 2f73 7061 6e3e 2062 7974 ize_t byt\n+001b2260: 6573 5f6f 7574 3b20 3c2f 6469 763e 0a3c es_out;
      .<\n+001b2270: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b2280: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >if (soap_r\n+001b2300: 6567 6973 7465 725f 706c 7567 696e 3c2f egister_plugin(soap, logging))
      . \n+001b23c0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // fai\n+001b23e0: 6c65 6420 746f 2072 6567 6973 7465 7220 led to register \n+001b23f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+001b2410: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... //
      ..<\n+001b2510: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b2520: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001b2530: 705f 5f64 6562 7567 2e68 746d 6c23 6761 p__debug.html#ga\n+001b2540: 3038 6136 3765 3839 3839 6463 3834 3936 08a67e8989dc8496\n+001b2550: 3032 6236 3165 3433 3861 3766 3836 6532 02b61e438a7f86e2\n+001b2560: 223e 736f 6170 5f73 6574 5f6c 6f67 6769 \">soap_set_loggi\n+001b2570: 6e67 5f6f 7574 626f 756e 643c 2f61 3e28 ng_outbound(\n+001b2580: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001b25b0: 2073 7464 6f75 7429 3b20 3c2f 6469 763e stdout);

      \n+001b25c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      ... // \n+001b25f0: 7072 6f63 6573 7320 6d65 7373 6167 6573 process messages\n+001b2600: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+001b2620: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_set_logg\n+001b2680: 696e 675f 696e 626f 756e 643c 2f61 3e28 ing_inbound(\n+001b2690: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001b26c0: 204e 554c 4c29 3b20 3c73 7061 6e20 636c NULL); //\n+001b26e0: 2064 6973 6162 6c65 206c 6f67 6769 6e67 disable logging\n+001b26f0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
      .<\n+001b2700: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b2710: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_set_log\n+001b2770: 6769 6e67 5f6f 7574 626f 756e 643c 2f61 ging_outbound(soap, NULL); \n+001b27d0: 2f2f 2064 6973 6162 6c65 206c 6f67 6769 // disable loggi\n+001b27e0: 6e67 203c 2f73 7061 6e3e 3c2f 6469 763e ng
      \n+001b27f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      soap_loggi\n+001b2860: 6e67 5f73 7461 7473 3c2f 613e 283c 6120 ng_stats(soap, &a\n+001b28a0: 6d70 3b62 7974 6573 5f6f 7574 2c20 2661 mp;bytes_out, &a\n+001b28b0: 6d70 3b62 7974 6573 5f69 6e29 3b3c 2f64 mp;bytes_in);.
      ... \n+001b28f0: 2f2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a //
      .\n+001b2900: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
      vo\n+001b2aa0: 6964 2073 6f61 705f 7365 745f 6c6f 6767 id soap_set_logg\n+001b2ab0: 696e 675f 6f75 7462 6f75 6e64 2873 7472 ing_outbound(str\n+001b2ac0: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, \n+001b2ad0: 4649 4c45 202a 6664 293c 2f64 6976 3e3c FILE *fd)
      <\n+001b2ae0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class=\"ttdoc\n+001b2af0: 223e 5370 6563 6966 7920 6f75 7462 6f75 \">Specify outbou\n+001b2b00: 6e64 206d 6573 7361 6765 206c 6f67 6769 nd message loggi\n+001b2b10: 6e67 2077 6974 6820 7468 6520 6c6f 6767 ng with the logg\n+001b2b20: 696e 6720 706c 7567 696e 2e3c 2f64 6976 ing plugin.
      .
      <\n+001b2ba0: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n+001b2bb0: 726f 7570 5f5f 6465 6275 672e 6874 6d6c roup__debug.html\n+001b2bc0: 2367 6134 3936 3561 3264 3538 6165 6334 #ga4965a2d58aec4\n+001b2bd0: 6165 3339 3833 6165 3733 6663 3731 3164 ae3983ae73fc711d\n+001b2be0: 6636 3022 3e73 6f61 705f 7265 7365 745f f60\">soap_reset_\n+001b2bf0: 6c6f 6767 696e 675f 7374 6174 733c 2f61 logging_stats
      void \n+001b2c20: 736f 6170 5f72 6573 6574 5f6c 6f67 6769 soap_reset_loggi\n+001b2c30: 6e67 5f73 7461 7473 2873 7472 7563 7420 ng_stats(struct \n+001b2c40: 736f 6170 202a 736f 6170 293c 2f64 6976 soap *soap)
      Reset messag\n+001b2c70: 696e 6720 7374 6174 6973 7469 6373 2077 ing statistics w\n+001b2c80: 6974 6820 7468 6520 6c6f 6767 696e 6720 ith the logging \n+001b2c90: 706c 7567 696e 2e3c 2f64 6976 3e3c 2f64 plugin.
      .
      void soap_loggi\n+001b2d90: 6e67 5f73 7461 7473 2873 7472 7563 7420 ng_stats(struct \n+001b2da0: 736f 6170 202a 736f 6170 2c20 7369 7a65 soap *soap, size\n+001b2db0: 5f74 202a 7365 6e74 2c20 7369 7a65 5f74 _t *sent, size_t\n+001b2dc0: 202a 7265 6376 293c 2f64 6976 3e3c 6469 *recv)
      \n+001b2de0: 436f 6c6c 6563 7420 6d65 7373 6167 696e Collect messagin\n+001b2df0: 6720 7374 6174 6973 7469 6373 2077 6974 g statistics wit\n+001b2e00: 6820 7468 6520 6c6f 6767 696e 6720 706c h the logging pl\n+001b2e10: 7567 696e 2e3c 2f64 6976 3e3c 2f64 6976 ugin.
      .
      s\n+001b2ed0: 6f61 705f 7365 745f 6c6f 6767 696e 675f oap_set_logging_\n+001b2ee0: 696e 626f 756e 643c 2f61 3e3c 2f64 6976 inbound
      void soap_s\n+001b2f10: 6574 5f6c 6f67 6769 6e67 5f69 6e62 6f75 et_logging_inbou\n+001b2f20: 6e64 2873 7472 7563 7420 736f 6170 202a nd(struct soap *\n+001b2f30: 736f 6170 2c20 4649 4c45 202a 6664 293c soap, FILE *fd)<\n+001b2f40: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
      Specify \n+001b2f60: 696e 626f 756e 6420 6d65 7373 6167 6520 inbound message \n+001b2f70: 6c6f 6767 696e 6720 7769 7468 2074 6865 logging with the\n+001b2f80: 206c 6f67 6769 6e67 2070 6c75 6769 6e2e logging plugin.\n+001b2f90: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
      .\n+001b2ff0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
      i\n+001b3070: 6e74 206c 6f67 6769 6e67 2873 7472 7563 nt logging(struc\n+001b3080: 7420 736f 6170 202a 2c20 7374 7275 6374 t soap *, struct\n+001b3090: 2073 6f61 705f 706c 7567 696e 202a 2c20 soap_plugin *, \n+001b30a0: 766f 6964 202a 293c 2f64 6976 3e3c 6469 void *)
      \n+001b30c0: 5468 6520 6c6f 6767 696e 6720 706c 7567 The logging plug\n+001b30d0: 696e 2072 6567 6973 7472 6174 696f 6e20 in registration \n+001b30e0: 6675 6e63 7469 6f6e 2e3c 2f64 6976 3e3c function.
      <\n+001b30f0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

      \n+001b3110: 4966 2079 6f75 2075 7365 203c 636f 6465 If you use soap\n+001b31d0: 5f63 6f70 793c 2f61 3e3c 2f63 6f64 653e _copy\n+001b31e0: 2074 6f20 636f 7079 2074 6865 203c 636f to copy the s\n+001b3240: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c\n+001b3250: 6f6e 7465 7874 2077 6974 6820 7468 6520 ontext with the \n+001b3260: 706c 7567 696e 2c20 7468 6520 706c 7567 plugin, the plug\n+001b3270: 696e 2773 2073 7461 7465 2077 696c 6c20 in's state will \n+001b3280: 6265 2073 6861 7265 6420 6279 2074 6865 be shared by the\n+001b3290: 2063 6f70 792e 2054 6865 2070 6c75 6769 copy. The plugi\n+001b32a0: 6e20 6973 2074 6872 6561 642d 7361 6665 n is thread-safe\n+001b32b0: 2c20 6275 7420 646f 6573 206e 6f74 2075 , but does not u\n+001b32c0: 7365 2061 206c 6f63 6b20 746f 2070 726f se a lock to pro\n+001b32d0: 7465 6374 2074 6865 2069 6e74 6572 6e61 tect the interna\n+001b32e0: 6c20 7374 6174 6973 7469 6373 2063 6f75 l statistics cou\n+001b32f0: 6e74 6572 7320 746f 2065 6e73 7572 6520 nters to ensure \n+001b3300: 7468 6520 7370 6565 6420 6f66 206d 6573 the speed of mes\n+001b3310: 7361 6769 6e67 2069 7320 6e6f 7420 636f saging is not co\n+001b3320: 6d70 726f 6d69 7365 642c 206d 6561 6e69 mpromised, meani\n+001b3330: 6e67 2074 6861 7420 796f 7520 7368 6f75 ng that you shou\n+001b3340: 6c64 206e 6f74 2066 756c 6c79 2072 656c ld not fully rel\n+001b3350: 7920 6f6e 2074 6865 2073 7461 7469 7374 y on the statist\n+001b3360: 6963 7320 746f 2062 6520 3130 3025 2061 ics to be 100% a\n+001b3370: 6363 7572 6174 6520 666f 7220 6d75 6c74 ccurate for mult\n+001b3380: 692d 7468 7265 6164 6564 2073 6572 7669 i-threaded servi\n+001b3390: 6365 732e 3c2f 703e 0a3c 703e 5365 6520 ces.

      .

      See \n+001b33a0: 616c 736f 203c 636f 6465 3e3c 6120 636c also lo\n+001b3430: 6767 696e 673c 2f61 3e3c 2f63 6f64 653e gging\n+001b3440: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

      .

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

      .

      \n+001b3480: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .RES\n+001b34b0: 5466 756c 2073 6572 7665 722d 7369 6465 Tful server-side\n+001b34c0: 2041 5049 2077 6974 6820 7468 6520 4854 API with the HT\n+001b34d0: 5450 2047 4554 2070 6c75 6769 6e3c 2f68 TP GET plugin.

      Server-sid\n+001b34f0: 6520 7573 6520 6f66 2052 4553 5466 756c e use of RESTful\n+001b3500: 2048 5454 5020 4745 5420 6f70 6572 6174 HTTP GET operat\n+001b3510: 696f 6e73 2069 7320 7375 7070 6f72 7465 ions is supporte\n+001b3520: 6420 7769 7468 2074 6865 203c 636f 6465 d with the http_get HTTP GET p\n+001b35d0: 6c75 6769 6e20 3c65 6d3e 3c63 6f64 653e lugin \n+001b35e0: 6773 6f61 702f 706c 7567 696e 2f68 7474 gsoap/plugin/htt\n+001b35f0: 7067 6574 2e63 3c2f 636f 6465 3e3c 2f65 pget.c.

      .

      The H\n+001b3610: 5454 5020 4745 5420 706c 7567 696e 2061 TTP GET plugin a\n+001b3620: 6c6c 6f77 7320 796f 7572 2073 6572 7665 llows your serve\n+001b3630: 7220 746f 2068 616e 646c 6520 5245 5354 r to handle REST\n+001b3640: 6675 6c20 4854 5450 2047 4554 2072 6571 ful HTTP GET req\n+001b3650: 7565 7374 7320 616e 6420 6174 2074 6865 uests and at the\n+001b3660: 2073 616d 6520 7469 6d65 2073 7469 6c6c same time still\n+001b3670: 2073 6572 7665 2053 4f41 502d 6261 7365 serve SOAP-base\n+001b3680: 6420 504f 5354 2072 6571 7565 7374 732e d POST requests.\n+001b3690: 2054 6865 2070 6c75 6769 6e20 7072 6f76 The plugin prov\n+001b36a0: 6964 6573 2073 7570 706f 7274 2074 6f20 ides support to \n+001b36b0: 636c 6965 6e74 2061 7070 6c69 6361 7469 client applicati\n+001b36c0: 6f6e 7320 746f 2069 7373 7565 2048 5454 ons to issue HTT\n+001b36d0: 5020 4745 5420 6f70 6572 6174 696f 6e73 P GET operations\n+001b36e0: 2074 6f20 6120 7365 7276 6572 2e3c 2f70 to a server..

      Note that H\n+001b3700: 5454 5020 4745 5420 7265 7175 6573 7473 TTP GET requests\n+001b3710: 2063 616e 2061 6c73 6f20 6265 2068 616e can also be han\n+001b3720: 646c 6564 2061 7420 7468 6520 7365 7276 dled at the serv\n+001b3730: 6572 2073 6964 6520 7769 7468 2074 6865 er side with the\n+001b3740: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::f\n+001b3810: 6765 743c 2f61 3e3c 2f63 6f64 653e 2063 get c\n+001b3820: 616c 6c62 6163 6b2c 2073 6565 2053 6563 allback, see Sec\n+001b3830: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion Fu\n+001b3860: 6e63 7469 6f6e 2063 616c 6c62 6163 6b73 nction callbacks\n+001b3870: 2066 6f72 2063 7573 746f 6d69 7a65 6420 for customized \n+001b3880: 492f 4f20 616e 6420 4854 5450 2068 616e I/O and HTTP han\n+001b3890: 646c 696e 673c 2f61 3e20 2e20 486f 7765 dling . Howe\n+001b38a0: 7665 722c 2074 6865 2048 5454 5020 4745 ver, the HTTP GE\n+001b38b0: 5420 706c 7567 696e 2061 6c73 6f20 6b65 T plugin also ke\n+001b38c0: 6570 7320 7374 6174 6973 7469 6373 206f eps statistics o\n+001b38d0: 6e20 7468 6520 6e75 6d62 6572 206f 6620 n the number of \n+001b38e0: 7375 6363 6573 7366 756c 2050 4f53 5420 successful POST \n+001b38f0: 616e 6420 4745 5420 6578 6368 616e 6765 and GET exchange\n+001b3900: 7320 616e 6420 6661 696c 6564 206f 7065 s and failed ope\n+001b3910: 7261 7469 6f6e 7320 2848 5454 5020 6661 rations (HTTP fa\n+001b3920: 756c 7473 2c20 534f 4150 2046 6175 6c74 ults, SOAP Fault\n+001b3930: 732c 2065 7463 2e29 2e20 4974 2061 6c73 s, etc.). It als\n+001b3940: 6f20 6b65 6570 7320 6869 7420 6869 7374 o keeps hit hist\n+001b3950: 6f67 7261 6d73 2061 6363 756d 756c 6174 ograms accumulat\n+001b3960: 6564 2066 6f72 2075 7020 746f 2061 2079 ed for up to a y\n+001b3970: 6561 7220 6f66 2072 756e 6e69 6e67 2074 ear of running t\n+001b3980: 696d 652e 3c2f 703e 0a3c 703e 546f 2075 ime.

      .

      To u\n+001b3990: 7365 2074 6865 203c 636f 6465 3e3c 6120 se the ht\n+001b3a20: 7470 5f67 6574 3c2f 613e 3c2f 636f 6465 tp_get plugin, compil\n+001b3a40: 6520 616e 6420 6c69 6e6b 2079 6f75 7220 e and link your \n+001b3a50: 6170 706c 6963 6174 696f 6e20 7769 7468 application with\n+001b3a60: 203c 656d 3e3c 636f 6465 3e68 7474 7067 httpg\n+001b3a70: 6574 2e63 3c2f 636f 6465 3e3c 2f65 6d3e et.c\n+001b3a80: 206c 6f63 6174 6564 2069 6e20 7468 6520 located in the \n+001b3a90: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/\n+001b3aa0: 706c 7567 696e 3c2f 636f 6465 3e3c 2f65 plugin directory of \n+001b3ac0: 7468 6520 6753 4f41 5020 7061 636b 6167 the gSOAP packag\n+001b3ad0: 652e 2054 6f20 656e 6162 6c65 2074 6865 e. To enable the\n+001b3ae0: 2070 6c75 6769 6e20 696e 2079 6f75 7220 plugin in your \n+001b3af0: 636f 6465 2c20 7265 6769 7374 6572 2074 code, register t\n+001b3b00: 6865 2070 6c75 6769 6e20 7769 7468 2079 he plugin with y\n+001b3b10: 6f75 7220 4854 5450 2047 4554 2068 616e our HTTP GET han\n+001b3b20: 646c 6572 2066 756e 6374 696f 6e20 6173 dler function as\n+001b3b30: 2066 6f6c 6c6f 7773 3a3c 2f70 3e0a 3c64 follows:

      .
      #include "\n+001b3b90: 6874 7470 6765 742e 6826 7175 6f74 3b3c httpget.h"<\n+001b3ba0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      . \n+001b3bc0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173

      .
      int ma\n+001b3c00: 696e 2829 3c2f 6469 763e 0a3c 6469 7620 in()
      .
      {.
      s\n+001b3c50: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap = \n+001b3cc0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_new();
      ...
      .\n+001b3fb0: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. //
      .
      struct http_get_data *\n+001b4020: 6874 7470 6765 7464 6174 613b 203c 2f64 httpgetdata; .
      httpgetd\n+001b4050: 6174 6120 3d20 283c 7370 616e 2063 6c61 ata = (str\n+001b4070: 7563 7420 3c2f 7370 616e 3e68 7474 705f uct http_\n+001b4080: 6765 745f 6461 7461 2a29 736f 6170 5f6c get_data*)soap_l\n+001b4090: 6f6f 6b75 705f 706c 7567 696e 283c 6120 ookup_plugin(soap, ht\n+001b40d0: 7470 5f67 6574 5f69 6429 3b20 3c2f 6469 tp_get_id); .
      if (!htt\n+001b4120: 7067 6574 6461 7461 2920 3c2f 6469 763e pgetdata)
      \n+001b4130: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      ... // if the plugi\n+001b4170: 6e20 7265 6769 7374 6572 6564 204f 4b2c n registered OK,\n+001b4180: 2074 6865 7265 2069 7320 6365 7274 6169 there is certai\n+001b4190: 6e6c 7920 6461 7461 2062 7574 2063 616e nly data but can\n+001b41a0: 2623 3339 3b74 2068 7572 7420 746f 2063 't hurt to c\n+001b41b0: 6865 636b 203c 2f73 7061 6e3e 3c2f 6469 heck .
      ... // process mess\n+001b4200: 6167 6573 3c2f 7370 616e 3e3c 2f64 6976 ages.
      \n+001b4240: 7369 7a65 5f74 3c2f 7370 616e 3e20 6765 size_t ge\n+001b4250: 745f 6f6b 203d 2068 7474 7067 6574 6461 t_ok = httpgetda\n+001b4260: 7461 2d26 6774 3b73 7461 745f 6765 743b ta->stat_get;\n+001b4270: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      size_t post_ok = ht\n+001b42c0: 7470 6765 7464 6174 612d 2667 743b 7374 tpgetdata->st\n+001b42d0: 6174 5f70 6f73 743b 203c 2f64 6976 3e0a at_post;
      .\n+001b42e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      si\n+001b4310: 7a65 5f74 3c2f 7370 616e 3e20 6572 726f ze_t erro\n+001b4320: 7273 203d 2068 7474 7067 6574 6461 7461 rs = httpgetdata\n+001b4330: 2d26 6774 3b73 7461 745f 6661 696c 3b20 ->stat_fail; \n+001b4340: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      time_\n+001b4360: 7420 6e6f 7720 3d20 7469 6d65 284e 554c t now = time(NUL\n+001b4370: 4c29 3b20 3c2f 6469 763e 0a3c 6469 7620 L);
      .
      <\n+001b4390: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001b43a0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct tm *T;
      \n+001b43c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      T = localti\n+001b43e0: 6d65 2826 616d 703b 6e6f 7729 3b20 3c2f me(&now); .
      size_t\n+001b4430: 2068 6974 7374 6869 736d 696e 7574 6520 hitsthisminute \n+001b4440: 3d20 6874 7470 6765 7464 6174 612d 2667 = httpgetdata-&g\n+001b4450: 743b 6869 7374 5f6d 696e 5b54 2d26 6774 t;hist_min[T->\n+001b4460: 3b74 6d5f 6d69 6e5d 3b20 3c2f 6469 763e ;tm_min];
      \n+001b4470: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      s\n+001b44a0: 697a 655f 743c 2f73 7061 6e3e 2068 6974 ize_t hit\n+001b44b0: 7374 6869 7368 6f75 7220 3d20 6874 7470 sthishour = http\n+001b44c0: 6765 7464 6174 612d 2667 743b 6869 7374 getdata->hist\n+001b44d0: 5f68 6f75 725b 542d 2667 743b 746d 5f68 _hour[T->tm_h\n+001b44e0: 6f75 725d 3b20 3c2f 6469 763e 0a3c 6469 our];
      . \n+001b4500: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_\n+001b4520: 743c 2f73 7061 6e3e 2068 6974 7374 6f64 t hitstod\n+001b4530: 6179 203d 2068 7474 7067 6574 6461 7461 ay = httpgetdata\n+001b4540: 2d26 6774 3b68 6973 745f 6461 795b 542d ->hist_day[T-\n+001b4550: 2667 743b 746d 5f79 6461 795d 3b3c 2f64 >tm_yday];.
      }
      .

      An HTTP \n+001b45a0: 4745 5420 6861 6e64 6c65 7220 6361 6e20 GET handler can \n+001b45b0: 7369 6d70 6c79 2070 726f 6475 6365 2073 simply produce s\n+001b45c0: 6f6d 6520 4854 4d4c 2063 6f6e 7465 6e74 ome HTML content\n+001b45d0: 2c20 6f72 2061 6e79 206f 7468 6572 2074 , or any other t\n+001b45e0: 7970 6520 6f66 2063 6f6e 7465 6e74 2062 ype of content b\n+001b45f0: 7920 7365 6e64 696e 6720 6461 7461 2075 y sending data u\n+001b4600: 7369 6e67 203c 636f 6465 3e3c 6120 636c sing soap_response:

      .<\n+001b46d0: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+001b46e0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">.{\n+001b47d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      soap-><\n+001b4820: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b4830: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b4840: 6874 6d6c 2361 6535 6539 3837 3333 6134 html#ae5e98733a4\n+001b4850: 3334 3962 3565 3134 3636 6139 6530 6363 349b5e1466a9e0cc\n+001b4860: 6332 3263 3131 223e 6874 7470 5f63 6f6e c22c11\">http_con\n+001b4870: 7465 6e74 3c2f 613e 203d 203c 7370 616e tent = "tex\n+001b48a0: 742f 6874 6d6c 2671 756f 743b 3c2f 7370 t/html";
      . \n+001b48d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_respon\n+001b4950: 7365 3c2f 613e 283c 6120 636c 6173 733d se(so\n+001b4980: 6170 3c2f 613e 2c20 3c61 2063 6c61 7373 ap, SOAP_FIL\n+001b49e0: 453c 2f61 3e29 3c2f 6469 763e 0a3c 6469 E)
      . \n+001b4a00: 2020 7c7c 203c 6120 636c 6173 733d 2263 || soap_send(soap, \n+001b4ab0: 2671 756f 743b 266c 743b 6874 6d6c 2667 "<html&g\n+001b4ac0: 743b 4865 6c6c 6f26 6c74 3b2f 6874 6d6c t;Hello</html\n+001b4ad0: 2667 743b 2671 756f 743b 3c2f 7370 616e >")
      ..
      \n+001b4bb0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return\n+001b4bd0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 soap_clo\n+001b4c30: 7365 736f 636b 3c2f 613e 283c 6120 636c sesock(soap);.
      return <\n+001b4cb0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b4cc0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001b4cd0: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g\n+001b4ce0: 6133 6231 3061 3638 6633 3534 6633 3963 a3b10a68f354f39c\n+001b4cf0: 6262 3066 6530 6430 3433 6164 3463 3763 bb0fe0d043ad4c7c\n+001b4d00: 3022 3e53 4f41 505f 4f4b 3c2f 613e 3b20 0\">SOAP_OK; \n+001b4d10: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // return \n+001b4d30: 534f 4150 5f4f 4b20 6f72 2048 5454 5020 SOAP_OK or HTTP \n+001b4d40: 6572 726f 7220 636f 6465 2c20 652e 672e error code, e.g.\n+001b4d50: 2034 3034 203c 2f73 7061 6e3e 3c2f 6469 404 .
      }
      .

      If you us\n+001b4da0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap_copy\n+001b4e60: 3c2f 636f 6465 3e20 746f 2063 6f70 7920 to copy \n+001b4e70: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap context wi\n+001b4ee0: 7468 2074 6865 2070 6c75 6769 6e2c 2074 th the plugin, t\n+001b4ef0: 6865 2070 6c75 6769 6e27 7320 6461 7461 he plugin's data\n+001b4f00: 2077 696c 6c20 6265 2073 6861 7265 6420 will be shared \n+001b4f10: 6279 2074 6865 2063 6f70 792e 2054 6865 by the copy. The\n+001b4f20: 7265 666f 7265 2c20 7468 6520 7374 6174 refore, the stat\n+001b4f30: 6973 7469 6373 2061 7265 206e 6f74 2031 istics are not 1\n+001b4f40: 3030 2520 6775 6172 616e 7465 6564 2074 00% guaranteed t\n+001b4f50: 6f20 6265 2061 6363 7572 6174 6520 666f o be accurate fo\n+001b4f60: 7220 6d75 6c74 692d 7468 7265 6164 6564 r multi-threaded\n+001b4f70: 2073 6572 7669 6365 7320 7369 6e63 6520 services since \n+001b4f80: 7261 6365 2063 6f6e 6469 7469 6f6e 7320 race conditions \n+001b4f90: 6f6e 2074 6865 2063 6f75 6e74 6572 7320 on the counters \n+001b4fa0: 6d61 7920 6f63 6375 722e 204d 7574 6578 may occur. Mutex\n+001b4fb0: 2069 7320 6e6f 7420 7573 6564 2074 6f20 is not used to \n+001b4fc0: 7570 6461 7465 2074 6865 2063 6f75 6e74 update the count\n+001b4fd0: 6572 7320 746f 2061 766f 6964 2069 6e74 ers to avoid int\n+001b4fe0: 726f 6475 6369 6e67 2065 7870 656e 7369 roducing expensi\n+001b4ff0: 7665 2073 796e 6368 726f 6e69 7a61 7469 ve synchronizati\n+001b5000: 6f6e 2070 6f69 6e74 732e 2049 6620 3130 on points. If 10\n+001b5010: 3025 2073 6572 7665 722d 7369 6465 2061 0% server-side a\n+001b5020: 6363 7572 6163 7920 6973 2072 6571 7569 ccuracy is requi\n+001b5030: 7265 642c 2061 6464 206d 7574 6578 2061 red, add mutex a\n+001b5040: 7420 7468 6520 706f 696e 7473 2069 6e64 t the points ind\n+001b5050: 6963 6174 6564 2069 6e20 7468 6520 3c65 icated in the httpget.\n+001b5070: 633c 2f63 6f64 653e 3c2f 656d 3e20 636f c co\n+001b5080: 6465 2e3c 2f70 3e0a 3c70 3e54 6865 2063 de.

      .

      The c\n+001b5090: 6c69 656e 742d 7369 6465 2075 7365 206f lient-side use o\n+001b50a0: 6620 4854 5450 2047 4554 2069 7320 7072 f HTTP GET is pr\n+001b50b0: 6f76 6964 6564 2062 7920 7468 6520 3c63 ovided by the soap_GET\n+001b5140: 3c2f 613e 3c2f 636f 6465 3e20 6f70 6572 oper\n+001b5150: 6174 696f 6e2e 2054 6f20 7265 6365 6976 ation. To receiv\n+001b5160: 6520 6120 534f 4150 2f58 4d4c 2028 7265 e a SOAP/XML (re\n+001b5170: 7370 6f6e 7365 2920 6d65 7373 6167 6520 sponse) message \n+001b5180: 3c65 6d3e 3c63 6f64 653e 6e73 3a6d 6574 ns:met\n+001b5190: 686f 6452 6573 706f 6e73 653c 2f63 6f64 hodResponse, use:.

      int m\n+001b5200: 6169 6e28 293c 2f64 6976 3e0a 3c64 6976 ain()
      .{<\n+001b5220: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      \n+001b5250: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap *<\n+001b5290: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b52a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b52b0: 6874 6d6c 223e 736f 6170 3c2f 613e 203d html\">soap =\n+001b52c0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_new();
      . \n+001b5340: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_GET(soap, endp\n+001b5440: 6f69 6e74 3c2f 613e 2c20 4e55 4c4c 2929 oint, NULL))\n+001b5450: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      ..\n+001b5470: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // error\n+001b5490: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+001b54b0: 2020 3c73 7061 6e20 636c 6173 733d 226b else\n+001b54d0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c if (soa\n+001b5500: 705f 7265 6376 5f6e 735f 5f77 6562 6d65 p_recv_ns__webme\n+001b5510: 7468 6f64 5265 7370 6f6e 7365 283c 6120 thodResponse(soap, ..\n+001b5550: 2e29 2920 3c2f 6469 763e 0a3c 6469 7620 .))
      .
      \n+001b5570: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // er\n+001b5590: 726f 723c 2f73 7061 6e3e 3c2f 6469 763e ror
      \n+001b55a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      e\n+001b55d0: 6c73 653c 2f73 7061 6e3e 203c 2f64 6976 lse .
      ... // success
      ..
      soap_end(<\n+001b5750: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b5760: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b5770: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html\">soap);\n+001b5780: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      s\n+001b57f0: 6f61 705f 646f 6e65 3c2f 613e 283c 6120 oap_done(soap);.
      int soap_GET(s\n+001b5910: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap\n+001b5920: 2c20 636f 6e73 7420 6368 6172 202a 656e , const char *en\n+001b5930: 6470 6f69 6e74 2c20 636f 6e73 7420 6368 dpoint, const ch\n+001b5940: 6172 202a 6163 7469 6f6e 293c 2f64 6976 ar *action)
      HTTP GET con\n+001b5970: 7465 6e74 2066 726f 6d20 7365 7276 6572 tent from server\n+001b5980: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f .
      .

      To recei\n+001b59b0: 7665 2061 6e79 2048 5454 5020 426f 6479 ve any HTTP Body\n+001b59c0: 2064 6174 6120 696e 746f 2061 2062 7566 data into a buf\n+001b59d0: 6665 722c 2075 7365 3a3c 2f70 3e0a 3c64 fer, use:

      .
      \n+001b5a20: 696e 743c 2f73 7061 6e3e 206d 6169 6e28 int main(\n+001b5a30: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
      .
      {.
      stru\n+001b5a80: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap *soap = soap_new()\n+001b5b50: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
      .
      char *response = NU\n+001b5ba0: 4c4c 3b20 3c2f 6469 763e 0a3c 6469 7620 LL;
      .
      <\n+001b5bc0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001b5bd0: 6f72 6474 7970 6522 3e73 697a 655f 743c ordtype\">size_t<\n+001b5be0: 2f73 7061 6e3e 2072 6573 706f 6e73 655f /span> response_\n+001b5bf0: 6c65 6e3b 3c2f 6469 763e 0a3c 6469 7620 len;
      .
      <\n+001b5c10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001b5c20: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if (soap_GET\n+001b5c90: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001b5cc0: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , endpo\n+001b5d10: 696e 743c 2f61 3e2c 204e 554c 4c29 3c2f int, NULL).
      || (re\n+001b5d40: 7370 6f6e 7365 203d 203c 6120 636c 6173 sponse = soap_ht\n+001b5da0: 7470 5f67 6574 5f62 6f64 793c 2f61 3e28 tp_get_body(\n+001b5db0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001b5de0: 2026 616d 703b 7265 7370 6f6e 7365 5f6c &response_l\n+001b5df0: 656e 2929 203d 3d20 4e55 4c4c 3c2f 6469 en)) == NULL.
      || soap_\n+001b5e70: 656e 645f 7265 6376 3c2f 613e 2826 616d end_recv(&am\n+001b5e80: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap))
      .
      \n+001b5ed0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // err\n+001b5ef0: 6f72 3c2f 7370 616e 3e3c 2f64 6976 3e0a or
      .\n+001b5f00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      el\n+001b5f30: 7365 3c2f 7370 616e 3e3c 2f64 6976 3e0a se
      .\n+001b5f40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      ... \n+001b5f70: 2f2f 2075 7365 2074 6865 2072 6573 706f // use the respo\n+001b5f80: 6e73 6520 7374 7269 6e67 2028 4e55 4c4c nse string (NULL\n+001b5f90: 2069 6e64 6963 6174 6573 206e 6f20 626f indicates no bo\n+001b5fa0: 6479 206f 7220 6572 726f 7229 3c2f 7370 dy or error)
      .
      soap_destroy<\n+001b6030: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(&\n+001b6060: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap); .
      soap_\n+001b60e0: 656e 643c 2f61 3e28 2661 6d70 3b3c 6120 end(&soap); <\n+001b6120: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      s\n+001b6190: 6f61 705f 646f 6e65 3c2f 613e 2826 616d oap_done(&am\n+001b61a0: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
      .
      }.

      See a\n+001b64b0: 6c73 6f20 3c63 6f64 653e 3c61 2063 6c61 lso http_\n+001b6540: 6765 743c 2f61 3e3c 2f63 6f64 653e 2e3c get.<\n+001b6550: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

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

      .

      .RES\n+001b65c0: 5466 756c 2073 6572 7665 722d 7369 6465 Tful server-side\n+001b65d0: 2041 5049 2077 6974 6820 7468 6520 4854 API with the HT\n+001b65e0: 5450 2050 4f53 5420 706c 7567 696e 3c2f TP POST plugin.

      Server-si\n+001b6600: 6465 2075 7365 206f 6620 5245 5354 6675 de use of RESTfu\n+001b6610: 6c20 4854 5450 2050 4f53 542c 2050 5554 l HTTP POST, PUT\n+001b6620: 2c20 5041 5443 482c 2061 6e64 2044 454c , PATCH, and DEL\n+001b6630: 4554 4520 6f70 6572 6174 696f 6e73 2061 ETE operations a\n+001b6640: 7265 2073 7570 706f 7274 6564 2077 6974 re supported wit\n+001b6650: 6820 7468 6520 3c63 6f64 653e 3c61 2063 h the ht\n+001b66e0: 7470 5f70 6f73 743c 2f61 3e3c 2f63 6f64 tp_post HTTP POST plu\n+001b6700: 6769 6e20 3c65 6d3e 3c63 6f64 653e 6773 gin gs\n+001b6710: 6f61 702f 706c 7567 696e 2f68 7474 7070 oap/plugin/httpp\n+001b6720: 6f73 742e 633c 2f63 6f64 653e 3c2f 656d ost.c.

      .

      The http_post<\n+001b67d0: 2f61 3e3c 2f63 6f64 653e 2048 5454 5020 /a> HTTP \n+001b67e0: 504f 5354 2070 6c75 6769 6e20 616c 6c6f POST plugin allo\n+001b67f0: 7773 2079 6f75 7220 7365 7276 6572 2074 ws your server t\n+001b6800: 6f20 6861 6e64 6c65 2052 4553 5466 756c o handle RESTful\n+001b6810: 2048 5454 5020 504f 5354 2072 6571 7565 HTTP POST reque\n+001b6820: 7374 7320 616e 6420 6174 2074 6865 2073 sts and at the s\n+001b6830: 616d 6520 7469 6d65 2073 7469 6c6c 2073 ame time still s\n+001b6840: 6572 7665 2053 4f41 502d 6261 7365 6420 erve SOAP-based \n+001b6850: 504f 5354 2072 6571 7565 7374 732e 2054 POST requests. T\n+001b6860: 6865 2070 6c75 6769 6e20 616c 736f 2070 he plugin also p\n+001b6870: 726f 7669 6465 7320 7375 7070 6f72 7420 rovides support \n+001b6880: 666f 7220 636c 6965 6e74 2061 7070 6c69 for client appli\n+001b6890: 6361 7469 6f6e 7320 746f 2069 7373 7565 cations to issue\n+001b68a0: 2048 5454 5020 504f 5354 206f 7065 7261 HTTP POST opera\n+001b68b0: 7469 6f6e 7320 746f 2061 2073 6572 7665 tions to a serve\n+001b68c0: 722e 3c2f 703e 0a3c 703e 546f 2073 696d r.

      .

      To sim\n+001b68d0: 706c 6966 7920 7468 6520 7365 7276 6572 plify the server\n+001b68e0: 2d73 6964 6520 6861 6e64 6c69 6e67 206f -side handling o\n+001b68f0: 6620 504f 5354 2072 6571 7565 7374 732c f POST requests,\n+001b6900: 2068 616e 646c 6572 7320 6361 6e20 6265 handlers can be\n+001b6910: 2061 7373 6f63 6961 7465 6420 7769 7468 associated with\n+001b6920: 206d 6564 6961 2074 7970 6573 3a3c 2f70 media types:.

      \n+001b6970: 7374 7275 6374 203c 2f73 7061 6e3e 6874 struct ht\n+001b6980: 7470 5f70 6f73 745f 6861 6e64 6c65 7273 tp_post_handlers\n+001b6990: 206d 795f 6861 6e64 6c65 7273 5b5d 203d my_handlers[] =\n+001b69a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      {.
      { "image/\n+001b6a00: 6a70 6726 7175 6f74 3b3c 2f73 7061 6e3e jpg"\n+001b6a10: 2c20 6a70 6567 5f68 616e 646c 6572 207d , jpeg_handler }\n+001b6a20: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
      .
      { <\n+001b6a40: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class=\"stri\n+001b6a50: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral\">"\n+001b6a60: 3b69 6d61 6765 2f2a 2671 756f 743b 3c2f ;image/*", image_h\n+001b6a80: 616e 646c 6572 207d 2c20 3c2f 6469 763e andler },
      \n+001b6a90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      { "text/ht\n+001b6ad0: 6d6c 2671 756f 743b 3c2f 7370 616e 3e2c ml",\n+001b6ae0: 2068 746d 6c5f 6861 6e64 6c65 7220 7d2c html_handler },\n+001b6af0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      { "\n+001b6b30: 7465 7874 2f2a 2671 756f 743b 3c2f 7370 text/*", text_han\n+001b6b50: 646c 6572 207d 2c20 3c2f 6469 763e 0a3c dler },
      .<\n+001b6b60: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b6b70: 3e20 207b 203c 7370 616e 2063 6c61 7373 > { "POST"\n+001b6ba0: 3b3c 2f73 7061 6e3e 2c20 2020 2020 2067 ;, g\n+001b6bb0: 656e 6572 6963 5f50 4f53 545f 6861 6e64 eneric_POST_hand\n+001b6bc0: 6c65 7220 7d2c 203c 2f64 6976 3e0a 3c64 ler },
      .\n+001b6be0: 2020 7b20 3c73 7061 6e20 636c 6173 733d { \n+001b6c00: 2671 756f 743b 5055 5426 7175 6f74 3b3c "PUT"<\n+001b6c10: 2f73 7061 6e3e 2c20 2020 2020 2020 6765 /span>, ge\n+001b6c20: 6e65 7269 635f 5055 545f 6861 6e64 6c65 neric_PUT_handle\n+001b6c30: 7220 7d2c 203c 2f64 6976 3e0a 3c64 6976 r },
      . \n+001b6c50: 7b20 3c73 7061 6e20 636c 6173 733d 2273 { &q\n+001b6c70: 756f 743b 5041 5443 4826 7175 6f74 3b3c uot;PATCH"<\n+001b6c80: 2f73 7061 6e3e 2c20 2020 2020 6765 6e65 /span>, gene\n+001b6c90: 7269 635f 5041 5443 485f 6861 6e64 6c65 ric_PATCH_handle\n+001b6ca0: 7220 7d2c 203c 2f64 6976 3e0a 3c64 6976 r },

      . \n+001b6cc0: 7b20 3c73 7061 6e20 636c 6173 733d 2273 { &q\n+001b6ce0: 756f 743b 4445 4c45 5445 2671 756f 743b uot;DELETE"\n+001b6cf0: 3c2f 7370 616e 3e2c 2020 2020 6765 6e65 , gene\n+001b6d00: 7269 635f 4445 4c45 5445 5f68 616e 646c ric_DELETE_handl\n+001b6d10: 6572 207d 2c20 3c2f 6469 763e 0a3c 6469 er },
      . \n+001b6d30: 207b 204e 554c 4c20 7d20 3c2f 6469 763e { NULL }
      \n+001b6d40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      };
      .

      Note that \n+001b6d80: 3c63 6f64 653e 2a3c 2f63 6f64 653e 2061 * a\n+001b6d90: 6e64 203c 636f 6465 3e2d 3c2f 636f 6465 nd - can be used as\n+001b6db0: 2077 696c 6463 6172 6473 2074 6f20 6d61 wildcards to ma\n+001b6dc0: 7463 6820 616e 7920 7465 7874 2061 6e64 tch any text and\n+001b6dd0: 2061 6e79 2063 6861 7261 6374 6572 2c20 any character, \n+001b6de0: 7265 7370 6563 7469 7665 6c79 2e20 4d65 respectively. Me\n+001b6df0: 6469 6120 7479 7065 7320 6d61 7920 6861 dia types may ha\n+001b6e00: 7665 206f 7074 696f 6e61 6c20 7061 7261 ve optional para\n+001b6e10: 6d65 7465 7273 2061 6674 6572 203c 636f meters after ; such\n+001b6e30: 2061 7320 3c63 6f64 653e 6368 6172 7365 as charse\n+001b6e40: 743c 2f63 6f64 653e 2061 6e64 203c 636f t and boundary. These parame\n+001b6e70: 7465 7273 2063 616e 2062 6520 6d61 7463 ters can be matc\n+001b6e80: 6865 6420 6279 2074 6865 206d 6564 6961 hed by the media\n+001b6e90: 2074 7970 6520 7061 7474 6572 6e73 2069 type patterns i\n+001b6ea0: 6e20 7468 6520 7461 626c 652e 2050 6174 n the table. Pat\n+001b6eb0: 7465 726e 7320 7468 6174 2061 7265 206d terns that are m\n+001b6ec0: 6f72 6520 7370 6563 6966 6963 206d 7573 ore specific mus\n+001b6ed0: 7420 7072 6563 6564 6520 7061 7474 6572 t precede patter\n+001b6ee0: 6e73 2074 6861 7420 6172 6520 6c65 7373 ns that are less\n+001b6ef0: 2073 7065 6369 6669 6320 696e 2074 6865 specific in the\n+001b6f00: 2074 6162 6c65 2e20 466f 7220 6578 616d table. For exam\n+001b6f10: 706c 652c 203c 636f 6465 3e22 7465 7874 ple, \"text\n+001b6f20: 2f78 6d6c 3b2a 6368 6172 7365 743d 7574 /xml;*charset=ut\n+001b6f30: 662d 382a 223c 2f63 6f64 653e 206d 7573 f-8*\" mus\n+001b6f40: 7420 7072 6563 6564 6520 3c63 6f64 653e t precede \n+001b6f50: 2274 6578 742f 786d 6c22 3c2f 636f 6465 \"text/xml\" which must pre\n+001b6f70: 6365 6465 203c 636f 6465 3e22 7465 7874 cede \"text\n+001b6f80: 2f2a 223c 2f63 6f64 653e 2e20 4e6f 7465 /*\". Note\n+001b6f90: 2074 6861 7420 3c63 6f64 653e 2274 6578 that \"tex\n+001b6fa0: 742f 786d 6c22 3c2f 636f 6465 3e20 616c t/xml\" al\n+001b6fb0: 736f 206d 6174 6368 6573 2061 6e79 2070 so matches any p\n+001b6fc0: 6172 616d 6574 6572 7320 6f66 2074 6865 arameters of the\n+001b6fd0: 206d 6564 6961 2074 7970 6520 6f66 2074 media type of t\n+001b6fe0: 6865 206d 6573 7361 6765 2072 6576 6569 he message revei\n+001b6ff0: 7665 642c 2073 7563 6820 6173 203c 636f ved, such as \"text/xml; ch\n+001b7010: 6172 7365 743d 7574 662d 3822 3c2f 636f arset=utf-8\" (only since \n+001b7030: 6753 4f41 5020 7665 7273 696f 6e20 322e gSOAP version 2.\n+001b7040: 382e 3735 292e 3c2f 703e 0a3c 703e 5468 8.75).

      .

      Th\n+001b7050: 6520 6861 6e64 6c65 7273 2061 7265 2066 e handlers are f\n+001b7060: 756e 6374 696f 6e73 2074 6861 7420 7769 unctions that wi\n+001b7070: 6c6c 2062 6520 696e 766f 6b65 6420 7768 ll be invoked wh\n+001b7080: 656e 2061 2050 4f53 5465 6420 7265 7175 en a POSTed requ\n+001b7090: 6573 7420 6d65 7373 6167 6520 6d61 7463 est message matc\n+001b70a0: 6869 6e67 206d 6564 6961 2074 7970 6520 hing media type \n+001b70b0: 6973 2073 656e 7420 746f 2074 6865 2073 is sent to the s\n+001b70c0: 6572 7665 722e 3c2f 703e 0a3c 703e 416e erver.

      .

      An\n+001b70d0: 2065 7861 6d70 6c65 2069 6d61 6765 2068 example image h\n+001b70e0: 616e 646c 6572 2074 6861 7420 6368 6563 andler that chec\n+001b70f0: 6b73 2074 6865 2073 7065 6369 6669 6320 ks the specific \n+001b7100: 696d 6167 6520 7479 7065 3a3c 2f70 3e0a image type:

      .\n+001b7110: 3c64 6976 2063 6c61 7373 3d22 6672 6167
      .
      {.
      cons\n+001b7240: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+001b7270: 6275 663b 203c 2f64 6976 3e0a 3c64 6976 buf;
      . \n+001b7290: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t\n+001b72b0: 3c2f 7370 616e 3e20 6c65 6e3b 203c 2f64 len; .
      //\n+001b72f0: 2069 6620 6e65 6365 7373 6172 792c 2063 if necessary, c\n+001b7300: 6865 636b 2074 7970 6520 696e 2073 6f61 heck type in soa\n+001b7310: 702d 2667 743b 6874 7470 5f63 6f6e 7465 p->http_conte\n+001b7320: 6e74 203c 2f73 7061 6e3e 3c2f 6469 763e nt
      \n+001b7330: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      i\n+001b7360: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (soap->http_cont\n+001b73f0: 656e 743c 2f61 3e20 2661 6d70 3b26 616d ent &&am\n+001b7400: 703b 2021 3c61 2063 6c61 7373 3d22 636f p; !soap_tag_c\n+001b7460: 6d70 3c2f 613e 283c 6120 636c 6173 733d mp(so\n+001b7490: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->http_content\n+001b74f0: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , "image/gi\n+001b7520: 6626 7175 6f74 3b3c 2f73 7061 6e3e 2920 f") \n+001b7530: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      return 404; \n+001b7590: 2f2f 2048 5454 5020 6572 726f 7220 3430 // HTTP error 40\n+001b75a0: 3420 3c2f 7370 616e 3e3c 2f64 6976 3e0a 4
      .\n+001b75b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      if ((buf = <\n+001b75d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b75e0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref=\"group__grou\n+001b75f0: 705f 5f69 6f2e 6874 6d6c 2367 6165 3263 p__io.html#gae2c\n+001b7600: 6433 3766 3837 3564 3333 3134 6565 6333 d37f875d3314eec3\n+001b7610: 3134 6238 3732 3365 3266 6664 3822 3e73 14b8723e2ffd8\">s\n+001b7620: 6f61 705f 6874 7470 5f67 6574 5f62 6f64 oap_http_get_bod\n+001b7630: 793c 2f61 3e28 3c61 2063 6c61 7373 3d22 y(soa\n+001b7660: 703c 2f61 3e2c 2026 616d 703b 6c65 6e29 p, &len)\n+001b7670: 2920 3d3d 204e 554c 4c29 3c2f 6469 763e ) == NULL)
      \n+001b7680: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      return <\n+001b76c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b76d0: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b76e0: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html\">soap-&\n+001b76f0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;erro\n+001b7740: 723c 2f61 3e3b 203c 2f64 6976 3e0a 3c64 r;
      .\n+001b7760: 2020 3c73 7061 6e20 636c 6173 733d 2263 // ... n\n+001b7780: 6f77 2070 726f 6365 7373 2069 6d61 6765 ow process image\n+001b7790: 2069 6e20 6275 6620 3c2f 7370 616e 3e3c in buf <\n+001b77a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      \n+001b77d0: 2f2f 2072 6570 6c79 2077 6974 6820 656d // reply with em\n+001b77e0: 7074 7920 4854 5450 2032 3030 204f 4b20 pty HTTP 200 OK \n+001b77f0: 7265 7370 6f6e 7365 3a20 3c2f 7370 616e response:
      .
      return soap_send_em\n+001b78a0: 7074 795f 7265 7370 6f6e 7365 3c2f 613e pty_response\n+001b78b0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001b78e0: 2c20 3230 3029 3b20 3c2f 6469 763e 0a3c , 200);
      .<\n+001b78f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001b7900: 3e7d 3c2f 6469 763e 0a3c 6469 7620 636c >}
      .
      <\n+001b7970: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href=\"group__g\n+001b7980: 726f 7570 5f5f 6d69 7363 2e68 746d 6c23 roup__misc.html#\n+001b7990: 6761 6532 6266 6164 3439 3937 3966 6161 gae2bfad49979faa\n+001b79a0: 3361 3632 3561 6361 3434 6163 6161 3031 3a625aca44acaa01\n+001b79b0: 3763 223e 736f 6170 5f74 6167 5f63 6d70 7c\">soap_tag_cmp\n+001b79c0: 3c2f 613e 3c2f 6469 763e 3c64 6976 2063
      in\n+001b79e0: 7420 736f 6170 5f74 6167 5f63 6d70 2863 t soap_tag_cmp(c\n+001b79f0: 6f6e 7374 2063 6861 7220 2a73 7472 696e onst char *strin\n+001b7a00: 672c 2063 6f6e 7374 2063 6861 7220 2a70 g, const char *p\n+001b7a10: 6174 7465 726e 293c 2f64 6976 3e3c 6469 attern)
      \n+001b7a30: 436f 6d70 6172 6520 7374 7269 6e67 2074 Compare string t\n+001b7a40: 6f20 6120 7061 7474 6572 6e2e 3c2f 6469 o a pattern.
      .
      <\n+001b7a60: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+001b7a70: 3c70 3e54 6865 2061 626f 7665 2065 7861

      The above exa\n+001b7a80: 6d70 6c65 2072 6574 7572 6e73 2048 5454 mple returns HTT\n+001b7a90: 5020 4f4b 2e20 4966 2063 6f6e 7465 6e74 P OK. If content\n+001b7aa0: 2069 7320 7375 7070 6f73 6564 2074 6f20 is supposed to \n+001b7ab0: 6265 2072 6574 7572 6e65 642c 2074 6865 be returned, the\n+001b7ac0: 6e20 7573 653a 3c2f 703e 0a3c 6469 7620 n use:

      .
      struct \n+001b7b10: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so\n+001b7b40: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+001b7b70: 6f61 703c 2f61 3e20 3d20 3c61 2063 6c61 oap = s\n+001b7bd0: 6f61 705f 6e65 773c 2f61 3e28 293b 3c2f oap_new();.
      ... //
      \n+001b7c20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      soap->\n+001b7cb0: 6874 7470 5f63 6f6e 7465 6e74 3c2f 613e http_content\n+001b7cc0: 203d 203c 7370 616e 2063 6c61 7373 3d22 = &\n+001b7ce0: 7175 6f74 3b69 6d61 6765 2f6a 7065 6726 quot;image/jpeg&\n+001b7cf0: 7175 6f74 3b3c 2f73 7061 6e3e 3b20 3c73 quot;; // a jpeg im\n+001b7d20: 6167 6520 746f 2072 6574 7572 6e20 6261 age to return ba\n+001b7d30: 636b 203c 2f73 7061 6e3e 3c2f 6469 763e ck
      \n+001b7d40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      if<\n+001b7d70: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (soap_res\n+001b7dd0: 706f 6e73 653c 2f61 3e28 3c61 2063 6c61 ponse(soap, SOAP_\n+001b7e60: 4649 4c45 3c2f 613e 2929 203c 7370 616e FILE)) // SOAP_FILE se\n+001b7e90: 7473 2063 7573 746f 6d20 6874 7470 2063 ts custom http c\n+001b7ea0: 6f6e 7465 6e74 203c 2f73 7061 6e3e 3c2f ontent .
      || soap_\n+001b7f20: 7365 6e64 5f72 6177 3c2f 613e 283c 6120 send_raw(soap, buf, \n+001b7fb0: 6c65 6e29 203c 7370 616e 2063 6c61 7373 len) // se\n+001b7fd0: 6e64 2069 6d61 6765 203c 2f73 7061 6e3e nd image \n+001b7fe0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      || soa\n+001b8050: 705f 656e 645f 7365 6e64 3c2f 613e 283c p_end_send(<\n+001b8060: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b8070: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b8080: 6874 6d6c 223e 736f 6170 3c2f 613e 293c html\">soap)<\n+001b8090: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..<\n+001b8180: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001b8190: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow\">return<\n+001b81a0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> SOAP_\n+001b8200: 4f4b 3c2f 613e 3b3c 2f64 6976 3e0a 3c2f OK;
      .

      For clie\n+001b8230: 6e74 2061 7070 6c69 6361 7469 6f6e 7320 nt applications \n+001b8240: 746f 2075 7365 2048 5454 5020 504f 5354 to use HTTP POST\n+001b8250: 2c20 7573 6520 7468 6520 3c63 6f64 653e , use the \n+001b8260: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_POST\n+001b82e0: 3c2f 636f 6465 3e20 6f70 6572 6174 696f operatio\n+001b82f0: 6e3a 3c2f 703e 0a3c 6469 7620 636c 6173 n:

      .
      <\n+001b8320: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001b8330: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord\">struct soap *soap<\n+001b83a0: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_\n+001b8400: 6e65 773c 2f61 3e28 293b 3c2f 6469 763e new();
      \n+001b8410: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      ... //<\n+001b8440: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      .<\n+001b8460: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001b8470: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *b\n+001b84d0: 7566 3c2f 613e 3b20 3c73 7061 6e20 636c uf; //\n+001b84f0: 2068 6f6c 6473 2074 6865 2048 5454 5020 holds the HTTP \n+001b8500: 7265 7175 6573 742f 7265 7370 6f6e 7365 request/response\n+001b8510: 2062 6f64 7920 6461 7461 203c 2f73 7061 body data
      .
      size_t len; //\n+001b8580: 206c 656e 6774 6820 6f66 2064 6174 6120 length of data \n+001b8590: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
      .\n+001b85b0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // pop\n+001b85d0: 756c 6174 6520 6275 6620 616e 6420 6c65 ulate buf and le\n+001b85e0: 6e20 7769 7468 206d 6573 7361 6765 2074 n with message t\n+001b85f0: 6f20 7365 6e64 3c2f 7370 616e 3e3c 2f64 o send.
      \n+001b8630: 6966 3c2f 7370 616e 3e20 283c 6120 636c if (soap_\n+001b8690: 504f 5354 3c2f 613e 283c 6120 636c 6173 POST(\n+001b86c0: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, "URL&\n+001b86f0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 quot;, "\n+001b8720: 534f 4150 2061 6374 696f 6e20 6f72 204e SOAP action or N\n+001b8730: 554c 4c26 7175 6f74 3b3c 2f73 7061 6e3e ULL"\n+001b8740: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q\n+001b8760: 756f 743b 6d65 6469 6120 7479 7065 2671 uot;media type&q\n+001b8770: 756f 743b 3c2f 7370 616e 3e29 203c 2f64 uot;) .
      || soap_s\n+001b87f0: 656e 645f 7261 773c 2f61 3e28 3c61 2063 end_raw(soap, buf, l\n+001b8880: 656e 293b 203c 2f64 6976 3e0a 3c64 6976 en);
      . |\n+001b88a0: 7c20 3c61 2063 6c61 7373 3d22 636f 6465 | soap_end_send<\n+001b8900: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+001b8930: 2f61 3e29 2920 3c2f 6469 763e 0a3c 6469 /a>))
      . \n+001b8950: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // err\n+001b8970: 6f72 3c2f 7370 616e 3e3c 2f64 6976 3e0a or
      .\n+001b8980: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      if (soap_begi\n+001b8a10: 6e5f 7265 6376 3c2f 613e 2826 616d 703b n_recv(&\n+001b8a20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+001b8a50: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      || (<\n+001b8a70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001b8a80: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001b8a90: 6874 6d6c 2361 6364 6131 3733 3666 6261 html#acda1736fba\n+001b8aa0: 6163 3037 3236 3132 3236 6265 6665 3136 ac07261226befe16\n+001b8ab0: 3561 3536 3831 223e 6275 663c 2f61 3e20 5a5681\">buf \n+001b8ac0: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_http_get_\n+001b8b20: 626f 6479 3c2f 613e 283c 6120 636c 6173 body(\n+001b8b50: 736f 6170 3c2f 613e 2c20 2661 6d70 3b6c soap, &l\n+001b8b60: 656e 2929 203d 3d20 4e55 4c4c 3c2f 6469 en)) == NULL.
      || soap_en\n+001b8be0: 645f 7265 6376 3c2f 613e 2826 616d 703b d_recv(&\n+001b8bf0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+001b8c20: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
      .
      ...\n+001b8c40: 203c 7370 616e 2063 6c61 7373 3d22 636f // error<\n+001b8c60: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      .<\n+001b8c80: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001b8c90: 656e 7422 3e2f 2f20 2e2e 2e20 7573 6520 ent\">// ... use \n+001b8ca0: 6275 665b 302e 2e6c 656e 2d31 5d20 3c2f buf[0..len-1]
      .soap_destroy<\n+001b8d30: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap<\n+001b8d60: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
      .soap_end(\n+001b8de0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+001b8e10: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
      .
      s\n+001b8e80: 6f61 705f 6672 6565 3c2f 613e 283c 6120 oap_free(soap);.
      soap\n+001b8f70: 5f62 6567 696e 5f72 6563 763c 2f61 3e3c _begin_recv<\n+001b8f80: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
      int soa\n+001b8fa0: 705f 6265 6769 6e5f 7265 6376 2873 7472 p_begin_recv(str\n+001b8fb0: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)<\n+001b8fc0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
      Initiali\n+001b8fe0: 7a65 2074 6865 2063 6f6e 7465 7874 2066 ze the context f\n+001b8ff0: 6f72 2072 6563 6569 7669 6e67 2e3c 2f64 or receiving.
      .
      soap_POST
      int soap\n+001b90e0: 5f50 4f53 5428 7374 7275 6374 2073 6f61 _POST(struct soa\n+001b90f0: 7020 2a73 6f61 702c 2063 6f6e 7374 2063 p *soap, const c\n+001b9100: 6861 7220 2a65 6e64 706f 696e 742c 2063 har *endpoint, c\n+001b9110: 6f6e 7374 2063 6861 7220 2a61 6374 696f onst char *actio\n+001b9120: 6e2c 2063 6f6e 7374 2063 6861 7220 2a74 n, const char *t\n+001b9130: 7970 6529 3c2f 6469 763e 3c64 6976 2063 ype)
      HTT\n+001b9150: 5020 504f 5354 2063 6f6e 7465 6e74 2074 P POST content t\n+001b9160: 6f20 7365 7276 6572 2e3c 2f64 6976 3e3c o server.
      <\n+001b9170: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

      \n+001b9190: 5369 6d69 6c61 726c 792c 203c 636f 6465 Similarly, soap_PUT<\n+001b9220: 2f63 6f64 653e 2c20 3c63 6f64 653e 3c61 /code>, soap_PATCH\n+001b92b0: 3c2f 636f 6465 3e2c 2061 6e64 203c 636f , and soap_D\n+001b9340: 454c 4554 453c 2f61 3e3c 2f63 6f64 653e ELETE\n+001b9350: 2063 6f6d 6d61 6e64 7320 6172 6520 7072 commands are pr\n+001b9360: 6f76 6964 6564 2066 6f72 2050 5554 2c20 ovided for PUT, \n+001b9370: 5041 5443 482c 2061 6e64 2044 454c 4554 PATCH, and DELET\n+001b9380: 4520 6861 6e64 6c69 6e67 2e3c 2f70 3e0a E handling.

      .\n+001b9390: 3c70 3e54 6f20 7375 7070 6f72 7420 4854

      To support HT\n+001b93a0: 5450 2070 6970 656c 696e 696e 6720 7765 TP pipelining we\n+001b93b0: 2075 7365 2074 6865 203c 636f 6465 3e3c use the <\n+001b93c0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001b93d0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+001b93e0: 5f69 6f2e 6874 6d6c 2367 6162 6562 6334 _io.html#gabebc4\n+001b93f0: 3063 6234 6466 3736 3431 3837 3439 3635 0cb4df7641874965\n+001b9400: 6466 3237 6366 6437 6162 6322 2074 6974 df27cfd7abc\" tit\n+001b9410: 6c65 3d22 5468 6520 4854 5450 2070 6970 le=\"The HTTP pip\n+001b9420: 656c 696e 696e 6720 706c 7567 696e 2072 elining plugin r\n+001b9430: 6567 6973 7472 6174 696f 6e20 6675 6e63 egistration func\n+001b9440: 7469 6f6e 2e22 3e68 7474 705f 7069 7065 tion.\">http_pipe\n+001b9450: 3c2f 613e 3c2f 636f 6465 3e20 706c 7567 plug\n+001b9460: 696e 2c20 7768 6963 6820 6361 6e20 6265 in, which can be\n+001b9470: 2075 7365 6420 6174 2074 6865 2073 6572 used at the ser\n+001b9480: 7665 7220 7369 6465 2074 6f20 656e 6162 ver side to enab\n+001b9490: 6c65 2048 5454 5020 7069 7065 6c69 6e69 le HTTP pipelini\n+001b94a0: 6e67 2061 7574 6f6d 6174 6963 616c 6c79 ng automatically\n+001b94b0: 2c20 7768 656e 2072 6567 6973 7465 7265 , when registere\n+001b94c0: 642e 2054 6865 2070 6c75 6769 6e20 6361 d. The plugin ca\n+001b94d0: 6e20 616c 736f 2062 6520 7573 6564 2061 n also be used a\n+001b94e0: 7420 7468 6520 636c 6965 6e74 2073 6964 t the client sid\n+001b94f0: 652c 2074 686f 7567 6820 7468 6973 2069 e, though this i\n+001b9500: 7320 6f6e 6c79 206e 6563 6573 7361 7279 s only necessary\n+001b9510: 2069 6e20 7363 656e 6172 696f 7320 7468 in scenarios th\n+001b9520: 6174 2072 6571 7569 7265 2074 6865 2063 at require the c\n+001b9530: 6c69 656e 7420 746f 2072 6563 6569 7665 lient to receive\n+001b9540: 206d 756c 7469 706c 6520 6d65 7373 6167 multiple messag\n+001b9550: 6573 2077 6974 686f 7574 2069 6e74 6572 es without inter\n+001b9560: 6d69 7474 656e 6420 7365 6e64 732c 2069 mittend sends, i\n+001b9570: 2e65 2e20 6d75 6c74 6970 6c65 2073 656e .e. multiple sen\n+001b9580: 6473 2066 6f6c 6c6f 7765 6420 6279 206d ds followed by m\n+001b9590: 756c 7469 706c 6520 7265 6365 6976 6573 ultiple receives\n+001b95a0: 2062 7920 7468 6520 7361 6d65 2074 6872 by the same thr\n+001b95b0: 6561 6420 7573 696e 6720 7468 6520 7361 ead using the sa\n+001b95c0: 6d65 203c 636f 6465 3e3c 6120 636c 6173 me soap context. Ho\n+001b9630: 7765 7665 722c 2063 6c69 656e 7473 2073 wever, clients s\n+001b9640: 686f 756c 6420 7573 6520 6d75 6c74 6970 hould use multip\n+001b9650: 6c65 2074 6872 6561 6473 2077 6865 6e20 le threads when \n+001b9660: 4854 5450 2070 6970 656c 696e 696e 6720 HTTP pipelining \n+001b9670: 6973 2075 7365 6420 746f 2070 7265 7665 is used to preve\n+001b9680: 6e74 2062 6c6f 636b 696e 672e 2053 6565 nt blocking. See\n+001b9690: 2074 6865 203c 656d 3e3c 636f 6465 3e67 the g\n+001b96a0: 736f 6170 2f73 616d 706c 6573 2f61 7379 soap/samples/asy\n+001b96b0: 6e63 3c2f 636f 6465 3e3c 2f65 6d3e 2066 nc f\n+001b96c0: 6f6c 6465 7220 696e 2074 6865 2067 534f older in the gSO\n+001b96d0: 4150 2070 6163 6b61 6765 2066 6f72 2065 AP package for e\n+001b96e0: 7870 6c61 6e61 7469 6f6e 2061 6e64 2065 xplanation and e\n+001b96f0: 7861 6d70 6c65 732e 3c2f 703e 0a3c 703e xamples.

      .

      \n+001b9700: 5365 6520 616c 736f 203c 636f 6465 3e3c See also <\n+001b9710: 6120 636c 6173 733d 2265 6c22 2068 7265 a class=\"el\" hre\n+001b9720: 663d 2267 726f 7570 5f5f 6772 6f75 705f f=\"group__group_\n+001b9730: 5f69 6f2e 6874 6d6c 2367 6134 6330 3864 _io.html#ga4c08d\n+001b9740: 3565 6632 3862 6330 6463 3337 6565 6534 5ef28bc0dc37eee4\n+001b9750: 3633 3361 6364 6431 3134 3022 2074 6974 633acdd1140\" tit\n+001b9760: 6c65 3d22 5468 6520 4854 5450 2050 4f53 le=\"The HTTP POS\n+001b9770: 5420 706c 7567 696e 2072 6567 6973 7472 T plugin registr\n+001b9780: 6174 696f 6e20 6675 6e63 7469 6f6e 2e22 ation function.\"\n+001b9790: 3e68 7474 705f 706f 7374 3c2f 613e 3c2f >http_post and \n+001b97b0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 http_pip\n+001b9840: 653c 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 e..

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

      .

      \n+001b98b0: 3c2f 613e 0a54 6865 2048 5454 5020 6469 .The HTTP di\n+001b98c0: 6765 7374 2061 7574 6865 6e74 6963 6174 gest authenticat\n+001b98d0: 696f 6e20 706c 7567 696e 3c2f 6833 3e0a ion plugin

      .\n+001b98e0: 3c70 3e54 6865 2048 5454 5020 6469 6765

      The HTTP dige\n+001b98f0: 7374 2061 7574 6865 6e74 6963 6174 696f st authenticatio\n+001b9900: 6e20 706c 7567 696e 2065 6e61 626c 6573 n plugin enables\n+001b9910: 2061 206d 6f72 6520 7365 6375 7265 2061 a more secure a\n+001b9920: 7574 6865 6e74 6963 6174 696f 6e20 7363 uthentication sc\n+001b9930: 6865 6d65 2063 6f6d 7061 7265 6420 746f heme compared to\n+001b9940: 2062 6173 6963 2061 7574 6865 6e74 6963 basic authentic\n+001b9950: 6174 696f 6e2e 2048 5454 5020 6261 7369 ation. HTTP basi\n+001b9960: 6320 6175 7468 656e 7469 6361 7469 6f6e c authentication\n+001b9970: 2073 656e 6473 2075 6e65 6e63 7279 7074 sends unencrypt\n+001b9980: 6564 2075 7365 7269 6473 2061 6e64 2070 ed userids and p\n+001b9990: 6173 7377 6f72 6473 206f 7665 7220 7468 asswords over th\n+001b99a0: 6520 6e65 742c 2077 6869 6c65 2064 6967 e net, while dig\n+001b99b0: 6573 7420 6175 7468 656e 7469 6361 7469 est authenticati\n+001b99c0: 6f6e 2064 6f65 7320 6e6f 7420 6578 6368 on does not exch\n+001b99d0: 616e 6765 2070 6173 7377 6f72 6473 2062 ange passwords b\n+001b99e0: 7574 2065 7863 6861 6e67 6573 2063 6865 ut exchanges che\n+001b99f0: 636b 7375 6d73 206f 6620 7061 7373 776f cksums of passwo\n+001b9a00: 7264 7320 2861 6e64 206f 7468 6572 2064 rds (and other d\n+001b9a10: 6174 6120 7375 6368 2061 7320 6e6f 6e63 ata such as nonc\n+001b9a20: 6573 2074 6f20 6176 6f69 6420 7265 706c es to avoid repl\n+001b9a30: 6179 2061 7474 6163 6b73 292e 2046 6f72 ay attacks). For\n+001b9a40: 206d 6f72 6520 6465 7461 696c 732c 2070 more details, p\n+001b9a50: 6c65 6173 6520 7365 6520 5246 4320 3236 lease see RFC 26\n+001b9a60: 3137 2e3c 2f70 3e0a 3c70 3e54 6865 2048 17.

      .

      The H\n+001b9a70: 5454 5020 6469 6765 7374 2061 7574 6865 TTP digest authe\n+001b9a80: 6e74 6963 6174 696f 6e20 6361 6e20 6265 ntication can be\n+001b9a90: 2075 7365 6420 6e65 7874 2074 6f20 7468 used next to th\n+001b9aa0: 6520 6275 696c 742d 696e 2062 6173 6963 e built-in basic\n+001b9ab0: 2061 7574 6865 6e74 6963 6174 696f 6e2c authentication,\n+001b9ac0: 206f 7220 6261 7369 6320 6175 7468 656e or basic authen\n+001b9ad0: 7469 6361 7469 6f6e 2063 616e 2062 6520 tication can be \n+001b9ae0: 7265 6a65 6374 6564 2074 6f20 7469 6768 rejected to tigh\n+001b9af0: 7465 6e20 7365 6375 7269 7479 2e20 5468 ten security. Th\n+001b9b00: 6520 7365 7276 6572 206d 7573 7420 6861 e server must ha\n+001b9b10: 7665 2061 2064 6174 6162 6173 6520 7769 ve a database wi\n+001b9b20: 7468 2075 7365 7269 6427 7320 616e 6420 th userid's and \n+001b9b30: 7061 7373 776f 7264 7320 2869 6e20 706c passwords (in pl\n+001b9b40: 6169 6e20 7465 7874 2066 6f72 6d29 2e20 ain text form). \n+001b9b50: 5468 6520 636c 6965 6e74 2c20 7768 656e The client, when\n+001b9b60: 2063 6861 6c6c 656e 6765 6420 6279 2074 challenged by t\n+001b9b70: 6865 2073 6572 7665 722c 2063 6865 636b he server, check\n+001b9b80: 7320 7468 6520 6175 7468 656e 7469 6361 s the authentica\n+001b9b90: 7469 6f6e 2072 6561 6c6d 2070 726f 7669 tion realm provi\n+001b9ba0: 6465 6420 6279 2074 6865 2073 6572 7665 ded by the serve\n+001b9bb0: 7220 616e 6420 7365 7473 2074 6865 2075 r and sets the u\n+001b9bc0: 7365 7269 6420 616e 6420 7061 7373 776f serid and passwo\n+001b9bd0: 7264 7320 666f 7220 6469 6765 7374 2061 rds for digest a\n+001b9be0: 7574 6865 6e74 6963 6174 696f 6e2e 2054 uthentication. T\n+001b9bf0: 6865 2063 6c69 656e 7420 6170 706c 6963 he client applic\n+001b9c00: 6174 696f 6e20 6361 6e20 7465 6d70 6f72 ation can tempor\n+001b9c10: 6172 696c 7920 7374 6f72 6520 7468 6520 arily store the \n+001b9c20: 7573 6572 6964 2061 6e64 2070 6173 7377 userid and passw\n+001b9c30: 6f72 6420 666f 7220 6120 7365 7175 656e ord for a sequen\n+001b9c40: 6365 206f 6620 6d65 7373 6167 6520 6578 ce of message ex\n+001b9c50: 6368 616e 6765 7320 7769 7468 2074 6865 changes with the\n+001b9c60: 2073 6572 7665 722c 2077 6869 6368 2069 server, which i\n+001b9c70: 7320 6661 7374 6572 2074 6861 6e20 7265 s faster than re\n+001b9c80: 7065 6174 6564 2061 7574 686f 7269 7a61 peated authoriza\n+001b9c90: 7469 6f6e 2063 6861 6c6c 656e 6765 7320 tion challenges \n+001b9ca0: 616e 6420 6175 7468 656e 7469 6361 7469 and authenticati\n+001b9cb0: 6f6e 2072 6573 706f 6e73 6573 2e3c 2f70 on responses..

      At the clie\n+001b9cd0: 6e74 2073 6964 652c 2074 6865 2070 6c75 nt side, the plu\n+001b9ce0: 6769 6e20 6973 2072 6567 6973 7465 7265 gin is registere\n+001b9cf0: 6420 616e 6420 7365 7276 6963 6520 696e d and service in\n+001b9d00: 766f 6361 7469 6f6e 7320 6172 6520 6368 vocations are ch\n+001b9d10: 6563 6b65 6420 666f 7220 6175 7468 6f72 ecked for author\n+001b9d20: 697a 6174 696f 6e20 6368 616c 6c65 6e67 ization challeng\n+001b9d30: 6573 2028 4854 5450 2065 7272 6f72 2063 es (HTTP error c\n+001b9d40: 6f64 6520 3430 3129 2e20 5768 656e 2074 ode 401). When t\n+001b9d50: 6865 2073 6572 7665 7220 6368 616c 6c65 he server challe\n+001b9d60: 6e67 6573 2074 6865 2063 6c69 656e 742c nges the client,\n+001b9d70: 2074 6865 2063 6c69 656e 7420 7368 6f75 the client shou\n+001b9d80: 6c64 2073 6574 2074 6865 2075 7365 7269 ld set the useri\n+001b9d90: 6420 616e 6420 7061 7373 776f 7264 2061 d and password a\n+001b9da0: 6e64 2072 6574 7279 2074 6865 2069 6e76 nd retry the inv\n+001b9db0: 6f63 6174 696f 6e2e 2054 6865 2063 6c69 ocation. The cli\n+001b9dc0: 656e 7420 6361 6e20 6465 7465 726d 696e ent can determin\n+001b9dd0: 6520 7468 6520 7573 6572 6964 2061 6e64 e the userid and\n+001b9de0: 2070 6173 7377 6f72 6420 6261 7365 6420 password based \n+001b9df0: 6f6e 2074 6865 2061 7574 6865 6e74 6963 on the authentic\n+001b9e00: 6174 696f 6e20 7265 616c 6d20 7061 7274 ation realm part\n+001b9e10: 206f 6620 7468 6520 7365 7276 6572 2773 of the server's\n+001b9e20: 2063 6861 6c6c 656e 6765 2e20 5468 6520 challenge. The \n+001b9e30: 6175 7468 656e 7469 6361 7469 6f6e 2069 authentication i\n+001b9e40: 6e66 6f72 6d61 7469 6f6e 2063 616e 2062 nformation can b\n+001b9e50: 6520 7465 6d70 6f72 6172 696c 7920 7361 e temporarily sa\n+001b9e60: 7665 6420 666f 7220 6d75 6c74 6970 6c65 ved for multiple\n+001b9e70: 2069 6e76 6f63 6174 696f 6e73 2e3c 2f70 invocations..

      Client-side\n+001b9e90: 2065 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 example:

      .
      #include "\n+001b9ef0: 6874 7470 6461 2e68 2671 756f 743b 3c2f httpda.h"
      . \n+001b9f20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      int ma\n+001b9f60: 696e 2829 3c2f 6469 763e 0a3c 6469 7620 in()
      .
      {.
      s\n+001b9fb0: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap = \n+001ba020: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_new();
      .
      <\n+001ba0a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001ba0b0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow\">if soap_regi\n+001ba120: 7374 6572 5f70 6c75 6769 6e3c 2f61 3e28 ster_plugin(\n+001ba130: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001ba160: 2068 7474 705f 6461 2929 203c 2f64 6976 http_da)) .
      exit(EXI\n+001ba190: 545f 4641 494c 5552 4529 3b20 3c73 7061 T_FAILURE); // failed to r\n+001ba1c0: 6567 6973 7465 7220 3c2f 7370 616e 3e3c egister <\n+001ba1d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      if (s\n+001ba210: 6f61 705f 6361 6c6c 5f6e 735f 5f77 6562 oap_call_ns__web\n+001ba220: 6d65 7468 6f64 283c 6120 636c 6173 733d method(so\n+001ba250: 6170 3c2f 613e 2c20 2e2e 2e29 2920 3c2f ap, ...)) .
      {
      \n+001ba280: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
      \n+001ba3b0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
      .
      \n+001ba3d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (!strcmp(soap->\n+001ba430: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;authre\n+001ba480: 616c 6d3c 2f61 3e2c 203c 6120 636c 6173 alm, authrealm)\n+001ba4e0: 2920 3c73 7061 6e20 636c 6173 733d 2263 ) // optio\n+001ba500: 6e61 6c6c 7920 6465 7465 726d 696e 6520 nally determine \n+001ba510: 6175 7468 656e 7469 6361 7469 6f6e 2072 authentication r\n+001ba520: 6561 6c6d 3c2f 7370 616e 3e3c 2f64 6976 ealm.
      {.
      struct \n+001ba590: 6874 7470 5f64 615f 696e 666f 2069 6e66 http_da_info inf\n+001ba5a0: 6f3b 203c 7370 616e 2063 6c61 7373 3d22 o; // to s\n+001ba5c0: 746f 7265 2075 7365 7269 6420 616e 6420 tore userid and \n+001ba5d0: 7061 7373 7764 203c 2f73 7061 6e3e 3c2f passwd .
      h\n+001ba600: 7474 705f 6461 5f73 6176 6528 3c61 2063 ttp_da_save(soap, &am\n+001ba640: 703b 696e 666f 2c20 6175 7468 7265 616c p;info, authreal\n+001ba650: 6d2c 2075 7365 7269 642c 2070 6173 7377 m, userid, passw\n+001ba660: 6429 3b20 3c73 7061 6e20 636c 6173 733d d); // set\n+001ba680: 2075 7365 7269 6420 616e 6420 7061 7373 userid and pass\n+001ba690: 7764 2066 6f72 2074 6869 7320 7265 616c wd for this real\n+001ba6a0: 6d3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c m
      .<\n+001ba6b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001ba6c0: 3e20 2020 2020 2020 203c 7370 616e 2063 > if (so\n+001ba6f0: 6170 5f63 616c 6c5f 6e73 5f5f 7765 626d ap_call_ns__webm\n+001ba700: 6574 686f 6428 3c61 2063 6c61 7373 3d22 ethod(soa\n+001ba730: 703c 2f61 3e2c 202e 2e2e 2929 203c 7370 p, ...)) // retry
      .
      \n+001ba780: 2020 2020 7b3c 2f64 6976 3e0a 3c64 6976 {
      . \n+001ba7a0: 2020 2020 2020 2020 2e2e 2e20 3c73 7061 ... //.
      soap_end(\n+001ba850: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+001ba880: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // useri\n+001ba8a0: 6420 616e 6420 7061 7373 7764 2077 6572 d and passwd wer\n+001ba8b0: 6520 6465 616c 6c6f 6361 7465 6420 3c2f e deallocated
      . \n+001ba8e0: 2020 2020 2020 2020 6874 7470 5f64 615f http_da_\n+001ba8f0: 7265 7374 6f72 6528 3c61 2063 6c61 7373 restore(s\n+001ba920: 6f61 703c 2f61 3e2c 2026 616d 703b 696e oap, &in\n+001ba930: 666f 293b 203c 7370 616e 2063 6c61 7373 fo); // re\n+001ba950: 7374 6f72 6520 7573 6572 6964 2061 6e64 store userid and\n+001ba960: 2070 6173 7377 6420 3c2f 7370 616e 3e3c passwd <\n+001ba970: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      \n+001ba990: 2020 3c73 7061 6e20 636c 6173 733d 226b if (!soap_cal\n+001ba9c0: 6c5f 6e73 5f5f 7765 626d 6574 686f 6428 l_ns__webmethod(\n+001ba9d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001baa00: 202e 2e2e 2929 203c 7370 616e 2063 6c61 ...)) // \n+001baa20: 616e 6f74 6865 7220 6361 6c6c 203c 2f73 another call
      .
      \n+001baa50: 2020 2020 2020 2020 202e 2e2e 203c 7370 ... //.
      }.
      }.
      }.
      }
      .<\n+001bab00: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001bab10: 3e20 2068 7474 705f 6461 5f72 656c 6561 > http_da_relea\n+001bab20: 7365 283c 6120 636c 6173 733d 2263 6f64 se(soap, &info); \n+001bab60: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // to remo\n+001bab80: 7665 2061 6c6c 2075 7365 7269 6420 616e ve all userid an\n+001bab90: 6420 7061 7373 7764 3c2f 7370 616e 3e3c d passwd<\n+001baba0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      s\n+001bac10: 6f61 705f 6465 7374 726f 793c 2f61 3e28 oap_destroy(\n+001bac20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+001bac50: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
      .
      soap_end(soap);<\n+001bad00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      s\n+001bad70: 6f61 705f 6672 6565 3c2f 613e 283c 6120 oap_free(soap);.
      }
      .<\n+001badd0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

      This co\n+001badf0: 6465 2073 7570 706f 7274 7320 626f 7468 de supports both\n+001bae00: 2062 6173 6963 2061 6e64 2064 6967 6573 basic and diges\n+001bae10: 7420 6175 7468 656e 7469 6361 7469 6f6e t authentication\n+001bae20: 2e3c 2f70 3e0a 3c70 3e54 6865 2073 6572 .

      .

      The ser\n+001bae30: 7665 7220 6361 6e20 6368 616c 6c65 6e67 ver can challeng\n+001bae40: 6520 6120 636c 6965 6e74 2075 7369 6e67 e a client using\n+001bae50: 2048 5454 5020 636f 6465 2034 3031 2e20 HTTP code 401. \n+001bae60: 5769 7468 2074 6865 2070 6c75 6769 6e2c With the plugin,\n+001bae70: 2048 5454 5020 6469 6765 7374 2061 7574 HTTP digest aut\n+001bae80: 6865 6e74 6963 6174 696f 6e20 6368 616c hentication chal\n+001bae90: 6c65 6e67 6573 2061 7265 2073 656e 642e lenges are send.\n+001baea0: 2057 6974 686f 7574 2074 6865 2070 6c75 Without the plu\n+001baeb0: 6769 6e2c 2062 6173 6963 2061 7574 6865 gin, basic authe\n+001baec0: 6e74 6963 6174 696f 6e20 6368 616c 6c65 ntication challe\n+001baed0: 6e67 6573 2061 7265 2073 656e 642e 3c2f nges are send..

      Each serve\n+001baef0: 7220 6d65 7468 6f64 2063 616e 2069 6d70 r method can imp\n+001baf00: 6c65 6d65 6e74 2061 7574 6865 6e74 6963 lement authentic\n+001baf10: 6174 696f 6e20 6173 2064 6573 6972 6564 ation as desired\n+001baf20: 2061 6e64 206d 6179 2065 6e66 6f72 6365 and may enforce\n+001baf30: 2064 6967 6573 7420 6175 7468 656e 7469 digest authenti\n+001baf40: 6361 7469 6f6e 206f 7220 6d61 7920 616c cation or may al\n+001baf50: 736f 2061 6363 6570 7420 6261 7369 6320 so accept basic \n+001baf60: 6175 7468 656e 7469 6361 7469 6f6e 2072 authentication r\n+001baf70: 6573 706f 6e73 6573 2e20 546f 2076 6572 esponses. To ver\n+001baf80: 6966 7920 6469 6765 7374 2061 7574 6865 ify digest authe\n+001baf90: 6e74 6963 6174 696f 6e20 7265 7370 6f6e ntication respon\n+001bafa0: 7365 732c 2074 6865 2073 6572 7665 7220 ses, the server \n+001bafb0: 7368 6f75 6c64 2063 6f6d 7075 7465 2061 should compute a\n+001bafc0: 6e64 2063 6f6d 7061 7265 2074 6865 2063 nd compare the c\n+001bafd0: 6865 636b 7375 6d73 2075 7369 6e67 2074 hecksums using t\n+001bafe0: 6865 2070 6c75 6769 6e27 7320 3c63 6f64 he plugin's http_da_verify\n+001bb000: 5f70 6f73 743c 2f63 6f64 653e 2066 756e _post fun\n+001bb010: 6374 696f 6e20 666f 7220 4854 5450 2050 ction for HTTP P\n+001bb020: 4f53 5420 7265 7175 6573 7473 2028 616e OST requests (an\n+001bb030: 6420 3c63 6f64 653e 6874 7470 5f64 615f d http_da_\n+001bb040: 7665 7269 6679 5f67 6574 3c2f 636f 6465 verify_get for HTTP GET r\n+001bb060: 6571 7565 7374 7320 7769 7468 2074 6865 equests with the\n+001bb070: 2048 5454 5020 4745 5420 706c 7567 696e HTTP GET plugin\n+001bb080: 2920 6173 2066 6f6c 6c6f 7773 3a3c 2f70 ) as follows:.

      #include &q\n+001bb0e0: 756f 743b 6874 7470 6461 2e68 2671 756f uot;httpda.h&quo\n+001bb0f0: 743b 3c2f 7370 616e 3e20 3c2f 6469 763e t;
      \n+001bb100: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      .
      int main()
      .<\n+001bb160: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001bb170: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
      .
      struct soap\n+001bb1e0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap = soap_ne\n+001bb270: 773c 2f61 3e28 293b 3c2f 6469 763e 0a3c w();
      .<\n+001bb280: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001bb290: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if<\n+001bb2b0: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (soap\n+001bb310: 5f72 6567 6973 7465 725f 706c 7567 696e _register_plugin\n+001bb320: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap\n+001bb350: 3c2f 613e 2c20 6874 7470 5f64 6129 2920 , http_da)) \n+001bb360: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      exi\n+001bb380: 7428 4558 4954 5f46 4149 4c55 5245 293b t(EXIT_FAILURE);\n+001bb390: 203c 7370 616e 2063 6c61 7373 3d22 636f // failed\n+001bb3b0: 2074 6f20 7265 6769 7374 6572 203c 2f73 to register
      .
      .\n+001bb3e0: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // use \n+001bb400: 736f 6170 5f62 696e 6420 616e 6420 736f soap_bind and so\n+001bb410: 6170 5f61 6363 6570 7420 696e 2061 2028 ap_accept in a (\n+001bb420: 6d75 6c74 692d 7468 7265 6164 6564 2920 multi-threaded) \n+001bb430: 7365 7276 6963 6520 6c6f 6f70 3c2f 7370 service loop
      ...
      ... \n+001bb5f0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //<\n+001bb610: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      s\n+001bb680: 6f61 705f 6465 7374 726f 793c 2f61 3e28 oap_destroy(\n+001bb690: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap)\n+001bb6c0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
      .
      soap_end(soap);<\n+001bb770: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      s\n+001bb7e0: 6f61 705f 6672 6565 3c2f 613e 283c 6120 oap_free(soap);.
      }
      .<\n+001bb840: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001bb850: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
      .
      int \n+001bb890: 6e73 5f5f 7765 626d 6574 686f 6428 3c73 ns__webmethod(struct soap *soap, ...)
      .\n+001bb930: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      {
      .
      if (soap->\n+001bba00: 7573 6572 6964 3c2f 613e 2026 616d 703b userid &\n+001bba10: 2661 6d70 3b20 3c61 2063 6c61 7373 3d22 & soa\n+001bba40: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->passwd) <\n+001bbaa0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001bbab0: 656e 7422 3e2f 2f20 636c 6965 6e74 2075 ent\">// client u\n+001bbac0: 7365 6420 6261 7369 6320 6175 7468 656e sed basic authen\n+001bbad0: 7469 6361 7469 6f6e 203c 2f73 7061 6e3e tication \n+001bbae0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      {.
      /\n+001bbb30: 2f20 6d61 7920 6465 6369 6465 206e 6f74 / may decide not\n+001bbb40: 2074 6f20 6861 6e64 6c65 2c20 6275 7420 to handle, but \n+001bbb50: 6966 206f 6b20 7468 656e 2067 6f20 6168 if ok then go ah\n+001bbb60: 6561 6420 616e 6420 636f 6d70 6172 6520 ead and compare \n+001bbb70: 696e 666f 3a20 3c2f 7370 616e 3e3c 2f64 info: ..\n+001bbdb0: 2020 2020 7b3c 2f64 6976 3e0a 3c64 6976 {
      . \n+001bbdd0: 2020 2020 2e2e 2e20 3c73 7061 6e20 636c ... //\n+001bbdf0: 2068 616e 646c 6520 7265 7175 6573 743c handle request<\n+001bbe00: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
      . \n+001bbe20: 2020 2020 203c 7370 616e 2063 6c61 7373 r\n+001bbe40: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_OK; .
      } .
      }
      \n+001bbef0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      e\n+001bbf20: 6c73 653c 2f73 7061 6e3e 203c 7370 616e lse if (\n+001bbf50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap-\n+001bbf80: 2667 743b 3c61 2063 6c61 7373 3d22 636f >aut\n+001bbfd0: 6872 6561 6c6d 3c2f 613e 2026 616d 703b hrealm &\n+001bbfe0: 2661 6d70 3b20 3c61 2063 6c61 7373 3d22 & soa\n+001bc010: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->userid) <\n+001bc070: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class=\"comm\n+001bc080: 656e 7422 3e2f 2f20 4469 6765 7374 2061 ent\">// Digest a\n+001bc090: 7574 6865 6e74 6963 6174 696f 6e20 3c2f uthentication
      . \n+001bc0c0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
      .
      passwd = ...; /\n+001bc150: 2f20 6461 7461 6261 7365 206c 6f6f 6b75 / database looku\n+001bc160: 7020 6f6e 2075 7365 7269 6420 616e 6420 p on userid and \n+001bc170: 6175 7468 7265 616c 6d20 746f 2066 696e authrealm to fin\n+001bc180: 6420 7061 7373 7764 203c 2f73 7061 6e3e d passwd \n+001bc190: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      if\n+001bc1d0: 2028 2173 7472 636d 7028 3c61 2063 6c61 (!strcmp(soap->authrealm\n+001bc260: 3c2f 613e 2c20 3c61 2063 6c61 7373 3d22 , a\n+001bc2b0: 7574 6872 6561 6c6d 3c2f 613e 2920 2661 uthrealm) &a\n+001bc2c0: 6d70 3b26 616d 703b 2021 7374 7263 6d70 mp;& !strcmp\n+001bc2d0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap\n+001bc300: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->us\n+001bc350: 6572 6964 3c2f 613e 2c20 3c61 2063 6c61 erid, userid)) \n+001bc3b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      {.
      if\n+001bc410: 2028 2168 7474 705f 6461 5f76 6572 6966 (!http_da_verif\n+001bc420: 795f 706f 7374 283c 6120 636c 6173 733d y_post(so\n+001bc450: 6170 3c2f 613e 2c20 3c61 2063 6c61 7373 ap, passwd)) .
      {.
      .\n+001bc4f0: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // hand\n+001bc510: 6c65 2072 6571 7565 7374 3c2f 7370 616e le request
      .
      \n+001bc540: 2020 3c73 7061 6e20 636c 6173 733d 226b retu\n+001bc560: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn SO\n+001bc5c0: 4150 5f4f 4b3c 2f61 3e3b 203c 2f64 6976 AP_OK; .
      } .
      } .
      }
      .<\n+001bc630: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001bc640: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap->\n+001bc6c0: 6175 7468 7265 616c 6d3c 2f61 3e20 3d20 authrealm = \n+001bc6d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 authrea\n+001bc720: 6c6d 3c2f 613e 3b20 3c73 7061 6e20 636c lm; //\n+001bc740: 2073 6574 2072 6561 6c6d 2066 6f72 2063 set realm for c\n+001bc750: 6861 6c6c 656e 6765 203c 2f73 7061 6e3e hallenge \n+001bc760: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      return 401; //\n+001bc7c0: 204e 6f74 2061 7574 686f 7269 7a65 642c Not authorized,\n+001bc7d0: 2063 6861 6c6c 656e 6765 2064 6967 6573 challenge diges\n+001bc7e0: 7420 6175 7468 656e 7469 6361 7469 6f6e t authentication\n+001bc7f0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
      .<\n+001bc800: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001bc810: 3e7d 3c2f 6469 763e 0a3c 2f64 6976 3e3c >}
      .
      <\n+001bc820: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment -->\n+001bc830: 3c70 3e46 6f72 206d 6f72 6520 6465 7461

      For more deta\n+001bc840: 696c 732c 2069 6e63 6c75 6469 6e67 2068 ils, including h\n+001bc850: 6f77 2074 6f20 636f 6e66 6967 7572 6520 ow to configure \n+001bc860: 4854 5450 2044 6967 6573 7420 6175 7468 HTTP Digest auth\n+001bc870: 656e 7469 6361 7469 6f6e 2066 6f72 2070 entication for p\n+001bc880: 726f 7869 6573 2c20 7365 6520 7468 6520 roxies, see the \n+001bc890: 3c61 2068 7265 663d 222e 2e2f 2e2e 2f68 HTTP dig\n+001bc8c0: 6573 7420 6175 7468 656e 7469 6361 7469 est authenticati\n+001bc8d0: 6f6e 2070 6c75 6769 6e3c 2f61 3e20 646f on plugin do\n+001bc8e0: 6375 6d65 6e74 6174 696f 6e2e 3c2f 703e cumentation.

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

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

      .

      .The HTTP s\n+001bc960: 6573 7369 6f6e 7320 706c 7567 696e 3c2f essions plugin.

      The plugi\n+001bc980: 6e20 636f 6465 2069 7320 6c6f 6361 7465 n code is locate\n+001bc990: 6420 696e 2074 6865 203c 656d 3e3c 636f d in the gsoap/plugin<\n+001bc9b0: 2f63 6f64 653e 3c2f 656d 3e20 6469 7265 /code> dire\n+001bc9c0: 6374 6f72 7920 636f 6e74 6169 6e69 6e67 ctory containing\n+001bc9d0: 203c 656d 3e3c 636f 6465 3e73 6573 7369 sessi\n+001bc9e0: 6f6e 732e 683c 2f63 6f64 653e 3c2f 656d ons.h and \n+001bca00: 7365 7373 696f 6e73 2e63 3c2f 636f 6465 sessions.c.

      .

      F\n+001bca20: 6f72 206d 6f72 6520 6465 7461 696c 732c or more details,\n+001bca30: 2073 6565 2074 6865 203c 6120 6872 6566 see the HTTP sessions \n+001bca70: 706c 7567 696e 3c2f 613e 2064 6f63 756d plugin docum\n+001bca80: 656e 7461 7469 6f6e 2e3c 2f70 3e0a 3c70 entation.

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

      \n+001bcaf0: 0a54 6865 2041 7061 6368 6520 6d6f 6475 .The Apache modu\n+001bcb00: 6c65 2070 6c75 6769 6e3c 2f68 333e 0a3c le plugin

      .<\n+001bcb10: 703e 5468 6520 706c 7567 696e 2063 6f64 p>The plugin cod\n+001bcb20: 6520 6973 206c 6f63 6174 6564 2069 6e20 e is located in \n+001bcb30: 7468 6520 3c65 6d3e 3c63 6f64 653e 6773 the gs\n+001bcb40: 6f61 702f 6d6f 645f 6773 6f61 702f 6d6f oap/mod_gsoap/mo\n+001bcb50: 645f 6773 6f61 702d 302e 392f 6170 6163 d_gsoap-0.9/apac\n+001bcb60: 6865 5f32 303c 2f63 6f64 653e 3c2f 656d he_20 directory.

      \n+001bcb80: 0a3c 703e 466f 7220 6d6f 7265 2064 6574 .

      For more det\n+001bcb90: 6169 6c73 2c20 7365 6520 7468 6520 3c61 ails, see the Apache modu\n+001bcbd0: 6c65 3c2f 613e 2064 6f63 756d 656e 7461 le documenta\n+001bcbe0: 7469 6f6e 2e3c 2f70 3e0a 3c70 3ef0 9f94 tion.

      .

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

      .\n+001bcc20: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

      .The \n+001bcc50: 4953 4150 4920 6578 7465 6e73 696f 6e20 ISAPI extension \n+001bcc60: 706c 7567 696e 3c2f 6833 3e0a 3c70 3e54 plugin

      .

      T\n+001bcc70: 6865 2070 6c75 6769 6e20 636f 6465 2069 he plugin code i\n+001bcc80: 7320 6c6f 6361 7465 6420 696e 2074 6865 s located in the\n+001bcc90: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap\n+001bcca0: 2f6d 6f64 5f67 736f 6170 2f67 736f 6170 /mod_gsoap/gsoap\n+001bccb0: 5f77 696e 2f69 7361 7069 3c2f 636f 6465 _win/isapi directory\n+001bccd0: 2e3c 2f70 3e0a 3c70 3e46 6f72 206d 6f72 .

      .

      For mor\n+001bcce0: 6520 6465 7461 696c 732c 2073 6565 2074 e details, see t\n+001bccf0: 6865 203c 6120 6872 6566 3d22 2e2e 2f2e he ISAPI e\n+001bcd20: 7874 656e 7369 6f6e 3c2f 613e 2064 6f63 xtension doc\n+001bcd30: 756d 656e 7461 7469 6f6e 2e3c 2f70 3e0a umentation.

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

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

      .

      \n+001bcda0: 0a54 6865 2043 5552 4c20 706c 7567 696e .The CURL plugin\n+001bcdb0: 3c2f 6833 3e0a 3c70 3e54 6865 2070 6c75

      .

      The plu\n+001bcdc0: 6769 6e20 636f 6465 2069 7320 6c6f 6361 gin code is loca\n+001bcdd0: 7465 6420 696e 2074 6865 203c 656d 3e3c ted in the <\n+001bcde0: 636f 6465 3e67 736f 6170 2f70 6c75 6769 code>gsoap/plugi\n+001bcdf0: 6e3c 2f63 6f64 653e 3c2f 656d 3e20 6469 n di\n+001bce00: 7265 6374 6f72 7920 636f 6e74 6169 6e69 rectory containi\n+001bce10: 6e67 203c 656d 3e3c 636f 6465 3e63 7572 ng cur\n+001bce20: 6c61 7069 2e68 3c2f 636f 6465 3e3c 2f65 lapi.h and curlapi.c.

      .

      F\n+001bce60: 6f72 206d 6f72 6520 6465 7461 696c 732c or more details,\n+001bce70: 2073 6565 2074 6865 203c 6120 6872 6566 see the CU\n+001bcea0: 524c 2070 6c75 6769 6e3c 2f61 3e20 646f RL plugin do\n+001bceb0: 6375 6d65 6e74 6174 696f 6e2e 3c2f 703e cumentation.

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

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

      .

      \n+001bcf20: 3c2f 613e 0a54 6865 2057 696e 496e 6574 .The WinInet\n+001bcf30: 2070 6c75 6769 6e3c 2f68 333e 0a3c 703e plugin

      .

      \n+001bcf40: 5468 6520 706c 7567 696e 2063 6f64 6520 The plugin code \n+001bcf50: 6973 206c 6f63 6174 6564 2069 6e20 7468 is located in th\n+001bcf60: 6520 3c65 6d3e 3c63 6f64 653e 6773 6f61 e gsoa\n+001bcf70: 702f 6d6f 645f 6773 6f61 702f 6773 6f61 p/mod_gsoap/gsoa\n+001bcf80: 705f 7769 6e2f 7769 6e69 6e65 743c 2f63 p_win/wininet direct\n+001bcfa0: 6f72 792e 3c2f 703e 0a3c 703e 466f 7220 ory.

      .

      For \n+001bcfb0: 6d6f 7265 2064 6574 6169 6c73 2c20 7365 more details, se\n+001bcfc0: 6520 7468 6520 3c61 2068 7265 663d 222e e the Wi\n+001bcff0: 6e49 6e65 7420 706c 7567 696e 3c2f 613e nInet plugin\n+001bd000: 2064 6f63 756d 656e 7461 7469 6f6e 2e3c documentation.<\n+001bd010: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

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

      .

      <\n+001bd070: 2f61 3e0a 5468 6520 5753 2d41 6464 7265 /a>.The WS-Addre\n+001bd080: 7373 696e 6720 706c 7567 696e 3c2f 6833 ssing plugin.

      The plugin \n+001bd0a0: 636f 6465 2069 7320 6c6f 6361 7465 6420 code is located \n+001bd0b0: 696e 2074 6865 203c 656d 3e3c 636f 6465 in the gsoap/plugin direct\n+001bd0e0: 6f72 7920 636f 6e74 6169 6e69 6e67 203c ory containing <\n+001bd0f0: 656d 3e3c 636f 6465 3e77 7361 6170 692e em>wsaapi.\n+001bd100: 683c 2f63 6f64 653e 3c2f 656d 3e20 616e h an\n+001bd110: 6420 3c65 6d3e 3c63 6f64 653e 7773 6161 d wsaa\n+001bd120: 7069 2e63 3c2f 636f 6465 3e3c 2f65 6d3e pi.c\n+001bd130: 2028 746f 2062 6520 7573 6564 2069 6e20 (to be used in \n+001bd140: 4320 616e 6420 432b 2b29 2e3c 2f70 3e0a C and C++).

      .\n+001bd150: 3c70 3e54 6f20 656e 6162 6c65 2057 532d

      To enable WS-\n+001bd160: 4164 6472 6573 7369 6e67 2032 3030 3520 Addressing 2005 \n+001bd170: 2861 6e64 2073 7570 706f 7274 2066 6f72 (and support for\n+001bd180: 2038 2f32 3030 3429 2c20 7468 6520 7365 8/2004), the se\n+001bd190: 7276 6963 6520 6465 6669 6e69 7469 6f6e rvice definition\n+001bd1a0: 7320 6865 6164 6572 2066 696c 6520 666f s header file fo\n+001bd1b0: 7220 736f 6170 6370 7032 2073 686f 756c r soapcpp2 shoul\n+001bd1c0: 6420 696e 636c 7564 6520 7468 6520 666f d include the fo\n+001bd1d0: 6c6c 6f77 696e 6720 696d 706f 7274 733a llowing imports:\n+001bd1e0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

      .
      #import \n+001bd230: 2671 756f 743b 696d 706f 7274 2f77 7361 "import/wsa\n+001bd240: 352e 6826 7175 6f74 3b3c 2f73 7061 6e3e 5.h"\n+001bd250: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
      .
      This imports th\n+001bd280: 6520 534f 4150 2068 6561 6465 7220 656c e SOAP header el\n+001bd290: 656d 656e 7473 2072 6571 7569 7265 6420 ements required \n+001bd2a0: 6279 2057 532d 4164 6472 6573 7369 6e67 by WS-Addressing\n+001bd2b0: 2e3c 2f70 3e0a 3c70 3e46 6f72 206d 6f72 .

      .

      For mor\n+001bd2c0: 6520 6465 7461 696c 732c 2073 6565 2074 e details, see t\n+001bd2d0: 6865 203c 6120 6872 6566 3d22 2e2e 2f2e he WS-Addres\n+001bd300: 7369 6e67 2070 6c75 6769 6e3c 2f61 3e20 sing plugin \n+001bd310: 646f 6375 6d65 6e74 6174 696f 6e2e 3c2f documentation..

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

      .

      <\n+001bd380: 2f61 3e0a 5468 6520 5753 2d52 656c 6961 /a>.The WS-Relia\n+001bd390: 626c 654d 6573 7361 6769 6e67 2070 6c75 bleMessaging plu\n+001bd3a0: 6769 6e3c 2f68 333e 0a3c 703e 5468 6520 gin

      .

      The \n+001bd3b0: 706c 7567 696e 2063 6f64 6520 6973 206c plugin code is l\n+001bd3c0: 6f63 6174 6564 2069 6e20 7468 6520 3c65 ocated in the gsoap/pl\n+001bd3e0: 7567 696e 3c2f 636f 6465 3e3c 2f65 6d3e ugin\n+001bd3f0: 2064 6972 6563 746f 7279 2063 6f6e 7461 directory conta\n+001bd400: 696e 696e 6720 3c65 6d3e 3c63 6f64 653e ining \n+001bd410: 7773 726d 6170 692e 683c 2f63 6f64 653e wsrmapi.h\n+001bd420: 3c2f 656d 3e20 616e 6420 3c65 6d3e 3c63 and wsrmapi.c (to be\n+001bd450: 2075 7365 6420 696e 2043 2061 6e64 2043 used in C and C\n+001bd460: 2b2b 292e 3c2f 703e 0a3c 703e 416c 736f ++).

      .

      Also\n+001bd470: 206e 6565 6465 6420 6172 6520 3c65 6d3e needed are \n+001bd480: 3c63 6f64 653e 7468 7265 6164 732e 683c threads.h<\n+001bd490: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and \n+001bd4a0: 3c65 6d3e 3c63 6f64 653e 7468 7265 6164 thread\n+001bd4b0: 732e 633c 2f63 6f64 653e 3c2f 656d 3e20 s.c \n+001bd4c0: 666f 7220 6d75 6c74 692d 7468 7265 6164 for multi-thread\n+001bd4d0: 696e 6720 616e 6420 6c6f 636b 696e 6720 ing and locking \n+001bd4e0: 7375 7070 6f72 742e 3c2f 703e 0a3c 703e support.

      .

      \n+001bd4f0: 546f 2065 6e61 626c 6520 5753 2d52 656c To enable WS-Rel\n+001bd500: 6961 626c 654d 6573 7361 6769 6e67 2c20 iableMessaging, \n+001bd510: 7468 6520 7365 7276 6963 6520 6465 6669 the service defi\n+001bd520: 6e69 7469 6f6e 7320 6865 6164 6572 2066 nitions header f\n+001bd530: 696c 6520 666f 7220 736f 6170 6370 7032 ile for soapcpp2\n+001bd540: 2073 686f 756c 6420 696e 636c 7564 6520 should include \n+001bd550: 7468 6520 666f 6c6c 6f77 696e 6720 696d the following im\n+001bd560: 706f 7274 733a 3c2f 703e 0a3c 6469 7620 ports:

      .
      #i\n+001bd5b0: 6d70 6f72 7420 2671 756f 743b 696d 706f mport "impo\n+001bd5c0: 7274 2f77 7372 6d2e 6826 7175 6f74 3b3c rt/wsrm.h"<\n+001bd5d0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
      .\n+001bd5f0: 3c73 7061 6e20 636c 6173 733d 2270 7265 #impo\n+001bd610: 7274 2026 7175 6f74 3b69 6d70 6f72 742f rt "import/\n+001bd620: 7773 6135 2e68 2671 756f 743b 3c2f 7370 wsa5.h"
      .

      \n+001bd640: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

      Thi\n+001bdac0: 7320 696d 706f 7274 7320 7468 6520 534f s imports the SO\n+001bdad0: 4150 2068 6561 6465 7220 656c 656d 656e AP header elemen\n+001bdae0: 7473 2072 6571 7569 7265 6420 6279 2057 ts required by W\n+001bdaf0: 532d 5365 6375 7269 7479 2e3c 2f70 3e0a S-Security.

      .\n+001bdb00: 3c70 3e46 6f72 206d 6f72 6520 6465 7461

      For more deta\n+001bdb10: 696c 732c 2073 6565 2074 6865 203c 6120 ils, see the WS-Security plu\n+001bdb50: 6769 6e3c 2f61 3e20 646f 6375 6d65 6e74 gin document\n+001bdb60: 6174 696f 6e2e 3c2f 703e 0a3c 703e f09f ation.

      .

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

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

      .The \n+001bdbd0: 5753 2d44 6973 636f 7665 7279 2070 6c75 WS-Discovery plu\n+001bdbe0: 6769 6e3c 2f68 333e 0a3c 703e 4261 7369 gin

      .

      Basi\n+001bdbf0: 6361 6c6c 792c 2074 6f20 6164 6420 5753 cally, to add WS\n+001bdc00: 2d44 6973 636f 7665 7279 2073 7570 706f -Discovery suppo\n+001bdc10: 7274 2074 6865 2066 6f6c 6c6f 7769 6e67 rt the following\n+001bdc20: 2065 7665 6e74 2068 616e 646c 6572 7320 event handlers \n+001bdc30: 6d75 7374 2062 6520 6465 6669 6e65 6420 must be defined \n+001bdc40: 616e 6420 6c69 6e6b 6564 3a3c 2f70 3e0a and linked:

      .\n+001bdc50: 3c64 6976 2063 6c61 7373 3d22 6672 6167
      void ws\n+001bdca0: 6464 5f65 7665 6e74 5f48 656c 6c6f 283c dd_event_Hello(<\n+001bdcb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001bdcc0: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord\">struct soap *soap<\n+001bdd30: 2f61 3e2c 203c 2f64 6976 3e0a 3c64 6976 /a>,
      .unsigned\n+001bdd70: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c int Ins\n+001bdda0: 7461 6e63 6549 642c 203c 2f64 6976 3e0a tanceId,
      .\n+001bddb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      const c\n+001bde00: 6861 723c 2f73 7061 6e3e 202a 5365 7175 har *Sequ\n+001bde10: 656e 6365 4964 2c20 3c2f 6469 763e 0a3c enceId,
      .<\n+001bde20: 6469 7620 636c 6173 733d 226c 696e 6522 div class=\"line\"\n+001bde30: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >unsig\n+001bde50: 6e65 643c 2f73 7061 6e3e 203c 7370 616e ned int \n+001bde80: 4d65 7373 6167 654e 756d 6265 722c 203c MessageNumber, <\n+001bde90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      co\n+001bdec0: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n+001bdef0: 202a 4d65 7373 6167 6549 442c 203c 2f64 *MessageID, .
      cons\n+001bdf30: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+001bdf60: 5265 6c61 7465 7354 6f2c 203c 2f64 6976 RelatesTo, .
      const<\n+001bdfa0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *En\n+001bdfd0: 6470 6f69 6e74 5265 6665 7265 6e63 652c dpointReference,\n+001bdfe0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      \n+001be010: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *Types, .
      const<\n+001be080: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *Sc\n+001be0b0: 6f70 6573 2c20 3c2f 6469 763e 0a3c 6469 opes,
      .<\n+001be0d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001be0e0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n+001be110: 3c2f 7370 616e 3e20 2a4d 6174 6368 4279 *MatchBy\n+001be120: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
      .
      const char *XAddrs, .
      \n+001be1c0: 756e 7369 676e 6564 3c2f 7370 616e 3e20 unsigned \n+001be1d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int MetadataVer\n+001be200: 7369 6f6e 293c 2f64 6976 3e0a 3c2f 6469 sion)
      .
      .<\n+001be320: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001be330: 6f72 6474 7970 6522 3e75 6e73 6967 6e65 ordtype\">unsigne\n+001be340: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d int In\n+001be370: 7374 616e 6365 4964 2c20 3c2f 6469 763e stanceId,
      \n+001be380: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      const \n+001be3d0: 6368 6172 3c2f 7370 616e 3e20 2a53 6571 char *Seq\n+001be3e0: 7565 6e63 6549 642c 203c 2f64 6976 3e0a uenceId,
      .\n+001be3f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      unsi\n+001be420: 676e 6564 3c2f 7370 616e 3e20 3c73 7061 gned int\n+001be450: 204d 6573 7361 6765 4e75 6d62 6572 2c20 MessageNumber, \n+001be460: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      c\n+001be490: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *MessageID, .
      con\n+001be500: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+001be530: 2a52 656c 6174 6573 546f 2c20 3c2f 6469 *RelatesTo, .
      const\n+001be570: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *E\n+001be5a0: 6e64 706f 696e 7452 6566 6572 656e 6365 ndpointReference\n+001be5b0: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
      .
      const char *Types, .
      const\n+001be650: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *S\n+001be680: 636f 7065 732c 203c 2f64 6976 3e0a 3c64 copes,
      .\n+001be6a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n+001be6e0: 723c 2f73 7061 6e3e 202a 4d61 7463 6842 r *MatchB\n+001be6f0: 792c 203c 2f64 6976 3e0a 3c64 6976 2063 y,
      .
      const <\n+001be730: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001be740: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *XAddrs, .
      unsigned\n+001be7a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int MetadataVe\n+001be7d0: 7273 696f 6e29 3c2f 6469 763e 0a3c 2f64 rsion)
      .
      soap\n+001be820: 5f77 7364 645f 6d6f 6465 2077 7364 645f _wsdd_mode wsdd_\n+001be830: 6576 656e 745f 5072 6f62 6528 3c73 7061 event_Probe(struct \n+001be860: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap \n+001be890: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap\n+001be8c0: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
      .
      const char *MessageID, \n+001be930: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      c\n+001be960: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *ReplyTo, .
      const\n+001be9d0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *T\n+001bea00: 7970 6573 2c20 3c2f 6469 763e 0a3c 6469 ypes,
      .<\n+001bea20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001bea30: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord\">const char\n+001bea60: 3c2f 7370 616e 3e20 2a53 636f 7065 732c *Scopes,\n+001bea70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      \n+001beaa0: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *MatchBy, .
      stru\n+001beb10: 6374 3c2f 7370 616e 3e20 7773 6464 5f5f ct wsdd__\n+001beb20: 5072 6f62 654d 6174 6368 6573 5479 7065 ProbeMatchesType\n+001beb30: 202a 5072 6f62 654d 6174 6368 6573 293c *ProbeMatches)<\n+001beb40: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.
      v\n+001beba0: 6f69 643c 2f73 7061 6e3e 2077 7364 645f oid wsdd_\n+001bebb0: 6576 656e 745f 5072 6f62 654d 6174 6368 event_ProbeMatch\n+001bebc0: 6573 283c 7370 616e 2063 6c61 7373 3d22 es(struct<\n+001bebe0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so\n+001bec10: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s\n+001bec40: 6f61 703c 2f61 3e2c 203c 2f64 6976 3e0a oap,
      .\n+001bec50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      unsi\n+001bec80: 676e 6564 3c2f 7370 616e 3e20 3c73 7061 gned int\n+001becb0: 2049 6e73 7461 6e63 6549 642c 203c 2f64 InstanceId, .
      cons\n+001becf0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+001bed20: 5365 7175 656e 6365 4964 2c20 3c2f 6469 SequenceId, .
      u\n+001bed60: 6e73 6967 6e65 643c 2f73 7061 6e3e 203c nsigned <\n+001bed70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001bed80: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype\">int MessageNumbe\n+001beda0: 722c 203c 2f64 6976 3e0a 3c64 6976 2063 r,
      .
      const <\n+001bede0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class=\"keyw\n+001bedf0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype\">char *MessageID,\n+001bee10: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      \n+001bee40: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *RelatesTo, <\n+001bee80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      st\n+001beeb0: 7275 6374 3c2f 7370 616e 3e20 7773 6464 ruct wsdd\n+001beec0: 5f5f 5072 6f62 654d 6174 6368 6573 5479 __ProbeMatchesTy\n+001beed0: 7065 202a 5072 6f62 654d 6174 6368 6573 pe *ProbeMatches\n+001beee0: 293c 2f64 6976 3e0a 3c2f 6469 763e 3c21 )
      .
      <\n+001bef00: 6469 7620 636c 6173 733d 2266 7261 676d div class=\"fragm\n+001bef10: 656e 7422 3e3c 6469 7620 636c 6173 733d ent\">
      soap_wsdd\n+001bef30: 5f6d 6f64 6520 7773 6464 5f65 7665 6e74 _mode wsdd_event\n+001bef40: 5f52 6573 6f6c 7665 283c 7370 616e 2063 _Resolve(s\n+001bef60: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, <\n+001befd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      co\n+001bf000: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char\n+001bf030: 202a 4d65 7373 6167 6549 442c 203c 2f64 *MessageID, .
      cons\n+001bf070: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+001bf0a0: 5265 706c 7954 6f2c 203c 2f64 6976 3e0a ReplyTo,
      .\n+001bf0b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      const c\n+001bf100: 6861 723c 2f73 7061 6e3e 202a 456e 6470 har *Endp\n+001bf110: 6f69 6e74 5265 6665 7265 6e63 652c 203c ointReference, <\n+001bf120: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      st\n+001bf150: 7275 6374 3c2f 7370 616e 3e20 7773 6464 ruct wsdd\n+001bf160: 5f5f 5265 736f 6c76 654d 6174 6368 6573 __ResolveMatches\n+001bf170: 5479 7065 202a 5265 736f 6c76 654d 6174 Type *ResolveMat\n+001bf180: 6368 6573 293c 2f64 6976 3e0a 3c2f 6469 ches)
      .
      void\n+001bf1f0: 2077 7364 645f 6576 656e 745f 5265 736f wsdd_event_Reso\n+001bf200: 6c76 654d 6174 6368 6573 283c 7370 616e lveMatches(struct <\n+001bf230: 6120 636c 6173 733d 2263 6f64 6522 2068 a class=\"code\" h\n+001bf240: 7265 663d 2273 7472 7563 7473 6f61 702e ref=\"structsoap.\n+001bf250: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html\">soap *\n+001bf260: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001bf290: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
      .
      unsigned in\n+001bf2f0: 743c 2f73 7061 6e3e 2049 6e73 7461 6e63 t Instanc\n+001bf300: 6549 642c 203c 2f64 6976 3e0a 3c64 6976 eId,
      .const\n+001bf340: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char<\n+001bf360: 2f73 7061 6e3e 202a 5365 7175 656e 6365 /span> *Sequence\n+001bf370: 4964 2c20 3c2f 6469 763e 0a3c 6469 7620 Id,
      .
      unsigned<\n+001bf3b0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> int Mess\n+001bf3e0: 6167 654e 756d 6265 722c 203c 2f64 6976 ageNumber, .
      const<\n+001bf420: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *Me\n+001bf450: 7373 6167 6549 442c 203c 2f64 6976 3e0a ssageID,
      .\n+001bf460: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      const c\n+001bf4b0: 6861 723c 2f73 7061 6e3e 202a 5265 6c61 har *Rela\n+001bf4c0: 7465 7354 6f2c 203c 2f64 6976 3e0a 3c64 tesTo,
      .\n+001bf4e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n+001bf520: 723c 2f73 7061 6e3e 202a 456e 6470 6f69 r *Endpoi\n+001bf530: 6e74 5265 6665 7265 6e63 652c 203c 2f64 ntReference, .
      cons\n+001bf570: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char *\n+001bf5a0: 5479 7065 732c 203c 2f64 6976 3e0a 3c64 Types,
      .\n+001bf5c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha\n+001bf600: 723c 2f73 7061 6e3e 202a 5363 6f70 6573 r *Scopes\n+001bf610: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
      .
      const char *MatchBy, .
      con\n+001bf6b0: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char \n+001bf6e0: 2a58 4164 6472 732c 203c 2f64 6976 3e0a *XAddrs,
      .\n+001bf6f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      unsi\n+001bf720: 676e 6564 3c2f 7370 616e 3e20 3c73 7061 gned int\n+001bf750: 204d 6574 6164 6174 6156 6572 7369 6f6e MetadataVersion\n+001bf760: 293c 2f64 6976 3e0a 3c2f 6469 763e 3c21 )
      .
      <\n+001bf780: 703e 5468 6573 6520 6576 656e 7420 6861 p>These event ha\n+001bf790: 6e64 6c65 7273 2077 696c 6c20 6265 2069 ndlers will be i\n+001bf7a0: 6e76 6f6b 6564 2077 6865 6e20 696e 626f nvoked when inbo\n+001bf7b0: 756e 6420 5753 2d44 6973 636f 7665 7279 und WS-Discovery\n+001bf7c0: 206d 6573 7361 6765 7320 6172 7269 7665 messages arrive\n+001bf7d0: 2075 7369 6e67 3a3c 2f70 3e0a 3c64 6976 using:

      .
      if\n+001bf820: 3c2f 7370 616e 3e20 2821 3c61 2063 6c61 (!soap\n+001bf880: 5f76 616c 6964 5f73 6f63 6b65 743c 2f61 _valid_socket(soap_bind(\n+001bf8f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap,\n+001bf920: 204e 554c 4c2c 203c 6120 636c 6173 733d NULL, \n+001bf970: 706f 7274 3c2f 613e 2c20 4241 434b 4c4f port, BACKLO\n+001bf980: 4729 2929 203c 2f64 6976 3e0a 3c64 6976 G)))
      . \n+001bf9a0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // err\n+001bf9c0: 6f72 203c 2f73 7061 6e3e 3c2f 6469 763e or
      \n+001bf9d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      if<\n+001bfa00: 2f73 7061 6e3e 2028 736f 6170 5f77 7364 /span> (soap_wsd\n+001bfa10: 645f 6c69 7374 656e 283c 6120 636c 6173 d_listen(\n+001bfa40: 736f 6170 3c2f 613e 2c20 7469 6d65 6f75 soap, timeou\n+001bfa50: 7429 2920 3c2f 6469 763e 0a3c 6469 7620 t))
      .
      .\n+001bfa70: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // erro\n+001bfa90: 723c 2f73 7061 6e3e 3c2f 6469 763e 0a3c r
      .<\n+001bfaa0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

      which w\n+001bfac0: 696c 6c20 6c69 7374 656e 2066 6f72 203c ill listen for <\n+001bfad0: 636f 6465 3e74 696d 656f 7574 3c2f 636f code>timeout seconds to i\n+001bfaf0: 6e62 6f75 6e64 2057 532d 4469 7363 6f76 nbound WS-Discov\n+001bfb00: 6572 7920 6d65 7373 6167 6573 206f 6e20 ery messages on \n+001bfb10: 6120 706f 7274 2061 6e64 2064 6973 7061 a port and dispa\n+001bfb20: 7463 6865 7320 7468 656d 2074 6f20 7468 tches them to th\n+001bfb30: 6520 6576 656e 7420 6861 6e64 6c65 7273 e event handlers\n+001bfb40: 2e20 4120 6e65 6761 7469 7665 203c 636f . A negative timeout value specifie\n+001bfb70: 7320 7468 6520 7469 6d65 6f75 7420 696e s the timeout in\n+001bfb80: 206d 6963 726f 7365 636f 6e64 732e 3c2f microseconds..

      For more d\n+001bfba0: 6574 6169 6c73 2c20 7365 6520 7468 6520 etails, see the \n+001bfbb0: 3c61 2068 7265 663d 222e 2e2f 2e2e 2f77 WS-Discove\n+001bfbe0: 7279 2070 6c75 6769 6e3c 2f61 3e20 646f ry plugin do\n+001bfbf0: 6375 6d65 6e74 6174 696f 6e2e 3c2f 703e cumentation.

      \n+001bfc00: 0a3c 6831 3e3c 6120 636c 6173 733d 2261 .

      .Copyr\n+001bfc30: 6967 6874 3c2f 6831 3e0a 3c70 3e3c 656d ight

      .

      Copyright (c) 2\n+001bfc50: 3030 302d 3230 3230 2c20 526f 6265 7274 000-2020, Robert\n+001bfc60: 2041 2e20 7661 6e20 456e 6765 6c65 6e2c A. van Engelen,\n+001bfc70: 2047 656e 6976 6961 2049 6e63 2e3c 6272 Genivia Inc..All rights \n+001bfc90: 7265 7365 7276 6564 2e3c 2f65 6d3e 203c reserved. <\n+001bfca0: 2f70 3e0a 3c2f 6469 763e 3c2f 6469 763e /p>.

      \n+001bfcb0: 3c21 2d2d 2050 6167 6544 6f63 202d 2d3e \n+001bfcc0: 0a3c 2f64 6976 3e3c 212d 2d20 636f 6e74 .
      .
      <\n+001bfce0: 212d 2d20 646f 632d 636f 6e74 656e 7420 !-- doc-content \n+001bfcf0: 2d2d 3e0a 3c68 7220 636c 6173 733d 2266 -->.
      .\n+001bfd20: 0a43 6f70 7972 6967 6874 2028 4329 2032 .Copyright (C) 2\n+001bfd30: 3032 312c 2052 6f62 6572 7420 7661 6e20 021, Robert van \n+001bfd40: 456e 6765 6c65 6e2c 2047 656e 6976 6961 Engelen, Genivia\n+001bfd50: 2049 6e63 2e2c 2041 6c6c 2052 6967 6874 Inc., All Right\n+001bfd60: 7320 5265 7365 7276 6564 2e0a 3c2f 6164 s Reserved...
      <\n+001bfd90: 736d 616c 6c3e 0a43 6f6e 7665 7274 6564 small>.Converted\n+001bfda0: 206f 6e20 4d6f 6e20 4d61 7220 3820 3230 on Mon Mar 8 20\n+001bfdb0: 3231 2031 333a 3036 3a32 3320 6279 203c 21 13:06:23 by <\n+001bfdc0: 6120 7461 7267 6574 3d22 5f62 6c61 6e6b a target=\"_blank\n+001bfdd0: 2220 6872 6566 3d22 6874 7470 3a2f 2f77 \" href=\"http://w\n+001bfde0: 7777 2e64 6f78 7967 656e 2e6f 7267 2f69 ww.doxygen.org/i\n+001bfdf0: 6e64 6578 2e68 746d 6c22 3e44 6f78 7967 ndex.html\">Doxyg\n+001bfe00: 656e 3c2f 613e 2031 2e39 2e31 3c2f 736d en 1.9.1
      .<\n+001bfe20: 6272 3e0a 3c64 6976 2073 7479 6c65 3d22 br>.
      ...\n"}]}]}]}]}