globals.php
7.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<?php
/*
Copyright 2000, 2001, 2002, 2003, 2004, 2005 Dataprev - Empresa de Tecnologia e Informações da Previdência Social, Brasil
Este arquivo é parte do programa CACIC - Configurador Automático e Coletor de Informações Computacionais
O CACIC é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como
publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença, ou (na sua opnião) qualquer versão.
Este programa é distribuido na esperança que possa ser util, mas SEM NENHUMA GARANTIA; sem uma garantia implicita de ADEQUAÇÂO a qualquer
MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes.
Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software
Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
//
// +----------------------------------------------------------------------+
// | PHP Version 4 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2002 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.02 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available at through the world-wide-web at |
// | http://www.php.net/license/2_02.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Authors: Shane Caraveo <Shane@Caraveo.com> Port to PEAR and more |
// | Authors: Dietrich Ayala <dietrich@ganx4.com> Original Author |
// +----------------------------------------------------------------------+
//
// $Id: globals.php,v 1.10 2002/03/21 02:13:29 shane Exp $
//
/**
* Global variables and constants of the SOAP classes
*
* @module globals
* @package SOAP
* @version $Id: globals.php,v 1.10 2002/03/21 02:13:29 shane Exp $
* @author Shane Caraveo <Shane@Caraveo.com> Port to PEAR and more
* @author Dietrich Ayala <dietrich@ganx4.com> Original Author
*/
// make errors handle properly in windows (thx, thong@xmethods.com)
error_reporting(2039);
/**
* Enable debugging informations?
*
* @const SOAP_DEBUG
*/
define('SOAP_DEBUG', true);
if (!function_exists('version_compare') ||
version_compare(phpversion(), '4.1', '<')) {
die('requires PHP 4.1 or higher\n');
}
if (version_compare(phpversion(), '4.1', '>=') &&
version_compare(phpversion(), '4.2', '<')) {
define('FLOAT', 'double');
} else {
define('FLOAT', 'float');
}
# for float support
# is there a way to calculate INF for the platform?
define('INF', 1.8e307);
define('NAN', 0.0);
# define types for value
define('SOAP_VALUE_SCALAR', 1);
define('SOAP_VALUE_ARRAY', 2);
define('SOAP_VALUE_STRUCT', 3);
define('SOAP_LIBRARY_NAME', 'PEAR-SOAPx4 0.6');
// set schema version
define('SOAP_XML_SCHEMA_VERSION', 'http://www.w3.org/2001/XMLSchema');
define('SOAP_XML_SCHEMA_1999', 'http://www.w3.org/1999/XMLSchema');
define('SOAP_SCHEMA', 'http://schemas.xmlsoap.org/wsdl/SOAP/');
define('SOAP_SCHEMA_ENCODING', 'http://schemas.xmlsoap.org/SOAP/encoding/');
define('SOAP_ENVELOP', 'http://schemas.xmlsoap.org/SOAP/envelope/');
define('SOAP_INTEROPORG', 'http://soapinterop.org/xsd');
$SOAP_XMLSchema = array(SOAP_XML_SCHEMA_VERSION, SOAP_XML_SCHEMA_1999);
// load types into typemap array
/*
$SOAP_typemap['http://www.w3.org/2001/XMLSchema'] = array(
'string','boolean','float','double','decimal','duration','dateTime','time',
'date','gYearMonth','gYear','gMonthDay','gDay','gMonth','hexBinary','base64Binary',
// derived datatypes
'normalizedString','token','language','NMTOKEN','NMTOKENS','Name','NCName','ID',
'IDREF','IDREFS','ENTITY','ENTITIES','integer','nonPositiveInteger',
'negativeInteger','long','int','short','byte','nonNegativeInteger',
'unsignedLong','unsignedInt','unsignedShort','unsignedByte','positiveInteger');
$SOAP_typemap['http://www.w3.org/1999/XMLSchema'] = array(
'i4','int','boolean','string','double','float','dateTime',
'timeInstant','base64Binary','base64','ur-type');
$SOAP_typemap[SOAP_INTEROPORG] = array('SOAPStruct');
$SOAP_typemap[SOAP_SCHEMA_ENCODING] = array('base64','array','Array');
*/
$SOAP_typemap[SOAP_XML_SCHEMA_VERSION] = array(
'string' => 'string',
'boolean' => 'boolean',
'float' => FLOAT,
'double' => 'double',
'decimal' => 'integer',
'duration' => 'integer',
'dateTime' => 'string',
'time' => 'string',
'date' => 'string',
'gYearMonth' => 'integer',
'gYear' => 'integer',
'gMonthDay' => 'integer',
'gDay' => 'integer',
'gMonth' => 'integer',
'hexBinary' => 'string',
'base64Binary' => 'string',
// derived datatypes
'normalizedString' => 'string',
'token' => 'string',
'language' => 'string',
'NMTOKEN' => 'string',
'NMTOKENS' => 'string',
'Name' => 'string',
'NCName' => 'string',
'ID' => 'string',
'IDREF' => 'string',
'IDREFS' => 'string',
'ENTITY' => 'string',
'ENTITIES' => 'string',
'integer' => 'integer',
'nonPositiveInteger' => 'integer',
'negativeInteger' => 'integer',
'long' => 'integer',
'int' => 'integer',
'short' => 'integer',
'byte' => 'string',
'nonNegativeInteger' => 'integer',
'unsignedLong' => 'integer',
'unsignedInt' => 'integer',
'unsignedShort' => 'integer',
'unsignedByte' => 'integer',
'positiveInteger' => 'integer'
);
$SOAP_typemap[SOAP_XML_SCHEMA_1999] = array(
'i4' => 'integer',
'int' => 'integer',
'boolean' => 'boolean',
'string' => 'string',
'double' => 'double',
'float' => FLOAT,
'dateTime' => 'string',
'timeInstant' => 'string',
'base64Binary' => 'string',
'base64' => 'string',
'ur-type' => 'string'
);
$SOAP_typemap[SOAP_INTEROPORG] = array('SOAPStruct' => 'array');
$SOAP_typemap[SOAP_SCHEMA_ENCODING] = array('base64' => 'string','array' => 'array','Array' => 'array', 'Struct'=>'array');
// load namespace uris into an array of uri => prefix
$SOAP_namespaces = array(
SOAP_ENVELOP => 'SOAP-ENV',
SOAP_XML_SCHEMA_VERSION => 'xsd',
SOAP_XML_SCHEMA_VERSION.'-instance' => 'xsi',
SOAP_SCHEMA_ENCODING => 'SOAP-ENC',
SOAP_INTEROPORG=>'si');
$SOAP_xmlEntities = array('quot' => '"','amp' => '&',
'lt' => '<','gt' => '>','apos' => "'");
?>