~vcs-imports/ifolder/dev

« back to all changes in this revision

Viewing changes to tools/gsoap/gsoap-linux-2.7/mod_gsoap/mod_gsoap-0.6/apache_13/example/calculator/calcclnt.cpp

  • Committer: kalidasbala
  • Date: 2007-11-22 15:45:57 UTC
  • Revision ID: vcs-imports@canonical.com-20071122154557-rowdjwpay7knkj9l
Update of gsoap to latest version 2.7.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <string.h>
 
2
#include "soapH.h"
 
3
#include "calc.nsmap"
 
4
 
 
5
int main(int argc, char** argv)
 
6
 
7
  struct soap *soap = soap_new();
 
8
  int a, b, result;
 
9
  if(argc > 3 )
 
10
  { a = atoi(argv[1]);
 
11
    b = atoi(argv[3]);
 
12
  }
 
13
  else
 
14
      return -1;
 
15
 
 
16
  switch (*argv[2]) {
 
17
  case '+':
 
18
    if(soap_call_ns__add(soap, "http://localhost:8080/soap", "calculate", a, b, &result) == 0)
 
19
      printf("%d+%d=%d\n", a, b, result);
 
20
    else
 
21
      soap_print_fault(soap, stdout);
 
22
    break;
 
23
 }
 
24
  return 0;
 
25
}