Click here to Skip to main content
15,895,740 members
Articles / Programming Languages / C++

CurrencyConvertor: How to Use gSOAP and Webservices, Part One

Rate me:
Please Sign up or sign in to vote.
4.85/5 (45 votes)
23 Mar 2007CPOL4 min read 561.5K   4.2K   71  
How to auto-generate VC++ source and include it in your project
/* soapCurrencyConvertorSoapProxy.h
   Generated by gSOAP 2.7.8c from WSCurrencyConv.h
   Copyright (C) 2000-2006, 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 soapCurrencyConvertorSoap_H
#define soapCurrencyConvertorSoap_H
#include "soapH.h"
class CurrencyConvertorSoap
{   public:
	struct soap *soap;
	const char *endpoint;
	CurrencyConvertorSoap()
	{ soap = soap_new(); endpoint = "http://www.webservicex.net/CurrencyConvertor.asmx"; if (soap && !soap->namespaces) { 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},
	{"ns1", "http://www.webserviceX.NET/", NULL, NULL},
	{NULL, NULL, NULL, NULL}
};
	soap->namespaces = namespaces; } };
	virtual ~CurrencyConvertorSoap() { if (soap) { soap_destroy(soap); soap_end(soap); soap_done(soap); soap_del(soap); } };
	virtual int __ns1__ConversionRate(_ns1__ConversionRate *ns1__ConversionRate, _ns1__ConversionRateResponse *ns1__ConversionRateResponse) { return soap ? soap_call___ns1__ConversionRate(soap, endpoint, NULL, ns1__ConversionRate, ns1__ConversionRateResponse) : SOAP_EOM; };
};
#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Welcome Italia spa
Italy Italy
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions