Commit 88e471516f6d7047dad4fe427abf96e45122a305

Authored by Edmar Moretti
1 parent 1360763a

--no commit message

pacotes/SOAP/Transport/cvs/Entries
@@ -1,4 +0,0 @@ @@ -1,4 +0,0 @@
1 -/HTTP.php/1.1.1.1/Thu Jun 8 16:21:39 2006//  
2 -/SMTP.php/1.1.1.1/Thu Jun 8 16:21:39 2006//  
3 -/WS_FTP.LOG/1.1.1.1/Tue May 30 19:09:37 2006//  
4 -D  
pacotes/SOAP/Transport/cvs/Entries.Extra
@@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
1 -/HTTP.php////  
2 -/SMTP.php////  
3 -/WS_FTP.LOG////  
pacotes/SOAP/Transport/cvs/Entries.Extra.Old
pacotes/SOAP/Transport/cvs/Entries.Old
@@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
1 -/HTTP.php/1.1.1.1/Thu Jun 8 16:21:39 2006//  
2 -/SMTP.php/1.1.1.1/Thu Jun 8 16:21:39 2006//  
3 -/WS_FTP.LOG/1.1.1.1/Tue May 30 19:09:37 2006//  
pacotes/SOAP/Transport/cvs/Repository
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -apis/SOAP/Transport  
pacotes/SOAP/Transport/cvs/Root
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -:ssh;username=06292871800;password=1304034;hostname=10.1.1.65:/repositorio/sistemas  
pacotes/SOAP/Transport/http.php
@@ -1,298 +0,0 @@ @@ -1,298 +0,0 @@
1 -<?php  
2 -//  
3 -// +----------------------------------------------------------------------+  
4 -// | PHP Version 4 |  
5 -// +----------------------------------------------------------------------+  
6 -// | Copyright (c) 1997-2002 The PHP Group |  
7 -// +----------------------------------------------------------------------+  
8 -// | This source file is subject to version 2.02 of the PHP license, |  
9 -// | that is bundled with this package in the file LICENSE, and is |  
10 -// | available at through the world-wide-web at |  
11 -// | http://www.php.net/license/2_02.txt. |  
12 -// | If you did not receive a copy of the PHP license and are unable to |  
13 -// | obtain it through the world-wide-web, please send a note to |  
14 -// | license@php.net so we can mail you a copy immediately. |  
15 -// +----------------------------------------------------------------------+  
16 -// | Authors: Shane Caraveo <Shane@Caraveo.com> |  
17 -// +----------------------------------------------------------------------+  
18 -//  
19 -// $Id: HTTP.php,v 1.1.1.2 2006/06/08 14:56:40 06292871800 Exp $  
20 -//  
21 -  
22 -require_once 'SOAP/globals.php';  
23 -require_once 'SOAP/Base.php';  
24 -  
25 -/**  
26 -* HTTP Transport for SOAP  
27 -*  
28 -* @access public  
29 -* @version $Id: HTTP.php,v 1.1.1.2 2006/06/08 14:56:40 06292871800 Exp $  
30 -* @package SOAP::Transport::HTTP  
31 -* @author Shane Caraveo <shane@php.net>  
32 -*/  
33 -class SOAP_Transport_HTTP extends SOAP_Base  
34 -{  
35 -  
36 - /**  
37 - * Basic Auth string  
38 - *  
39 - * @var string  
40 - */  
41 - var $credentials = '';  
42 -  
43 - /**  
44 - *  
45 - * @var int connection timeout in seconds - 0 = none  
46 - */  
47 - var $timeout = 4;  
48 -  
49 - /**  
50 - * Error number  
51 - *  
52 - * @var int  
53 - */  
54 - var $errno = 0;  
55 -  
56 - /**  
57 - * Error message  
58 - *  
59 - * @var string  
60 - */  
61 - var $errmsg = '';  
62 -  
63 - /**  
64 - * Array containing urlparts - parse_url()  
65 - *  
66 - * @var mixed  
67 - */  
68 - var $urlparts = NULL;  
69 -  
70 - /**  
71 - * Connection endpoint - URL  
72 - *  
73 - * @var string  
74 - */  
75 - var $url = '';  
76 -  
77 - /**  
78 - * Incoming payload  
79 - *  
80 - * @var string  
81 - */  
82 - var $incoming_payload = '';  
83 -  
84 - /**  
85 - * HTTP-Request User-Agent  
86 - *  
87 - * @var string  
88 - */  
89 - var $_userAgent = SOAP_LIBRARY_NAME;  
90 -  
91 - /**  
92 - * SOAP_Transport_HTTP Constructor  
93 - *  
94 - * @param string $URL http url to soap endpoint  
95 - *  
96 - * @access public  
97 - */  
98 - function SOAP_Transport_HTTP($URL)  
99 - {  
100 - parent::SOAP_Base('HTTP');  
101 - $this->urlparts = @parse_url($URL);  
102 - $this->url = $URL;  
103 - }  
104 -  
105 - /**  
106 - * send and receive soap data  
107 - *  
108 - * @param string &$msg outgoing post data  
109 - * @param string $action SOAP Action header data  
110 - * @param int $timeout socket timeout, default 0 or off  
111 - *  
112 - * @return string|fault response  
113 - * @access public  
114 - */  
115 - function &send(&$msg, $action = '', $timeout = 0)  
116 - {  
117 - if (!$this->_validateUrl()) {  
118 - return $this->raiseSoapFault($this->errmsg);  
119 - }  
120 -  
121 - if ($timeout)  
122 - $this->timeout = $timeout;  
123 -  
124 - if (strcasecmp($this->urlparts['scheme'], 'HTTP') == 0) {  
125 - return $this->_sendHTTP($msg, $action);  
126 - } else if (strcasecmp($this->urlparts['scheme'], 'HTTPS') == 0) {  
127 - return $this->_sendHTTPS($msg, $action);  
128 - }  
129 -  
130 - return $this->raiseSoapFault('Invalid url scheme '.$this->url);  
131 - }  
132 -  
133 - /**  
134 - * set data for http authentication  
135 - * creates Authorization header  
136 - *  
137 - * @param string $username username  
138 - * @param string $password response data, minus http headers  
139 - *  
140 - * @return none  
141 - * @access public  
142 - */  
143 - function setCredentials($username, $password)  
144 - {  
145 - $this->credentials = 'Authorization: Basic ' . base64_encode($username . ':' . $password) . "\r\n";  
146 - }  
147 -  
148 - // private members  
149 -  
150 - /**  
151 - * validate url data passed to constructor  
152 - *  
153 - * @return boolean  
154 - * @access private  
155 - */  
156 - function _validateUrl()  
157 - {  
158 - if ( ! is_array($this->urlparts) ) {  
159 - $this->errno = 2;  
160 - $this->errmsg = "Unable to parse URL $url";  
161 - return FALSE;  
162 - }  
163 - if (!isset($this->urlparts['host'])) {  
164 - $this->errmsg = "No host in URL $url";  
165 - return FALSE;  
166 - }  
167 - if (!isset($this->urlparts['port'])) {  
168 -  
169 - if (strcasecmp($this->urlparts['scheme'], 'HTTP') == 0)  
170 - $this->urlparts['port'] = 80;  
171 - else if (strcasecmp($this->urlparts['scheme'], 'HTTPS') == 0)  
172 - $this->urlparts['port'] = 443;  
173 -  
174 - }  
175 - if (isset($this->urlparts['user'])) {  
176 - $this->setCredentials($this->urlparts['user'], $this->urlparts['password']);  
177 - }  
178 -  
179 - return TRUE;  
180 - }  
181 -  
182 - /**  
183 - * remove http headers from response  
184 - *  
185 - * @return boolean  
186 - * @access private  
187 - */  
188 - function _parseResponse()  
189 - {  
190 - if (preg_match("/^(.*?)\r?\n\r?\n(.*)/s", $this->incoming_payload, $match)) {  
191 - $this->response = preg_replace("/[\r|\n]/", '', $match[2]);  
192 - // if no content, return false  
193 - return strlen($this->response) > 0;  
194 - }  
195 - return FALSE;  
196 - }  
197 -  
198 - /**  
199 - * create http request, including headers, for outgoing request  
200 - *  
201 - * @return string outgoing_payload  
202 - * @access private  
203 - */  
204 - function &_getRequest(&$msg, $action)  
205 - {  
206 - $this->outgoing_payload =  
207 - "POST {$this->urlparts['path']} HTTP/1.0\r\n".  
208 - "User-Agent: {$this->_userAgent}\r\n".  
209 - "Host: {$this->urlparts['host']}\r\n".  
210 - $this->credentials.  
211 - "Content-Type: text/xml\r\n".  
212 - "Content-Length: ".strlen($msg)."\r\n".  
213 - "SOAPAction: \"$action\"\r\n\r\n".  
214 - $msg;  
215 - return $this->outgoing_payload;  
216 - }  
217 -  
218 - /**  
219 - * send outgoing request, and read/parse response  
220 - *  
221 - * @param string &$msg outgoing SOAP package  
222 - * @param string $action SOAP Action  
223 - *  
224 - * @return string &$response response data, minus http headers  
225 - * @access private  
226 - */  
227 - function &_sendHTTP(&$msg, $action = '')  
228 - {  
229 - $this->_getRequest($msg, $action);  
230 -  
231 - // send  
232 - if ($this->timeout > 0) {  
233 - $fp = fsockopen($this->urlparts['host'], $this->urlparts['port'], $this->errno, $this->errmsg, $this->timeout);  
234 - } else {  
235 - $fp = fsockopen($this->urlparts['host'], $this->urlparts['port'], $this->errno, $this->errmsg);  
236 - }  
237 - if (!$fp) {  
238 - $this->errmsg = "Unable to connect to {$this->urlparts['host']}:{$this->urlparts['port']}";  
239 - return $this->raiseSoapFault($this->errmsg);  
240 - }  
241 - if (!fputs($fp, $this->outgoing_payload, strlen($this->outgoing_payload))) {  
242 - $this->errmsg = "Error POSTing Data to {$this->urlparts['host']}";  
243 - return $this->raiseSoapFault($this->errmsg);  
244 - }  
245 -  
246 - // get reponse  
247 - while ($data = fread($fp, 32768)) {  
248 - $this->incoming_payload .= $data;  
249 - }  
250 -  
251 - fclose($fp);  
252 -  
253 - if (!$this->_parseResponse()) {  
254 - $this->errmsg = 'Invalid HTTP Response';  
255 - return $this->raiseSoapFault($this->errmsg, $this->outgoing_payload."\n\n".$this->incoming_payload);  
256 - }  
257 - return $this->response;  
258 - }  
259 -  
260 - /**  
261 - * send outgoing request, and read/parse response, via HTTPS  
262 - *  
263 - * @param string &$msg outgoing SOAP package  
264 - * @param string $action SOAP Action  
265 - *  
266 - * @return string &$response response data, minus http headers  
267 - * @access private  
268 - */  
269 - function &_sendHTTPS(&$msg, $action)  
270 - {  
271 - /* NOTE This function uses the CURL functions  
272 - * Your php must be compiled with CURL  
273 - */  
274 - if (!extension_loaded('php_curl')) {  
275 - $this->errno = -1;  
276 - $this->errmsg = 'CURL Extension is required for HTTPS';  
277 - return $this->raiseSoapFault($this->errmsg);  
278 - }  
279 -  
280 - $this->_getRequest($msg, $action);  
281 -  
282 - $ch = curl_init();  
283 - if ($this->timeout) {  
284 - curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout); //times out after 4s  
285 - }  
286 - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->outgoing_payload);  
287 - curl_setopt($ch, CURLOPT_URL, $this->url);  
288 - curl_setopt($ch, CURLOPT_FAILONERROR, 1);  
289 - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);  
290 - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);  
291 - curl_setopt($ch, CURLOPT_VERBOSE, 1);  
292 - $this->response = curl_exec($ch);  
293 - curl_close($ch);  
294 -  
295 - return $this->response;  
296 - }  
297 -} // end SOAP_Transport_HTTP  
298 -?>  
pacotes/SOAP/Transport/smtp.php
@@ -1,150 +0,0 @@ @@ -1,150 +0,0 @@
1 -<?php  
2 -//  
3 -// +----------------------------------------------------------------------+  
4 -// | PHP Version 4 |  
5 -// +----------------------------------------------------------------------+  
6 -// | Copyright (c) 1997-2002 The PHP Group |  
7 -// +----------------------------------------------------------------------+  
8 -// | This source file is subject to version 2.02 of the PHP license, |  
9 -// | that is bundled with this package in the file LICENSE, and is |  
10 -// | available at through the world-wide-web at |  
11 -// | http://www.php.net/license/2_02.txt. |  
12 -// | If you did not receive a copy of the PHP license and are unable to |  
13 -// | obtain it through the world-wide-web, please send a note to |  
14 -// | license@php.net so we can mail you a copy immediately. |  
15 -// +----------------------------------------------------------------------+  
16 -// | Authors: Shane Caraveo <Shane@Caraveo.com> |  
17 -// +----------------------------------------------------------------------+  
18 -//  
19 -// $Id: SMTP.php,v 1.1.1.2 2006/06/08 14:56:40 06292871800 Exp $  
20 -//  
21 -// Status: rough draft, untested  
22 -//  
23 -// TODO:  
24 -// switch to pear mail stuff  
25 -// smtp authentication  
26 -// smtp ssl support  
27 -// ability to define smtp options (encoding, from, etc.)  
28 -//  
29 -  
30 -require_once 'SOAP/globals.php';  
31 -require_once 'SOAP/Message.php';  
32 -require_once 'SOAP/Base.php';  
33 -  
34 -/**  
35 -* SMTP Transport for SOAP  
36 -*  
37 -* @access public  
38 -* @version $Id: SMTP.php,v 1.1.1.2 2006/06/08 14:56:40 06292871800 Exp $  
39 -* @package SOAP::Transport::SMTP  
40 -* @author Shane Caraveo <shane@php.net>  
41 -*/  
42 -class SOAP_Transport_SMTP extends SOAP_Base  
43 -{  
44 - var $credentials = '';  
45 - var $timeout = 4; // connect timeout  
46 - var $errno = 0;  
47 - var $errmsg = '';  
48 - var $urlparts = NULL;  
49 - var $url = '';  
50 - var $incoming_payload = '';  
51 - var $_userAgent = SOAP_LIBRARY_NAME;  
52 -  
53 - /**  
54 - * SOAP_Transport_SMTP Constructor  
55 - *  
56 - * @param string $URL mailto:address  
57 - *  
58 - * @access public  
59 - */  
60 - function SOAP_Transport_SMTP($URL)  
61 - {  
62 - parent::SOAP_Base('SMTP');  
63 - $this->urlparts = @parse_url($URL);  
64 - $this->url = $URL;  
65 - }  
66 -  
67 - /**  
68 - * send and receive soap data  
69 - *  
70 - * @param string &$msg outgoing post data  
71 - * @param string $action SOAP Action header data  
72 - * @param int $timeout socket timeout, default 0 or off  
73 - *  
74 - * @return string &$response response data, minus http headers  
75 - * @access public  
76 - */  
77 - function send(&$msg, $action = '', $timeout = 0)  
78 - {  
79 - if (!$this->_validateUrl()) {  
80 - return $this->raiseSoapFault($this->errmsg);  
81 - }  
82 -  
83 - $headers = "From: $action\n".  
84 - "X-Mailer: $this->_userAgent\n".  
85 - "MIME-Version: 1.0\n".  
86 - "Content-Type: text/xml; charset=\"utf-8\"\n".  
87 - "Content-Transfer-Encoding: quoted-printable\n";  
88 - $subject = 'SOAP Message';  
89 -  
90 - # we want to return a proper XML message  
91 - $result = mail($this->urlparts['path'], $subject, $msg, $headers);  
92 -  
93 - if ($result) {  
94 - $val = new SOAP_Value('return','boolean',TRUE);  
95 - } else {  
96 - $val = new SOAP_Value('Fault','struct',array(  
97 - new SOAP_Value('faultcode','string','SOAP-ENV:Transport:SMTP'),  
98 - new SOAP_Value('faultstring','string',"couldn't send message to $action")  
99 - ));  
100 - }  
101 -  
102 - $return_msg = new SOAP_Message('Response',array($val),'smtp');  
103 - $response = $return_msg->serialize();  
104 -  
105 - return $result;  
106 - }  
107 -  
108 - /**  
109 - * set data for http authentication  
110 - * creates Authorization header  
111 - *  
112 - * @param string $username username  
113 - * @param string $password response data, minus http headers  
114 - *  
115 - * @return none  
116 - * @access public  
117 - */  
118 - function setCredentials($username, $password)  
119 - {  
120 - $this->username = $username;  
121 - $this->password = $password;  
122 - }  
123 -  
124 - // private members  
125 -  
126 - /**  
127 - * validate url data passed to constructor  
128 - *  
129 - * @return boolean  
130 - * @access private  
131 - */  
132 - function _validateUrl()  
133 - {  
134 - if ( ! is_array($this->urlparts) ) {  
135 - $this->errno = 2;  
136 - $this->errmsg = "Unable to parse URL $url";  
137 - return FALSE;  
138 - }  
139 - if (!isset($this->urlparts['scheme']) ||  
140 - strcasecmp($this->urlparts['scheme'], 'mailto') != 0) {  
141 - return FALSE;  
142 - }  
143 - if (!isset($this->urlparts['path'])) {  
144 - return FALSE;  
145 - }  
146 - return TRUE;  
147 - }  
148 -  
149 -} // end SOAP_Transport_HTTP  
150 -?>  
pacotes/SOAP/Transport/ws_ftp.log
@@ -1,2 +0,0 @@ @@ -1,2 +0,0 @@
1 -104.04.29 17:57 B R:\mma\webservice\SOAP\Transport\HTTP.php --> 200.175.128.131 /var/www/default/AppServer/Mauricio/ws_delphi/SOAP/Transport HTTP.php  
2 -104.04.29 17:57 B R:\mma\webservice\SOAP\Transport\SMTP.php --> 200.175.128.131 /var/www/default/AppServer/Mauricio/ws_delphi/SOAP/Transport SMTP.php  
pacotes/SOAP/Type/cvs/Entries
@@ -1,5 +0,0 @@ @@ -1,5 +0,0 @@
1 -/dateTime.php/1.1.1.1/Thu Jun 8 16:21:39 2006//  
2 -/WS_FTP.LOG/1.1.1.1/Tue May 30 19:09:37 2006//  
3 -/duration.php/1.1.1.1/Tue May 30 19:09:38 2006//  
4 -/hexBinary.php/1.1.1.1/Thu Jun 8 16:21:39 2006//  
5 -D  
pacotes/SOAP/Type/cvs/Entries.Extra
@@ -1,4 +0,0 @@ @@ -1,4 +0,0 @@
1 -/dateTime.php////  
2 -/WS_FTP.LOG////  
3 -/duration.php////  
4 -/hexBinary.php////  
pacotes/SOAP/Type/cvs/Entries.Extra.Old
pacotes/SOAP/Type/cvs/Entries.Old
@@ -1,4 +0,0 @@ @@ -1,4 +0,0 @@
1 -/dateTime.php/1.1.1.1/Thu Jun 8 16:21:39 2006//  
2 -/WS_FTP.LOG/1.1.1.1/Tue May 30 19:09:37 2006//  
3 -/duration.php/1.1.1.1/Tue May 30 19:09:38 2006//  
4 -/hexBinary.php/1.1.1.1/Thu Jun 8 16:21:39 2006//  
pacotes/SOAP/Type/cvs/Repository
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -apis/SOAP/Type  
pacotes/SOAP/Type/cvs/Root
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -:ssh;username=06292871800;password=1304034;hostname=10.1.1.65:/repositorio/sistemas  
pacotes/SOAP/Type/dateTime.php
@@ -1,154 +0,0 @@ @@ -1,154 +0,0 @@
1 -<?php  
2 -//  
3 -// +----------------------------------------------------------------------+  
4 -// | PHP Version 4 |  
5 -// +----------------------------------------------------------------------+  
6 -// | Copyright (c) 1997-2002 The PHP Group |  
7 -// +----------------------------------------------------------------------+  
8 -// | This source file is subject to version 2.02 of the PHP license, |  
9 -// | that is bundled with this package in the file LICENSE, and is |  
10 -// | available at through the world-wide-web at |  
11 -// | http://www.php.net/license/2_02.txt. |  
12 -// | If you did not receive a copy of the PHP license and are unable to |  
13 -// | obtain it through the world-wide-web, please send a note to |  
14 -// | license@php.net so we can mail you a copy immediately. |  
15 -// +----------------------------------------------------------------------+  
16 -// | Authors: Shane Caraveo <Shane@Caraveo.com> Port to PEAR and more |  
17 -// | Authors: Dietrich Ayala <dietrich@ganx4.com> Original Author |  
18 -// +----------------------------------------------------------------------+  
19 -//  
20 -// $Id: dateTime.php,v 1.1.1.2 2006/06/08 14:56:40 06292871800 Exp $  
21 -//  
22 -class SOAP_Type_dateTime  
23 -{  
24 - var $ereg_iso8601 = '(-?[0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(\.[0-9]*)?(Z|[+\-][0-9]{4}|[+\-][0-9]{2}:[0-9]{2})?';  
25 - #"(-?[0-9]{4})-". // centuries & years CCYY-  
26 - #"([0-9]{2})-". // months MM-  
27 - #"([0-9]{2})". // days DD  
28 - #"T". // separator T  
29 - #"([0-9]{2}):". // hours hh:  
30 - #"([0-9]{2}):". // minutes mm:  
31 - #"([0-9]{2})(\.[0-9]*)?". // seconds ss.ss...  
32 - #"(Z|[+\-][0-9]{4}|[+\-][0-9]{2}:[0-9]{2})?"; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's  
33 - # if no 8th reg (Z) assumes UTC  
34 - var $timestamp = -1;  
35 -  
36 - function SOAP_Type_dateTime($date = -1)  
37 - {  
38 - if ($date == -1) $date = time();  
39 -  
40 - if (gettype($date) == 'integer') {  
41 - $this->timestamp = $date;  
42 - } else {  
43 - $this->timestamp = $this->toUnixtime($date);  
44 - }  
45 - }  
46 -  
47 - function toSOAP($date = NULL)  
48 - {  
49 - return $this->toUTC($date);  
50 - }  
51 -  
52 - function toString($timestamp = 0)  
53 - {  
54 - if (!$timestamp) $timestamp = $this->timestamp;  
55 - if ($timestamp < 0) return 0;  
56 -  
57 - return date('Y-m-d\TH:i:sO',$timestamp);  
58 - }  
59 -  
60 - function _split($datestr)  
61 - {  
62 - if (!$datestr)  
63 - $datestr = $this->toString();  
64 - else if (gettype($datestr) == 'integer')  
65 - $datestr = $this->toString($datestr);  
66 -  
67 - if (ereg($this->ereg_iso8601,$datestr,$regs)) {  
68 - if ($regs[8] != '' && $regs[8] != 'Z') {  
69 - $op = substr($regs[8],0,1);  
70 - $h = substr($regs[8],1,2);  
71 - if (strstr($regs[8],':')) {  
72 - $m = substr($regs[8],4,2);  
73 - } else {  
74 - $m = substr($regs[8],3,2);  
75 - }  
76 - if ($op == '+') {  
77 - $regs[4] = $regs[4] - $h;  
78 - if ($regs[4] < 0) $regs[4] += 24;  
79 - $regs[5] = $regs[5] - $m;  
80 - if ($regs[5] < 0) $regs[5] += 60;  
81 - } else {  
82 - $regs[4] = $regs[4] + $h;  
83 - if ($regs[4] > 23) $regs[4] -= 24;  
84 - $regs[5] = $regs[5] + $m;  
85 - if ($regs[5] > 59) $regs[5] -= 60;  
86 - }  
87 - }  
88 - return $regs;  
89 - }  
90 - return FALSE;  
91 - }  
92 -  
93 - function toUTC($datestr = NULL)  
94 - {  
95 - $regs = $this->_split($datestr);  
96 -  
97 - if ($regs) {  
98 - return sprintf('%04d-%02d-%02dT%02d:%02d:%02dZ',$regs[1],$regs[2],$regs[3],$regs[4],$regs[5],$regs[6]);  
99 - }  
100 -  
101 - return '';  
102 - }  
103 -  
104 - function toUnixtime($datestr = NULL)  
105 - {  
106 - $regs = $this->_split($datestr);  
107 - if ($regs) {  
108 - return strtotime("$regs[1]-$regs[2]-$regs[3] $regs[4]:$regs[5]:$regs[6]Z");  
109 - }  
110 - return -1;  
111 - }  
112 -  
113 - function compare($date1, $date2 = NULL)  
114 - {  
115 - if ($date2 === null) {  
116 - $date2 = $date1;  
117 - $date1 = $this->timestamp;  
118 - }  
119 - if (!is_numeric($date1))  
120 - $date1 = $this->toUnixtime($date1);  
121 - if (!is_numeric($date2))  
122 - $date2 = $this->toUnixtime($date2);  
123 - if ($date1 != -1 && $date2 != -1) return $date1 - $date2;  
124 - return -1;  
125 - }  
126 -  
127 - function _test($orig = '2001-04-25T09:31:41-0700')  
128 - {  
129 - $utc = $this->toUTC($orig);  
130 - $ts1 = $this->toUnixtime($orig);  
131 - $ts2 = $this->toUnixtime($utc);  
132 - $b1 = $this->toString($ts1);  
133 - $b2 = $this->toString($ts2);  
134 - print "orig: $orig\n";  
135 - print "orig toUTC: $utc\n";  
136 - print "orig ts: $ts1\n";  
137 - print "utc ts: $ts2\n";  
138 - print "orig ts back: $b1\n";  
139 - print "utc ts back: $b2\n";  
140 - if ($b1 != $orig || $b2 != $orig) {  
141 - echo "Error in iso8601 conversions\n";  
142 - } else {  
143 - echo "dateTime OK\n";  
144 - }  
145 - }  
146 -}  
147 -  
148 -# these should all match  
149 -#$d = new SOAP_Type_dateTime();  
150 -#echo $d->compare("2001-04-25T20:31:41Z","2001-04-25T20:31:41Z")."\n";  
151 -#echo $d->compare("2001-04-25T20:31:41Z","2001-04-25T12:31:41-0800")."\n";  
152 -#echo $d->compare("2001-04-25T20:31:41Z","2001-04-25T12:31:41-08:00")."\n";  
153 -  
154 -?>  
155 \ No newline at end of file 0 \ No newline at end of file
pacotes/SOAP/Type/duration.php
@@ -1,165 +0,0 @@ @@ -1,165 +0,0 @@
1 -<?php  
2 -/*  
3 -http://www.w3.org/TR/xmlschema-2/  
4 -  
5 -[Definition:] duration represents a duration of time. The value space of  
6 -duration is a six-dimensional space where the coordinates designate the  
7 -Gregorian year, month, day, hour, minute, and second components  
8 -defined in 5.5.3.2 of [ISO 8601], respectively. These components are  
9 -ordered in their significance by their order of appearance i.e. as year,  
10 -month, day, hour, minute, and second.  
11 -  
12 -3.2.6.1 Lexical representation  
13 -The lexical representation for duration is the [ISO 8601] extended  
14 -format PnYn MnDTnH nMnS, where nY represents the number of  
15 -years, nM the number of months, nD the number of days, 'T' is the  
16 -date/time separator, nH the number of hours, nM the number of  
17 -minutes and nS the number of seconds. The number of seconds  
18 -can include decimal digits to arbitrary precision.  
19 -  
20 -The values of the Year, Month, Day, Hour and Minutes components  
21 -are not restricted but allow an arbitrary integer. Similarly, the  
22 -value of the Seconds component allows an arbitrary decimal.  
23 -Thus, the lexical representation of duration does not follow the  
24 -alternative format of 5.5.3.2.1 of [ISO 8601].  
25 -  
26 -An optional preceding minus sign ('-') is allowed, to indicate a  
27 -negative duration. If the sign is omitted a positive duration is  
28 -indicated. See also ISO 8601 Date and Time Formats (D).  
29 -  
30 -For example, to indicate a duration of 1 year, 2 months, 3 days,  
31 -10 hours, and 30 minutes, one would write: P1Y2M3DT10H30M.  
32 -One could also indicate a duration of minus 120 days as: -P120D.  
33 -  
34 -Reduced precision and truncated representations of this format  
35 -are allowed provided they conform to the following:  
36 -  
37 -If the number of years, months, days, hours, minutes, or seconds  
38 -in any expression equals zero, the number and its corresponding  
39 -designator *may* be omitted. However, at least one number and  
40 -its designator *must* be present.  
41 -The seconds part *may* have a decimal fraction.  
42 -The designator 'T' shall be absent if all of the time items are absent.  
43 -The designator 'P' must always be present.  
44 -For example, P1347Y, P1347M and P1Y2MT2H are all allowed; P0Y1347M  
45 -and P0Y1347M0D are allowed. P-1347M is not allowed although -P1347M  
46 -is allowed. P1Y2MT is not allowed.  
47 -  
48 -*/  
49 -  
50 -/* this is only an aproximation of duration, more work still to do.  
51 - see above schema url for more info on duration  
52 -  
53 - TODO: figure out best aproximation for year and month conversion to seconds  
54 -*/  
55 -  
56 -$ereg_duration = '(-)?P([0-9]+Y)?([0-9]+M)?([0-9]+D)?T?([0-9]+H)?([0-9]+M)?([0-9]+S)?';  
57 -class SOAP_Type_duration  
58 -{  
59 - // format PnYnMnDTnHnMnS  
60 - function unix_to_duration($seconds) {  
61 - return SOAP_Type_duration::getduration($seconds);  
62 - }  
63 -  
64 - function mod($a, $b, &$d, &$r) {  
65 - $d = floor( $a / $b );  
66 - $r = $a % $b;  
67 - }  
68 -  
69 - function getduration($seconds) {  
70 - $neg = '';  
71 - if ($seconds < 0) {  
72 - $neg = '-';  
73 - $seconds = $seconds * -1;  
74 - }  
75 -  
76 - $_mi = 60;  
77 - $_h = $_mi * 60;  
78 - $_d = $_h * 24;  
79 - // XXX how do we properly handle month and year values?  
80 - $_m = $_d * 30;  
81 - $_y = $_d * 365;  
82 -  
83 - SOAP_Type_duration::mod($seconds, $_y, $y, $seconds);  
84 - SOAP_Type_duration::mod($seconds, $_m, $m, $seconds);  
85 - SOAP_Type_duration::mod($seconds, $_d, $d, $seconds);  
86 - SOAP_Type_duration::mod($seconds, $_h, $h, $seconds);  
87 - SOAP_Type_duration::mod($seconds, $_mi, $mi, $s);  
88 -  
89 - $duration = $neg.'P';  
90 - if ($y) $duration .= $y.'Y';  
91 - if ($m) $duration .= $m.'M';  
92 - if ($d) $duration .= $d.'D';  
93 - if ($h || $mi || $s) $duration .='T';  
94 - if ($h) $duration .= $h.'H';  
95 - if ($mi) $duration .= $mi.'M';  
96 - if ($s) $duration .= $s.'S';  
97 - if ($duration == 'P' || $duration == '-P') $duration = 'PT0S';  
98 - return $duration;  
99 - }  
100 -  
101 - function mkduration($n, $Y, $Mo, $D, $H, $Mi, $S) {  
102 - $_mi = 60;  
103 - $_h = $_mi * 60;  
104 - $_d = $_h * 24;  
105 - // XXX how do we properly handle month and year values?  
106 - $_m = $_d * 30;  
107 - $_y = $_d * 365;  
108 -  
109 - $sec = $Y * $_y + $Mo * $_m + $D * $_d + $H * $_h + $Mi * $_mi + $S;  
110 - if ($n == '-') $sec = $sec * -1;  
111 - return $sec;  
112 - }  
113 -  
114 - function duration_to_unix($duration) {  
115 - global $ereg_duration;  
116 - if (ereg($ereg_duration,$duration,$regs)) {  
117 - return SOAP_Type_duration::mkduration($regs[1], $regs[2], $regs[3], $regs[4], $regs[5], $regs[6], $regs[7]);  
118 - }  
119 - return FALSE;  
120 - }  
121 -  
122 - function is_duration($duration) {  
123 - global $ereg_duration;  
124 - return ereg($ereg_duration,$duration,$regs);  
125 - }  
126 -  
127 - function _test($time) {  
128 - if (SOAP_Type_duration::is_duration($time)) {  
129 - $t = SOAP_Type_duration::duration_to_unix($time);  
130 - echo "Duration: $time is ".$t." seconds\n";  
131 - } else {  
132 - $t = SOAP_Type_duration::unix_to_duration($time);  
133 - echo "Seconds: $time is ".$t." duration\n";  
134 - }  
135 - return $t;  
136 - }  
137 -  
138 - function add($d1, $d2) {  
139 - $s1 = SOAP_Type_duration::duration_to_unix($d1);  
140 - $s2 = SOAP_Type_duration::duration_to_unix($d2);  
141 - return SOAP_Type_duration::unix_to_duration($s1 + $s2);  
142 - }  
143 -  
144 - function subtract($d1, $d2) {  
145 - $s1 = SOAP_Type_duration::duration_to_unix($d1);  
146 - $s2 = SOAP_Type_duration::duration_to_unix($d2);  
147 - return SOAP_Type_duration::unix_to_duration($s1 - $s2);  
148 - }  
149 -  
150 -}  
151 -  
152 -/* tests */  
153 -  
154 -$t = SOAP_Type_duration::_test('P1Y2M3DT10H30M');  
155 -SOAP_Type_duration::_test($t);  
156 -$t = SOAP_Type_duration::_test('-P120D');  
157 -SOAP_Type_duration::_test($t);  
158 -  
159 -// duration since 1970  
160 -$t = SOAP_Type_duration::_test(time());  
161 -SOAP_Type_duration::_test($t);  
162 -  
163 -print "Add should be PT0S: ".SOAP_Type_duration::add('-P120D','P4M')."\n";  
164 -print "Subtract should be PT0S: ".SOAP_Type_duration::subtract('P120D','P4M')."\n";  
165 -?>  
166 \ No newline at end of file 0 \ No newline at end of file
pacotes/SOAP/Type/hexBinary.php
@@ -1,46 +0,0 @@ @@ -1,46 +0,0 @@
1 -<?php  
2 -//  
3 -// +----------------------------------------------------------------------+  
4 -// | PHP Version 4 |  
5 -// +----------------------------------------------------------------------+  
6 -// | Copyright (c) 1997-2002 The PHP Group |  
7 -// +----------------------------------------------------------------------+  
8 -// | This source file is subject to version 2.02 of the PHP license, |  
9 -// | that is bundled with this package in the file LICENSE, and is |  
10 -// | available at through the world-wide-web at |  
11 -// | http://www.php.net/license/2_02.txt. |  
12 -// | If you did not receive a copy of the PHP license and are unable to |  
13 -// | obtain it through the world-wide-web, please send a note to |  
14 -// | license@php.net so we can mail you a copy immediately. |  
15 -// +----------------------------------------------------------------------+  
16 -// | Authors: Shane Caraveo <Shane@Caraveo.com> Port to PEAR and more |  
17 -// | Authors: Dietrich Ayala <dietrich@ganx4.com> Original Author |  
18 -// +----------------------------------------------------------------------+  
19 -//  
20 -// $Id: hexBinary.php,v 1.1.1.2 2006/06/08 14:56:40 06292871800 Exp $  
21 -//  
22 -class SOAP_Type_hexBinary  
23 -{  
24 - function to_bin($value)  
25 - {  
26 - $len = strlen($value);  
27 - return pack('H' . $len, $value);  
28 - }  
29 - function to_hex($value)  
30 - {  
31 - return bin2hex($value);  
32 - }  
33 - function is_hexbin($value)  
34 - {  
35 - # first see if there are any invalid chars  
36 - $l = strlen($value);  
37 -  
38 - if ($l < 1 || strspn($value, '0123456789ABCDEFabcdef') != $l) return FALSE;  
39 -  
40 - $bin = SOAP_Type_hexBinary::to_bin($value);  
41 - $hex = SOAP_Type_hexBinary::to_hex($bin);  
42 - return strcasecmp($value, $hex) == 0;  
43 - }  
44 -}  
45 -  
46 -?>  
47 \ No newline at end of file 0 \ No newline at end of file
pacotes/SOAP/Type/ws_ftp.log
@@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
1 -104.04.29 17:57 B R:\mma\webservice\SOAP\Type\dateTime.php --> 200.175.128.131 /var/www/default/AppServer/Mauricio/ws_delphi/SOAP/Type dateTime.php  
2 -104.04.29 17:57 B R:\mma\webservice\SOAP\Type\duration.php --> 200.175.128.131 /var/www/default/AppServer/Mauricio/ws_delphi/SOAP/Type duration.php  
3 -104.04.29 17:57 B R:\mma\webservice\SOAP\Type\hexBinary.php --> 200.175.128.131 /var/www/default/AppServer/Mauricio/ws_delphi/SOAP/Type hexBinary.php  
pacotes/SOAP/cvs/Entries
@@ -1,18 +0,0 @@ @@ -1,18 +0,0 @@
1 -D/example////  
2 -D/Type////  
3 -D/Transport////  
4 -/Message.php/1.1.1.1/Thu Jun 8 16:21:38 2006//  
5 -/Base.php/1.1.1.1/Thu Jun 8 16:21:38 2006//  
6 -/Client.php/1.1.1.1/Thu Jun 8 16:21:38 2006//  
7 -/Fault.php/1.1.1.1/Thu Jun 8 16:21:38 2006//  
8 -/Transport.php/1.1.1.1/Thu Jun 8 16:21:38 2006//  
9 -/Parser.php/1.1.1.1/Thu Jun 8 16:21:38 2006//  
10 -/Server.php/1.1.1.1/Thu Jun 8 16:21:38 2006//  
11 -/easy_parser.inc/1.1.1.1/Tue May 30 19:09:37 2006//  
12 -/Value.php/1.1.1.1/Thu Jun 8 16:21:38 2006//  
13 -/WSDL.php/1.1.1.1/Thu Jun 8 16:21:38 2006//  
14 -/WS_FTP.LOG/1.1.1.1/Tue May 30 19:09:37 2006//  
15 -/globals.php/1.1.1.1/Thu Jun 8 16:21:38 2006//  
16 -/nusoap.php/1.1.1.1/Thu Jun 8 16:21:39 2006//  
17 -/readme.txt/1.1.1.1/Tue May 30 19:09:37 2006//  
18 -/xmlize_inc.php/1.1.1.1/Tue May 30 19:09:37 2006//  
pacotes/SOAP/cvs/Entries.Extra
pacotes/SOAP/cvs/Entries.Extra.Old
@@ -1,15 +0,0 @@ @@ -1,15 +0,0 @@
1 -/Base.php////  
2 -/Client.php////  
3 -/Fault.php////  
4 -/Message.php////  
5 -/Parser.php////  
6 -/Server.php////  
7 -/Transport.php////  
8 -/Value.php////  
9 -/WSDL.php////  
10 -/WS_FTP.LOG////  
11 -/easy_parser.inc////  
12 -/globals.php////  
13 -/nusoap.php////  
14 -/readme.txt////  
15 -/xmlize_inc.php////  
pacotes/SOAP/cvs/Entries.Old
@@ -1,16 +0,0 @@ @@ -1,16 +0,0 @@
1 -/Base.php/1.1.1.1/Tue May 30 19:09:37 2006//  
2 -/Client.php/1.1.1.1/Tue May 30 19:09:37 2006//  
3 -/Fault.php/1.1.1.1/Tue May 30 19:09:37 2006//  
4 -/Message.php/1.1.1.1/Tue May 30 19:09:37 2006//  
5 -/Parser.php/1.1.1.1/Tue May 30 19:09:37 2006//  
6 -/Server.php/1.1.1.1/Tue May 30 19:09:37 2006//  
7 -/Transport.php/1.1.1.1/Tue May 30 19:09:37 2006//  
8 -/Value.php/1.1.1.1/Tue May 30 19:09:37 2006//  
9 -/WSDL.php/1.1.1.1/Tue May 30 19:09:37 2006//  
10 -/WS_FTP.LOG/1.1.1.1/Tue May 30 19:09:37 2006//  
11 -/easy_parser.inc/1.1.1.1/Tue May 30 19:09:37 2006//  
12 -/globals.php/1.1.1.1/Tue May 30 19:09:37 2006//  
13 -/nusoap.php/1.1.1.1/Tue May 30 19:09:37 2006//  
14 -/readme.txt/1.1.1.1/Tue May 30 19:09:37 2006//  
15 -/xmlize_inc.php/1.1.1.1/Tue May 30 19:09:37 2006//  
16 -D  
pacotes/SOAP/cvs/Repository
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -apis/SOAP  
pacotes/SOAP/cvs/Root
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -:ssh;username=06292871800;password=1304034;hostname=10.1.1.65:/repositorio/sistemas  
pacotes/SOAP/example/cvs/Entries
@@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
1 -/stockquote.php/1.1.1.1/Thu Jun 8 16:21:39 2006//  
2 -/WS_FTP.LOG/1.1.1.1/Tue May 30 19:09:37 2006//  
3 -D  
pacotes/SOAP/example/cvs/Entries.Extra
@@ -1,2 +0,0 @@ @@ -1,2 +0,0 @@
1 -/stockquote.php////  
2 -/WS_FTP.LOG////  
pacotes/SOAP/example/cvs/Entries.Extra.Old
pacotes/SOAP/example/cvs/Entries.Old
@@ -1,2 +0,0 @@ @@ -1,2 +0,0 @@
1 -/stockquote.php/1.1.1.1/Thu Jun 8 16:21:39 2006//  
2 -/WS_FTP.LOG/1.1.1.1/Tue May 30 19:09:37 2006//  
pacotes/SOAP/example/cvs/Repository
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -apis/SOAP/example  
pacotes/SOAP/example/cvs/Root
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -:ssh;username=06292871800;password=1304034;hostname=10.1.1.65:/repositorio/sistemas  
pacotes/SOAP/example/stockquote.php
@@ -1,49 +0,0 @@ @@ -1,49 +0,0 @@
1 -<html><body>  
2 -<?  
3 -//  
4 -// +----------------------------------------------------------------------+  
5 -// | PHP Version 4 |  
6 -// +----------------------------------------------------------------------+  
7 -// | Copyright (c) 1997-2002 The PHP Group |  
8 -// +----------------------------------------------------------------------+  
9 -// | This source file is subject to version 2.02 of the PHP license, |  
10 -// | that is bundled with this package in the file LICENSE, and is |  
11 -// | available at through the world-wide-web at |  
12 -// | http://www.php.net/license/2_02.txt. |  
13 -// | If you did not receive a copy of the PHP license and are unable to |  
14 -// | obtain it through the world-wide-web, please send a note to |  
15 -// | license@php.net so we can mail you a copy immediately. |  
16 -// +----------------------------------------------------------------------+  
17 -// | Authors: Shane Caraveo <Shane@Caraveo.com> Port to PEAR and more |  
18 -// | Authors: Dietrich Ayala <dietrich@ganx4.com> Original Author |  
19 -// +----------------------------------------------------------------------+  
20 -//  
21 -// $Id: stockquote.php,v 1.1.1.2 2006/06/08 14:56:40 06292871800 Exp $  
22 -//  
23 -// include soap client class  
24 -include("SOAP/Client.php");  
25 -//include("../Client.php");  
26 -  
27 -print "<br>\n<strong>wsdl:</strong>";  
28 -$soapclient = new SOAP_Client("http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl","wsdl");  
29 -print $soapclient;  
30 -print_r($soapclient->call("getQuote",array("symbol"=>"ibm")));  
31 -print "\n\n";  
32 -  
33 -if (extension_loaded('overload')) {  
34 - print "\n<br><strong>overloaded:</strong>";  
35 - $ret = $soapclient->getQuote("ibm");  
36 - print_r($ret);  
37 - print "\n\n";  
38 -}  
39 -unset($soapclient);  
40 -  
41 -print "\n<br><strong>non wsdl:</strong>";  
42 -$soapclient = new SOAP_Client("http://services.xmethods.net:80/soap");  
43 -$ret = $soapclient->call("getQuote",array("symbol"=>"ibm","urn:xmethods-delayed-quotes","urn:xmethods-delayed-quotes#getQuote"));  
44 -print_r($ret);  
45 -print "\n\n";  
46 -unset($soapclient);  
47 -  
48 -?>  
49 -</html></body>  
pacotes/SOAP/example/ws_ftp.log
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -104.04.29 17:56 B R:\mma\webservice\SOAP\example\stockquote.php --> 200.175.128.131 /var/www/default/AppServer/Mauricio/ws_delphi/SOAP/example stockquote.php