/*
stdsoap2.c[pp] 2.7.12
gSOAP runtime engine
gSOAP XML Web services tools
Copyright (C) 2000-2008, Robert van Engelen, Genivia Inc., All Rights Reserved.
This part of the software is released under ONE of the following licenses:
GPL, or the gSOAP public license, or Genivia's license for commercial use.
--------------------------------------------------------------------------------
Contributors:
Wind River Systems Inc., for the following additions under gSOAP public license:
- vxWorks compatible
--------------------------------------------------------------------------------
gSOAP public license.
The contents of this file are subject to the gSOAP Public License Version 1.3
(the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.cs.fsu.edu/~engelen/soaplicense.html
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the License.
The Initial Developer of the Original Code is Robert A. van Engelen.
Copyright (C) 2000-2008, Robert van Engelen, Genivia Inc., All Rights Reserved.
--------------------------------------------------------------------------------
GPL license.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA
Author contact information:
[email protected] / [email protected]
This program is released under the GPL with the additional exemption that
compiling, linking, and/or using OpenSSL is allowed.
--------------------------------------------------------------------------------
A commercial use license is available from Genivia, Inc., [email protected]
--------------------------------------------------------------------------------
Installation note:
Win32 build needs winsock.dll (Visual C++ "wsock32.lib")
To do this in Visual C++ 6.0, go to "Project", "settings", select the "Link"
tab (the project file needs to be selected in the file view) and add
"wsock32.lib" to the "Object/library modules" entry
On Mac OS X with gcc (GCC) 3.1 20020420 (prerelease) you MUST compile with
-fstack_check when using -O2 because gcc 3.1 has a bug that smashes the stack
when locally allocated data exceeds 64K.
*/
#ifdef AS400
# pragma convert(819) /* EBCDIC to ASCII */
#endif
#include "stdsoap2.h"
#ifdef __BORLANDC__
# pragma warn -8060
#else
# ifdef WIN32
# ifdef UNDER_CE
# pragma comment(lib, "winsock.lib")
# else
# pragma comment(lib, "wsock32.lib")
# endif
# pragma warning(disable : 4996) /* disable deprecation warnings */
# endif
#endif
#ifdef __cplusplus
SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.7.12 2008-10-01 00:00:00 GMT")
extern "C" {
#else
SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.7.12 2008-10-01 00:00:00 GMT")
#endif
/* 8bit character representing unknown/nonrepresentable character data (e.g. not supported by current locale with multibyte support enabled) */
#ifndef SOAP_UNKNOWN_CHAR
#define SOAP_UNKNOWN_CHAR (127)
#endif
/* EOF=-1 */
#define SOAP_LT (soap_wchar)(-2) /* XML character '<' */
#define SOAP_TT (soap_wchar)(-3) /* XML character '</' */
#define SOAP_GT (soap_wchar)(-4) /* XML character '>' */
#define SOAP_QT (soap_wchar)(-5) /* XML character '"' */
#define SOAP_AP (soap_wchar)(-6) /* XML character ''' */
#define soap_blank(c) ((c) >= 0 && (c) <= 32)
#define soap_notblank(c) ((c) > 32)
#if defined(WIN32) && !defined(UNDER_CE)
#define soap_hash_ptr(p) ((PtrToUlong(p) >> 3) & (SOAP_PTRHASH - 1))
#else
#define soap_hash_ptr(p) ((size_t)(((unsigned long)(p) >> 3) & (SOAP_PTRHASH-1)))
#endif
#ifndef PALM_1
static void soap_init_logs(struct soap*);
#endif
#ifdef SOAP_DEBUG
static void soap_close_logfile(struct soap*, int);
static void soap_set_logfile(struct soap*, int, const char*);
#endif
#ifdef SOAP_MEM_DEBUG
static void soap_init_mht(struct soap*);
static void soap_free_mht(struct soap*);
static void soap_track_unlink(struct soap*, const void*);
#endif
#ifndef PALM_2
static int soap_set_error(struct soap*, const char*, const char*, const char*, const char*, int);
static int soap_copy_fault(struct soap*, const char*, const char*, const char*, const char*);
static int soap_getattrval(struct soap*, char*, size_t, soap_wchar);
#endif
#ifndef PALM_1
static void soap_free_ns(struct soap *soap);
static soap_wchar soap_char(struct soap*);
static soap_wchar soap_get_pi(struct soap*);
static int soap_isxdigit(int);
static void *fplugin(struct soap*, const char*);
static char *soap_get_http_body(struct soap*);
static size_t soap_count_attachments(struct soap *soap);
static int soap_try_connect_command(struct soap*, int http_command, const char *endpoint, const char *action);
#ifndef WITH_NOIDREF
static void soap_update_ptrs(struct soap*, char*, char*, char*, char*);
static int soap_has_copies(struct soap*, const char*, const char*);
static void soap_init_iht(struct soap*);
static void soap_free_iht(struct soap*);
static void soap_init_pht(struct soap*);
static void soap_free_pht(struct soap*);
#endif
#endif
#ifndef WITH_LEAN
static const char *soap_set_validation_fault(struct soap*, const char*, const char*);
static int soap_isnumeric(struct soap*, const char*);
static struct soap_nlist *soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized);
static void soap_pop_ns(struct soap *soap);
static void soap_utilize_ns(struct soap *soap, const char *tag, size_t n);
#endif
#ifndef WITH_LEANER
#ifndef PALM_1
static struct soap_multipart *soap_new_multipart(struct soap*, struct soap_multipart**, struct soap_multipart**, char*, size_t);
static int soap_putdimefield(struct soap*, const char*, size_t);
static char *soap_getdimefield(struct soap*, size_t);
static void soap_select_mime_boundary(struct soap*);
static int soap_valid_mime_boundary(struct soap*);
static void soap_resolve_attachment(struct soap*, struct soap_multipart*);
#endif
#endif
#ifdef WITH_GZIP
static int soap_getgziphdr(struct soap*);
#endif
#ifdef WITH_OPENSSL
int soap_ssl_init_done = 0;
static int ssl_auth_init(struct soap*);
static int ssl_verify_callback(int, X509_STORE_CTX*);
static int ssl_verify_callback_allow_expired_certificate(int, X509_STORE_CTX*);
static int ssl_password(char*, int, int, void *);
/* The callback below is included for future references:
static DH *ssl_tmp_dh(SSL*, int, int);
*/
#endif
#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER)
#ifndef PALM_1
static const char *soap_decode(char*, size_t, const char*, const char*);
#endif
#endif
#ifndef WITH_NOHTTP
#ifndef PALM_1
static soap_wchar soap_getchunkchar(struct soap*);
static const char *http_error(struct soap*, int);
static int http_post(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
static int http_get(struct soap*);
static int http_put(struct soap*);
static int http_del(struct soap*);
static int http_head(struct soap*);
static int http_send_header(struct soap*, const char*);
static int http_post_header(struct soap*, const char*, const char*);
static int http_response(struct soap*, int, size_t);
static int http_parse(struct soap*);
static int http_parse_header(struct soap*, const char*, const char*);
#endif
#endif
#ifndef WITH_NOIO
#ifndef PALM_1
static int fsend(struct soap*, const char*, size_t);
static size_t frecv(struct soap*, char*, size_t);
static int tcp_in

游刃有余则成
- 粉丝: 24
最新资源
- 1459292960_chapter8_36224_1754231640964.zip
- duangsuse-valid-projects_Python-ML-intro_54428_1754231643949.zip
- drinkingcode_PythonDemo_54428_1754231646194.zip
- Python编程从入门到实践完整学习笔记与代码示例_包含变量和简单数据类型列表简介操作列表if语句等基础章节内容详解_适用于Python初学者系统学习编程基础知识和实践练习_.zip
- Python编程从入门到实践完整学习笔记与代码示例_包含字符串处理_列表操作_字典使用_函数定义_类与对象_文件读写_异常处理等核心知识点详解_适合Python初学者系统学习编程基.zip
- victor-luyunning_web_crawlers_54428_1754231682624.zip
- huangbinggui05_flaskr_54428_1754231684956.zip
- JanisZhang_PythonNotes_54428_1754231690770.zip
- k2v1n_Learning-Python_54428_1754231686461.zip
- VincentJ1989_PythonTutorial_24844_1754231699600.zip
- Python编程语言入门学习与日常实践记录项目_包含Python基础语法学习笔记_代码示例_常见问题解决方案_编程练习案例_适合零基础初学者_用于系统学习Python编程知识_提升.zip
- Python编程自学实践项目_从零基础入门到数据分析实战_包含基础语法学习函数与模块应用面向对象编程文件操作异常处理数据可视化NumPy数组运算Pandas数据处理.zip
- myemcu_Crawler_54428_1754231478227.zip
- Python编程学习项目_Python编程-从入门到实践全书代码实现与练习_包含基础语法函数类与对象文件操作异常处理测试代码数据可视化Web应用开发等完整示例_适.zip
- Python编程语言入门学习与基础语法练习项目_包含变量定义条件判断循环结构函数编写列表字典操作等基础语法示例_适合零基础编程新手学习Python语法和开发环境的入门教程_.zip
- Python编程从入门到实践完整学习笔记_包含变量字符串函数类文件异常测试项目开发等基础知识_详细记录书籍每个章节的重点内容与代码示例_用于系统学习Python37语法并完成书中.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈


