[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gforge-commits] gforge/www/soap index.php, 1.3, 1.4 nusoap.php, 1.4, 1
From: |
lo-lan-do |
Subject: |
[Gforge-commits] gforge/www/soap index.php, 1.3, 1.4 nusoap.php, 1.4, 1.5 |
Date: |
Wed, 15 Dec 2004 11:48:48 -0600 |
Update of /cvsroot/gforge/gforge/www/soap
In directory db.perdue.net:/tmp/cvs-serv5072
Modified Files:
index.php nusoap.php
Log Message:
Hal's patch #1015
Index: index.php
===================================================================
RCS file: /cvsroot/gforge/gforge/www/soap/index.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- index.php 18 Oct 2004 22:43:29 -0000 1.3
+++ index.php 15 Dec 2004 17:48:43 -0000 1.4
@@ -5,28 +5,24 @@
require_once('www/include/BaseLanguage.class');
$uri = 'http://'.$sys_default_domain;
-
// 1. include client and server
require_once('./nusoap.php');
-
+//$debug = true;
// 2. instantiate server object
$server = new soap_server();
//configureWSDL($serviceName,$namespace = false,$endpoint =
false,$style='rpc', $transport = 'http://schemas.xmlsoap.org/soap/http');
-$server->configureWSDL('GForgeAPI',$uri);
+//$server->configureWSDL('GForgeAPI',$uri);
+$server->configureWSDL('GForgeAPI',$uri,false,'rpc','http://schemas.xmlsoap.org/soap/http',$uri);
-// set schema target namespace
-$server->wsdl->schemaTargetNamespace = $uri.'/';
-$server->namespaces['s0'] = $uri;
// add types
-
$server->wsdl->addComplexType(
'ArrayOfstring',
'complexType',
'array',
'',
- '',
+ 'SOAP-ENC:Array',
array(),
- array(array('ref'=>'SOAP-ENC:Array','wsdl:arrayType'=>'string[]')),
+
array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]')),
'xsd:string'
);
@@ -35,24 +31,48 @@
'complexType',
'array',
'',
- '',
+ 'SOAP-ENC:Array',
array(),
- array(array('ref'=>'SOAP-ENC:Array','wsdl:arrayType'=>'integer[]')),
+
array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:integer[]')),
'xsd:integer'
);
+$server->wsdl->addComplexType(
+ 'ArrayOflong',
+ 'complexType',
+ 'array',
+ '',
+ 'SOAP-ENC:Array',
+ array(),
+
array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:long[]')),
+ 'xsd:long'
+);
+
+$server->wsdl->addComplexType(
+ 'ArrayOfint',
+ 'complexType',
+ 'array',
+ '',
+ 'SOAP-ENC:Array',
+ array(),
+ array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:int[]')),
+ 'xsd:int'
+);
+
// session/authentication
$server->register(
'login',
array('userid'=>'xsd:string','passwd'=>'xsd:string'),
array('loginResponse'=>'xsd:string'),
- $uri);
+ $uri,
+ $uri.'#login');
$server->register(
'logout',
- array('$sessionkey'=>'xsd:string'),
+ array('sessionkey'=>'xsd:string'),
array('logoutResponse'=>'xsd:string'),
- $uri);
+ $uri,
+ $uri.'#logout');
//
// Include Group Functions
@@ -98,16 +118,8 @@
*
* @param string The session key
*/
-function continueSession($sessionKey) {
- global $session_ser, $Language;
- $session_ser = $sessionKey;
- session_set();
- $Language=new BaseLanguage();
- $Language->loadLanguage("English"); // TODO use the user's default
language
- setlocale (LC_TIME, $Language->getText('system','locale'));
- $sys_strftimefmt = $Language->getText('system','strftimefmt');
- $sys_datefmt = $Language->getText('system','datefmt');
-
+function continue_session($sessionKey) {
+ session_continue($sessionKey);
}
// session/authentication
@@ -131,10 +143,10 @@
$res = session_login_valid($userid, $passwd);
if (!$res) {
- return new soap_fault('1001', 'user', "Unable to log in with
userid of ".$userid." and password of ".$passwd, 'No Detail');
+ return new soap_fault('1001', 'user', "Unable to log in with
userid of ".$userid." and password of ".$passwd, $feedback);
}
- return new soapval('tns:soapVal','string',$session_ser);
+ return $session_ser;
}
/**
@@ -145,7 +157,7 @@
function logout($sessionkey) {
continueSession($sessionkey);
session_logout();
- return new soapval('tns:soapVal','string',"OK");
+ return "OK";
}
Index: nusoap.php
===================================================================
RCS file: /cvsroot/gforge/gforge/www/soap/nusoap.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- nusoap.php 4 Aug 2003 17:59:41 -0000 1.4
+++ nusoap.php 15 Dec 2004 17:48:43 -0000 1.5
@@ -1,6 +1,7 @@
<?php
/*
+$Id$
NuSOAP - Web Services Toolkit for PHP
@@ -54,16 +55,18 @@
* nusoap_base
*
* @author Dietrich Ayala <address@hidden>
[...5954 lines suppressed...]
+ }
+ $newPath = isset($newCookie['path']) ?
$newCookie['path'] : 'NOPATH';
+ $path = isset($cookie['path']) ?
$cookie['path'] : 'NOPATH';
+ if ($newPath != $path) {
+ continue;
+ }
+ $this->cookies[$i] = $newCookie;
+ $found = true;
+ $this->debug('Update cookie ' . $newName . '='
. $newCookie['value']);
+ break;
+ }
+ if (! $found) {
+ $this->debug('Add cookie ' . $newName . '=' .
$newCookie['value']);
+ $this->cookies[] = $newCookie;
+ }
+ }
+ return true;
+ }
+}
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gforge-commits] gforge/www/soap index.php, 1.3, 1.4 nusoap.php, 1.4, 1.5,
lo-lan-do <=