cvs: pear /Services_Webservice Webservice.php /Services_Webservice/tests test_01.php test_02.php test_03.php test_04.php test_05.php
| From: | Manfred Weber | Date: | Thu, 28 Dec 2006 10:52:33 +0000 |
| Subject: | cvs: pear /Services_Webservice Webservice.php /Services_Webservice/tests test_01.php test_02.php test_03.php test_04.php test_05.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-43866@lists.php.net to get a copy of this message | ||
crafics Thu Dec 28 10:52:33 2006 UTC
Added files:
/pear/Services_Webservice/tests test_03.php test_04.php test_05.php
Modified files:
/pear/Services_Webservice Webservice.php
/pear/Services_Webservice/tests test_01.php test_02.php
Log:
- added new tests
- removed empt line
http://cvs.php.net/viewvc.cgi/pear/Services_Webservice/Webservice.php?r1=1.13&r2=1.14&diff_format=u
Index: pear/Services_Webservice/Webservice.php
diff -u pear/Services_Webservice/Webservice.php:1.13 pear/Services_Webservice/Webservice.php:1.14
--- pear/Services_Webservice/Webservice.php:1.13 Thu Dec 28 10:24:49 2006
+++ pear/Services_Webservice/Webservice.php Thu Dec 28 10:52:33 2006
@@ -22,7 +22,7 @@
* @author Philippe Jausions <Philippe.Jausions@11abacus.com>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: Webservice.php,v 1.13 2006/12/28 10:24:49 crafics Exp $
+ * @version CVS: $Id: Webservice.php,v 1.14 2006/12/28 10:52:33 crafics Exp $
* @link http://dschini.org/Services/
*/
@@ -867,5 +867,4 @@
$this->wsdl_definitions->appendChild($service);
}
}
-
-?>
+?>
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/pear/Services_Webservice/tests/test_01.php?r1=1.4&r2=1.5&diff_format=u
Index: pear/Services_Webservice/tests/test_01.php
diff -u pear/Services_Webservice/tests/test_01.php:1.4
pear/Services_Webservice/tests/test_01.php:1.5
--- pear/Services_Webservice/tests/test_01.php:1.4 Mon Aug 29 15:15:45 2005
+++ pear/Services_Webservice/tests/test_01.php Thu Dec 28 10:52:33 2006
@@ -1,101 +1,26 @@
-<?PHP
-
+<?php
include_once('Services/Webservice.php');
-/**
- * My first service with PEAR::Services_Webservice,
- * it rocks!
- *
- * Long description of service
- */
-class myService
-{
-
- /**
- * This function prints out "hello!"
- * We also added a DOM-node to the WSDL-file
- * portType-operation-documentation.
- *
- * What about multiline comments?
- * I am a long description of the operation
- *
- * @param int
- * @param string[][]
- * @param classB
- * @return classC[][][]
- */
- public function hello($i, $j, classB $k)
- {
- }
-
- /**
- * This function prints out hello2
- *
- * @param int
- * @param string[][]
- * @param classB[][][]
- * @param classC
- */
- public function hello2($a, $b, $c, $d)
- {
- }
-
- /**
- * @deprecated
- * @return string
- */
- public function failMe() {
- }
-
-}
-class classB
+class myService extends Services_Webservice
{
- /**
- * 3D coordinates
- * @var int[][][]
- */
- public $a;
- /**
- * @var classC[][][]
- */
- public $b;
+ /**
+ * Says "Hello!"
+ *
+ * @param int
+ * @return string
+ */
+ public function hello($i )
+ {
+ //create some logic here
+ return 'myString';
+ }
}
-class classC
-{
- /**
- * Ah ha!
- * @var classD
- */
- public $a;
-}
-class classD
-{
- /**
- * Use "c" instead
- * @var classE[][][][]
- * @deprecated
- */
- public $a;
- /**
- * @var classE[][][][]
- * @webservice.hidden
- */
- public $b;
- /**
- * @var int[][][][]
- */
- public $c;
-}
-class classE
-{
- /**
- * @var int
- */
- public $a;
-}
-
-$myService =& Services_Webservice::factory('SOAP', 'myService', "http://example.org", array('uri' => 'http://example.org', 'encoding' =>
SOAP_ENCODED));
-$myService->handle();
+$myService = new myService(
+ 'myService',
+ 'example webservice description',
+ array('uri' => 'myService', 'encoding' =>
SOAP_ENCODED,'soap_version' => SOAP_1_2)
+);
+$myService->handle();
+?>
-?>
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/pear/Services_Webservice/tests/test_02.php?r1=1.1&r2=1.2&diff_format=u
Index: pear/Services_Webservice/tests/test_02.php
diff -u pear/Services_Webservice/tests/test_02.php:1.1
pear/Services_Webservice/tests/test_02.php:1.2
--- pear/Services_Webservice/tests/test_02.php:1.1 Tue Nov 14 22:17:45 2006
+++ pear/Services_Webservice/tests/test_02.php Thu Dec 28 10:52:33 2006
@@ -15,11 +15,11 @@
return 'myString';
}
}
-
+
$myService = new myService(
- 'myService',
- 'example webservice description',
- array('uri' => 'myService', 'encoding' =>
SOAP_ENCODED,'soap_version' => SOAP_1_2)
+ 'myService',
+ 'example webservice description',
+ array('uri' => 'myService', 'encoding' =>
SOAP_ENCODED,'soap_version' => SOAP_1_2)
);
-$myService->handle();
-?>
+$myService->handle();
+?>
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/pear/Services_Webservice/tests/test_03.php?view=markup&rev=1.1
Index: pear/Services_Webservice/tests/test_03.php
+++ pear/Services_Webservice/tests/test_03.php
<?php
include_once('Services/Webservice.php');
class classB
{
/**
* @var string
*/
public $c;
public function __construct($c)
{
$this->c=$c;
}
}
class myService extends Services_Webservice
{
/**
* Says "Hello!"
*
* @param int
* @param string
* @return classB
*/
public function hello($i, $j )
{
//create some logic here
return new SoapVar(new ClassB('myString'),
SOAP_ENC_OBJECT,
'classB',
'urn:myService');
}
}
$myService = new myService(
'myService',
'example webservice description',
array('uri' => 'myService', 'encoding' =>
SOAP_ENCODED,'soap_version' => SOAP_1_2)
);
$myService->handle();
?>
http://cvs.php.net/viewvc.cgi/pear/Services_Webservice/tests/test_04.php?view=markup&rev=1.1
Index: pear/Services_Webservice/tests/test_04.php
+++ pear/Services_Webservice/tests/test_04.php
<?php
include_once('Services/Webservice.php');
class myService extends Services_Webservice
{
/**
* Says "Hello!"
*
* @param int[]
* @return string[]
*/
public function hello($i)
{
$strArray = array();
$strArray[] = $i[0].'a';
$strArray[] = $i[1].'b';
$strArray[] = $i[2].'c';
$strArray[] = $i[3].'d';
$strArray[] = $i[4].'e';
return $strArray;
}
}
$myService = new myService(
'myService',
'example webservice description',
array('uri' => 'myService', 'encoding' =>
SOAP_ENCODED,'soap_version' => SOAP_1_2)
);
$myService->handle();
?>
http://cvs.php.net/viewvc.cgi/pear/Services_Webservice/tests/test_05.php?view=markup&rev=1.1
Index: pear/Services_Webservice/tests/test_05.php
+++ pear/Services_Webservice/tests/test_05.php
<?php
include_once('Services/Webservice.php');
class classB
{
/**
* @var int[]
*/
public $i;
public function __construct()
{
$this->i = array(1,2,3,4,5);
}
}
class myService extends Services_Webservice
{
/**
* Says "Hello!"
*
* @return classB[]
*/
public function hello()
{
//create some business logic here
$classB[] = new SoapVar(new
ClassB(),SOAP_ENC_OBJECT,'classB','urn:myService');
return $classB;
}
}
$myService = new myService(
'myService',
'example webservice description',
array('uri' => 'myService', 'encoding' =>
SOAP_ENCODED,'soap_version' => SOAP_1_2)
);
$myService->handle();
?>