⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 echo_proxy.cpp

📁 ESOAP是一款专注于嵌入式web service开发的工具 压缩包里提供了基本的例子
💻 CPP
字号:
/*
 Created by eSoap Code Generator for C++, >>> DEMO <<<  Version - 1.08
 **** DO NOT EDIT THIS FILE.  *****
 Time: Sun Sep 09 09:37:51 2001

 **** CODE CREATED USING AN UNREGISTERED VERSION OF ESOAPCG.
 Please, after the initial testing, you *MUST* buy a
 copy of this application to continue using it.

 * Limits of this version:

     + 5 functions per interface
     + 5 User defined types( Complex Types )

*/

#include "soap_envelope.h"
#include "Echo_proxy.h"


/* must be the last include */
#ifdef MEMWATCH
#include <memwatch.h>
#endif
namespace echo {

static const char *__client_code = 
"SOAP-CODE:Client";
static const char *__client_param =
"Error: parsing parameter.";


const char *Echo_Proxy::NS_URI = "http://tempuri.com/";
const char *Echo_Proxy::SOAP_ACTION = "http://tempuri.com/";

Echo_Proxy::Echo_Proxy( const char *url, unsigned long timeout )
{
   __ht = esoap::TransportFactory::create( url, esoap::TransportFactory::HTTP );
   __ht->setTimeout( timeout );
}

Echo_Proxy::~Echo_Proxy()
{
   delete __ht;
}

esoap::Packet Echo_Proxy::getGIF( )
{
  esoap::Envelope    __env;
  esoap::Method *__m = __env.setMethod( "m:getGIF", NS_URI );
  esoap::Envelope *__in = __ht->call( __env, SOAP_ACTION );
  if( !__in->success() )
  {
     esoap::SoapException __ex( __in->getFault() );
     delete __in;
     throw __ex;
  }
  esoap::Method *__resp = __in->getMethod();
  if( !__resp )
  {
     delete __in;
     throw esoap::SoapException( __client_code, __client_param );
  }
  {  esoap::Parameter *__p;
      if( __resp->getParameterCount() == 1 )
         __p = __in->getRealParameter( __resp->getParameter( 0 ) );
      else 
         __p = __in->getRealParameter( __resp->getParameter( "return" ) );
     if( !__p )
     {
       delete __in;
       throw esoap::SoapException( __client_code, __client_param );
     }
    esoap::Packet __o_r = __p->getBinary();
     delete __in;
     return __o_r;
  }
}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -