1/* 2 calc.h 3 4 This is a gSOAP header file with web service definitions. 5 6 The service operations and type definitions use familiar C/C++ syntax. 7 8 The following methods are defined by this gSOAP service definition: 9 10 add(a,b) 11 sub(a,b) 12 mul(a,b) 13 div(a,b) 14 pow(a,b) 15 16 Compilation in C (see samples/calc): 17 $ soapcpp2 -c calc.h 18 $ cc -o calcclient calcclient.c stdsoap2.c soapC.c soapClient.c 19 $ cc -o calcserver calcserver.c stdsoap2.c soapC.c soapServer.c 20 21 Compilation in C++ (see samples/calc++): 22 $ soapcpp2 -i calc.h 23 $ cc -o calcclient++ calcclient.cpp stdsoap2.cpp soapC.cpp soapcalcProxy.cpp 24 $ cc -o calcserver++ calcserver.cpp stdsoap2.cpp soapC.cpp soapcalcService.cpp 25 26 Note that soapcpp2 option -i generates proxy and service classes, which 27 encapsulate the method operations in the class instead of defining them 28 as global functions as in C. 29 30 The //gsoap directives are used to bind XML namespaces and to define 31 Web service properties: 32 33 //gsoap <ns> service name: <WSDLserviceName> <documentationText> 34 //gsoap <ns> service style: [rpc|document] 35 //gsoap <ns> service encoding: [literal|encoded] 36 //gsoap <ns> service namespace: <WSDLnamespaceURI> 37 //gsoap <ns> service location: <WSDLserviceAddressLocationURI> 38 39 Web service operation properties: 40 41 //gsoap <ns> service method-style: <methodName> [rpc|document] 42 //gsoap <ns> service method-encoding: <methodName> [literal|encoded] 43 //gsoap <ns> service method-action: <methodName> <actionString> 44 //gsoap <ns> service method-documentation: <methodName> <documentation> 45 46 and type schema properties: 47 48 //gsoap <ns> schema namespace: <schemaNamespaceURI> 49 //gsoap <ns> schema elementForm: [qualified|unqualified] 50 //gsoap <ns> schema attributeForm: [qualified|unqualified] 51 //gsoap <ns> schema documentation: <documentationText> 52 //gsoap <ns> schema type-documentation: <typeName> <documentationText> 53 54 where <ns> is an XML namespace prefix, which is used in C/C++ operation 55 names, e.g. ns__add(), and type names, e.g. xsd__int. 56 57 See the documentation for the full list of //gsoap directives. 58 59-------------------------------------------------------------------------------- 60gSOAP XML Web services tools 61Copyright (C) 2001-2008, Robert van Engelen, Genivia, Inc. All Rights Reserved. 62This software is released under one of the following two licenses: 63GPL or Genivia's license for commercial use. 64-------------------------------------------------------------------------------- 65GPL license. 66 67This program is free software; you can redistribute it and/or modify it under 68the terms of the GNU General Public License as published by the Free Software 69Foundation; either version 2 of the License, or (at your option) any later 70version. 71 72This program is distributed in the hope that it will be useful, but WITHOUT ANY 73WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 74PARTICULAR PURPOSE. See the GNU General Public License for more details. 75 76You should have received a copy of the GNU General Public License along with 77this program; if not, write to the Free Software Foundation, Inc., 59 Temple 78Place, Suite 330, Boston, MA 02111-1307 USA 79 80Author contact information: 81engelen@genivia.com / engelen@acm.org 82-------------------------------------------------------------------------------- 83A commercial use license is available from Genivia, Inc., contact@genivia.com 84-------------------------------------------------------------------------------- 85*/ 86 87//gsoap ns service name: calc Simple calculator service 88//gsoap ns service style: rpc 89//gsoap ns service encoding: encoded 90//gsoap ns service namespace: http://websrv.cs.fsu.edu/~engelen/calc.wsdl 91//gsoap ns service location: http://websrv.cs.fsu.edu/~engelen/calcserver.cgi 92 93//gsoap ns schema namespace: urn:calc 94 95//gsoap ns service method-documentation: add Sums two values 96int ns__add(double a, double b, double *result); 97 98//gsoap ns service method-documentation: sub Subtracts two values 99int ns__sub(double a, double b, double *result); 100 101//gsoap ns service method-documentation: mul Multiplies two values 102int ns__mul(double a, double b, double *result); 103 104//gsoap ns service method-documentation: div Divides two values 105int ns__div(double a, double b, double *result); 106 107//gsoap ns service method-documentation: pow Raises a to b 108int ns__pow(double a, double b, double *result); 109