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

soapClient.cpp

Go to the documentation of this file.
00001 /* soapClient.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("@(#) soapClient.cpp ver 2.7.8c 2006-08-21 11:13:38 GMT")
00010 
00011 
00012 SOAP_FMAC5 int SOAP_FMAC6 soap_call_acq2xx__getVersion(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *client_version, char *&server_version)
00013 {       struct acq2xx__getVersion soap_tmp_acq2xx__getVersion;
00014         struct acq2xx__getVersionResponse *soap_tmp_acq2xx__getVersionResponse;
00015         if (!soap_endpoint)
00016                 soap_endpoint = "http://ACQ2XX_IP_ADDRESS:6666";
00017         soap->encodingStyle = NULL;
00018         soap_tmp_acq2xx__getVersion.client_version = client_version;
00019         soap_begin(soap);
00020         soap_serializeheader(soap);
00021         soap_serialize_acq2xx__getVersion(soap, &soap_tmp_acq2xx__getVersion);
00022         if (soap_begin_count(soap))
00023                 return soap->error;
00024         if (soap->mode & SOAP_IO_LENGTH)
00025         {       if (soap_envelope_begin_out(soap)
00026                  || soap_putheader(soap)
00027                  || soap_body_begin_out(soap)
00028                  || soap_put_acq2xx__getVersion(soap, &soap_tmp_acq2xx__getVersion, "acq2xx:getVersion", "")
00029                  || soap_body_end_out(soap)
00030                  || soap_envelope_end_out(soap))
00031                          return soap->error;
00032         }
00033         if (soap_end_count(soap))
00034                 return soap->error;
00035         if (soap_connect(soap, soap_endpoint, soap_action)
00036          || soap_envelope_begin_out(soap)
00037          || soap_putheader(soap)
00038          || soap_body_begin_out(soap)
00039          || soap_put_acq2xx__getVersion(soap, &soap_tmp_acq2xx__getVersion, "acq2xx:getVersion", "")
00040          || soap_body_end_out(soap)
00041          || soap_envelope_end_out(soap)
00042          || soap_end_send(soap))
00043                 return soap_closesock(soap);
00044         server_version = NULL;
00045         if (soap_begin_recv(soap)
00046          || soap_envelope_begin_in(soap)
00047          || soap_recv_header(soap)
00048          || soap_body_begin_in(soap))
00049                 return soap_closesock(soap);
00050         soap_tmp_acq2xx__getVersionResponse = soap_get_acq2xx__getVersionResponse(soap, NULL, "acq2xx:getVersionResponse", "");
00051         if (soap->error)
00052         {       if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)
00053                         return soap_recv_fault(soap);
00054                 return soap_closesock(soap);
00055         }
00056         if (soap_body_end_in(soap)
00057          || soap_envelope_end_in(soap)
00058          || soap_end_recv(soap))
00059                 return soap_closesock(soap);
00060         server_version = soap_tmp_acq2xx__getVersionResponse->server_version;
00061         return soap_closesock(soap);
00062 }
00063 
00064 SOAP_FMAC5 int SOAP_FMAC6 soap_call_acq2xx__acqcmd(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *command, char *&response)
00065 {       struct acq2xx__acqcmd soap_tmp_acq2xx__acqcmd;
00066         struct acq2xx__acqcmdResponse *soap_tmp_acq2xx__acqcmdResponse;
00067         if (!soap_endpoint)
00068                 soap_endpoint = "http://ACQ2XX_IP_ADDRESS:6666";
00069         soap->encodingStyle = NULL;
00070         soap_tmp_acq2xx__acqcmd.command = command;
00071         soap_begin(soap);
00072         soap_serializeheader(soap);
00073         soap_serialize_acq2xx__acqcmd(soap, &soap_tmp_acq2xx__acqcmd);
00074         if (soap_begin_count(soap))
00075                 return soap->error;
00076         if (soap->mode & SOAP_IO_LENGTH)
00077         {       if (soap_envelope_begin_out(soap)
00078                  || soap_putheader(soap)
00079                  || soap_body_begin_out(soap)
00080                  || soap_put_acq2xx__acqcmd(soap, &soap_tmp_acq2xx__acqcmd, "acq2xx:acqcmd", "")
00081                  || soap_body_end_out(soap)
00082                  || soap_envelope_end_out(soap))
00083                          return soap->error;
00084         }
00085         if (soap_end_count(soap))
00086                 return soap->error;
00087         if (soap_connect(soap, soap_endpoint, soap_action)
00088          || soap_envelope_begin_out(soap)
00089          || soap_putheader(soap)
00090          || soap_body_begin_out(soap)
00091          || soap_put_acq2xx__acqcmd(soap, &soap_tmp_acq2xx__acqcmd, "acq2xx:acqcmd", "")
00092          || soap_body_end_out(soap)
00093          || soap_envelope_end_out(soap)
00094          || soap_end_send(soap))
00095                 return soap_closesock(soap);
00096         response = NULL;
00097         if (soap_begin_recv(soap)
00098          || soap_envelope_begin_in(soap)
00099          || soap_recv_header(soap)
00100          || soap_body_begin_in(soap))
00101                 return soap_closesock(soap);
00102         soap_tmp_acq2xx__acqcmdResponse = soap_get_acq2xx__acqcmdResponse(soap, NULL, "acq2xx:acqcmdResponse", "");
00103         if (soap->error)
00104         {       if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)
00105                         return soap_recv_fault(soap);
00106                 return soap_closesock(soap);
00107         }
00108         if (soap_body_end_in(soap)
00109          || soap_envelope_end_in(soap)
00110          || soap_end_recv(soap))
00111                 return soap_closesock(soap);
00112         response = soap_tmp_acq2xx__acqcmdResponse->response;
00113         return soap_closesock(soap);
00114 }
00115 
00116 SOAP_FMAC5 int SOAP_FMAC6 soap_call_acq2xx__acq2sh(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *command, char *&response)
00117 {       struct acq2xx__acq2sh soap_tmp_acq2xx__acq2sh;
00118         struct acq2xx__acq2shResponse *soap_tmp_acq2xx__acq2shResponse;
00119         if (!soap_endpoint)
00120                 soap_endpoint = "http://ACQ2XX_IP_ADDRESS:6666";
00121         soap->encodingStyle = NULL;
00122         soap_tmp_acq2xx__acq2sh.command = command;
00123         soap_begin(soap);
00124         soap_serializeheader(soap);
00125         soap_serialize_acq2xx__acq2sh(soap, &soap_tmp_acq2xx__acq2sh);
00126         if (soap_begin_count(soap))
00127                 return soap->error;
00128         if (soap->mode & SOAP_IO_LENGTH)
00129         {       if (soap_envelope_begin_out(soap)
00130                  || soap_putheader(soap)
00131                  || soap_body_begin_out(soap)
00132                  || soap_put_acq2xx__acq2sh(soap, &soap_tmp_acq2xx__acq2sh, "acq2xx:acq2sh", "")
00133                  || soap_body_end_out(soap)
00134                  || soap_envelope_end_out(soap))
00135                          return soap->error;
00136         }
00137         if (soap_end_count(soap))
00138                 return soap->error;
00139         if (soap_connect(soap, soap_endpoint, soap_action)
00140          || soap_envelope_begin_out(soap)
00141          || soap_putheader(soap)
00142          || soap_body_begin_out(soap)
00143          || soap_put_acq2xx__acq2sh(soap, &soap_tmp_acq2xx__acq2sh, "acq2xx:acq2sh", "")
00144          || soap_body_end_out(soap)
00145          || soap_envelope_end_out(soap)
00146          || soap_end_send(soap))
00147                 return soap_closesock(soap);
00148         response = NULL;
00149         if (soap_begin_recv(soap)
00150          || soap_envelope_begin_in(soap)
00151          || soap_recv_header(soap)
00152          || soap_body_begin_in(soap))
00153                 return soap_closesock(soap);
00154         soap_tmp_acq2xx__acq2shResponse = soap_get_acq2xx__acq2shResponse(soap, NULL, "acq2xx:acq2shResponse", "");
00155         if (soap->error)
00156         {       if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)
00157                         return soap_recv_fault(soap);
00158                 return soap_closesock(soap);
00159         }
00160         if (soap_body_end_in(soap)
00161          || soap_envelope_end_in(soap)
00162          || soap_end_recv(soap))
00163                 return soap_closesock(soap);
00164         response = soap_tmp_acq2xx__acq2shResponse->response;
00165         return soap_closesock(soap);
00166 }
00167 
00168 SOAP_FMAC5 int SOAP_FMAC6 soap_call_acq2xx__acq2script(struct soap *soap, const char *soap_endpoint, const char *soap_action, acq2xx__Transaction *in, struct acq2xx__acq2scriptResponse &result)
00169 {       struct acq2xx__acq2script soap_tmp_acq2xx__acq2script;
00170         if (!soap_endpoint)
00171                 soap_endpoint = "http://ACQ2XX_IP_ADDRESS:6666";
00172         soap->encodingStyle = NULL;
00173         soap_tmp_acq2xx__acq2script.in = in;
00174         soap_begin(soap);
00175         soap_serializeheader(soap);
00176         soap_serialize_acq2xx__acq2script(soap, &soap_tmp_acq2xx__acq2script);
00177         if (soap_begin_count(soap))
00178                 return soap->error;
00179         if (soap->mode & SOAP_IO_LENGTH)
00180         {       if (soap_envelope_begin_out(soap)
00181                  || soap_putheader(soap)
00182                  || soap_body_begin_out(soap)
00183                  || soap_put_acq2xx__acq2script(soap, &soap_tmp_acq2xx__acq2script, "acq2xx:acq2script", "")
00184                  || soap_body_end_out(soap)
00185                  || soap_envelope_end_out(soap))
00186                          return soap->error;
00187         }
00188         if (soap_end_count(soap))
00189                 return soap->error;
00190         if (soap_connect(soap, soap_endpoint, soap_action)
00191          || soap_envelope_begin_out(soap)
00192          || soap_putheader(soap)
00193          || soap_body_begin_out(soap)
00194          || soap_put_acq2xx__acq2script(soap, &soap_tmp_acq2xx__acq2script, "acq2xx:acq2script", "")
00195          || soap_body_end_out(soap)
00196          || soap_envelope_end_out(soap)
00197          || soap_end_send(soap))
00198                 return soap_closesock(soap);
00199         soap_default_acq2xx__acq2scriptResponse(soap, &result);
00200         if (soap_begin_recv(soap)
00201          || soap_envelope_begin_in(soap)
00202          || soap_recv_header(soap)
00203          || soap_body_begin_in(soap))
00204                 return soap_closesock(soap);
00205         soap_get_acq2xx__acq2scriptResponse(soap, &result, "acq2xx:acq2scriptResponse", "");
00206         if (soap->error)
00207         {       if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)
00208                         return soap_recv_fault(soap);
00209                 return soap_closesock(soap);
00210         }
00211         if (soap_body_end_in(soap)
00212          || soap_envelope_end_in(soap)
00213          || soap_end_recv(soap))
00214                 return soap_closesock(soap);
00215         return soap_closesock(soap);
00216 }
00217 
00218 SOAP_FMAC5 int SOAP_FMAC6 soap_call_acq2xx__getAcqStatus(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct acq2xx__AcqStatus &status)
00219 {       struct acq2xx__getAcqStatus soap_tmp_acq2xx__getAcqStatus;
00220         if (!soap_endpoint)
00221                 soap_endpoint = "http://ACQ2XX_IP_ADDRESS:6666";
00222         soap->encodingStyle = NULL;
00223         soap_begin(soap);
00224         soap_serializeheader(soap);
00225         soap_serialize_acq2xx__getAcqStatus(soap, &soap_tmp_acq2xx__getAcqStatus);
00226         if (soap_begin_count(soap))
00227                 return soap->error;
00228         if (soap->mode & SOAP_IO_LENGTH)
00229         {       if (soap_envelope_begin_out(soap)
00230                  || soap_putheader(soap)
00231                  || soap_body_begin_out(soap)
00232                  || soap_put_acq2xx__getAcqStatus(soap, &soap_tmp_acq2xx__getAcqStatus, "acq2xx:getAcqStatus", "")
00233                  || soap_body_end_out(soap)
00234                  || soap_envelope_end_out(soap))
00235                          return soap->error;
00236         }
00237         if (soap_end_count(soap))
00238                 return soap->error;
00239         if (soap_connect(soap, soap_endpoint, soap_action)
00240          || soap_envelope_begin_out(soap)
00241          || soap_putheader(soap)
00242          || soap_body_begin_out(soap)
00243          || soap_put_acq2xx__getAcqStatus(soap, &soap_tmp_acq2xx__getAcqStatus, "acq2xx:getAcqStatus", "")
00244          || soap_body_end_out(soap)
00245          || soap_envelope_end_out(soap)
00246          || soap_end_send(soap))
00247                 return soap_closesock(soap);
00248         soap_default_acq2xx__AcqStatus(soap, &status);
00249         if (soap_begin_recv(soap)
00250          || soap_envelope_begin_in(soap)
00251          || soap_recv_header(soap)
00252          || soap_body_begin_in(soap))
00253                 return soap_closesock(soap);
00254         soap_get_acq2xx__AcqStatus(soap, &status, "acq2xx:AcqStatus", "");
00255         if (soap->error)
00256         {       if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)
00257                         return soap_recv_fault(soap);
00258                 return soap_closesock(soap);
00259         }
00260         if (soap_body_end_in(soap)
00261          || soap_envelope_end_in(soap)
00262          || soap_end_recv(soap))
00263                 return soap_closesock(soap);
00264         return soap_closesock(soap);
00265 }
00266 
00267 SOAP_FMAC5 int SOAP_FMAC6 soap_call_acq2xx__setArm(struct soap *soap, const char *soap_endpoint, const char *soap_action, int block, struct acq2xx__AcqStatus &status)
00268 {       struct acq2xx__setArm soap_tmp_acq2xx__setArm;
00269         if (!soap_endpoint)
00270                 soap_endpoint = "http://ACQ2XX_IP_ADDRESS:6666";
00271         soap->encodingStyle = NULL;
00272         soap_tmp_acq2xx__setArm.block = block;
00273         soap_begin(soap);
00274         soap_serializeheader(soap);
00275         soap_serialize_acq2xx__setArm(soap, &soap_tmp_acq2xx__setArm);
00276         if (soap_begin_count(soap))
00277                 return soap->error;
00278         if (soap->mode & SOAP_IO_LENGTH)
00279         {       if (soap_envelope_begin_out(soap)
00280                  || soap_putheader(soap)
00281                  || soap_body_begin_out(soap)
00282                  || soap_put_acq2xx__setArm(soap, &soap_tmp_acq2xx__setArm, "acq2xx:setArm", "")
00283                  || soap_body_end_out(soap)
00284                  || soap_envelope_end_out(soap))
00285                          return soap->error;
00286         }
00287         if (soap_end_count(soap))
00288                 return soap->error;
00289         if (soap_connect(soap, soap_endpoint, soap_action)
00290          || soap_envelope_begin_out(soap)
00291          || soap_putheader(soap)
00292          || soap_body_begin_out(soap)
00293          || soap_put_acq2xx__setArm(soap, &soap_tmp_acq2xx__setArm, "acq2xx:setArm", "")
00294          || soap_body_end_out(soap)
00295          || soap_envelope_end_out(soap)
00296          || soap_end_send(soap))
00297                 return soap_closesock(soap);
00298         soap_default_acq2xx__AcqStatus(soap, &status);
00299         if (soap_begin_recv(soap)
00300          || soap_envelope_begin_in(soap)
00301          || soap_recv_header(soap)
00302          || soap_body_begin_in(soap))
00303                 return soap_closesock(soap);
00304         soap_get_acq2xx__AcqStatus(soap, &status, "acq2xx:AcqStatus", "");
00305         if (soap->error)
00306         {       if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)
00307                         return soap_recv_fault(soap);
00308                 return soap_closesock(soap);
00309         }
00310         if (soap_body_end_in(soap)
00311          || soap_envelope_end_in(soap)
00312          || soap_end_recv(soap))
00313                 return soap_closesock(soap);
00314         return soap_closesock(soap);
00315 }
00316 
00317 SOAP_FMAC5 int SOAP_FMAC6 soap_call_acq2xx__waitStop(struct soap *soap, const char *soap_endpoint, const char *soap_action, int timeout_sec, struct acq2xx__AcqStatus &status)
00318 {       struct acq2xx__waitStop soap_tmp_acq2xx__waitStop;
00319         if (!soap_endpoint)
00320                 soap_endpoint = "http://ACQ2XX_IP_ADDRESS:6666";
00321         soap->encodingStyle = NULL;
00322         soap_tmp_acq2xx__waitStop.timeout_sec = timeout_sec;
00323         soap_begin(soap);
00324         soap_serializeheader(soap);
00325         soap_serialize_acq2xx__waitStop(soap, &soap_tmp_acq2xx__waitStop);
00326         if (soap_begin_count(soap))
00327                 return soap->error;
00328         if (soap->mode & SOAP_IO_LENGTH)
00329         {       if (soap_envelope_begin_out(soap)
00330                  || soap_putheader(soap)
00331                  || soap_body_begin_out(soap)
00332                  || soap_put_acq2xx__waitStop(soap, &soap_tmp_acq2xx__waitStop, "acq2xx:waitStop", "")
00333                  || soap_body_end_out(soap)
00334                  || soap_envelope_end_out(soap))
00335                          return soap->error;
00336         }
00337         if (soap_end_count(soap))
00338                 return soap->error;
00339         if (soap_connect(soap, soap_endpoint, soap_action)
00340          || soap_envelope_begin_out(soap)
00341          || soap_putheader(soap)
00342          || soap_body_begin_out(soap)
00343          || soap_put_acq2xx__waitStop(soap, &soap_tmp_acq2xx__waitStop, "acq2xx:waitStop", "")
00344          || soap_body_end_out(soap)
00345          || soap_envelope_end_out(soap)
00346          || soap_end_send(soap))
00347                 return soap_closesock(soap);
00348         soap_default_acq2xx__AcqStatus(soap, &status);
00349         if (soap_begin_recv(soap)
00350          || soap_envelope_begin_in(soap)
00351          || soap_recv_header(soap)
00352          || soap_body_begin_in(soap))
00353                 return soap_closesock(soap);
00354         soap_get_acq2xx__AcqStatus(soap, &status, "acq2xx:AcqStatus", "");
00355         if (soap->error)
00356         {       if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)
00357                         return soap_recv_fault(soap);
00358                 return soap_closesock(soap);
00359         }
00360         if (soap_body_end_in(soap)
00361          || soap_envelope_end_in(soap)
00362          || soap_end_recv(soap))
00363                 return soap_closesock(soap);
00364         return soap_closesock(soap);
00365 }
00366 
00367 /* End of soapClient.cpp */

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