Changeset 1727

Show
Ignore:
Timestamp:
08/12/08 16:51:11 (4 months ago)
Author:
xkovah
Message:

made nsvisit just to pass the time, while waiting to subscribe to gsoap list

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • capture-mod/trunk/CaptureClient.vcproj

    r1644 r1727  
    199199            </File> 
    200200            <File 
     201                RelativePath=".\CaptureSoapServer.cpp" 
     202                > 
     203            </File> 
     204            <File 
    201205                RelativePath=".\EventController.cpp" 
    202206                > 
     
    216220            <File 
    217221                RelativePath=".\Monitor.cpp" 
    218                 > 
    219             </File> 
    220             <File 
    221                 RelativePath=".\MySoapServer.cpp" 
    222222                > 
    223223            </File> 
     
    309309            </File> 
    310310            <File 
     311                RelativePath=".\CaptureSoapServer.h" 
     312                > 
     313            </File> 
     314            <File 
    311315                RelativePath=".\ErrorCodes.h" 
    312316                > 
     
    334338            <File 
    335339                RelativePath=".\Monitor.h" 
    336                 > 
    337             </File> 
    338             <File 
    339                 RelativePath=".\MySoapServer.h" 
    340340                > 
    341341            </File> 
  • capture-mod/trunk/CaptureSoapServer.cpp

    r1726 r1727  
    8383   *result = "pong"; 
    8484 
     85   return SOAP_OK;  
     86} 
     87 
     88int ns__visit(struct soap *soap, char * url, char ** result){ 
    8589    wchar_t xURL[1024]; 
    86     wsprintf(xURL, L"%hs", a); 
     90    wsprintf(xURL, L"%hs", url); 
    8791    //Build my own new-fangled Element to pass to Visitor:onServerEvent which I think will open  
    8892    typedef boost::signal<void (Element*)> signal_serverEvent; 
     
    9599    e.data = NULL; 
    96100    e.dataLength = 0; 
    97     printf("trying with notifyListeners\n"); 
     101    printf("visiting %s\n", url); 
    98102    EventController::getInstance()->notifyListeners(&e); 
    99 //  printf("trying with globVisitor\n"); 
    100 //  globVisitor->onServerEvent(&e); 
    101  
    102    return SOAP_OK;  
     103 
     104    return SOAP_OK; 
    103105} 
    104106 
  • capture-mod/trunk/CaptureSoapServer.h

    r1726 r1727  
    1717#include <boost/signal.hpp> 
    1818#include <boost/bind.hpp> 
    19 #include <boost\regex.hpp> 
     19#include <boost/regex.hpp> 
    2020#include <boost/algorithm/string/classification.hpp> 
    2121#include <boost/algorithm/string/find_iterator.hpp> 
  • capture-mod/trunk/capture.junks.res.xml

    r1725 r1727  
    77 xmlns:ns="capture"> 
    88 <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> 
    9   <ms2
     9  <Struct-1
    1010   <first></first> 
    1111   <last></last> 
    12   </ms2
     12  </Struct-1
    1313 </SOAP-ENV:Body> 
    1414</SOAP-ENV:Envelope> 
  • capture-mod/trunk/capture.wsdl

    r1726 r1727  
    4747</message> 
    4848 
     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 
    4957<message name="subRequest"> 
    5058 <part name="a" type="xsd:double"/> 
     
    6674  <input message="tns:pingRequest"/> 
    6775  <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"/> 
    6881 </operation> 
    6982 <operation name="sub"> 
     
    94107  </output> 
    95108 </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> 
    96118 <operation name="sub"> 
    97119  <SOAP:operation style="rpc" soapAction=""/> 
  • capture-mod/trunk/captureGSOAP.h

    r1724 r1727  
    99 
    1010/* 
    11 typedef struct ms2
     11typedef struct
    1212    char * first;  
    1313    char * last; 
     
    1919int ns__add(int a, int b, int &result);  
    2020int ns__ping(char * a, char ** result); 
     21int ns__visit(char * a, char ** result); 
    2122int ns__sub(double a, double b, double &result);  
  • capture-mod/trunk/soapC.cpp

    r1726 r1727  
    88#include "soapH.h" 
    99 
    10 SOAP_SOURCE_STAMP("@(#) soapC.cpp ver 2.7.10 2008-08-12 07:50:20 GMT") 
     10SOAP_SOURCE_STAMP("@(#) soapC.cpp ver 2.7.10 2008-08-12 08:49:10 GMT") 
    1111 
    1212 
     
    166166    case SOAP_TYPE_ns__subResponse: 
    167167        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"); 
    168172    case SOAP_TYPE_ns__ping: 
    169173        return soap_in_ns__ping(soap, NULL, NULL, "ns:ping"); 
     
    205209            return soap_in_ns__subResponse(soap, NULL, NULL, NULL); 
    206210        } 
     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        } 
    207219        if (!soap_match_tag(soap, t, "ns:ping")) 
    208220        {   *type = SOAP_TYPE_ns__ping; 
     
    309321    case SOAP_TYPE_ns__subResponse: 
    310322        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"); 
    311327    case SOAP_TYPE_ns__ping: 
    312328        return soap_out_ns__ping(soap, tag, id, (const struct ns__ping *)ptr, "ns:ping"); 
     
    347363    case SOAP_TYPE_ns__subResponse: 
    348364        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); 
    349371        break; 
    350372    case SOAP_TYPE_ns__ping: 
     
    389411    case SOAP_TYPE_ns__ping: 
    390412        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); 
    391417    case SOAP_TYPE_ns__subResponse: 
    392418        return (void*)soap_instantiate_ns__subResponse(soap, -1, type, arrayType, n); 
     
    443469        else 
    444470            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; 
    445483        break; 
    446484    case SOAP_TYPE_ns__subResponse: 
     
    14851523} 
    14861524 
     1525SOAP_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 
     1531SOAP_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 
     1537SOAP_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 
     1545SOAP_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 
     1554SOAP_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 
     1562SOAP_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 
     1598SOAP_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 
     1602SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__visit(struct soap *soap, struct ns__visit *p) 
     1603{   soap_delete(soap, p); 
     1604} 
     1605 
     1606SOAP_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} 
     1629SOAP_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 
     1635SOAP_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 
     1641SOAP_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 
     1647SOAP_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 
     1655SOAP_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 
     1664SOAP_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 
     1672SOAP_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 
     1708SOAP_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 
     1712SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__visitResponse(struct soap *soap, struct ns__visitResponse *p) 
     1713{   soap_delete(soap, p); 
     1714} 
     1715 
     1716SOAP_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} 
     1739SOAP_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 
    14871745SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__ping(struct soap *soap, struct ns__ping *a) 
    14881746{ 
  • capture-mod/trunk/soapClient.cpp

    r1726 r1727  
    77#include "soapH.h" 
    88 
    9 SOAP_SOURCE_STAMP("@(#) soapClient.cpp ver 2.7.10 2008-08-12 07:50:20 GMT") 
     9SOAP_SOURCE_STAMP("@(#) soapClient.cpp ver 2.7.10 2008-08-12 08:49:10 GMT") 
    1010 
    1111 
     
    116116} 
    117117 
     118SOAP_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 
    118171SOAP_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) 
    119172{   struct ns__sub soap_tmp_ns__sub; 
  • capture-mod/trunk/soapH.h

    r1726 r1727  
    4949 
    5050#ifndef SOAP_TYPE_double 
    51 #define SOAP_TYPE_double (15
     51#define SOAP_TYPE_double (18
    5252#endif 
    5353SOAP_FMAC3 void SOAP_FMAC4 soap_default_double(struct soap*, double *); 
     
    6060 
    6161#ifndef SOAP_TYPE_SOAP_ENV__Fault 
    62 #define SOAP_TYPE_SOAP_ENV__Fault (27
     62#define SOAP_TYPE_SOAP_ENV__Fault (30
    6363#endif 
    6464SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Fault(struct soap*, struct SOAP_ENV__Fault *); 
     
    7878 
    7979#ifndef SOAP_TYPE_SOAP_ENV__Reason 
    80 #define SOAP_TYPE_SOAP_ENV__Reason (26
     80#define SOAP_TYPE_SOAP_ENV__Reason (29
    8181#endif 
    8282SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *); 
     
    9696 
    9797#ifndef SOAP_TYPE_SOAP_ENV__Detail 
    98 #define SOAP_TYPE_SOAP_ENV__Detail (23
     98#define SOAP_TYPE_SOAP_ENV__Detail (26
    9999#endif 
    100100SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *); 
     
    114114 
    115115#ifndef SOAP_TYPE_SOAP_ENV__Code 
    116 #define SOAP_TYPE_SOAP_ENV__Code (21
     116#define SOAP_TYPE_SOAP_ENV__Code (24
    117117#endif 
    118118SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *); 
     
    132132 
    133133#ifndef SOAP_TYPE_SOAP_ENV__Header 
    134 #define SOAP_TYPE_SOAP_ENV__Header (20
     134#define SOAP_TYPE_SOAP_ENV__Header (23
    135135#endif 
    136136SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Header(struct soap*, struct SOAP_ENV__Header *); 
     
    148148 
    149149#ifndef SOAP_TYPE_ns__sub 
    150 #define SOAP_TYPE_ns__sub (19
     150#define SOAP_TYPE_ns__sub (22
    151151#endif 
    152152SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__sub(struct soap*, struct ns__sub *); 
     
    162162 
    163163#ifndef SOAP_TYPE_ns__subResponse 
    164 #define SOAP_TYPE_ns__subResponse (18
     164#define SOAP_TYPE_ns__subResponse (21
    165165#endif 
    166166SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__subResponse(struct soap*, struct ns__subResponse *); 
     
    175175SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__subResponse(struct soap*, int, int, void*, size_t, const void*, size_t); 
    176176 
     177#ifndef SOAP_TYPE_ns__visit 
     178#define SOAP_TYPE_ns__visit (17) 
     179#endif 
     180SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__visit(struct soap*, struct ns__visit *); 
     181SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__visit(struct soap*, const struct ns__visit *); 
     182SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__visit(struct soap*, const struct ns__visit *, const char*, const char*); 
     183SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__visit(struct soap*, const char*, int, const struct ns__visit *, const char*); 
     184SOAP_FMAC3 struct ns__visit * SOAP_FMAC4 soap_get_ns__visit(struct soap*, struct ns__visit *, const char*, const char*); 
     185SOAP_FMAC3 struct ns__visit * SOAP_FMAC4 soap_in_ns__visit(struct soap*, const char*, struct ns__visit *, const char*); 
     186SOAP_FMAC5 struct ns__visit * SOAP_FMAC6 soap_new_ns__visit(struct soap*, int); 
     187SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__visit(struct soap*, struct ns__visit*); 
     188SOAP_FMAC3 struct ns__visit * SOAP_FMAC4 soap_instantiate_ns__visit(struct soap*, int, const char*, const char*, size_t*); 
     189SOAP_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 
     194SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__visitResponse(struct soap*, struct ns__visitResponse *); 
     195SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__visitResponse(struct soap*, const struct ns__visitResponse *); 
     196SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__visitResponse(struct soap*, const struct ns__visitResponse *, const char*, const char*); 
     197SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__visitResponse(struct soap*, const char*, int, const struct ns__visitResponse *, const char*); 
     198SOAP_FMAC3 struct ns__visitResponse * SOAP_FMAC4 soap_get_ns__visitResponse(struct soap*, struct ns__visitResponse *, const char*, const char*); 
     199SOAP_FMAC3 struct ns__visitResponse * SOAP_FMAC4 soap_in_ns__visitResponse(struct soap*, const char*, struct ns__visitResponse *, const char*); 
     200SOAP_FMAC5 struct ns__visitResponse * SOAP_FMAC6 soap_new_ns__visitResponse(struct soap*, int); 
     201SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__visitResponse(struct soap*, struct ns__visitResponse*); 
     202SOAP_FMAC3 struct ns__visitResponse * SOAP_FMAC4 soap_instantiate_ns__visitResponse(struct soap*, int, const char*, const char*, size_t*); 
     203SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__visitResponse(struct soap*, int, int, void*, size_t, const void*, size_t); 
     204 
    177205#ifndef SOAP_TYPE_ns__ping 
    178206#define SOAP_TYPE_ns__ping (14) 
     
    234262 
    235263#ifndef SOAP_TYPE_PointerToSOAP_ENV__Reason 
    236 #define SOAP_TYPE_PointerToSOAP_ENV__Reason (29
     264#define SOAP_TYPE_PointerToSOAP_ENV__Reason (32
    237265#endif 
    238266SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *const*); 
     
    247275 
    248276#ifndef SOAP_TYPE_PointerToSOAP_ENV__Detail 
    249 #define SOAP_TYPE_PointerToSOAP_ENV__Detail (28
     277#define SOAP_TYPE_PointerToSOAP_ENV__Detail (31
    250278#endif 
    251279SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *const*); 
     
    260288 
    261289#ifndef SOAP_TYPE_PointerToSOAP_ENV__Code 
    262 #define SOAP_TYPE_PointerToSOAP_ENV__Code (22
     290#define SOAP_TYPE_PointerToSOAP_ENV__Code (25
    263291#endif 
    264292SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *const*); 
  • capture-mod/trunk/soapServer.cpp

    r1726 r1727  
    77#include "soapH.h" 
    88 
    9 SOAP_SOURCE_STAMP("@(#) soapServer.cpp ver 2.7.10 2008-08-12 07:50:20 GMT") 
     9SOAP_SOURCE_STAMP("@(#) soapServer.cpp ver 2.7.10 2008-08-12 08:49:10 GMT") 
    1010 
    1111 
     
    7878    if (!soap_match_tag(soap, soap->tag, "ns:ping")) 
    7979        return soap_serve_ns__ping(soap); 
     80    if (!soap_match_tag(soap, soap->tag, "ns:visit")) 
     81        return soap_serve_ns__visit(soap); 
    8082    if (!soap_match_tag(soap, soap->tag, "ns:sub")) 
    8183        return soap_serve_ns__sub(soap); 
     
    169171} 
    170172 
     173SOAP_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 
    171217SOAP_FMAC5 int SOAP_FMAC6 soap_serve_ns__sub(struct soap *soap) 
    172218{   struct ns__sub soap_tmp_ns__sub; 
  • capture-mod/trunk/soapStub.h

    r1726 r1727  
    6969#endif 
    7070 
     71#ifndef SOAP_TYPE_ns__visitResponse 
     72#define SOAP_TYPE_ns__visitResponse (16) 
     73/* ns:visitResponse */ 
     74struct ns__visitResponse 
     75{ 
     76public: 
     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 */ 
     84struct ns__visit 
     85{ 
     86public: 
     87    char *a;    /* optional element of type xsd:string */ 
     88}; 
     89#endif 
     90 
    7191#ifndef SOAP_TYPE_ns__subResponse 
    72 #define SOAP_TYPE_ns__subResponse (18
     92#define SOAP_TYPE_ns__subResponse (21
    7393/* ns:subResponse */ 
    7494struct ns__subResponse 
     
    80100 
    81101#ifndef SOAP_TYPE_ns__sub 
    82 #define SOAP_TYPE_ns__sub (19
     102#define SOAP_TYPE_ns__sub (22
    83103/* ns:sub */ 
    84104struct ns__sub 
     
    91111 
    92112#ifndef SOAP_TYPE_SOAP_ENV__Header 
    93 #define SOAP_TYPE_SOAP_ENV__Header (20
     113#define SOAP_TYPE_SOAP_ENV__Header (23
    94114/* SOAP Header: */ 
    95115struct SOAP_ENV__Header 
     
    103123 
    104124#ifndef SOAP_TYPE_SOAP_ENV__Code 
    105 #define SOAP_TYPE_SOAP_ENV__Code (21
     125#define SOAP_TYPE_SOAP_ENV__Code (24
    106126/* SOAP Fault Code: */ 
    107127struct SOAP_ENV__Code 
     
    114134 
    115135#ifndef SOAP_TYPE_SOAP_ENV__Detail 
    116 #define SOAP_TYPE_SOAP_ENV__Detail (23
     136#define SOAP_TYPE_SOAP_ENV__Detail (26
    117137/* SOAP-ENV:Detail */ 
    118138struct SOAP_ENV__Detail 
     
    126146 
    127147#ifndef SOAP_TYPE_SOAP_ENV__Reason 
    128 #define SOAP_TYPE_SOAP_ENV__Reason (26
     148#define SOAP_TYPE_SOAP_ENV__Reason (29
    129149/* SOAP-ENV:Reason */ 
    130150struct SOAP_ENV__Reason 
     
    136156 
    137157#ifndef SOAP_TYPE_SOAP_ENV__Fault 
    138 #define SOAP_TYPE_SOAP_ENV__Fault (27
     158#define SOAP_TYPE_SOAP_ENV__Fault (30
    139159/* SOAP Fault: */ 
    140160struct SOAP_ENV__Fault 
     
    202222SOAP_FMAC5 int SOAP_FMAC6 ns__ping(struct soap*, char *a, char **result); 
    203223 
     224SOAP_FMAC5 int SOAP_FMAC6 ns__visit(struct soap*, char *a, char **result); 
     225 
    204226SOAP_FMAC5 int SOAP_FMAC6 ns__sub(struct soap*, double a, double b, double &result); 
    205227 
     
    215237SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns__ping(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *a, char **result); 
    216238 
     239SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns__visit(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *a, char **result); 
     240 
    217241SOAP_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); 
    218242 
     
    231255SOAP_FMAC5 int SOAP_FMAC6 soap_serve_ns__ping(struct soap*); 
    232256 
     257SOAP_FMAC5 int SOAP_FMAC6 soap_serve_ns__visit(struct soap*); 
     258 
    233259SOAP_FMAC5 int SOAP_FMAC6 soap_serve_ns__sub(struct soap*); 
    234260