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

📄 array_server.cpp

📁 ESOAP是一款专注于嵌入式web service开发的工具 压缩包里提供了基本的例子
💻 CPP
字号:
// AUTO GENERATED ( copied from "Echo_impl.cpp" ).
#include "Echo_impl.h"

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

namespace echo {

esoap_Vector< int > *Echo_Impl::echo(
                  const esoap_Vector< int > & i )
{
   esoap_Vector< int > * r = new esoap_Vector< int >();
   *r = i;
   return r;
}

}
// AUTO GENERATED END.




// ---------------------------------------------------------


/////////////////////////////////////////////////////////////////////////////
// $Id: array_server.cpp,v 1.4 2001/09/11 12:03:38 rosimildo Exp $
//
// Copyright (c) 2001 Exor International Inc. All rights reserved.
//
// MODULE DESCRIPTION: A simple "echo" example for eSoap.
//
// MODIFICATION/HISTORY:
//
// $Log: array_server.cpp,v $
// Revision 1.4  2001/09/11 12:03:38  rosimildo
// changed copyright from Technopoint to Exit; updated version to 0.9
//
// Revision 1.3  2001/09/10 22:52:59  rosimildo
// Added basic auth.
//
// Revision 1.2  2001/09/09 14:19:52  rosimildo
// Added some comments. Added copyright.
//
// Revision 1.1  2001/09/08 15:15:19  rosimildo
// Added the array example.
//
//
// Created 2001/09/10 Rosimildo da Silva, ConnectTel Inc.
// [rdasilva@connecttel.com]
//
/////////////////////////////////////////////////////////////////////////////
#include "soap_server.h"

int main(int, char ** )
{
  // create the server instance, and initialize it.
  esoap::ServerFactory::create( esoap::ServerFactory::ABYSS );
  esoap::Server::instance()->init( "eSOAPServer", 8080, ".", 0, true );

  // IMPORTANT: This tell the server to validate any request using the
  // HTTP "basic authentication" mechanism.
  esoap::Server::instance()->setBasicAuthentication( "joe", "esoap" );

  // Create "Echo" instance, and register it with the server
  echo::Echo_Impl echo;
  echo.activate();

  // start the server...
  esoap::Server::instance()->run();

  // shutdown server.
  echo.deactivate();
  esoap::Server::setInstance( 0 );
  return 0;
}

⌨️ 快捷键说明

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