Changeset 1727
- Timestamp:
- 08/12/08 16:51:11 (4 months ago)
- Files:
-
- capture-mod/trunk/CaptureClient.vcproj (modified) (4 diffs)
- capture-mod/trunk/CaptureSoapServer.cpp (modified) (2 diffs)
- capture-mod/trunk/CaptureSoapServer.h (modified) (1 diff)
- capture-mod/trunk/capture.junks.res.xml (modified) (1 diff)
- capture-mod/trunk/capture.wsdl (modified) (3 diffs)
- capture-mod/trunk/captureGSOAP.h (modified) (2 diffs)
- capture-mod/trunk/soapC.cpp (modified) (8 diffs)
- capture-mod/trunk/soapClient.cpp (modified) (2 diffs)
- capture-mod/trunk/soapH.h (modified) (12 diffs)
- capture-mod/trunk/soapServer.cpp (modified) (3 diffs)
- capture-mod/trunk/soapStub.h (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
capture-mod/trunk/CaptureClient.vcproj
r1644 r1727 199 199 </File> 200 200 <File 201 RelativePath=".\CaptureSoapServer.cpp" 202 > 203 </File> 204 <File 201 205 RelativePath=".\EventController.cpp" 202 206 > … … 216 220 <File 217 221 RelativePath=".\Monitor.cpp" 218 >219 </File>220 <File221 RelativePath=".\MySoapServer.cpp"222 222 > 223 223 </File> … … 309 309 </File> 310 310 <File 311 RelativePath=".\CaptureSoapServer.h" 312 > 313 </File> 314 <File 311 315 RelativePath=".\ErrorCodes.h" 312 316 > … … 334 338 <File 335 339 RelativePath=".\Monitor.h" 336 >337 </File>338 <File339 RelativePath=".\MySoapServer.h"340 340 > 341 341 </File> capture-mod/trunk/CaptureSoapServer.cpp
r1726 r1727 83 83 *result = "pong"; 84 84 85 return SOAP_OK; 86 } 87 88 int ns__visit(struct soap *soap, char * url, char ** result){ 85 89 wchar_t xURL[1024]; 86 wsprintf(xURL, L"%hs", a);90 wsprintf(xURL, L"%hs", url); 87 91 //Build my own new-fangled Element to pass to Visitor:onServerEvent which I think will open 88 92 typedef boost::signal<void (Element*)> signal_serverEvent; … … 95 99 e.data = NULL; 96 100 e.dataLength = 0; 97 printf(" trying with notifyListeners\n");101 printf("visiting %s\n", url); 98 102 EventController::getInstance()->notifyListeners(&e); 99 // printf("trying with globVisitor\n"); 100 // globVisitor->onServerEvent(&e); 101 102 return SOAP_OK; 103 104 return SOAP_OK; 103 105 } 104 106 capture-mod/trunk/CaptureSoapServer.h
r1726 r1727 17 17 #include <boost/signal.hpp> 18 18 #include <boost/bind.hpp> 19 #include <boost \regex.hpp>19 #include <boost/regex.hpp> 20 20 #include <boost/algorithm/string/classification.hpp> 21 21 #include <boost/algorithm/string/find_iterator.hpp> capture-mod/trunk/capture.junks.res.xml
r1725 r1727 7 7 xmlns:ns="capture"> 8 8 <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> 9 < ms2>9 <Struct-1> 10 10 <first></first> 11 11 <last></last> 12 </ ms2>12 </Struct-1> 13 13 </SOAP-ENV:Body> 14 14 </SOAP-ENV:Envelope> capture-mod/trunk/capture.wsdl
r1726 r1727 47 47 </message> 48 48 49 <message name="visitRequest"> 50 <part name="a" type="xsd:string"/> 51 </message> 52 53 <message name="visitResponse"> 54 <part name="result" type="xsd:string"/> 55 </message> 56 49 57 <message name="subRequest"> 50 58 <part name="a" type="xsd:double"/> … … 66 74 <input message="tns:pingRequest"/> 67 75 <output message="tns:pingResponse"/> 76 </operation> 77 <operation name="visit"> 78 <documentation>Service definition of function ns__visit</documentation> 79 <input message="tns:visitRequest"/> 80 <output message="tns:visitResponse"/> 68 81 </operation> 69 82 <operation name="sub"> … … 94 107 </output> 95 108 </operation> 109 <operation name="visit"> 110 <SOAP:operation style="rpc" soapAction=""/> 111 <input> 112 <SOAP:body use="encoded" namespace="capture" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 113 </input> 114 <output> 115 <SOAP:body use="encoded" namespace="capture" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 116 </output> 117 </operation> 96 118 <operation name="sub"> 97 119 <SOAP:operation style="rpc" soapAction=""/> capture-mod/trunk/captureGSOAP.h
r1724 r1727 9 9 10 10 /* 11 typedef struct ms2{11 typedef struct { 12 12 char * first; 13 13 char * last; … … 19 19 int ns__add(int a, int b, int &result); 20 20 int ns__ping(char * a, char ** result); 21 int ns__visit(char * a, char ** result); 21 22 int ns__sub(double a, double b, double &result); capture-mod/trunk/soapC.cpp
r1726 r1727 8 8 #include "soapH.h" 9 9 10 SOAP_SOURCE_STAMP("@(#) soapC.cpp ver 2.7.10 2008-08-12 0 7:50:20 GMT")10 SOAP_SOURCE_STAMP("@(#) soapC.cpp ver 2.7.10 2008-08-12 08:49:10 GMT") 11 11 12 12 … … 166 166 case SOAP_TYPE_ns__subResponse: 167 167 return soap_in_ns__subResponse(soap, NULL, NULL, "ns:subResponse"); 168 case SOAP_TYPE_ns__visit: 169 return soap_in_ns__visit(soap, NULL, NULL, "ns:visit"); 170 case SOAP_TYPE_ns__visitResponse: 171 return soap_in_ns__visitResponse(soap, NULL, NULL, "ns:visitResponse"); 168 172 case SOAP_TYPE_ns__ping: 169 173 return soap_in_ns__ping(soap, NULL, NULL, "ns:ping"); … … 205 209 return soap_in_ns__subResponse(soap, NULL, NULL, NULL); 206 210 } 211 if (!soap_match_tag(soap, t, "ns:visit")) 212 { *type = SOAP_TYPE_ns__visit; 213 return soap_in_ns__visit(soap, NULL, NULL, NULL); 214 } 215 if (!soap_match_tag(soap, t, "ns:visitResponse")) 216 { *type = SOAP_TYPE_ns__visitResponse; 217 return soap_in_ns__visitResponse(soap, NULL, NULL, NULL); 218 } 207 219 if (!soap_match_tag(soap, t, "ns:ping")) 208 220 { *type = SOAP_TYPE_ns__ping; … … 309 321 case SOAP_TYPE_ns__subResponse: 310 322 return soap_out_ns__subResponse(soap, tag, id, (const struct ns__subResponse *)ptr, "ns:subResponse"); 323 case SOAP_TYPE_ns__visit: 324 return soap_out_ns__visit(soap, tag, id, (const struct ns__visit *)ptr, "ns:visit"); 325 case SOAP_TYPE_ns__visitResponse: 326 return soap_out_ns__visitResponse(soap, tag, id, (const struct ns__visitResponse *)ptr, "ns:visitResponse"); 311 327 case SOAP_TYPE_ns__ping: 312 328 return soap_out_ns__ping(soap, tag, id, (const struct ns__ping *)ptr, "ns:ping"); … … 347 363 case SOAP_TYPE_ns__subResponse: 348 364 soap_serialize_ns__subResponse(soap, (const struct ns__subResponse *)ptr); 365 break; 366 case SOAP_TYPE_ns__visit: 367 soap_serialize_ns__visit(soap, (const struct ns__visit *)ptr); 368 break; 369 case SOAP_TYPE_ns__visitResponse: 370 soap_serialize_ns__visitResponse(soap, (const struct ns__visitResponse *)ptr); 349 371 break; 350 372 case SOAP_TYPE_ns__ping: … … 389 411 case SOAP_TYPE_ns__ping: 390 412 return (void*)soap_instantiate_ns__ping(soap, -1, type, arrayType, n); 413 case SOAP_TYPE_ns__visitResponse: 414 return (void*)soap_instantiate_ns__visitResponse(soap, -1, type, arrayType, n); 415 case SOAP_TYPE_ns__visit: 416 return (void*)soap_instantiate_ns__visit(soap, -1, type, arrayType, n); 391 417 case SOAP_TYPE_ns__subResponse: 392 418 return (void*)soap_instantiate_ns__subResponse(soap, -1, type, arrayType, n); … … 443 469 else 444 470 delete[] (struct ns__ping*)p->ptr; 471 break; 472 case SOAP_TYPE_ns__visitResponse: 473 if (p->size < 0) 474 delete (struct ns__visitResponse*)p->ptr; 475 else 476 delete[] (struct ns__visitResponse*)p->ptr; 477 break; 478 case SOAP_TYPE_ns__visit: 479 if (p->size < 0) 480 delete (struct ns__visit*)p->ptr; 481 else 482 delete[] (struct ns__visit*)p->ptr; 445 483 break; 446 484 case SOAP_TYPE_ns__subResponse: … … 1485 1523 } 1486 1524 1525 SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__visit(struct soap *soap, struct ns__visit *a) 1526 { 1527 (void)soap; (void)a; /* appease -Wall -Werror */ 1528 soap_default_string(soap, &a->a); 1529 } 1530 1531 SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__visit(struct soap *soap, const struct ns__visit *a) 1532 { 1533 (void)soap; (void)a; /* appease -Wall -Werror */ 1534 soap_serialize_string(soap, &a->a); 1535 } 1536 1537 SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__visit(struct soap *soap, const struct ns__visit *a, const char *tag, const char *type) 1538 { 1539 register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__visit); 1540 if (soap_out_ns__visit(soap, tag, id, a, type)) 1541 return soap->error; 1542 return soap_putindependent(soap); 1543 } 1544 1545 SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__visit(struct soap *soap, const char *tag, int id, const struct ns__visit *a, const char *type) 1546 { 1547 if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__visit), type)) 1548 return soap->error; 1549 if (soap_out_string(soap, "a", -1, &a->a, "")) 1550 return soap->error; 1551 return soap_element_end_out(soap, tag); 1552 } 1553 1554 SOAP_FMAC3 struct ns__visit * SOAP_FMAC4 soap_get_ns__visit(struct soap *soap, struct ns__visit *p, const char *tag, const char *type) 1555 { 1556 if ((p = soap_in_ns__visit(soap, tag, p, type))) 1557 if (soap_getindependent(soap)) 1558 return NULL; 1559 return p; 1560 } 1561 1562 SOAP_FMAC3 struct ns__visit * SOAP_FMAC4 soap_in_ns__visit(struct soap *soap, const char *tag, struct ns__visit *a, const char *type) 1563 { 1564 short soap_flag_a = 1; 1565 if (soap_element_begin_in(soap, tag, 0, type)) 1566 return NULL; 1567 a = (struct ns__visit *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__visit, sizeof(struct ns__visit), 0, NULL, NULL, NULL); 1568 if (!a) 1569 return NULL; 1570 soap_default_ns__visit(soap, a); 1571 if (soap->body && !*soap->href) 1572 { 1573 for (;;) 1574 { soap->error = SOAP_TAG_MISMATCH; 1575 if (soap_flag_a && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) 1576 if (soap_in_string(soap, "a", &a->a, "xsd:string")) 1577 { soap_flag_a--; 1578 continue; 1579 } 1580 if (soap->error == SOAP_TAG_MISMATCH) 1581 soap->error = soap_ignore_element(soap); 1582 if (soap->error == SOAP_NO_TAG) 1583 break; 1584 if (soap->error) 1585 return NULL; 1586 } 1587 if (soap_element_end_in(soap, tag)) 1588 return NULL; 1589 } 1590 else 1591 { a = (struct ns__visit *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns__visit, 0, sizeof(struct ns__visit), 0, NULL); 1592 if (soap->body && soap_element_end_in(soap, tag)) 1593 return NULL; 1594 } 1595 return a; 1596 } 1597 1598 SOAP_FMAC5 struct ns__visit * SOAP_FMAC6 soap_new_ns__visit(struct soap *soap, int n) 1599 { return soap_instantiate_ns__visit(soap, n, NULL, NULL, NULL); 1600 } 1601 1602 SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__visit(struct soap *soap, struct ns__visit *p) 1603 { soap_delete(soap, p); 1604 } 1605 1606 SOAP_FMAC3 struct ns__visit * SOAP_FMAC4 soap_instantiate_ns__visit(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) 1607 { 1608 DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__visit(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); 1609 struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__visit, n, soap_fdelete); 1610 if (!cp) 1611 return NULL; 1612 if (n < 0) 1613 { cp->ptr = (void*)new struct ns__visit; 1614 if (size) 1615 *size = sizeof(struct ns__visit); 1616 } 1617 else 1618 { cp->ptr = (void*)new struct ns__visit[n]; 1619 if (!cp->ptr) 1620 { soap->error = SOAP_EOM; 1621 return NULL; 1622 } 1623 if (size) 1624 *size = n * sizeof(struct ns__visit); 1625 } 1626 DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); 1627 return (struct ns__visit*)cp->ptr; 1628 } 1629 SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__visit(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) 1630 { 1631 DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__visit %p -> %p\n", q, p)); 1632 *(struct ns__visit*)p = *(struct ns__visit*)q; 1633 } 1634 1635 SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__visitResponse(struct soap *soap, struct ns__visitResponse *a) 1636 { 1637 (void)soap; (void)a; /* appease -Wall -Werror */ 1638 a->result = NULL; 1639 } 1640 1641 SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__visitResponse(struct soap *soap, const struct ns__visitResponse *a) 1642 { 1643 (void)soap; (void)a; /* appease -Wall -Werror */ 1644 soap_serialize_PointerTostring(soap, &a->result); 1645 } 1646 1647 SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__visitResponse(struct soap *soap, const struct ns__visitResponse *a, const char *tag, const char *type) 1648 { 1649 register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__visitResponse); 1650 if (soap_out_ns__visitResponse(soap, tag, id, a, type)) 1651 return soap->error; 1652 return soap_putindependent(soap); 1653 } 1654 1655 SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__visitResponse(struct soap *soap, const char *tag, int id, const struct ns__visitResponse *a, const char *type) 1656 { 1657 if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__visitResponse), type)) 1658 return soap->error; 1659 if (soap_out_PointerTostring(soap, "result", -1, &a->result, "")) 1660 return soap->error; 1661 return soap_element_end_out(soap, tag); 1662 } 1663 1664 SOAP_FMAC3 struct ns__visitResponse * SOAP_FMAC4 soap_get_ns__visitResponse(struct soap *soap, struct ns__visitResponse *p, const char *tag, const char *type) 1665 { 1666 if ((p = soap_in_ns__visitResponse(soap, tag, p, type))) 1667 if (soap_getindependent(soap)) 1668 return NULL; 1669 return p; 1670 } 1671 1672 SOAP_FMAC3 struct ns__visitResponse * SOAP_FMAC4 soap_in_ns__visitResponse(struct soap *soap, const char *tag, struct ns__visitResponse *a, const char *type) 1673 { 1674 short soap_flag_result = 1; 1675 if (soap_element_begin_in(soap, tag, 0, type)) 1676 return NULL; 1677 a = (struct ns__visitResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__visitResponse, sizeof(struct ns__visitResponse), 0, NULL, NULL, NULL); 1678 if (!a) 1679 return NULL; 1680 soap_default_ns__visitResponse(soap, a); 1681 if (soap->body && !*soap->href) 1682 { 1683 for (;;) 1684 { soap->error = SOAP_TAG_MISMATCH; 1685 if (soap_flag_result && soap->error == SOAP_TAG_MISMATCH) 1686 if (soap_in_PointerTostring(soap, "result", &a->result, "xsd:string")) 1687 { soap_flag_result--; 1688 continue; 1689 } 1690 if (soap->error == SOAP_TAG_MISMATCH) 1691 soap->error = soap_ignore_element(soap); 1692 if (soap->error == SOAP_NO_TAG) 1693 break; 1694 if (soap->error) 1695 return NULL; 1696 } 1697 if (soap_element_end_in(soap, tag)) 1698 return NULL; 1699 } 1700 else 1701 { a = (struct ns__visitResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns__visitResponse, 0, sizeof(struct ns__visitResponse), 0, NULL); 1702 if (soap->body && soap_element_end_in(soap, tag)) 1703 return NULL; 1704 } 1705 return a; 1706 } 1707 1708 SOAP_FMAC5 struct ns__visitResponse * SOAP_FMAC6 soap_new_ns__visitResponse(struct soap *soap, int n) 1709 { return soap_instantiate_ns__visitResponse(soap, n, NULL, NULL, NULL); 1710 } 1711 1712 SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__visitResponse(struct soap *soap, struct ns__visitResponse *p) 1713 { soap_delete(soap, p); 1714 } 1715 1716 SOAP_FMAC3 struct ns__visitResponse * SOAP_FMAC4 soap_instantiate_ns__visitResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) 1717 { 1718 DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__visitResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); 1719 struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__visitResponse, n, soap_fdelete); 1720 if (!cp) 1721 return NULL; 1722 if (n < 0) 1723 { cp->ptr = (void*)new struct ns__visitResponse; 1724 if (size) 1725 *size = sizeof(struct ns__visitResponse); 1726 } 1727 else 1728 { cp->ptr = (void*)new struct ns__visitResponse[n]; 1729 if (!cp->ptr) 1730 { soap->error = SOAP_EOM; 1731 return NULL; 1732 } 1733 if (size) 1734 *size = n * sizeof(struct ns__visitResponse); 1735 } 1736 DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); 1737 return (struct ns__visitResponse*)cp->ptr; 1738 } 1739 SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__visitResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) 1740 { 1741 DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__visitResponse %p -> %p\n", q, p)); 1742 *(struct ns__visitResponse*)p = *(struct ns__visitResponse*)q; 1743 } 1744 1487 1745 SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__ping(struct soap *soap, struct ns__ping *a) 1488 1746 { capture-mod/trunk/soapClient.cpp
r1726 r1727 7 7 #include "soapH.h" 8 8 9 SOAP_SOURCE_STAMP("@(#) soapClient.cpp ver 2.7.10 2008-08-12 0 7:50:20 GMT")9 SOAP_SOURCE_STAMP("@(#) soapClient.cpp ver 2.7.10 2008-08-12 08:49:10 GMT") 10 10 11 11 … … 116 116 } 117 117 118 SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns__visit(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *a, char **result) 119 { struct ns__visit soap_tmp_ns__visit; 120 struct ns__visitResponse *soap_tmp_ns__visitResponse; 121 if (!soap_endpoint) 122 soap_endpoint = "http://192.168.0.131:1234"; 123 soap->encodingStyle = ""; 124 soap_tmp_ns__visit.a = a; 125 soap_begin(soap); 126 soap_serializeheader(soap); 127 soap_serialize_ns__visit(soap, &soap_tmp_ns__visit); 128 if (soap_begin_count(soap)) 129 return soap->error; 130 if (soap->mode & SOAP_IO_LENGTH) 131 { if (soap_envelope_begin_out(soap) 132 || soap_putheader(soap) 133 || soap_body_begin_out(soap) 134 || soap_put_ns__visit(soap, &soap_tmp_ns__visit, "ns:visit", "") 135 || soap_body_end_out(soap) 136 || soap_envelope_end_out(soap)) 137 return soap->error; 138 } 139 if (soap_end_count(soap)) 140 return soap->error; 141 if (soap_connect(soap, soap_endpoint, soap_action) 142 || soap_envelope_begin_out(soap) 143 || soap_putheader(soap) 144 || soap_body_begin_out(soap) 145 || soap_put_ns__visit(soap, &soap_tmp_ns__visit, "ns:visit", "") 146 || soap_body_end_out(soap) 147 || soap_envelope_end_out(soap) 148 || soap_end_send(soap)) 149 return soap_closesock(soap); 150 *result = NULL; 151 if (soap_begin_recv(soap) 152 || soap_envelope_begin_in(soap) 153 || soap_recv_header(soap) 154 || soap_body_begin_in(soap)) 155 return soap_closesock(soap); 156 soap_tmp_ns__visitResponse = soap_get_ns__visitResponse(soap, NULL, "ns:visitResponse", ""); 157 if (soap->error) 158 { if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2) 159 return soap_recv_fault(soap); 160 return soap_closesock(soap); 161 } 162 if (soap_body_end_in(soap) 163 || soap_envelope_end_in(soap) 164 || soap_end_recv(soap)) 165 return soap_closesock(soap); 166 if (result && soap_tmp_ns__visitResponse->result) 167 *result = *soap_tmp_ns__visitResponse->result; 168 return soap_closesock(soap); 169 } 170 118 171 SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns__sub(struct soap *soap, const char *soap_endpoint, const char *soap_action, double a, double b, double &result) 119 172 { struct ns__sub soap_tmp_ns__sub; capture-mod/trunk/soapH.h
r1726 r1727 49 49 50 50 #ifndef SOAP_TYPE_double 51 #define SOAP_TYPE_double (1 5)51 #define SOAP_TYPE_double (18) 52 52 #endif 53 53 SOAP_FMAC3 void SOAP_FMAC4 soap_default_double(struct soap*, double *); … … 60 60 61 61 #ifndef SOAP_TYPE_SOAP_ENV__Fault 62 #define SOAP_TYPE_SOAP_ENV__Fault ( 27)62 #define SOAP_TYPE_SOAP_ENV__Fault (30) 63 63 #endif 64 64 SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Fault(struct soap*, struct SOAP_ENV__Fault *); … … 78 78 79 79 #ifndef SOAP_TYPE_SOAP_ENV__Reason 80 #define SOAP_TYPE_SOAP_ENV__Reason (2 6)80 #define SOAP_TYPE_SOAP_ENV__Reason (29) 81 81 #endif 82 82 SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *); … … 96 96 97 97 #ifndef SOAP_TYPE_SOAP_ENV__Detail 98 #define SOAP_TYPE_SOAP_ENV__Detail (2 3)98 #define SOAP_TYPE_SOAP_ENV__Detail (26) 99 99 #endif 100 100 SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *); … … 114 114 115 115 #ifndef SOAP_TYPE_SOAP_ENV__Code 116 #define SOAP_TYPE_SOAP_ENV__Code (2 1)116 #define SOAP_TYPE_SOAP_ENV__Code (24) 117 117 #endif 118 118 SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *); … … 132 132 133 133 #ifndef SOAP_TYPE_SOAP_ENV__Header 134 #define SOAP_TYPE_SOAP_ENV__Header (2 0)134 #define SOAP_TYPE_SOAP_ENV__Header (23) 135 135 #endif 136 136 SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Header(struct soap*, struct SOAP_ENV__Header *); … … 148 148 149 149 #ifndef SOAP_TYPE_ns__sub 150 #define SOAP_TYPE_ns__sub ( 19)150 #define SOAP_TYPE_ns__sub (22) 151 151 #endif 152 152 SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__sub(struct soap*, struct ns__sub *); … … 162 162 163 163 #ifndef SOAP_TYPE_ns__subResponse 164 #define SOAP_TYPE_ns__subResponse ( 18)164 #define SOAP_TYPE_ns__subResponse (21) 165 165 #endif 166 166 SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__subResponse(struct soap*, struct ns__subResponse *); … … 175 175 SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__subResponse(struct soap*, int, int, void*, size_t, const void*, size_t); 176 176 177 #ifndef SOAP_TYPE_ns__visit 178 #define SOAP_TYPE_ns__visit (17) 179 #endif 180 SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__visit(struct soap*, struct ns__visit *); 181 SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__visit(struct soap*, const struct ns__visit *); 182 SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__visit(struct soap*, const struct ns__visit *, const char*, const char*); 183 SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__visit(struct soap*, const char*, int, const struct ns__visit *, const char*); 184 SOAP_FMAC3 struct ns__visit * SOAP_FMAC4 soap_get_ns__visit(struct soap*, struct ns__visit *, const char*, const char*); 185 SOAP_FMAC3 struct ns__visit * SOAP_FMAC4 soap_in_ns__visit(struct soap*, const char*, struct ns__visit *, const char*); 186 SOAP_FMAC5 struct ns__visit * SOAP_FMAC6 soap_new_ns__visit(struct soap*, int); 187 SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__visit(struct soap*, struct ns__visit*); 188 SOAP_FMAC3 struct ns__visit * SOAP_FMAC4 soap_instantiate_ns__visit(struct soap*, int, const char*, const char*, size_t*); 189 SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__visit(struct soap*, int, int, void*, size_t, const void*, size_t); 190 191 #ifndef SOAP_TYPE_ns__visitResponse 192 #define SOAP_TYPE_ns__visitResponse (16) 193 #endif 194 SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__visitResponse(struct soap*, struct ns__visitResponse *); 195 SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__visitResponse(struct soap*, const struct ns__visitResponse *); 196 SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__visitResponse(struct soap*, const struct ns__visitResponse *, const char*, const char*); 197 SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__visitResponse(struct soap*, const char*, int, const struct ns__visitResponse *, const char*); 198 SOAP_FMAC3 struct ns__visitResponse * SOAP_FMAC4 soap_get_ns__visitResponse(struct soap*, struct ns__visitResponse *, const char*, const char*); 199 SOAP_FMAC3 struct ns__visitResponse * SOAP_FMAC4 soap_in_ns__visitResponse(struct soap*, const char*, struct ns__visitResponse *, const char*); 200 SOAP_FMAC5 struct ns__visitResponse * SOAP_FMAC6 soap_new_ns__visitResponse(struct soap*, int); 201 SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__visitResponse(struct soap*, struct ns__visitResponse*); 202 SOAP_FMAC3 struct ns__visitResponse * SOAP_FMAC4 soap_instantiate_ns__visitResponse(struct soap*, int, const char*, const char*, size_t*); 203 SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__visitResponse(struct soap*, int, int, void*, size_t, const void*, size_t); 204 177 205 #ifndef SOAP_TYPE_ns__ping 178 206 #define SOAP_TYPE_ns__ping (14) … … 234 262 235 263 #ifndef SOAP_TYPE_PointerToSOAP_ENV__Reason 236 #define SOAP_TYPE_PointerToSOAP_ENV__Reason ( 29)264 #define SOAP_TYPE_PointerToSOAP_ENV__Reason (32) 237 265 #endif 238 266 SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *const*); … … 247 275 248 276 #ifndef SOAP_TYPE_PointerToSOAP_ENV__Detail 249 #define SOAP_TYPE_PointerToSOAP_ENV__Detail ( 28)277 #define SOAP_TYPE_PointerToSOAP_ENV__Detail (31) 250 278 #endif 251 279 SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *const*); … … 260 288 261 289 #ifndef SOAP_TYPE_PointerToSOAP_ENV__Code 262 #define SOAP_TYPE_PointerToSOAP_ENV__Code (2 2)290 #define SOAP_TYPE_PointerToSOAP_ENV__Code (25) 263 291 #endif 264 292 SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *const*); capture-mod/trunk/soapServer.cpp
r1726 r1727 7 7 #include "soapH.h" 8 8 9 SOAP_SOURCE_STAMP("@(#) soapServer.cpp ver 2.7.10 2008-08-12 0 7:50:20 GMT")9 SOAP_SOURCE_STAMP("@(#) soapServer.cpp ver 2.7.10 2008-08-12 08:49:10 GMT") 10 10 11 11 … … 78 78 if (!soap_match_tag(soap, soap->tag, "ns:ping")) 79 79 return soap_serve_ns__ping(soap); 80 if (!soap_match_tag(soap, soap->tag, "ns:visit")) 81 return soap_serve_ns__visit(soap); 80 82 if (!soap_match_tag(soap, soap->tag, "ns:sub")) 81 83 return soap_serve_ns__sub(soap); … … 169 171 } 170 172 173 SOAP_FMAC5 int SOAP_FMAC6 soap_serve_ns__visit(struct soap *soap) 174 { struct ns__visit soap_tmp_ns__visit; 175 struct ns__visitResponse soap_tmp_ns__visitResponse; 176 char * soap_tmp_string; 177 soap_default_ns__visitResponse(soap, &soap_tmp_ns__visitResponse); 178 soap_tmp_string = NULL; 179 soap_tmp_ns__visitResponse.result = &soap_tmp_string; 180 soap_default_ns__visit(soap, &soap_tmp_ns__visit); 181 soap->encodingStyle = ""; 182 if (!soap_get_ns__visit(soap, &soap_tmp_ns__visit, "ns:visit", NULL)) 183 return soap->error; 184 if (soap_body_end_in(soap) 185 || soap_envelope_end_in(soap) 186 || soap_end_recv(soap)) 187 return soap->error; 188 soap->error = ns__visit(soap, soap_tmp_ns__visit.a, &soap_tmp_string); 189 if (soap->error) 190 return soap->error; 191 soap_serializeheader(soap); 192 soap_serialize_ns__visitResponse(soap, &soap_tmp_ns__visitResponse); 193 if (soap_begin_count(soap)) 194 return soap->error; 195 if (soap->mode & SOAP_IO_LENGTH) 196 { if (soap_envelope_begin_out(soap) 197 || soap_putheader(soap) 198 || soap_body_begin_out(soap) 199 || soap_put_ns__visitResponse(soap, &soap_tmp_ns__visitResponse, "ns:visitResponse", "") 200 || soap_body_end_out(soap) 201 || soap_envelope_end_out(soap)) 202 return soap->error; 203 }; 204 if (soap_end_count(soap) 205 || soap_response(soap, SOAP_OK) 206 || soap_envelope_begin_out(soap) 207 || soap_putheader(soap) 208 || soap_body_begin_out(soap) 209 || soap_put_ns__visitResponse(soap, &soap_tmp_ns__visitResponse, "ns:visitResponse", "") 210 || soap_body_end_out(soap) 211 || soap_envelope_end_out(soap) 212 || soap_end_send(soap)) 213 return soap->error; 214 return soap_closesock(soap); 215 } 216 171 217 SOAP_FMAC5 int SOAP_FMAC6 soap_serve_ns__sub(struct soap *soap) 172 218 { struct ns__sub soap_tmp_ns__sub; capture-mod/trunk/soapStub.h
r1726 r1727 69 69 #endif 70 70 71 #ifndef SOAP_TYPE_ns__visitResponse 72 #define SOAP_TYPE_ns__visitResponse (16) 73 /* ns:visitResponse */ 74 struct ns__visitResponse 75 { 76 public: 77 char **result; /* SOAP 1.2 RPC return element (when namespace qualified) */ /* optional element of type xsd:string */ 78 }; 79 #endif 80 81 #ifndef SOAP_TYPE_ns__visit 82 #define SOAP_TYPE_ns__visit (17) 83 /* ns:visit */ 84 struct ns__visit 85 { 86 public: 87 char *a; /* optional element of type xsd:string */ 88 }; 89 #endif 90 71 91 #ifndef SOAP_TYPE_ns__subResponse 72 #define SOAP_TYPE_ns__subResponse ( 18)92 #define SOAP_TYPE_ns__subResponse (21) 73 93 /* ns:subResponse */ 74 94 struct ns__subResponse … … 80 100 81 101 #ifndef SOAP_TYPE_ns__sub 82 #define SOAP_TYPE_ns__sub ( 19)102 #define SOAP_TYPE_ns__sub (22) 83 103 /* ns:sub */ 84 104 struct ns__sub … … 91 111 92 112 #ifndef SOAP_TYPE_SOAP_ENV__Header 93 #define SOAP_TYPE_SOAP_ENV__Header (2 0)113 #define SOAP_TYPE_SOAP_ENV__Header (23) 94 114 /* SOAP Header: */ 95 115 struct SOAP_ENV__Header … … 103 123 104 124 #ifndef SOAP_TYPE_SOAP_ENV__Code 105 #define SOAP_TYPE_SOAP_ENV__Code (2 1)125 #define SOAP_TYPE_SOAP_ENV__Code (24) 106 126 /* SOAP Fault Code: */ 107 127 struct SOAP_ENV__Code … … 114 134 115 135 #ifndef SOAP_TYPE_SOAP_ENV__Detail 116 #define SOAP_TYPE_SOAP_ENV__Detail (2 3)136 #define SOAP_TYPE_SOAP_ENV__Detail (26) 117 137 /* SOAP-ENV:Detail */ 118 138 struct SOAP_ENV__Detail … … 126 146 127 147 #ifndef SOAP_TYPE_SOAP_ENV__Reason 128 #define SOAP_TYPE_SOAP_ENV__Reason (2 6)148 #define SOAP_TYPE_SOAP_ENV__Reason (29) 129 149 /* SOAP-ENV:Reason */ 130 150 struct SOAP_ENV__Reason … … 136 156 137 157 #ifndef SOAP_TYPE_SOAP_ENV__Fault 138 #define SOAP_TYPE_SOAP_ENV__Fault ( 27)158 #define SOAP_TYPE_SOAP_ENV__Fault (30) 139 159 /* SOAP Fault: */ 140 160 struct SOAP_ENV__Fault … … 202 222 SOAP_FMAC5 int SOAP_FMAC6 ns__ping(struct soap*, char *a, char **result); 203 223 224 SOAP_FMAC5 int SOAP_FMAC6 ns__visit(struct soap*, char *a, char **result); 225 204 226 SOAP_FMAC5 int SOAP_FMAC6 ns__sub(struct soap*, double a, double b, double &result); 205 227 … … 215 237 SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns__ping(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *a, char **result); 216 238 239 SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns__visit(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *a, char **result); 240 217 241 SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns__sub(struct soap *soap, const char *soap_endpoint, const char *soap_action, double a, double b, double &result); 218 242 … … 231 255 SOAP_FMAC5 int SOAP_FMAC6 soap_serve_ns__ping(struct soap*); 232 256 257 SOAP_FMAC5 int SOAP_FMAC6 soap_serve_ns__visit(struct soap*); 258 233 259 SOAP_FMAC5 int SOAP_FMAC6 soap_serve_ns__sub(struct soap*); 234 260
