<?php
/*
$Id: nusoap.php,v 1.75 2004/05/05 12:15:04 snichol Exp $
NuSOAP - Web Services Toolkit for PHP
Copyright (c) 2002 NuSphere Corporation
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
If you have any questions or comments, please email:
Dietrich Ayala
[email protected]
http://dietrich.ganx4.com/nusoap
NuSphere Corporation
http://www.nusphere.com
*/
/* load classes
// necessary classes
require_once('class.soapclient.php');
require_once('class.soap_val.php');
require_once('class.soap_parser.php');
require_once('class.soap_fault.php');
// transport classes
require_once('class.soap_transport_http.php');
// optional add-on classes
require_once('class.xmlschema.php');
require_once('class.wsdl.php');
// server class
require_once('class.soap_server.php');*/
/**
*
* nusoap_base
*
* @author Dietrich Ayala <[email protected]>
* @version $Id: nusoap.php,v 1.75 2004/05/05 12:15:04 snichol Exp $
* @access public
*/
class nusoap_base {
var $title = 'NuSOAP';
var $version = '0.6.7';
var $revision = '$Revision: 1.75 $';
var $error_str = false;
var $debug_str = '';
// toggles automatic encoding of special characters as entities
// (should always be true, I think)
var $charencoding = true;
/**
* set schema version
*
* @var XMLSchemaVersion
* @access public
*/
var $XMLSchemaVersion = 'http://www.w3.org/2001/XMLSchema';
/**
* set charset encoding for outgoing messages
*
* @var soap_defencoding
* @access public
*/
//var $soap_defencoding = 'UTF-8';
var $soap_defencoding = 'ISO-8859-1';
/**
* load namespace uris into an array of uri => prefix
*
* @var namespaces
* @access public
*/
var $namespaces = array(
'SOAP-ENV' => 'http://schemas.xmlsoap.org/soap/envelope/',
'xsd' => 'http://www.w3.org/2001/XMLSchema',
'xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
'SOAP-ENC' => 'http://schemas.xmlsoap.org/soap/encoding/',
'si' => 'http://soapinterop.org/xsd');
var $usedNamespaces = array();
/**
* load types into typemap array
* is this legacy yet?
* no, this is used by the xmlschema class to verify type => namespace mappings.
* @var typemap
* @access public
*/
var $typemap = array(
'http://www.w3.org/2001/XMLSchema' => array(
'string'=>'string','boolean'=>'boolean','float'=>'double','double'=>'double','decimal'=>'double',
'duration'=>'','dateTime'=>'string','time'=>'string','date'=>'string','gYearMonth'=>'',
'gYear'=>'','gMonthDay'=>'','gDay'=>'','gMonth'=>'','hexBinary'=>'string','base64Binary'=>'string',
// derived datatypes
'normalizedString'=>'string','token'=>'string','language'=>'','NMTOKEN'=>'','NMTOKENS'=>'','Name'=>'','NCName'=>'','ID'=>'',
'IDREF'=>'','IDREFS'=>'','ENTITY'=>'','ENTITIES'=>'','integer'=>'integer','nonPositiveInteger'=>'integer',
'negativeInteger'=>'integer','long'=>'integer','int'=>'integer','short'=>'integer','byte'=>'integer','nonNegativeInteger'=>'integer',
'unsignedLong'=>'','unsignedInt'=>'','unsignedShort'=>'','unsignedByte'=>'','positiveInteger'=>''),
'http://www.w3.org/1999/XMLSchema' => array(
'i4'=>'','int'=>'integer','boolean'=>'boolean','string'=>'string','double'=>'double',
'float'=>'double','dateTime'=>'string',
'timeInstant'=>'string','base64Binary'=>'string','base64'=>'string','ur-type'=>'array'),
'http://soapinterop.org/xsd' => array('SOAPStruct'=>'struct'),
'http://schemas.xmlsoap.org/soap/encoding/' => array('base64'=>'string','array'=>'array','Array'=>'array'),
'http://xml.apache.org/xml-soap' => array('Map')
);
/**
* entities to convert
*
* @var xmlEntities
* @access public
*/
var $xmlEntities = array('quot' => '"','amp' => '&',
'lt' => '<','gt' => '>','apos' => "'");
/**
* adds debug data to the class level debug string
*
* @param string $string debug data
* @access private
*/
function debug($string){
$this->debug_str .= get_class($this).": $string\n";
}
/**
* expands entities, e.g. changes '<' to '<'.
*
* @param string $val The string in which to expand entities.
* @access private
*/
function expandEntities($val) {
if ($this->charencoding) {
$val = str_replace('&', '&', $val);
$val = str_replace("'", ''', $val);
$val = str_replace('"', '"', $val);
$val = str_replace('<', '<', $val);
$val = str_replace('>', '>', $val);
}
return $val;
}
/**
* returns error string if present
*
* @return boolean $string error string
* @access public
*/
function getError(){
if($this->error_str != ''){
return $this->error_str;
}
return false;
}
/**
* sets error string
*
* @return boolean $string error string
* @access private
*/
function setError($str){
$this->error_str = $str;
}
/**
* detect if array is a simple array or a struct (associative array)
*
* @param $val The PHP array
* @return string (arraySimple|arrayStruct)
* @access private
*/
function isArraySimpleOrStruct($val) {
$keyList = array_keys($val);
foreach ($keyList as $keyListValue) {
if (!is_int($keyListValue)) {
return 'arrayStruct';
}
}
return 'arraySimple';
}
/**
* serializes PHP values in accordance w/ section 5. Type information is
* not serialized if $use == 'literal'.
*
* @return string
* @access public
*/
function serialize_val($val,$name=false,$type=false,$name_ns=false,$type_ns=false,$attributes=false,$use='encoded'){
if(is_object($val) && get_class($val) == 'soapval'){
return $val->serialize($use);
}
$this->debug( "in serialize_val: $val, $name, $type, $name_ns, $type_ns, $attributes, $use");
// if no name, use item
$name = (!$name|| is_numeric($name)) ? 'soapVal' : $name;
// if name has ns, add ns prefix to name
$xmlns = '';
if($name_ns){
$prefix = 'nu'.rand(1000,9999);
$name = $prefix.':'.$name;
$xmlns .= " xmlns:$prefix=\"$name_ns\"";
}
// if type is prefixed, create type prefix
if($type_ns != '' && $type_ns == $this->namespaces['xsd']){
// need to fix this. shouldn't default to xsd if no ns specified
// w/o checking against typemap
$type_prefix = 'xsd';
} elseif($type_ns){
$type_prefix = 'ns'.rand(1000,9999);
$xmlns .= " xmlns:$type_prefix=\"$type_ns\"";
}
// serialize attributes if present
$atts = '';
if($attributes){
foreach($attributes as $k => $v){
$atts .= " $k=\"$v\"";
}
}
// serialize if an xsd built-in primitive type
if($type != '' && isset($this->typemap[$this->XMLSchemaVersion][$type])){
if (is_bool($val)) {
if ($type == 'boolean') {
$val = $val ? 'true' : 'false';
} elseif (! $val) {
$val = 0;
}
} else if (is_string($val)) {
$val = $this->expandEntities($val);
}
if ($use == 'literal') {
return "<$name$xmlns>$val</$name>";
} else {
return "<$name$xmlns xsi:type=\"xsd:$type\">$val</$name>";
}
}
// detect type and serialize
$xml = '';
switch(true) {
case ($type == '' && is_null($val)):
if ($use == 'literal') {
// TODO: depends on nillable
$xml .= "<$name$xmlns/>";
} else {
$xml .= "<$name$xmlns xsi:nil=\"true\"/>";
}
break;
case (is_bool($val) || $type == 'boolean'):
if ($type == 'boolean') {
$
没有合适的资源?快使用搜索试试~ 我知道了~
3123大气全屏图表统计bootstrap后台模板5111_企业网站模板PHP整站源码.zip.7z
共2784个文件
gif:1039个
php:516个
css:417个
需积分: 0 0 下载量 52 浏览量
2023-08-01
17:25:20
上传
评论
收藏 3.06MB 7Z 举报
温馨提示
3123大气全屏图表统计bootstrap后台模板5111_企业网站模板PHP整站源码.zip.7z
资源推荐
资源详情
资源评论
收起资源包目录
3123大气全屏图表统计bootstrap后台模板5111_企业网站模板PHP整站源码.zip.7z (2784个子文件)
changelog 14KB
style.css 14KB
pe.css 13KB
style.css 7KB
style.css 7KB
style.css 7KB
style.css 7KB
style.css 6KB
style.css 6KB
style.css 6KB
style.css 5KB
style.css 5KB
style.css 5KB
common.css 4KB
productcontent_1.css 3KB
productcontent.css 3KB
member.css 3KB
newscontent_know.css 3KB
newscontent.css 3KB
newscontent_portal.css 3KB
productcontent_2.css 3KB
productcontent_blue.css 3KB
photocontent_blue.css 3KB
photocontent.css 3KB
A.css 2KB
style.css 2KB
productquery_2.css 2KB
productquery_3.css 2KB
K.css 2KB
B.css 2KB
A.css 2KB
C.css 2KB
N.css 2KB
F.css 2KB
J.css 2KB
H.css 2KB
G.css 2KB
D.css 2KB
O.css 2KB
L.css 2KB
M.css 2KB
E.css 2KB
P.css 2KB
I.css 2KB
productquery_4.css 2KB
productquery_5.css 2KB
productquery_1.css 2KB
photopollquery.css 2KB
B.css 2KB
C.css 2KB
N.css 2KB
K.css 2KB
M.css 2KB
H.css 2KB
D.css 2KB
P.css 2KB
I.css 2KB
L.css 2KB
J.css 2KB
G.css 2KB
O.css 2KB
C.css 2KB
D.css 2KB
M.css 2KB
B.css 2KB
H.css 2KB
N.css 2KB
G.css 2KB
I.css 2KB
P.css 2KB
J.css 2KB
O.css 2KB
L.css 2KB
A.css 2KB
A.css 2KB
productmember.css 2KB
E.css 2KB
E.css 2KB
K.css 2KB
productquery_6.css 2KB
F.css 2KB
F.css 2KB
B.css 2KB
M.css 2KB
K.css 2KB
C.css 2KB
H.css 2KB
N.css 2KB
D.css 2KB
I.css 2KB
J.css 2KB
L.css 2KB
P.css 2KB
O.css 2KB
G.css 2KB
A.css 2KB
E.css 2KB
photomember.css 2KB
newsquery_cap.css 2KB
F.css 2KB
共 2784 条
- 1
- 2
- 3
- 4
- 5
- 6
- 28
资源评论
qq_41146932
- 粉丝: 8
- 资源: 6308
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- vue自定义指令( 复制、拖动、权限)
- json格式文件备份redis数据库 工具
- Multi-Agent-Flocking.zip
- 指标公式未来函数检测工具V1.2
- projectData
- SQL Server 性能监视器,它旨在提供开箱即用的全面监控,并作为您自己的项目或应用程序的监控框架 它在本地数据库中收集性能
- Python 程序语言设计模式思路-并发模式:线程池模式:管理线程池,优化线程创建和销毁
- 股事汇投资工具-实时新闻、财经日历、市场快讯、持仓查询、外汇兑换、换算工具、大盘云图、江恩工具、指标检测等
- webrtc-streamer
- html+css+'青春献礼二十大 红色旅游助乡村'为主题的网页设计 2022年参与学校网页设计比赛时完成的
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功