This repository was archived by the owner on Mar 11, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsoapcalculatorObject.h
executable file
·53 lines (44 loc) · 2.53 KB
/
soapcalculatorObject.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* soapcalculatorObject.h
Generated by gSOAP 2.7.10 from calc.h
Copyright(C) 2000-2008, Robert van Engelen, Genivia Inc. All Rights Reserved.
This part of the software is released under one of the following licenses:
GPL, the gSOAP public license, or Genivia's license for commercial use.
*/
#ifndef soapcalculatorObject_H
#define soapcalculatorObject_H
#include "soapH.h"
/******************************************************************************\
* *
* Service Object *
* *
\******************************************************************************/
class calculatorService : public soap
{ public:
calculatorService()
{ static const struct Namespace namespaces[] =
{
{"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", "http://www.w3.org/*/soap-envelope", NULL},
{"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/", "http://www.w3.org/*/soap-encoding", NULL},
{"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance", NULL},
{"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema", NULL},
{"ns", "calculator", NULL, NULL},
{NULL, NULL, NULL, NULL}
};
if (!this->namespaces) this->namespaces = namespaces; };
virtual ~calculatorService() { };
/// Bind service to port (returns master socket or SOAP_INVALID_SOCKET)
virtual SOAP_SOCKET bind(const char *host, int port, int backlog) { return soap_bind(this, host, port, backlog); };
/// Accept next request (returns socket or SOAP_INVALID_SOCKET)
virtual SOAP_SOCKET accept() { return soap_accept(this); };
/// Serve this request (returns error code or SOAP_OK)
virtual int serve() { return soap_serve(this); };
};
/******************************************************************************\
* *
* Service Operations (you should define these globally) *
* *
\******************************************************************************/
SOAP_FMAC5 int SOAP_FMAC6 ns__add(struct soap*, int a, int b, int &result);
SOAP_FMAC5 int SOAP_FMAC6 ns__test(struct soap*, char *a, char **result);
SOAP_FMAC5 int SOAP_FMAC6 ns__sub(struct soap*, double a, double b, double &result);
#endif