Main Page | Namespace List | Class Hierarchy | Data Structures | File List | Data Fields | Globals | Related Pages

soapServer.cpp

Go to the documentation of this file.
00001 /* soapServer.cpp
00002    Generated by gSOAP 2.7.8c from acq2xx.h
00003    Copyright (C) 2000-2006, Robert van Engelen, Genivia Inc. All Rights Reserved.
00004    This part of the software is released under one of the following licenses:
00005    GPL, the gSOAP public license, or Genivia's license for commercial use.
00006 */
00007 #include "soapH.h"
00008 
00009 SOAP_SOURCE_STAMP("@(#) soapServer.cpp ver 2.7.8c 2006-08-21 11:13:38 GMT")
00010 
00011 
00012 SOAP_FMAC5 int SOAP_FMAC6 soap_serve(struct soap *soap)
00013 {
00014 #ifndef WITH_FASTCGI
00015         unsigned int k = soap->max_keep_alive;
00016 #endif
00017 
00018         do
00019         {
00020 #ifdef WITH_FASTCGI
00021                 if (FCGI_Accept() < 0)
00022                 {
00023                         soap->error = SOAP_EOF;
00024                         return soap_send_fault(soap);
00025                 }
00026 #endif
00027 
00028                 soap_begin(soap);
00029 
00030 #ifndef WITH_FASTCGI
00031                 if (soap->max_keep_alive > 0 && !--k)
00032                         soap->keep_alive = 0;
00033 #endif
00034 
00035                 if (soap_begin_recv(soap))
00036                 {       if (soap->error < SOAP_STOP)
00037                         {
00038 #ifdef WITH_FASTCGI
00039                                 soap_send_fault(soap);
00040 #else 
00041                                 return soap_send_fault(soap);
00042 #endif
00043                         }
00044                         soap_closesock(soap);
00045 
00046                         continue;
00047                 }
00048 
00049                 if (soap_envelope_begin_in(soap)
00050                  || soap_recv_header(soap)
00051                  || soap_body_begin_in(soap)
00052                  || soap_serve_request(soap)
00053                  || (soap->fserveloop && soap->fserveloop(soap)))
00054                 {
00055 #ifdef WITH_FASTCGI
00056                         soap_send_fault(soap);
00057 #else
00058                         return soap_send_fault(soap);
00059 #endif
00060                 }
00061 
00062 #ifdef WITH_FASTCGI
00063         } while (1);
00064 #else
00065         } while (soap->keep_alive);
00066 #endif
00067         return SOAP_OK;
00068 }
00069 
00070 #ifndef WITH_NOSERVEREQUEST
00071 SOAP_FMAC5 int SOAP_FMAC6 soap_serve_request(struct soap *soap)
00072 {
00073         soap_peek_element(soap);
00074         if (!soap_match_tag(soap, soap->tag, "acq2xx:getVersion"))
00075                 return soap_serve_acq2xx__getVersion(soap);
00076         if (!soap_match_tag(soap, soap->tag, "acq2xx:acqcmd"))
00077                 return soap_serve_acq2xx__acqcmd(soap);
00078         if (!soap_match_tag(soap, soap->tag, "acq2xx:acq2sh"))
00079                 return soap_serve_acq2xx__acq2sh(soap);
00080         if (!soap_match_tag(soap, soap->tag, "acq2xx:acq2script"))
00081                 return soap_serve_acq2xx__acq2script(soap);
00082         if (!soap_match_tag(soap, soap->tag, "acq2xx:getAcqStatus"))
00083                 return soap_serve_acq2xx__getAcqStatus(soap);
00084         if (!soap_match_tag(soap, soap->tag, "acq2xx:setArm"))
00085                 return soap_serve_acq2xx__setArm(soap);
00086         if (!soap_match_tag(soap, soap->tag, "acq2xx:waitStop"))
00087                 return soap_serve_acq2xx__waitStop(soap);
00088         return soap->error = SOAP_NO_METHOD;
00089 }
00090 #endif
00091 
00092 SOAP_FMAC5 int SOAP_FMAC6 soap_serve_acq2xx__getVersion(struct soap *soap)
00093 {       struct acq2xx__getVersion soap_tmp_acq2xx__getVersion;
00094         struct acq2xx__getVersionResponse soap_tmp_acq2xx__getVersionResponse;
00095         soap_default_acq2xx__getVersionResponse(soap, &soap_tmp_acq2xx__getVersionResponse);
00096         soap_default_acq2xx__getVersion(soap, &soap_tmp_acq2xx__getVersion);
00097         soap->encodingStyle = NULL;
00098         if (!soap_get_acq2xx__getVersion(soap, &soap_tmp_acq2xx__getVersion, "acq2xx:getVersion", NULL))
00099                 return soap->error;
00100         if (soap_body_end_in(soap)
00101          || soap_envelope_end_in(soap)
00102          || soap_end_recv(soap))
00103                 return soap->error;
00104         soap->error = acq2xx__getVersion(soap, soap_tmp_acq2xx__getVersion.client_version, soap_tmp_acq2xx__getVersionResponse.server_version);
00105         if (soap->error)
00106                 return soap->error;
00107         soap_serializeheader(soap);
00108         soap_serialize_acq2xx__getVersionResponse(soap, &soap_tmp_acq2xx__getVersionResponse);
00109         if (soap_begin_count(soap))
00110                 return soap->error;
00111         if (soap->mode & SOAP_IO_LENGTH)
00112         {       if (soap_envelope_begin_out(soap)
00113                  || soap_putheader(soap)
00114                  || soap_body_begin_out(soap)
00115                  || soap_put_acq2xx__getVersionResponse(soap, &soap_tmp_acq2xx__getVersionResponse, "acq2xx:getVersionResponse", "")
00116                  || soap_body_end_out(soap)
00117                  || soap_envelope_end_out(soap))
00118                          return soap->error;
00119         };
00120         if (soap_end_count(soap)
00121          || soap_response(soap, SOAP_OK)
00122          || soap_envelope_begin_out(soap)
00123          || soap_putheader(soap)
00124          || soap_body_begin_out(soap)
00125          || soap_put_acq2xx__getVersionResponse(soap, &soap_tmp_acq2xx__getVersionResponse, "acq2xx:getVersionResponse", "")
00126          || soap_body_end_out(soap)
00127          || soap_envelope_end_out(soap)
00128          || soap_end_send(soap))
00129                 return soap->error;
00130         return soap_closesock(soap);
00131 }
00132 
00133 SOAP_FMAC5 int SOAP_FMAC6 soap_serve_acq2xx__acqcmd(struct soap *soap)
00134 {       struct acq2xx__acqcmd soap_tmp_acq2xx__acqcmd;
00135         struct acq2xx__acqcmdResponse soap_tmp_acq2xx__acqcmdResponse;
00136         soap_default_acq2xx__acqcmdResponse(soap, &soap_tmp_acq2xx__acqcmdResponse);
00137         soap_default_acq2xx__acqcmd(soap, &soap_tmp_acq2xx__acqcmd);
00138         soap->encodingStyle = NULL;
00139         if (!soap_get_acq2xx__acqcmd(soap, &soap_tmp_acq2xx__acqcmd, "acq2xx:acqcmd", NULL))
00140                 return soap->error;
00141         if (soap_body_end_in(soap)
00142          || soap_envelope_end_in(soap)
00143          || soap_end_recv(soap))
00144                 return soap->error;
00145         soap->error = acq2xx__acqcmd(soap, soap_tmp_acq2xx__acqcmd.command, soap_tmp_acq2xx__acqcmdResponse.response);
00146         if (soap->error)
00147                 return soap->error;
00148         soap_serializeheader(soap);
00149         soap_serialize_acq2xx__acqcmdResponse(soap, &soap_tmp_acq2xx__acqcmdResponse);
00150         if (soap_begin_count(soap))
00151                 return soap->error;
00152         if (soap->mode & SOAP_IO_LENGTH)
00153         {       if (soap_envelope_begin_out(soap)
00154                  || soap_putheader(soap)
00155                  || soap_body_begin_out(soap)
00156                  || soap_put_acq2xx__acqcmdResponse(soap, &soap_tmp_acq2xx__acqcmdResponse, "acq2xx:acqcmdResponse", "")
00157                  || soap_body_end_out(soap)
00158                  || soap_envelope_end_out(soap))
00159                          return soap->error;
00160         };
00161         if (soap_end_count(soap)
00162          || soap_response(soap, SOAP_OK)
00163          || soap_envelope_begin_out(soap)
00164          || soap_putheader(soap)
00165          || soap_body_begin_out(soap)
00166          || soap_put_acq2xx__acqcmdResponse(soap, &soap_tmp_acq2xx__acqcmdResponse, "acq2xx:acqcmdResponse", "")
00167          || soap_body_end_out(soap)
00168          || soap_envelope_end_out(soap)
00169          || soap_end_send(soap))
00170                 return soap->error;
00171         return soap_closesock(soap);
00172 }
00173 
00174 SOAP_FMAC5 int SOAP_FMAC6 soap_serve_acq2xx__acq2sh(struct soap *soap)
00175 {       struct acq2xx__acq2sh soap_tmp_acq2xx__acq2sh;
00176         struct acq2xx__acq2shResponse soap_tmp_acq2xx__acq2shResponse;
00177         soap_default_acq2xx__acq2shResponse(soap, &soap_tmp_acq2xx__acq2shResponse);
00178         soap_default_acq2xx__acq2sh(soap, &soap_tmp_acq2xx__acq2sh);
00179         soap->encodingStyle = NULL;
00180         if (!soap_get_acq2xx__acq2sh(soap, &soap_tmp_acq2xx__acq2sh, "acq2xx:acq2sh", NULL))
00181                 return soap->error;
00182         if (soap_body_end_in(soap)
00183          || soap_envelope_end_in(soap)
00184          || soap_end_recv(soap))
00185                 return soap->error;
00186         soap->error = acq2xx__acq2sh(soap, soap_tmp_acq2xx__acq2sh.command, soap_tmp_acq2xx__acq2shResponse.response);
00187         if (soap->error)
00188                 return soap->error;
00189         soap_serializeheader(soap);
00190         soap_serialize_acq2xx__acq2shResponse(soap, &soap_tmp_acq2xx__acq2shResponse);
00191         if (soap_begin_count(soap))
00192                 return soap->error;
00193         if (soap->mode & SOAP_IO_LENGTH)
00194         {       if (soap_envelope_begin_out(soap)
00195                  || soap_putheader(soap)
00196                  || soap_body_begin_out(soap)
00197                  || soap_put_acq2xx__acq2shResponse(soap, &soap_tmp_acq2xx__acq2shResponse, "acq2xx:acq2shResponse", "")
00198                  || soap_body_end_out(soap)
00199                  || soap_envelope_end_out(soap))
00200                          return soap->error;
00201         };
00202         if (soap_end_count(soap)
00203          || soap_response(soap, SOAP_OK)
00204          || soap_envelope_begin_out(soap)
00205          || soap_putheader(soap)
00206          || soap_body_begin_out(soap)
00207          || soap_put_acq2xx__acq2shResponse(soap, &soap_tmp_acq2xx__acq2shResponse, "acq2xx:acq2shResponse", "")
00208          || soap_body_end_out(soap)
00209          || soap_envelope_end_out(soap)
00210          || soap_end_send(soap))
00211                 return soap->error;
00212         return soap_closesock(soap);
00213 }
00214 
00215 SOAP_FMAC5 int SOAP_FMAC6 soap_serve_acq2xx__acq2script(struct soap *soap)
00216 {       struct acq2xx__acq2script soap_tmp_acq2xx__acq2script;
00217         struct acq2xx__acq2scriptResponse result;
00218         soap_default_acq2xx__acq2scriptResponse(soap, &result);
00219         soap_default_acq2xx__acq2script(soap, &soap_tmp_acq2xx__acq2script);
00220         soap->encodingStyle = NULL;
00221         if (!soap_get_acq2xx__acq2script(soap, &soap_tmp_acq2xx__acq2script, "acq2xx:acq2script", NULL))
00222                 return soap->error;
00223         if (soap_body_end_in(soap)
00224          || soap_envelope_end_in(soap)
00225          || soap_end_recv(soap))
00226                 return soap->error;
00227         soap->error = acq2xx__acq2script(soap, soap_tmp_acq2xx__acq2script.in, result);
00228         if (soap->error)
00229                 return soap->error;
00230         soap_serializeheader(soap);
00231         soap_serialize_acq2xx__acq2scriptResponse(soap, &result);
00232         if (soap_begin_count(soap))
00233                 return soap->error;
00234         if (soap->mode & SOAP_IO_LENGTH)
00235         {       if (soap_envelope_begin_out(soap)
00236                  || soap_putheader(soap)
00237                  || soap_body_begin_out(soap)
00238                  || soap_put_acq2xx__acq2scriptResponse(soap, &result, "acq2xx:acq2scriptResponse", "")
00239                  || soap_body_end_out(soap)
00240                  || soap_envelope_end_out(soap))
00241                          return soap->error;
00242         };
00243         if (soap_end_count(soap)
00244          || soap_response(soap, SOAP_OK)
00245          || soap_envelope_begin_out(soap)
00246          || soap_putheader(soap)
00247          || soap_body_begin_out(soap)
00248          || soap_put_acq2xx__acq2scriptResponse(soap, &result, "acq2xx:acq2scriptResponse", "")
00249          || soap_body_end_out(soap)
00250          || soap_envelope_end_out(soap)
00251          || soap_end_send(soap))
00252                 return soap->error;
00253         return soap_closesock(soap);
00254 }
00255 
00256 SOAP_FMAC5 int SOAP_FMAC6 soap_serve_acq2xx__getAcqStatus(struct soap *soap)
00257 {       struct acq2xx__getAcqStatus soap_tmp_acq2xx__getAcqStatus;
00258         struct acq2xx__AcqStatus status;
00259         soap_default_acq2xx__AcqStatus(soap, &status);
00260         soap_default_acq2xx__getAcqStatus(soap, &soap_tmp_acq2xx__getAcqStatus);
00261         soap->encodingStyle = NULL;
00262         if (!soap_get_acq2xx__getAcqStatus(soap, &soap_tmp_acq2xx__getAcqStatus, "acq2xx:getAcqStatus", NULL))
00263                 return soap->error;
00264         if (soap_body_end_in(soap)
00265          || soap_envelope_end_in(soap)
00266          || soap_end_recv(soap))
00267                 return soap->error;
00268         soap->error = acq2xx__getAcqStatus(soap, status);
00269         if (soap->error)
00270                 return soap->error;
00271         soap_serializeheader(soap);
00272         soap_serialize_acq2xx__AcqStatus(soap, &status);
00273         if (soap_begin_count(soap))
00274                 return soap->error;
00275         if (soap->mode & SOAP_IO_LENGTH)
00276         {       if (soap_envelope_begin_out(soap)
00277                  || soap_putheader(soap)
00278                  || soap_body_begin_out(soap)
00279                  || soap_put_acq2xx__AcqStatus(soap, &status, "acq2xx:AcqStatus", "")
00280                  || soap_body_end_out(soap)
00281                  || soap_envelope_end_out(soap))
00282                          return soap->error;
00283         };
00284         if (soap_end_count(soap)
00285          || soap_response(soap, SOAP_OK)
00286          || soap_envelope_begin_out(soap)
00287          || soap_putheader(soap)
00288          || soap_body_begin_out(soap)
00289          || soap_put_acq2xx__AcqStatus(soap, &status, "acq2xx:AcqStatus", "")
00290          || soap_body_end_out(soap)
00291          || soap_envelope_end_out(soap)
00292          || soap_end_send(soap))
00293                 return soap->error;
00294         return soap_closesock(soap);
00295 }
00296 
00297 SOAP_FMAC5 int SOAP_FMAC6 soap_serve_acq2xx__setArm(struct soap *soap)
00298 {       struct acq2xx__setArm soap_tmp_acq2xx__setArm;
00299         struct acq2xx__AcqStatus status;
00300         soap_default_acq2xx__AcqStatus(soap, &status);
00301         soap_default_acq2xx__setArm(soap, &soap_tmp_acq2xx__setArm);
00302         soap->encodingStyle = NULL;
00303         if (!soap_get_acq2xx__setArm(soap, &soap_tmp_acq2xx__setArm, "acq2xx:setArm", NULL))
00304                 return soap->error;
00305         if (soap_body_end_in(soap)
00306          || soap_envelope_end_in(soap)
00307          || soap_end_recv(soap))
00308                 return soap->error;
00309         soap->error = acq2xx__setArm(soap, soap_tmp_acq2xx__setArm.block, status);
00310         if (soap->error)
00311                 return soap->error;
00312         soap_serializeheader(soap);
00313         soap_serialize_acq2xx__AcqStatus(soap, &status);
00314         if (soap_begin_count(soap))
00315                 return soap->error;
00316         if (soap->mode & SOAP_IO_LENGTH)
00317         {       if (soap_envelope_begin_out(soap)
00318                  || soap_putheader(soap)
00319                  || soap_body_begin_out(soap)
00320                  || soap_put_acq2xx__AcqStatus(soap, &status, "acq2xx:AcqStatus", "")
00321                  || soap_body_end_out(soap)
00322                  || soap_envelope_end_out(soap))
00323                          return soap->error;
00324         };
00325         if (soap_end_count(soap)
00326          || soap_response(soap, SOAP_OK)
00327          || soap_envelope_begin_out(soap)
00328          || soap_putheader(soap)
00329          || soap_body_begin_out(soap)
00330          || soap_put_acq2xx__AcqStatus(soap, &status, "acq2xx:AcqStatus", "")
00331          || soap_body_end_out(soap)
00332          || soap_envelope_end_out(soap)
00333          || soap_end_send(soap))
00334                 return soap->error;
00335         return soap_closesock(soap);
00336 }
00337 
00338 SOAP_FMAC5 int SOAP_FMAC6 soap_serve_acq2xx__waitStop(struct soap *soap)
00339 {       struct acq2xx__waitStop soap_tmp_acq2xx__waitStop;
00340         struct acq2xx__AcqStatus status;
00341         soap_default_acq2xx__AcqStatus(soap, &status);
00342         soap_default_acq2xx__waitStop(soap, &soap_tmp_acq2xx__waitStop);
00343         soap->encodingStyle = NULL;
00344         if (!soap_get_acq2xx__waitStop(soap, &soap_tmp_acq2xx__waitStop, "acq2xx:waitStop", NULL))
00345                 return soap->error;
00346         if (soap_body_end_in(soap)
00347          || soap_envelope_end_in(soap)
00348          || soap_end_recv(soap))
00349                 return soap->error;
00350         soap->error = acq2xx__waitStop(soap, soap_tmp_acq2xx__waitStop.timeout_sec, status);
00351         if (soap->error)
00352                 return soap->error;
00353         soap_serializeheader(soap);
00354         soap_serialize_acq2xx__AcqStatus(soap, &status);
00355         if (soap_begin_count(soap))
00356                 return soap->error;
00357         if (soap->mode & SOAP_IO_LENGTH)
00358         {       if (soap_envelope_begin_out(soap)
00359                  || soap_putheader(soap)
00360                  || soap_body_begin_out(soap)
00361                  || soap_put_acq2xx__AcqStatus(soap, &status, "acq2xx:AcqStatus", "")
00362                  || soap_body_end_out(soap)
00363                  || soap_envelope_end_out(soap))
00364                          return soap->error;
00365         };
00366         if (soap_end_count(soap)
00367          || soap_response(soap, SOAP_OK)
00368          || soap_envelope_begin_out(soap)
00369          || soap_putheader(soap)
00370          || soap_body_begin_out(soap)
00371          || soap_put_acq2xx__AcqStatus(soap, &status, "acq2xx:AcqStatus", "")
00372          || soap_body_end_out(soap)
00373          || soap_envelope_end_out(soap)
00374          || soap_end_send(soap))
00375                 return soap->error;
00376         return soap_closesock(soap);
00377 }
00378 
00379 /* End of soapServer.cpp */

Generated on Mon Aug 21 12:39:57 2006 for ACQ2XXWebServices by  doxygen 1.4.4