Changeset 1760

Show
Ignore:
Timestamp:
08/20/08 17:40:07 (3 months ago)
Author:
xkovah
Message:

Close to sending and receiving files in base64, but just introduced a bug in Capture somewhere (probably the delete[]s

Files:

Legend:

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

    r1727 r1760  
    191191            </File> 
    192192            <File 
     193                RelativePath=".\b64.c" 
     194                > 
     195            </File> 
     196            <File 
    193197                RelativePath=".\CaptureClient.cpp" 
    194198                > 
     
    301305            </File> 
    302306            <File 
     307                RelativePath=".\b64.h" 
     308                > 
     309            </File> 
     310            <File 
    303311                RelativePath=".\CaptureGlobal.h" 
    304312                > 
  • capture-mod/trunk/CaptureSoapServer.cpp

    r1749 r1760  
    44*/ 
    55 
     6 
    67#include "CaptureSoapServer.h" 
    78 
    89#include "soapH.h"  
    910#include "capture.nsmap"  
    10  
    1111#include "Visitor.h" 
     12#include "b64.h" 
    1213 
    1314CaptureSoapServer::CaptureSoapServer(Visitor* v){ 
     
    112113} 
    113114 
    114 int ns__sendBase64(struct soap *soap, char * data, int encodedLength, int decodedLength, ns__myStruct &result){ 
    115     printf("in ns__sendBase64\n"); 
     115int ns__sendFileBase64(struct soap *soap, char * fileName, char * data, unsigned int encodedLength, unsigned int decodedLength, ns__myStruct &result){ 
     116    printf("in ns__sendFileBase64\n"); 
    116117 
    117118    printf("encodedLength = %d, decodedLength = %d, data[0][1][2][3] = %c%c%c%c\n", encodedLength, decodedLength, 
    118119        data[0], data[1], data[2], data[3]); 
    119120 
    120     HANDLE myHandle = CreateFileA("F:\\tmp\\soapcpp2.exe", (GENERIC_READ | GENERIC_WRITE), 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); 
     121    //Sanity check 
     122    if(decodedLength != b64::b64_decode(data, encodedLength, NULL, NULL)){ 
     123        printf("The decode will not be correct. Exiting\n"); 
     124        return SOAP_ERR; 
     125    } 
     126    //Decode the data 
     127    char * decodedData = new char[decodedLength]; 
     128    b64::b64_decode(data, encodedLength, decodedData, decodedLength); 
     129 
     130    printf("decodedData[0][1] = %c%c\n", decodedData[0], decodedData[1]); 
     131    //Open a file to write the decoded data to 
     132    HANDLE myHandle = CreateFileA(fileName, (GENERIC_READ | GENERIC_WRITE),  
     133                                    NULL, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); 
    121134    if(myHandle == INVALID_HANDLE_VALUE){ 
    122135        printf("couldn't open the file. Exiting\n"); 
    123136        return SOAP_ERR; 
    124137    } 
     138 
     139    //Write the data 
    125140    DWORD numWrote; 
    126     BOOL b = WriteFile(myHandle, data, decodedLength, &numWrote, NULL); 
     141    BOOL b = WriteFile(myHandle, decodedData, decodedLength, &numWrote, NULL); 
    127142    if(b){ 
    128         printf("Wrote %d bytes of data\n", numWrote); 
     143        printf("Wrote %d bytes of data to %s\n", numWrote, fileName); 
    129144    } 
    130145    CloseHandle(myHandle); 
     146    delete[] decodedData; 
    131147 
    132148    ns__myStruct x; 
     
    139155} 
    140156 
     157int ns__receiveFileBase64(struct soap *soap, char * fileName, ns__receiveFileStruct &result){ 
     158    printf("in ns__receiveFileBase64, about to open %s\n", fileName); 
     159 
     160    //Open the file 
     161    HANDLE myHandle = CreateFileA(fileName, GENERIC_READ, NULL, NULL,  
     162                                    OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); 
     163    if(myHandle == INVALID_HANDLE_VALUE){ 
     164        printf("couldn't open the file %s. Exiting\n", fileName); 
     165        return SOAP_ERR; 
     166    } 
     167 
     168    //Get the size and then read it into a buffer 
     169    unsigned int fileSize = (unsigned int)GetFileSize(myHandle, NULL); 
     170    if(fileSize <= 0){ 
     171        printf("Error, or zero-length file\n"); 
     172        return SOAP_ERR; 
     173    } 
     174    char * buffer = new char[fileSize]; 
     175 
     176    DWORD numRead = 0; 
     177    BOOL b = ReadFile(myHandle, buffer, fileSize, &numRead,NULL); 
     178    if(!b || numRead != fileSize){ 
     179        printf("ReadFile error\n"); 
     180        return SOAP_ERR; 
     181    } 
     182    else{ 
     183        printf("Read the file successfully\n"); 
     184    } 
     185 
     186    //base64 the file 
     187    unsigned int encodedLength = b64::b64_encode(buffer, fileSize, NULL, NULL); 
     188    char * encodedData = new char[encodedLength]; 
     189    size_t ret = b64::b64_encode(buffer, fileSize, encodedData, encodedLength); 
     190    if(ret == 0){ 
     191        printf("size of the buffer was insufficient, or the length of the * converted buffer was longer than destLen\n"); 
     192        return SOAP_ERR; 
     193    } 
     194 
     195    //return the file 
     196    result.data = encodedData; 
     197    result.encodedLength = encodedLength; 
     198    result.decodedLength = fileSize; 
     199 
     200    printf("cleaning up\n"); 
     201    CloseHandle(myHandle); 
     202    delete[] buffer; 
     203    delete[] encodedData; 
     204 
     205    return SOAP_OK; 
     206} 
     207 
    141208int ns__sendMIME(struct soap *soap, int magicNumber, int &result){ 
     209    printf("In ns__sendMIME\n"); 
     210 
    142211    struct soap_multipart * attachment; 
    143212    for(attachment = soap->mime.list; attachment; attachment = attachment->next){ 
  • capture-mod/trunk/MIMEsend.pl

    r1749 r1760  
    2121print "\nCalling sendMIME\n\n"; 
    2222$data = SOAP::Data->name(magicNumber => "123"); 
    23 $client->sendMIME($data); 
    24 #$result = $client->sendMIME($data); 
    25 #print "result = $result\n"; 
     23#$client->sendMIME($data); 
     24$result = $client->sendMIME($data); 
     25print "result = $result\n"; 
    2626 
    2727 
  • capture-mod/trunk/capture.wsdl

    r1749 r1760  
    3232   </complexContent> 
    3333  </complexType> 
     34  <complexType name="receiveFileStruct"> 
     35   <complexContent> 
     36    <restriction base="ns:rcvS"> 
     37    </restriction> 
     38   </complexContent> 
     39  </complexType> 
    3440  <complexType name="s"> 
    3541   <sequence> 
     
    3844   </sequence> 
    3945  </complexType> 
     46  <complexType name="rcvS"> 
     47   <sequence> 
     48     <element name="data" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 
     49     <element name="encodedLength" type="xsd:unsignedInt" minOccurs="1" maxOccurs="1"/> 
     50     <element name="decodedLength" type="xsd:unsignedInt" minOccurs="1" maxOccurs="1"/> 
     51   </sequence> 
     52  </complexType> 
    4053 </schema> 
    4154 
     
    5164</message> 
    5265 
    53 <message name="sendBase64"> 
     66<message name="sendFileBase64"> 
     67 <part name="fileName" type="xsd:string"/> 
    5468 <part name="data" type="xsd:string"/> 
    55  <part name="encodedLength" type="xsd:int"/> 
    56  <part name="decodedLength" type="xsd:int"/> 
     69 <part name="encodedLength" type="xsd:unsignedInt"/> 
     70 <part name="decodedLength" type="xsd:unsignedInt"/> 
     71</message> 
     72 
     73<message name="receiveFileBase64"> 
     74 <part name="fileName" type="xsd:string"/> 
     75</message> 
     76 
     77<message name="rcvS"> 
     78 <part name="data" type="xsd:string"/> 
     79 <part name="encodedLength" type="xsd:unsignedInt"/> 
     80 <part name="decodedLength" type="xsd:unsignedInt"/> 
    5781</message> 
    5882 
     
    105129  <output message="tns:s"/> 
    106130 </operation> 
    107  <operation name="sendBase64"> 
    108   <documentation>Service definition of function ns__sendBase64</documentation> 
    109   <input message="tns:sendBase64"/> 
     131 <operation name="sendFileBase64"> 
     132  <documentation>Service definition of function ns__sendFileBase64</documentation> 
     133  <input message="tns:sendFileBase64"/> 
    110134  <output message="tns:s"/> 
     135 </operation> 
     136 <operation name="receiveFileBase64"> 
     137  <documentation>Service definition of function ns__receiveFileBase64</documentation> 
     138  <input message="tns:receiveFileBase64"/> 
     139  <output message="tns:rcvS"/> 
    111140 </operation> 
    112141 <operation name="sendMIME"> 
     
    148177  </output> 
    149178 </operation> 
    150  <operation name="sendBase64"> 
     179 <operation name="sendFileBase64"> 
     180  <SOAP:operation style="rpc" soapAction=""/> 
     181  <input> 
     182     <SOAP:body use="encoded" namespace="capture" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 
     183  </input> 
     184  <output> 
     185     <SOAP:body use="encoded" namespace="capture" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 
     186  </output> 
     187 </operation> 
     188 <operation name="receiveFileBase64"> 
    151189  <SOAP:operation style="rpc" soapAction=""/> 
    152190  <input> 
  • capture-mod/trunk/captureGSOAP.h

    r1749 r1760  
    1414} ns__myStruct; 
    1515 
     16typedef struct rcvS{ 
     17    char * data;  
     18    unsigned int encodedLength; 
     19    unsigned int decodedLength; 
     20} ns__receiveFileStruct; 
     21 
    1622int ns__junks(char * a, ns__myStruct &result); 
    17 int ns__sendBase64(char * data, int encodedLength, int decodedLength, ns__myStruct &result); 
     23int ns__sendFileBase64(char * fileName, char * data, unsigned int encodedLength, unsigned int decodedLength, ns__myStruct &result); 
     24int ns__receiveFileBase64(char * fileName, ns__receiveFileStruct &result); 
    1825int ns__sendMIME(int magicNumber, int &result); 
    1926 
  • capture-mod/trunk/client.pl

    r1749 r1760  
    1515    $fullfile .= $_; 
    1616} 
    17 #$encoded = encode_base64($fullfile); 
     17$encoded = encode_base64($fullfile, ""); 
    1818#print "$fullfile\n"; 
    1919#print "$encoded\n"; 
     
    2323print "What tha...\n"; 
    2424} 
    25 #$encodedLength = length($encoded); 
    26 #print "File size = " . $statz[7] . "\n"; 
    27 #print "Base64 size = " . length($encoded)  . "\n"; 
     25$encodedLength = length($encoded); 
     26print "File size = " . $statz[7] . "\n"; 
     27print "Base64 size = $encodedLength\n"; 
    2828 
    29 my $ent = build MIME::Entity 
    30   Type    => "application/exe", 
    31   Path    => $ARGV[0], 
    32   Filename => $ARGV[0], 
    33   Disposition => "attachment"; 
     29#my $ent = build MIME::Entity 
     30# Type    => "application/exe", 
     31# Path    => $ARGV[0], 
     32# Filename => $ARGV[0], 
     33# Disposition => "attachment"; 
    3434 
    35  
    36 #$base64Data = SOAP::Data->name(data => $encoded, encodedLength => $encodedLength, decodedLength => $decodedLength); 
    37 #$base64Data1 = SOAP::Data->name(data => $fullfile); 
    38 $base64Data1 = SOAP::Data->name(data => "abcdefg"); 
    39 $base64Data2 = SOAP::Data->name(encodedLength => 0); 
    40 #$base64Data2 = SOAP::Data->name(encodedLength => 7); 
    41 $base64Data3 = SOAP::Data->name(decodedLength => $decodedLength); 
    42 #$base64Data3 = SOAP::Data->name(decodedLength => 8); 
     35$fileNameSOAP = SOAP::Data->name(fileName => $ARGV[0]); 
     36$dataSOAP = SOAP::Data->name(data => $encoded); 
     37$encodedLengthSOAP = SOAP::Data->name(encodedLength => $encodedLength); 
     38$decodedLengthSOAP = SOAP::Data->name(decodedLength => $decodedLength); 
    4339 
    4440$pingDataA = SOAP::Data->name(a => "http://www.cnn.com"); 
     
    4945$structData = SOAP::Data->name(a => "a"); 
    5046 
    51 $res = SOAP::Lite 
    52     -> proxy('http://192.168.0.131:1234/') 
    53     -> ns('capture') 
    54     -> ping($pingDataA) 
    55     -> result; 
     47#$res = SOAP::Lite 
     48#    -> proxy('http://192.168.0.131:1234/') 
     49#    -> ns('capture') 
     50#    -> ping($pingDataA) 
     51#    -> result; 
    5652 
    5753 
     
    6965    -> ns('capture'); 
    7066 
    71 print "\ncalling sendBase64\n\n"; 
    72 $result = $client->sendBase64($base64Data1, $base64Data2, $base64Data3); 
     67#print "\ncalling sendFileBase64\n\n"; 
     68#$result = $client->sendFileBase64($fileNameSOAP, $dataSOAP, $encodedLengthSOAP, $decodedLengthSOAP); 
     69#print "Result is $result\n"; 
     70print "\ncalling receiveFileBase64\n\n"; 
     71$som = $client->receiveFileBase64($fileNameSOAP); 
    7372#$result = $client->sendMIME(31337); 
    7473 
    7574#print Dumper($result); 
    7675 
    77 print "calling junks\n"; 
    78 $res = SOAP::Lite 
    79     -> proxy('http://192.168.0.131:1234/') 
    80     -> ns('capture'); 
     76#print "calling junks\n"; 
     77#$res = SOAP::Lite 
     78#    -> proxy('http://192.168.0.131:1234/') 
     79#    -> ns('capture'); 
    8180 
    82 my $som = $res->junks($structData); 
     81#my $som = $res->junks($structData); 
     82 
     83$encodedDataFromServer = $som->result; 
     84$fileFromServer = decode_base64($encodedDataFromServer); 
     85open(BLA, ">serverfile.exe"); 
     86print BLA $fileFromServer; 
     87close(BLA); 
    8388 
    8489print "ns__myStruct.first = " . $som->result . "\n"; 
  • capture-mod/trunk/soapC.cpp

    r1749 r1760  
    88#include "soapH.h" 
    99 
    10 SOAP_SOURCE_STAMP("@(#) soapC.cpp ver 2.7.10 2008-08-18 06:59:56 GMT") 
     10SOAP_SOURCE_STAMP("@(#) soapC.cpp ver 2.7.10 2008-08-20 08:51:52 GMT") 
    1111 
    1212 
     
    162162    case SOAP_TYPE_double: 
    163163        return soap_in_double(soap, NULL, NULL, "xsd:double"); 
     164    case SOAP_TYPE_unsignedInt: 
     165        return soap_in_unsignedInt(soap, NULL, NULL, "xsd:unsignedInt"); 
    164166    case SOAP_TYPE_ns__sub: 
    165167        return soap_in_ns__sub(soap, NULL, NULL, "ns:sub"); 
     
    182184    case SOAP_TYPE_ns__sendMIMEResponse: 
    183185        return soap_in_ns__sendMIMEResponse(soap, NULL, NULL, "ns:sendMIMEResponse"); 
    184     case SOAP_TYPE_ns__sendBase64: 
    185         return soap_in_ns__sendBase64(soap, NULL, NULL, "ns:sendBase64"); 
     186    case SOAP_TYPE_ns__receiveFileBase64: 
     187        return soap_in_ns__receiveFileBase64(soap, NULL, NULL, "ns:receiveFileBase64"); 
     188    case SOAP_TYPE_ns__sendFileBase64: 
     189        return soap_in_ns__sendFileBase64(soap, NULL, NULL, "ns:sendFileBase64"); 
    186190    case SOAP_TYPE_ns__junks: 
    187191        return soap_in_ns__junks(soap, NULL, NULL, "ns:junks"); 
     192    case SOAP_TYPE_ns__receiveFileStruct: 
     193        return soap_in_ns__receiveFileStruct(soap, NULL, NULL, "ns:receiveFileStruct"); 
     194    case SOAP_TYPE_rcvS: 
     195        return soap_in_rcvS(soap, NULL, NULL, "rcvS"); 
    188196    case SOAP_TYPE_ns__myStruct: 
    189197        return soap_in_ns__myStruct(soap, NULL, NULL, "ns:myStruct"); 
     
    213221            return soap_in_double(soap, NULL, NULL, NULL); 
    214222        } 
     223        if (!soap_match_tag(soap, t, "xsd:unsignedInt")) 
     224        {   *type = SOAP_TYPE_unsignedInt; 
     225            return soap_in_unsignedInt(soap, NULL, NULL, NULL); 
     226        } 
    215227        if (!soap_match_tag(soap, t, "ns:sub")) 
    216228        {   *type = SOAP_TYPE_ns__sub; 
     
    253265            return soap_in_ns__sendMIMEResponse(soap, NULL, NULL, NULL); 
    254266        } 
    255         if (!soap_match_tag(soap, t, "ns:sendBase64")) 
    256         {   *type = SOAP_TYPE_ns__sendBase64; 
    257             return soap_in_ns__sendBase64(soap, NULL, NULL, NULL); 
     267        if (!soap_match_tag(soap, t, "ns:receiveFileBase64")) 
     268        {   *type = SOAP_TYPE_ns__receiveFileBase64; 
     269            return soap_in_ns__receiveFileBase64(soap, NULL, NULL, NULL); 
     270        } 
     271        if (!soap_match_tag(soap, t, "ns:sendFileBase64")) 
     272        {   *type = SOAP_TYPE_ns__sendFileBase64; 
     273            return soap_in_ns__sendFileBase64(soap, NULL, NULL, NULL); 
    258274        } 
    259275        if (!soap_match_tag(soap, t, "ns:junks")) 
    260276        {   *type = SOAP_TYPE_ns__junks; 
    261277            return soap_in_ns__junks(soap, NULL, NULL, NULL); 
     278        } 
     279        if (!soap_match_tag(soap, t, "ns:receiveFileStruct")) 
     280        {   *type = SOAP_TYPE_ns__receiveFileStruct; 
     281            return soap_in_ns__receiveFileStruct(soap, NULL, NULL, NULL); 
     282        } 
     283        if (!soap_match_tag(soap, t, "rcvS")) 
     284        {   *type = SOAP_TYPE_rcvS; 
     285            return soap_in_rcvS(soap, NULL, NULL, NULL); 
    262286        } 
    263287        if (!soap_match_tag(soap, t, "ns:myStruct")) 
     
    353377    case SOAP_TYPE_double: 
    354378        return soap_out_double(soap, tag, id, (const double *)ptr, "xsd:double"); 
     379    case SOAP_TYPE_unsignedInt: 
     380        return soap_out_unsignedInt(soap, tag, id, (const unsigned int *)ptr, "xsd:unsignedInt"); 
    355381    case SOAP_TYPE_ns__sub: 
    356382        return soap_out_ns__sub(soap, tag, id, (const struct ns__sub *)ptr, "ns:sub"); 
     
    373399    case SOAP_TYPE_ns__sendMIMEResponse: 
    374400        return soap_out_ns__sendMIMEResponse(soap, tag, id, (const struct ns__sendMIMEResponse *)ptr, "ns:sendMIMEResponse"); 
    375     case SOAP_TYPE_ns__sendBase64: 
    376         return soap_out_ns__sendBase64(soap, tag, id, (const struct ns__sendBase64 *)ptr, "ns:sendBase64"); 
     401    case SOAP_TYPE_ns__receiveFileBase64: 
     402        return soap_out_ns__receiveFileBase64(soap, tag, id, (const struct ns__receiveFileBase64 *)ptr, "ns:receiveFileBase64"); 
     403    case SOAP_TYPE_ns__sendFileBase64: 
     404        return soap_out_ns__sendFileBase64(soap, tag, id, (const struct ns__sendFileBase64 *)ptr, "ns:sendFileBase64"); 
    377405    case SOAP_TYPE_ns__junks: 
    378406        return soap_out_ns__junks(soap, tag, id, (const struct ns__junks *)ptr, "ns:junks"); 
     407    case SOAP_TYPE_ns__receiveFileStruct: 
     408        return soap_out_ns__receiveFileStruct(soap, tag, id, (const struct rcvS *)ptr, "ns:receiveFileStruct"); 
     409    case SOAP_TYPE_rcvS: 
     410        return soap_out_rcvS(soap, tag, id, (const struct rcvS *)ptr, "rcvS"); 
    379411    case SOAP_TYPE_ns__myStruct: 
    380412        return soap_out_ns__myStruct(soap, tag, id, (const struct s *)ptr, "ns:myStruct"); 
     
    436468        soap_serialize_ns__sendMIMEResponse(soap, (const struct ns__sendMIMEResponse *)ptr); 
    437469        break; 
    438     case SOAP_TYPE_ns__sendBase64: 
    439         soap_serialize_ns__sendBase64(soap, (const struct ns__sendBase64 *)ptr); 
     470    case SOAP_TYPE_ns__receiveFileBase64: 
     471        soap_serialize_ns__receiveFileBase64(soap, (const struct ns__receiveFileBase64 *)ptr); 
     472        break; 
     473    case SOAP_TYPE_ns__sendFileBase64: 
     474        soap_serialize_ns__sendFileBase64(soap, (const struct ns__sendFileBase64 *)ptr); 
    440475        break; 
    441476    case SOAP_TYPE_ns__junks: 
    442477        soap_serialize_ns__junks(soap, (const struct ns__junks *)ptr); 
     478        break; 
     479    case SOAP_TYPE_ns__receiveFileStruct: 
     480        soap_serialize_ns__receiveFileStruct(soap, (const struct rcvS *)ptr); 
     481        break; 
     482    case SOAP_TYPE_rcvS: 
     483        soap_serialize_rcvS(soap, (const struct rcvS *)ptr); 
    443484        break; 
    444485    case SOAP_TYPE_ns__myStruct: 
     
    471512    case SOAP_TYPE_s: 
    472513        return (void*)soap_instantiate_s(soap, -1, type, arrayType, n); 
     514    case SOAP_TYPE_rcvS: 
     515        return (void*)soap_instantiate_rcvS(soap, -1, type, arrayType, n); 
    473516    case SOAP_TYPE_ns__junks: 
    474517        return (void*)soap_instantiate_ns__junks(soap, -1, type, arrayType, n); 
    475     case SOAP_TYPE_ns__sendBase64: 
    476         return (void*)soap_instantiate_ns__sendBase64(soap, -1, type, arrayType, n); 
     518    case SOAP_TYPE_ns__sendFileBase64: 
     519        return (void*)soap_instantiate_ns__sendFileBase64(soap, -1, type, arrayType, n); 
     520    case SOAP_TYPE_ns__receiveFileBase64: 
     521        return (void*)soap_instantiate_ns__receiveFileBase64(soap, -1, type, arrayType, n); 
    477522    case SOAP_TYPE_ns__sendMIMEResponse: 
    478523        return (void*)soap_instantiate_ns__sendMIMEResponse(soap, -1, type, arrayType, n); 
     
    517562    case SOAP_TYPE_ns__myStruct: 
    518563        return (void*)soap_instantiate_ns__myStruct(soap, -1, type, arrayType, n); 
     564    case SOAP_TYPE_ns__receiveFileStruct: 
     565        return (void*)soap_instantiate_ns__receiveFileStruct(soap, -1, type, arrayType, n); 
    519566    } 
    520567    return NULL; 
     
    530577            delete[] (struct s*)p->ptr; 
    531578        break; 
     579    case SOAP_TYPE_rcvS: 
     580        if (p->size < 0) 
     581            delete (struct rcvS*)p->ptr; 
     582        else 
     583            delete[] (struct rcvS*)p->ptr; 
     584        break; 
    532585    case SOAP_TYPE_ns__junks: 
    533586        if (p->size < 0) 
     
    536589            delete[] (struct ns__junks*)p->ptr; 
    537590        break; 
    538     case SOAP_TYPE_ns__sendBase64: 
     591    case SOAP_TYPE_ns__sendFileBase64: 
    539592        if (p->size < 0) 
    540             delete (struct ns__sendBase64*)p->ptr; 
     593            delete (struct ns__sendFileBase64*)p->ptr; 
    541594        else 
    542             delete[] (struct ns__sendBase64*)p->ptr; 
     595            delete[] (struct ns__sendFileBase64*)p->ptr; 
     596        break; 
     597    case SOAP_TYPE_ns__receiveFileBase64: 
     598        if (p->size < 0) 
     599            delete (struct ns__receiveFileBase64*)p->ptr; 
     600        else 
     601            delete[] (struct ns__receiveFileBase64*)p->ptr; 
    543602        break; 
    544603    case SOAP_TYPE_ns__sendMIMEResponse: 
     
    637696        else 
    638697            delete[] (struct s*)p->ptr; 
     698        break; 
     699    case SOAP_TYPE_ns__receiveFileStruct: 
     700        if (p->size < 0) 
     701            delete (struct rcvS*)p->ptr; 
     702        else 
     703            delete[] (struct rcvS*)p->ptr; 
    639704        break; 
    640705    default:    return SOAP_ERR; 
     
    750815{ 
    751816    return soap_indouble(soap, tag, a, type, SOAP_TYPE_double); 
     817} 
     818 
     819SOAP_FMAC3 void SOAP_FMAC4 soap_default_unsignedInt(struct soap *soap, unsigned int *a) 
     820{   (void)soap; /* appease -Wall -Werror */ 
     821#ifdef SOAP_DEFAULT_unsignedInt 
     822    *a = SOAP_DEFAULT_unsignedInt; 
     823#else 
     824    *a = (unsigned int)0; 
     825#endif 
     826} 
     827 
     828SOAP_FMAC3 int SOAP_FMAC4 soap_put_unsignedInt(struct soap *soap, const unsigned int *a, const char *tag, const char *type) 
     829{ 
     830    register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_unsignedInt); 
     831    if (soap_out_unsignedInt(soap, tag, id, a, type)) 
     832        return soap->error; 
     833    return soap_putindependent(soap); 
     834} 
     835 
     836SOAP_FMAC3 int SOAP_FMAC4 soap_out_unsignedInt(struct soap *soap, const char *tag, int id, const unsigned int *a, const char *type) 
     837{ 
     838    return soap_outunsignedInt(soap, tag, id, a, type, SOAP_TYPE_unsignedInt); 
     839} 
     840 
     841SOAP_FMAC3 unsigned int * SOAP_FMAC4 soap_get_unsignedInt(struct soap *soap, unsigned int *p, const char *tag, const char *type) 
     842{ 
     843    if ((p = soap_in_unsignedInt(soap, tag, p, type))) 
     844        if (soap_getindependent(soap)) 
     845            return NULL; 
     846    return p; 
     847} 
     848 
     849SOAP_FMAC3 unsigned int * SOAP_FMAC4 soap_in_unsignedInt(struct soap *soap, const char *tag, unsigned int *a, const char *type) 
     850{ 
     851    return soap_inunsignedInt(soap, tag, a, type, SOAP_TYPE_unsignedInt); 
    752852} 
    753853 
     
    25372637} 
    25382638 
    2539 SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__sendBase64(struct soap *soap, struct ns__sendBase64 *a) 
    2540 
    2541     (void)soap; (void)a; /* appease -Wall -Werror */ 
    2542     soap_default_string(soap, &a->data); 
    2543     soap_default_int(soap, &a->encodedLength); 
    2544     soap_default_int(soap, &a->decodedLength); 
    2545 
    2546  
    2547 SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__sendBase64(struct soap *soap, const struct ns__sendBase64 *a) 
    2548 
    2549     (void)soap; (void)a; /* appease -Wall -Werror */ 
    2550     soap_serialize_string(soap, &a->data); 
    2551 
    2552  
    2553 SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__sendBase64(struct soap *soap, const struct ns__sendBase64 *a, const char *tag, const char *type) 
    2554 
    2555     register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__sendBase64); 
    2556     if (soap_out_ns__sendBase64(soap, tag, id, a, type)) 
     2639SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__receiveFileBase64(struct soap *soap, struct ns__receiveFileBase64 *a) 
     2640
     2641    (void)soap; (void)a; /* appease -Wall -Werror */ 
     2642    soap_default_string(soap, &a->fileName); 
     2643
     2644 
     2645SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__receiveFileBase64(struct soap *soap, const struct ns__receiveFileBase64 *a) 
     2646
     2647    (void)soap; (void)a; /* appease -Wall -Werror */ 
     2648    soap_serialize_string(soap, &a->fileName); 
     2649
     2650 
     2651SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__receiveFileBase64(struct soap *soap, const struct ns__receiveFileBase64 *a, const char *tag, const char *type) 
     2652
     2653    register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__receiveFileBase64); 
     2654    if (soap_out_ns__receiveFileBase64(soap, tag, id, a, type)) 
    25572655        return soap->error; 
    25582656    return soap_putindependent(soap); 
    25592657} 
    25602658 
    2561 SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__sendBase64(struct soap *soap, const char *tag, int id, const struct ns__sendBase64 *a, const char *type) 
    2562 
    2563     if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__sendBase64), type)) 
    2564         return soap->error; 
    2565     if (soap_out_string(soap, "data", -1, &a->data, "")) 
    2566         return soap->error; 
    2567     if (soap_out_int(soap, "encodedLength", -1, &a->encodedLength, "")) 
    2568         return soap->error; 
    2569     if (soap_out_int(soap, "decodedLength", -1, &a->decodedLength, "")) 
     2659SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__receiveFileBase64(struct soap *soap, const char *tag, int id, const struct ns__receiveFileBase64 *a, const char *type) 
     2660
     2661    if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__receiveFileBase64), type)) 
     2662        return soap->error; 
     2663    if (soap_out_string(soap, "fileName", -1, &a->fileName, "")) 
    25702664        return soap->error; 
    25712665    return soap_element_end_out(soap, tag); 
    25722666} 
    25732667 
    2574 SOAP_FMAC3 struct ns__sendBase64 * SOAP_FMAC4 soap_get_ns__sendBase64(struct soap *soap, struct ns__sendBase64 *p, const char *tag, const char *type) 
    2575 { 
    2576     if ((p = soap_in_ns__sendBase64(soap, tag, p, type))) 
     2668SOAP_FMAC3 struct ns__receiveFileBase64 * SOAP_FMAC4 soap_get_ns__receiveFileBase64(struct soap *soap, struct ns__receiveFileBase64 *p, const char *tag, const char *type) 
     2669{ 
     2670    if ((p = soap_in_ns__receiveFileBase64(soap, tag, p, type))) 
    25772671        if (soap_getindependent(soap)) 
    25782672            return NULL; 
     
    25802674} 
    25812675 
    2582 SOAP_FMAC3 struct ns__sendBase64 * SOAP_FMAC4 soap_in_ns__sendBase64(struct soap *soap, const char *tag, struct ns__sendBase64 *a, const char *type) 
    2583 { 
    2584     short soap_flag_data = 1, soap_flag_encodedLength = 1, soap_flag_decodedLength = 1; 
     2676SOAP_FMAC3 struct ns__receiveFileBase64 * SOAP_FMAC4 soap_in_ns__receiveFileBase64(struct soap *soap, const char *tag, struct ns__receiveFileBase64 *a, const char *type) 
     2677{ 
     2678    short soap_flag_fileName = 1; 
    25852679    if (soap_element_begin_in(soap, tag, 0, type)) 
    25862680        return NULL; 
    2587     a = (struct ns__sendBase64 *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__sendBase64, sizeof(struct ns__sendBase64), 0, NULL, NULL, NULL); 
     2681    a = (struct ns__receiveFileBase64 *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__receiveFileBase64, sizeof(struct ns__receiveFileBase64), 0, NULL, NULL, NULL); 
    25882682    if (!a) 
    25892683        return NULL; 
    2590     soap_default_ns__sendBase64(soap, a); 
     2684    soap_default_ns__receiveFileBase64(soap, a); 
    25912685    if (soap->body && !*soap->href) 
    25922686    { 
    25932687        for (;;) 
    25942688        {   soap->error = SOAP_TAG_MISMATCH; 
    2595             if (soap_flag_data && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) 
    2596                 if (soap_in_string(soap, "data", &a->data, "xsd:string")) 
    2597                 {   soap_flag_data--; 
    2598                     continue; 
    2599                 } 
    2600             if (soap_flag_encodedLength && soap->error == SOAP_TAG_MISMATCH) 
    2601                 if (soap_in_int(soap, "encodedLength", &a->encodedLength, "xsd:int")) 
    2602                 {   soap_flag_encodedLength--; 
    2603                     continue; 
    2604                 } 
    2605             if (soap_flag_decodedLength && soap->error == SOAP_TAG_MISMATCH) 
    2606                 if (soap_in_int(soap, "decodedLength", &a->decodedLength, "xsd:int")) 
    2607                 {   soap_flag_decodedLength--; 
     2689            if (soap_flag_fileName && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) 
     2690                if (soap_in_string(soap, "fileName", &a->fileName, "xsd:string")) 
     2691                {   soap_flag_fileName--; 
    26082692                    continue; 
    26092693                } 
     
    26192703    } 
    26202704    else 
    2621     {   a = (struct ns__sendBase64 *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns__sendBase64, 0, sizeof(struct ns__sendBase64), 0, NULL); 
     2705    {   a = (struct ns__receiveFileBase64 *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns__receiveFileBase64, 0, sizeof(struct ns__receiveFileBase64), 0, NULL); 
     2706        if (soap->body && soap_element_end_in(soap, tag)) 
     2707            return NULL; 
     2708    } 
     2709    return a; 
     2710
     2711 
     2712SOAP_FMAC5 struct ns__receiveFileBase64 * SOAP_FMAC6 soap_new_ns__receiveFileBase64(struct soap *soap, int n) 
     2713{   return soap_instantiate_ns__receiveFileBase64(soap, n, NULL, NULL, NULL); 
     2714
     2715 
     2716SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__receiveFileBase64(struct soap *soap, struct ns__receiveFileBase64 *p) 
     2717{   soap_delete(soap, p); 
     2718
     2719 
     2720SOAP_FMAC3 struct ns__receiveFileBase64 * SOAP_FMAC4 soap_instantiate_ns__receiveFileBase64(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) 
     2721
     2722    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__receiveFileBase64(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); 
     2723    struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__receiveFileBase64, n, soap_fdelete); 
     2724    if (!cp) 
     2725        return NULL; 
     2726    if (n < 0) 
     2727    {   cp->ptr = (void*)new struct ns__receiveFileBase64; 
     2728        if (size) 
     2729            *size = sizeof(struct ns__receiveFileBase64); 
     2730    } 
     2731    else 
     2732    {   cp->ptr = (void*)new struct ns__receiveFileBase64[n]; 
     2733        if (!cp->ptr) 
     2734        {   soap->error = SOAP_EOM; 
     2735            return NULL; 
     2736        } 
     2737        if (size) 
     2738            *size = n * sizeof(struct ns__receiveFileBase64); 
     2739    } 
     2740        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); 
     2741    return (struct ns__receiveFileBase64*)cp->ptr; 
     2742
     2743SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__receiveFileBase64(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) 
     2744
     2745    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__receiveFileBase64 %p -> %p\n", q, p)); 
     2746    *(struct ns__receiveFileBase64*)p = *(struct ns__receiveFileBase64*)q; 
     2747
     2748 
     2749SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__sendFileBase64(struct soap *soap, struct ns__sendFileBase64 *a) 
     2750
     2751    (void)soap; (void)a; /* appease -Wall -Werror */ 
     2752    soap_default_string(soap, &a->fileName); 
     2753    soap_default_string(soap, &a->data); 
     2754    soap_default_unsignedInt(soap, &a->encodedLength); 
     2755    soap_default_unsignedInt(soap, &a->decodedLength); 
     2756
     2757 
     2758SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__sendFileBase64(struct soap *soap, const struct ns__sendFileBase64 *a) 
     2759
     2760    (void)soap; (void)a; /* appease -Wall -Werror */ 
     2761    soap_serialize_string(soap, &a->fileName); 
     2762    soap_serialize_string(soap, &a->data); 
     2763
     2764 
     2765SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__sendFileBase64(struct soap *soap, const struct ns__sendFileBase64 *a, const char *tag, const char *type) 
     2766
     2767    register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__sendFileBase64); 
     2768    if (soap_out_ns__sendFileBase64(soap, tag, id, a, type)) 
     2769        return soap->error; 
     2770    return soap_putindependent(soap); 
     2771
     2772 
     2773SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__sendFileBase64(struct soap *soap, const char *tag, int id, const struct ns__sendFileBase64 *a, const char *type) 
     2774
     2775    if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__sendFileBase64), type)) 
     2776        return soap->error; 
     2777    if (soap_out_string(soap, "fileName", -1, &a->fileName, "")) 
     2778        return soap->error; 
     2779    if (soap_out_string(soap, "data", -1, &a->data, "")) 
     2780        return soap->error; 
     2781    if (soap_out_unsignedInt(soap, "encodedLength", -1, &a->encodedLength, "")) 
     2782        return soap->error; 
     2783    if (soap_out_unsignedInt(soap, "decodedLength", -1, &a->decodedLength, "")) 
     2784        return soap->error; 
     2785    return soap_element_end_out(soap, tag); 
     2786
     2787 
     2788SOAP_FMAC3 struct ns__sendFileBase64 * SOAP_FMAC4 soap_get_ns__sendFileBase64(struct soap *soap, struct ns__sendFileBase64 *p, const char *tag, const char *type) 
     2789
     2790    if ((p = soap_in_ns__sendFileBase64(soap, tag, p, type))) 
     2791        if (soap_getindependent(soap)) 
     2792            return NULL; 
     2793    return p; 
     2794
     2795 
     2796SOAP_FMAC3 struct ns__sendFileBase64 * SOAP_FMAC4 soap_in_ns__sendFileBase64(struct soap *soap, const char *tag, struct ns__sendFileBase64 *a, const char *type) 
     2797
     2798    short soap_flag_fileName = 1, soap_flag_data = 1, soap_flag_encodedLength = 1, soap_flag_decodedLength = 1; 
     2799    if (soap_element_begin_in(soap, tag, 0, type)) 
     2800        return NULL; 
     2801    a = (struct ns__sendFileBase64 *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__sendFileBase64, sizeof(struct ns__sendFileBase64), 0, NULL, NULL, NULL); 
     2802    if (!a) 
     2803        return NULL; 
     2804    soap_default_ns__sendFileBase64(soap, a); 
     2805    if (soap->body && !*soap->href) 
     2806    { 
     2807        for (;;) 
     2808        {   soap->error = SOAP_TAG_MISMATCH; 
     2809            if (soap_flag_fileName && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) 
     2810                if (soap_in_string(soap, "fileName", &a->fileName, "xsd:string")) 
     2811                {   soap_flag_fileName--; 
     2812                    continue; 
     2813                } 
     2814            if (soap_flag_data && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) 
     2815                if (soap_in_string(soap, "data", &a->data, "xsd:string")) 
     2816                {   soap_flag_data--; 
     2817                    continue; 
     2818                } 
     2819            if (soap_flag_encodedLength && soap->error == SOAP_TAG_MISMATCH) 
     2820                if (soap_in_unsignedInt(soap, "encodedLength", &a->encodedLength, "xsd:unsignedInt")) 
     2821                {   soap_flag_encodedLength--; 
     2822                    continue; 
     2823                } 
     2824            if (soap_flag_decodedLength && soap->error == SOAP_TAG_MISMATCH) 
     2825                if (soap_in_unsignedInt(soap, "decodedLength", &a->decodedLength, "xsd:unsignedInt")) 
     2826                {   soap_flag_decodedLength--; 
     2827                    continue; 
     2828                } 
     2829            if (soap->error == SOAP_TAG_MISMATCH) 
     2830                soap->error = soap_ignore_element(soap); 
     2831            if (soap->error == SOAP_NO_TAG) 
     2832                break; 
     2833            if (soap->error) 
     2834                return NULL; 
     2835        } 
     2836        if (soap_element_end_in(soap, tag)) 
     2837            return NULL; 
     2838    } 
     2839    else 
     2840    {   a = (struct ns__sendFileBase64 *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns__sendFileBase64, 0, sizeof(struct ns__sendFileBase64), 0, NULL); 
    26222841        if (soap->body && soap_element_end_in(soap, tag)) 
    26232842            return NULL; 
     
    26302849} 
    26312850 
    2632 SOAP_FMAC5 struct ns__sendBase64 * SOAP_FMAC6 soap_new_ns__sendBase64(struct soap *soap, int n) 
    2633 {   return soap_instantiate_ns__sendBase64(soap, n, NULL, NULL, NULL); 
    2634 } 
    2635  
    2636 SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__sendBase64(struct soap *soap, struct ns__sendBase64 *p) 
     2851SOAP_FMAC5 struct ns__sendFileBase64 * SOAP_FMAC6 soap_new_ns__sendFileBase64(struct soap *soap, int n) 
     2852{   return soap_instantiate_ns__sendFileBase64(soap, n, NULL, NULL, NULL); 
     2853} 
     2854 
     2855SOAP_FMAC5 void SOAP_FMAC6 soap_delete_ns__sendFileBase64(struct soap *soap, struct ns__sendFileBase64 *p) 
    26372856{   soap_delete(soap, p); 
    26382857} 
    26392858 
    2640 SOAP_FMAC3 struct ns__sendBase64 * SOAP_FMAC4 soap_instantiate_ns__sendBase64(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) 
    2641 { 
    2642     DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__sendBase64(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); 
    2643     struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__sendBase64, n, soap_fdelete); 
     2859SOAP_FMAC3 struct ns__sendFileBase64 * SOAP_FMAC4 soap_instantiate_ns__sendFileBase64(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) 
     2860{ 
     2861    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns__sendFileBase64(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); 
     2862    struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns__sendFileBase64, n, soap_fdelete); 
    26442863    if (!cp) 
    26452864        return NULL; 
    26462865    if (n < 0) 
    2647     {   cp->ptr = (void*)new struct ns__sendBase64; 
    2648         if (size) 
    2649             *size = sizeof(struct ns__sendBase64); 
    2650     } 
    2651     else 
    2652     {   cp->ptr = (void*)new struct ns__sendBase64[n]; 
     2866    {   cp->ptr = (void*)new struct ns__sendFileBase64; 
     2867        if (size) 
     2868            *size = sizeof(struct ns__sendFileBase64); 
     2869    } 
     2870    else 
     2871    {   cp->ptr = (void*)new struct ns__sendFileBase64[n]; 
    26532872        if (!cp->ptr) 
    26542873        {   soap->error = SOAP_EOM; 
     
    26562875        } 
    26572876        if (size) 
    2658             *size = n * sizeof(struct ns__sendBase64); 
     2877            *size = n * sizeof(struct ns__sendFileBase64); 
    26592878    } 
    26602879        DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); 
    2661     return (struct ns__sendBase64*)cp->ptr; 
    2662 } 
    2663 SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__sendBase64(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) 
    2664 { 
    2665     DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__sendBase64 %p -> %p\n", q, p)); 
    2666     *(struct ns__sendBase64*)p = *(struct ns__sendBase64*)q; 
     2880    return (struct ns__sendFileBase64*)cp->ptr; 
     2881} 
     2882SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns__sendFileBase64(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) 
     2883{ 
     2884    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns__sendFileBase64 %p -> %p\n", q, p)); 
     2885    *(struct ns__sendFileBase64*)p = *(struct ns__sendFileBase64*)q; 
    26672886} 
    26682887 
     
    27772996} 
    27782997 
     2998SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns__receiveFileStruct(struct soap *soap, struct rcvS *a) 
     2999{   soap_default_rcvS(soap, a); 
     3000} 
     3001 
     3002SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns__receiveFileStruct(struct soap *soap, struct rcvS const*a) 
     3003{   soap_serialize_rcvS(soap, a); 
     3004} 
     3005 
     3006SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns__receiveFileStruct(struct soap *soap, const struct rcvS *a, const char *tag, const char *type) 
     3007{ 
     3008    register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns__receiveFileStruct); 
     3009    if (soap_out_ns__receiveFileStruct(soap, tag, id, a, type)) 
     3010        return soap->error; 
     3011    return soap_putindependent(soap); 
     3012} 
     3013 
     3014SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns__receiveFileStruct(struct soap *soap, const char *tag, int id, const struct rcvS *a, const char *type) 
     3015{ 
     3016    if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__receiveFileStruct), type)) 
     3017        return soap->error; 
     3018    if (soap_out_string(soap, "data", -1, &a->data, "")) 
     3019        return soap->error; 
     3020    if (soap_out_unsignedInt(soap, "encodedLength", -1, &a->encodedLength, "")) 
     3021        return soap->error; 
     3022    if (soap_out_unsignedInt(soap, "decodedLength", -1, &a->decodedLength, "")) 
     3023        return soap->error; 
     3024    return soap_element_end_out(soap, tag); 
     3025} 
     3026 
     3027SOAP_FMAC3 struct rcvS * SOAP_FMAC4 soap_get_ns__receiveFileStruct(struct soap *soap, struct rcvS *p, const char *tag, const char *type) 
     3028{ 
     3029    if ((p = soap_in_ns__receiveFileStruct(soap, tag, p, type))) 
     3030        if (soap_getindependent(soap)) 
     3031            return NULL; 
     3032    return p; 
     3033} 
     3034 
     3035SOAP_FMAC3 struct rcvS * SOAP_FMAC4 soap_in_ns__receiveFileStruct(struct soap *soap, const char *tag, struct rcvS *a, const char *type) 
     3036{ 
     3037    short soap_flag_data = 1, soap_flag_encodedLength = 1, soap_flag_decodedLength = 1; 
     3038    if (soap_element_begin_in(soap, tag, 0, type)) 
     3039        return NULL; 
     3040    a = (struct rcvS *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns__receiveFileStruct, sizeof(struct rcvS), 0, NULL, NULL, NULL); 
     3041    if (!a) 
     3042        return NULL; 
     3043    soap_default_ns__receiveFileStruct(soap, a); 
     3044    if (soap->body && !*soap->href) 
     3045    { 
     3046        for (;;) 
     3047        {   soap->error = SOAP_TAG_MISMATCH; 
     3048            if (soap_flag_data && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) 
     3049                if (soap_in_string(soap, "data", &a->data, "xsd:string")) 
     3050                {   soap_flag_data--; 
     3051                    continue; 
     3052                } 
     3053            if (soap_flag_encodedLength && soap->error == SOAP_TAG_MISMATCH) 
     3054                if (soap_in_unsignedInt(soap, "encodedLength", &a->encodedLength, "xsd:unsignedInt")) 
     3055                {   soap_flag_encodedLength--; 
     3056                    continue; 
     3057                } 
     3058            if (soap_flag_decodedLength && soap->error == SOAP_TAG_MISMATCH) 
     3059                if (soap_in_unsignedInt(soap, "decodedLength", &a->decodedLength, "xsd:unsignedInt")) 
     3060                {   soap_flag_decodedLength--; 
     3061                    continue; 
     3062                } 
     3063    &n