~ifolder-dev/simias/trunk-packaging

« back to all changes in this revision

Viewing changes to tools/gsoap/gsoap-linux-2.7/samples/quote/.svn/text-base/quote.c.svn-base

  • Committer: Jorge O. Castro
  • Date: 2007-12-03 06:56:46 UTC
  • Revision ID: jorge@ubuntu.com-20071203065646-mupcnjcwgm5mnhyt
* Remove a bunch of .svn directories we no longer need.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include "soapH.h"      /* include generated proxy and SOAP support */
2
 
 
3
 
int main(int argc, char **argv)
4
 
{ struct soap soap;
5
 
  float q;
6
 
  char *sym;
7
 
  if (argc > 1)
8
 
    sym = argv[1];
9
 
  else
10
 
  { fprintf(stderr, "Usage: quote <ticker>\n");
11
 
    exit(1);
12
 
  }
13
 
  soap_init(&soap);
14
 
  if (soap_call_ns__getQuote(&soap, "http://services.xmethods.net/soap", "", sym, &q) == 0)
15
 
    printf("\nCompany - %s    Quote - %f\n", sym, q);
16
 
  else
17
 
    soap_print_fault(&soap, stderr);
18
 
  soap_end(&soap);
19
 
  soap_done(&soap);
20
 
  return 0;
21
 
}
22
 
 
23
 
/* The namespace mapping table is required and associates namespace prefixes with namespace names: */
24
 
struct Namespace namespaces[] =
25
 
{
26
 
  {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", "http://www.w3.org/*/soap-envelope", NULL}, /* MUST be the first */
27
 
  {"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/", "http://www.w3.org/*/soap-encoding", NULL}, /* MUST be the second */
28
 
  {"xsi", "http://www.w3.org/1999/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance", NULL}, /* MUST be the third */
29
 
  {"xsd", "http://www.w3.org/1999/XMLSchema", "http://www.w3.org/*/XMLSchema", NULL},
30
 
  {"ns", "urn:xmethods-delayed-quotes"},        /* Method namespace URI */
31
 
  {NULL, NULL, NULL, NULL}
32
 
};
33
 
 
34